diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2023-09-23 12:35:22 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2023-09-23 12:35:22 +0700 |
| commit | a74adc5dc9bfbbd87c308aa040b605e4160e0d17 (patch) | |
| tree | 22712130c098997acabdc932aa7bad875c2347ca /indoteknik_custom | |
| parent | eb765ba62294f05434bb8741050919dab11f165a (diff) | |
fix bug pricelist
Diffstat (limited to 'indoteknik_custom')
| -rwxr-xr-x | indoteknik_custom/models/product_template.py | 8 |
1 files changed, 1 insertions, 7 deletions
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: |
