From 59f9937dd87deb4e3a1a4e061e0d773b408ead5f Mon Sep 17 00:00:00 2001 From: stephanchrst Date: Thu, 30 Mar 2023 10:35:19 +0700 Subject: add manufacture name in solr --- indoteknik_custom/models/apache_solr.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/indoteknik_custom/models/apache_solr.py b/indoteknik_custom/models/apache_solr.py index abdb1d50..63b332a5 100644 --- a/indoteknik_custom/models/apache_solr.py +++ b/indoteknik_custom/models/apache_solr.py @@ -56,7 +56,7 @@ class ApacheSolr(models.Model): 'id': template.id, 'display_name_s': template.display_name, 'name_s': template.name, - 'default_code_s': template.default_code, + 'default_code_s': template.default_code or '', 'product_rating_f': template.product_rating, 'product_id_i': template.id, 'image_s': self.env['ir.attachment'].api_image('product.template', 'image_512', template.id), @@ -68,6 +68,7 @@ class ApacheSolr(models.Model): 'stock_total_f': template.qty_stock_vendor, 'weight_f': template.weight, 'manufacture_id_i': template.x_manufacture.id or 0, + 'manufacture_name_s': template.x_manufacture.x_name or '', 'image_promotion_1_s': self.env['ir.attachment'].api_image('x_manufactures', 'image_promotion_1', template.x_manufacture.id), 'image_promotion_2_s': self.env['ir.attachment'].api_image('x_manufactures', 'image_promotion_2', template.x_manufacture.id), 'category_id_i': template.categ_id.id or 0, -- cgit v1.2.3