diff options
| -rw-r--r-- | indoteknik_custom/models/solr/apache_solr_queue.py | 10 | ||||
| -rw-r--r-- | indoteknik_custom/views/apache_solr_queue.xml | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/indoteknik_custom/models/solr/apache_solr_queue.py b/indoteknik_custom/models/solr/apache_solr_queue.py index f8c57919..02ad5bb8 100644 --- a/indoteknik_custom/models/solr/apache_solr_queue.py +++ b/indoteknik_custom/models/solr/apache_solr_queue.py @@ -39,6 +39,16 @@ class ApacheSolrQueue(models.Model): if elapsed_time > max_exec_time: break rec.execute_queue() + + def open_target_record(self): + return { + 'name': '', + 'view_mode': 'form', + 'res_model': self.res_model, + 'target': 'current', + 'type': 'ir.actions.act_window', + 'res_id': self.res_id + } def execute_queue(self): for rec in self: diff --git a/indoteknik_custom/views/apache_solr_queue.xml b/indoteknik_custom/views/apache_solr_queue.xml index 8de9eb46..7577e569 100644 --- a/indoteknik_custom/views/apache_solr_queue.xml +++ b/indoteknik_custom/views/apache_solr_queue.xml @@ -4,6 +4,7 @@ <field name="model">apache.solr.queue</field> <field name="arch" type="xml"> <tree editable="top" default_order="create_date desc"> + <button type="object" name="open_target_record" class="fa fa-external-link" /> <field name="id" readonly="1" /> <field name="display_name" readonly="1" /> <field name="res_model" readonly="1" /> |
