diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2023-09-25 09:46:48 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2023-09-25 09:46:48 +0700 |
| commit | 447b8587ff5203e7ee0b27967bf27d2e4bf9ab48 (patch) | |
| tree | 90f97e2d26c9278dda304e939414c32c271e946d | |
| parent | a74adc5dc9bfbbd87c308aa040b605e4160e0d17 (diff) | |
add attribute account move line user can't create analytic tags on line, add level to manufacture solr
| -rw-r--r-- | indoteknik_custom/models/solr/apache_solr.py | 4 | ||||
| -rw-r--r-- | indoteknik_custom/models/solr/x_manufactures.py | 5 | ||||
| -rw-r--r-- | indoteknik_custom/views/account_move_line.xml | 1 | ||||
| -rw-r--r-- | indoteknik_custom/views/apache_solr_queue.xml | 2 |
4 files changed, 9 insertions, 3 deletions
diff --git a/indoteknik_custom/models/solr/apache_solr.py b/indoteknik_custom/models/solr/apache_solr.py index eb02cb57..5acfded8 100644 --- a/indoteknik_custom/models/solr/apache_solr.py +++ b/indoteknik_custom/models/solr/apache_solr.py @@ -213,6 +213,8 @@ class ApacheSolr(models.Model): end_time = time.time() _logger.info("[SYNC_PRODUCT_TO_SOLR] Finish task add to solr. Time taken: {:.6f} seconds".format(end_time - start_time)) + return True + def _test_product_price(self, product_id=228178): product = self.env['product.product'].search([('id', '=', product_id)], limit=1) _logger.info('price incl tax: %s' % product._get_website_price_include_tax()) @@ -287,3 +289,5 @@ class ApacheSolr(models.Model): _variants_solr.add(documents) end_time = time.time() _logger.info("[SYNC_VARIANTS_TO_SOLR] Finish task add to solr. Time taken: {:.6f} seconds".format(end_time - start_time)) + + return False diff --git a/indoteknik_custom/models/solr/x_manufactures.py b/indoteknik_custom/models/solr/x_manufactures.py index c0c321e4..375b7708 100644 --- a/indoteknik_custom/models/solr/x_manufactures.py +++ b/indoteknik_custom/models/solr/x_manufactures.py @@ -44,10 +44,11 @@ class XManufactures(models.Model): 'sequence_i': brands.sequence or '', 'negara_asal_s': brands.x_negara_asal or '', 'short_desc_s': brands.x_short_desc or '', + 'level_s': brands.x_manufacture_level or '', 'image_s': self.env['ir.attachment'].api_image('x_manufactures', 'x_logo_manufacture', brands.id), 'produk_aksesoris_sparepart_s': brands.x_produk_aksesoris_sparepart or '', - 'categories': [x.id for x in brands.category_ids], - 'banners': [x.id for x in brands.x_manufactures_banners], + 'category_ids': [x.id for x in brands.category_ids], + 'banner_ids': [x.id for x in brands.x_manufactures_banners], }) self.solr().add([document]) brands.update_last_update_solr() diff --git a/indoteknik_custom/views/account_move_line.xml b/indoteknik_custom/views/account_move_line.xml index 5b5f73cd..02b936f1 100644 --- a/indoteknik_custom/views/account_move_line.xml +++ b/indoteknik_custom/views/account_move_line.xml @@ -11,6 +11,7 @@ </xpath> <xpath expr="//page[@id='aml_tab']/field[@name='line_ids']/tree/field[@name='analytic_tag_ids']" position="attributes"> <attribute name="groups"/> + <attribute name="options">{'no_create': True}</attribute> </xpath> </field> </record> diff --git a/indoteknik_custom/views/apache_solr_queue.xml b/indoteknik_custom/views/apache_solr_queue.xml index 56ab2713..3861fd20 100644 --- a/indoteknik_custom/views/apache_solr_queue.xml +++ b/indoteknik_custom/views/apache_solr_queue.xml @@ -3,7 +3,7 @@ <field name="name">apache.solr.queue.tree</field> <field name="model">apache.solr.queue</field> <field name="arch" type="xml"> - <tree editable="top" default_order="execute_date desc"> + <tree editable="top" default_order="create_date desc"> <field name="display_name" readonly="1" /> <field name="res_model" readonly="1" /> <field name="res_id" readonly="1" /> |
