summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafi Zadanly <zadanlyr@gmail.com>2023-04-03 15:27:24 +0700
committerRafi Zadanly <zadanlyr@gmail.com>2023-04-03 15:27:24 +0700
commit760830d22f2e060e4038c3a06515f920ea251abd (patch)
treeb6dfbc915fdaf329f92208ae23a6bd3bd0017ab3
parent4cbb23cd48f70788d440a55b552b6fa3be44ddfe (diff)
add category, manufacture field apache solr
-rw-r--r--indoteknik_custom/models/apache_solr.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/indoteknik_custom/models/apache_solr.py b/indoteknik_custom/models/apache_solr.py
index 4cab66ec..cbc63a1e 100644
--- a/indoteknik_custom/models/apache_solr.py
+++ b/indoteknik_custom/models/apache_solr.py
@@ -65,10 +65,12 @@ class ApacheSolr(models.Model):
'weight_f': template.weight,
'manufacture_id_i': template.x_manufacture.id or 0,
'manufacture_name_s': template.x_manufacture.x_name or '',
+ 'manufacture_name': 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,
- 'category_name_s': template.categ_id.name,
+ 'category_name_s': template.categ_id.name or '',
+ 'category_name': template.categ_id.name or '',
'variants_name_t': variants_name,
'variants_code_t': variants_code,
'search_rank_i': template.search_rank,