[IMP] stock_account: improve UserError for products without a cost
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user