summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2024-09-03 09:03:29 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2024-09-03 09:03:29 +0700
commitc9621e309e9b9db20ac01359b9369fa2d2a32024 (patch)
tree6a0cc198e80691d949d6cef962d3ef77373f2402
parent8dab99ed68d5fdc3a47bcd2cd349cad1d93fd53d (diff)
cr solr
-rw-r--r--indoteknik_custom/models/solr/product_template.py4
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)