diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2024-02-16 11:43:08 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2024-02-16 11:43:08 +0700 |
| commit | 3861a02e3080d75b507ad9a763fa7f635b463ec8 (patch) | |
| tree | f1397bd3978114f52f10bf64435bc45c709ec2b3 | |
| parent | 03ba190bca443625075ddbd637d895bfc1a27fcd (diff) | |
Add description on apache solr queue
| -rw-r--r-- | indoteknik_custom/models/solr/apache_solr_queue.py | 4 | ||||
| -rw-r--r-- | indoteknik_custom/views/apache_solr_queue.xml | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/indoteknik_custom/models/solr/apache_solr_queue.py b/indoteknik_custom/models/solr/apache_solr_queue.py index 07274295..f8c57919 100644 --- a/indoteknik_custom/models/solr/apache_solr_queue.py +++ b/indoteknik_custom/models/solr/apache_solr_queue.py @@ -18,6 +18,7 @@ class ApacheSolrQueue(models.Model): ('not_found', 'Record not found') ], 'Execute Status') execute_date = fields.Datetime('Execute Date') + description = fields.Text('Description') def _compute_display_name(self): for rec in self: @@ -57,7 +58,8 @@ class ApacheSolrQueue(models.Model): rec.execute_status = 'success' else: rec.execute_status = 'not_found' - except: + except Exception as e: + rec.description = e rec.execute_status = 'failed' rec.execute_date = datetime.utcnow() self.env.cr.commit() diff --git a/indoteknik_custom/views/apache_solr_queue.xml b/indoteknik_custom/views/apache_solr_queue.xml index 13869b4c..8de9eb46 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"> + <field name="id" readonly="1" /> <field name="display_name" readonly="1" /> <field name="res_model" readonly="1" /> <field name="res_id" readonly="1" /> |
