From 55e588cc2cfda5f9ba79c747dbdbcdaf928191c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sun, 26 Jan 2020 21:32:38 +0100 Subject: [PATCH] Add missing gettext call when raising ProductCostPriceError issue8930 --- product.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/product.py b/product.py index 619ac5bcb9..984ad4d18c 100644 --- a/product.py +++ b/product.py @@ -815,10 +815,10 @@ class CostPriceRevision(ModelSQL, ModifyCostPriceStart): raise ValueError except Exception as exception: raise ProductCostPriceError( - 'stock.msg_invalid_cost_price', - cost_price=self.cost_price, - product=self.product.rec_name, - exception=exception) from exception + gettext('stock.msg_invalid_cost_price', + cost_price=self.cost_price, + product=self.product.rec_name, + exception=exception)) from exception def get_cost_price(self, cost_price, **context): context.setdefault('names', {})['cost_price'] = cost_price