diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2023-03-30 10:35:19 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2023-03-30 10:35:19 +0700 |
| commit | 59f9937dd87deb4e3a1a4e061e0d773b408ead5f (patch) | |
| tree | 171b7c1f904f12999a166dc8cac0bf8122c81991 | |
| parent | 534dd15d461f7e1aa83f31f24dcd953f69c2c113 (diff) | |
add manufacture name in solr
| -rw-r--r-- | indoteknik_custom/models/apache_solr.py | 3 |
1 files changed, 2 insertions, 1 deletions
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, |
