From 378181cba7dd93f825b7dc1295c1b182a3d311a6 Mon Sep 17 00:00:00 2001 From: Juan Jose Scarafia Date: Sat, 8 Aug 2020 21:57:01 -0300 Subject: [PATCH] [FIX] product: add missing dep ctx on price This depends context was missing and getting the price of product.tempalte for different pricelist was not working. We use the same depends_context as in product.product _compute_product_price --- addons/product/models/product_template.py | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/product/models/product_template.py b/addons/product/models/product_template.py index 64aebb3f8c745..7c454ed1ca7ed 100644 --- a/addons/product/models/product_template.py +++ b/addons/product/models/product_template.py @@ -188,6 +188,7 @@ def _compute_currency_id(self): def _compute_cost_currency_id(self): self.cost_currency_id = self.env.company.currency_id.id + @api.depends_context('pricelist', 'partner', 'quantity', 'uom', 'date', 'no_variant_attributes_price_extra') def _compute_template_price(self): prices = self._compute_template_price_no_inverse() for template in self: