From a74adc5dc9bfbbd87c308aa040b605e4160e0d17 Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Sat, 23 Sep 2023 12:35:22 +0700 Subject: fix bug pricelist --- indoteknik_custom/models/product_template.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'indoteknik_custom') diff --git a/indoteknik_custom/models/product_template.py b/indoteknik_custom/models/product_template.py index ed722d5e..d35188b4 100755 --- a/indoteknik_custom/models/product_template.py +++ b/indoteknik_custom/models/product_template.py @@ -193,13 +193,7 @@ class ProductTemplate(models.Model): def _compute_web_price(self): for template in self: - # product = self.env['product.product'].search([('product_tmpl_id', '=', template.id)], limit=1) - - product_pricelist_item = self.env['product.pricelist.item'].search([ - ('pricelist_id', '=', 1), - ('product_id', '=', template.product_variant_id.id)], limit=1) - price = product_pricelist_item.fixed_price - template.web_price = price + template.web_price = template.product_variant_ids[0].web_price def _have_promotion_program(self): for template in self: -- cgit v1.2.3