diff options
| -rwxr-xr-x | indoteknik_custom/models/product_template.py | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/indoteknik_custom/models/product_template.py b/indoteknik_custom/models/product_template.py index da1a111f..d8a2aae2 100755 --- a/indoteknik_custom/models/product_template.py +++ b/indoteknik_custom/models/product_template.py @@ -188,12 +188,7 @@ class ProductTemplate(models.Model): def _compute_web_price(self): for template in self: - products = self.env['product.product'].search([ - ('product_tmpl_id', '=', template.id), - ('active', 'in', [True, False]) - ]) - for variants in products: - template.web_price = variants[0].web_price + template.web_price = template.product_variant_id.web_price def _have_promotion_program(self): for template in self: |
