diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2023-10-05 10:07:40 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2023-10-05 10:07:40 +0700 |
| commit | c452ac57ec1266452d04bbf4c38191aaa6630186 (patch) | |
| tree | 9fa8cf32c6d7ffb40a34877ef962b16f6cbfd499 /indoteknik_custom/models | |
| parent | b2c16c315455f5f1f7cc60c474435c6b9e965e40 (diff) | |
Add price context for get product price API
Diffstat (limited to 'indoteknik_custom/models')
| -rw-r--r-- | indoteknik_custom/models/solr/product_product.py | 2 | ||||
| -rw-r--r-- | indoteknik_custom/models/solr/product_template.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/indoteknik_custom/models/solr/product_product.py b/indoteknik_custom/models/solr/product_product.py index 16135e5e..20a68b47 100644 --- a/indoteknik_custom/models/solr/product_product.py +++ b/indoteknik_custom/models/solr/product_product.py @@ -134,7 +134,7 @@ class ProductProduct(models.Model): def solr_results(self): solr_model = self.env['apache.solr'] - pricelist = self.env.user_pricelist + pricelist = self.env.context.get('user_pricelist') price_tier = pricelist.get_tier_name() results = [] diff --git a/indoteknik_custom/models/solr/product_template.py b/indoteknik_custom/models/solr/product_template.py index e39530a7..30c3b3c5 100644 --- a/indoteknik_custom/models/solr/product_template.py +++ b/indoteknik_custom/models/solr/product_template.py @@ -157,7 +157,7 @@ class ProductTemplate(models.Model): def solr_results(self, detail=False): solr_model = self.env['apache.solr'] - pricelist = self.env.user_pricelist + pricelist = self.env.context.get('user_pricelist') price_tier = pricelist.get_tier_name() results = [] |
