diff options
| -rw-r--r-- | indoteknik_custom/models/solr/product_template.py | 4 |
1 files 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) |
