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 /indoteknik_custom/models | |
| parent | a74adc5dc9bfbbd87c308aa040b605e4160e0d17 (diff) | |
add attribute account move line user can't create analytic tags on line, add level to manufacture solr
Diffstat (limited to 'indoteknik_custom/models')
| -rw-r--r-- | indoteknik_custom/models/solr/apache_solr.py | 4 | ||||
| -rw-r--r-- | indoteknik_custom/models/solr/x_manufactures.py | 5 |
2 files changed, 7 insertions, 2 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() |
