summaryrefslogtreecommitdiff
path: root/indoteknik_api/models
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2024-11-18 15:41:41 +0700
committerit-fixcomart <it@fixcomart.co.id>2024-11-18 15:41:41 +0700
commit862e7b97028104e69ab500bf354a7c1b85854e4a (patch)
tree542e873a56980cde2fabc847e13fb1eb3d8f2b18 /indoteknik_api/models
parent34c6611b059cf6ea79bb78e359b973719848f09b (diff)
<iman> update code avoid error
Diffstat (limited to 'indoteknik_api/models')
-rw-r--r--indoteknik_api/models/product_product.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/indoteknik_api/models/product_product.py b/indoteknik_api/models/product_product.py
index 386ddb6a..f8869c7d 100644
--- a/indoteknik_api/models/product_product.py
+++ b/indoteknik_api/models/product_product.py
@@ -61,8 +61,9 @@ class ProductProduct(models.Model):
price_for = self.env.context.get('price_for', 'odoo')
pricelist = pricelist or self.env.context.get('user_pricelist')
default_price_tier = '1_v2'
-
- price_tier = pricelist.get_tier_level()
+ price_tier = []
+ if pricelist:
+ price_tier = pricelist.get_tier_level()
price_tier = price_tier if price_tier else default_price_tier
pricelist = self._get_pricelist_tier(price_tier)