[IMP] stock_account: improve UserError for products without a cost

This commit is contained in:
dbh
2017-09-25 19:29:14 -07:00
committed by Joren Van Onder
parent 6227212977
commit 0510970d12
+1 -1
View File
@@ -389,7 +389,7 @@ class StockMove(models.Model):
# check that all data is correct
if self.company_id.currency_id.is_zero(debit_value):
raise UserError(_("The found valuation amount for product %s is zero. Which means there is probably a configuration error. Check the costing method and the standard price") % (self.product_id.name,))
raise UserError(_("The cost of %s is currently equal to 0. Change the cost or the configuration of your product to avoid an incorrect valuation.") % (self.product_id.name,))
credit_value = debit_value
if self.product_id.cost_method == 'average' and self.company_id.anglo_saxon_accounting: