summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafi Zadanly <zadanlyr@gmail.com>2024-02-17 11:13:09 +0700
committerRafi Zadanly <zadanlyr@gmail.com>2024-02-17 11:13:09 +0700
commitfd275ea8c25246e349ae3e177ac6d0acdda249c6 (patch)
treefb7988ced25691b9217d2439996e0bc0e83e9c3d
parent0f3132ffb296dd64015581ba7bbf13f1f6761d7c (diff)
Add open target record on apache solr queue
-rw-r--r--indoteknik_custom/models/solr/apache_solr_queue.py10
-rw-r--r--indoteknik_custom/views/apache_solr_queue.xml1
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" />