From c9621e309e9b9db20ac01359b9369fa2d2a32024 Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Tue, 3 Sep 2024 09:03:29 +0700 Subject: cr solr --- indoteknik_custom/models/solr/product_template.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indoteknik_custom/models/solr/product_template.py b/indoteknik_custom/models/solr/product_template.py index 2e34befe..9c5dc73e 100644 --- a/indoteknik_custom/models/solr/product_template.py +++ b/indoteknik_custom/models/solr/product_template.py @@ -128,7 +128,7 @@ class ProductTemplate(models.Model): if not document.get('has_price_info_b'): template._sync_price_to_solr() - def get_category_hierarchy_ids(category_id, env): + def get_category_hierarchy_ids(self, category_id): """ Function to get category hierarchy IDs including the category itself and its parents. @@ -143,7 +143,7 @@ class ProductTemplate(models.Model): def traverse_category(cat_id): # Retrieve category object based on ID - category = env['product.category'].browse(cat_id) + category = self.env['product.public.category'].browse(cat_id) # Add the current category ID to the list category_ids.append(category.id) -- cgit v1.2.3