Add missing gettext call when raising ProductCostPriceError

issue8930
This commit is contained in:
Cédric Krier
2020-01-26 21:32:38 +01:00
parent d7c5c6b75a
commit 55e588cc2c
+4 -4
View File
@@ -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