[REF] stock_account: warn when changing cost method

This commit is contained in:
Simon Lejeune
2017-11-28 15:17:59 +01:00
parent 5851a69aa3
commit 0ca4b0f373
+10
View File
@@ -234,3 +234,13 @@ class ProductCategory(models.Model):
'account.account', 'Stock Valuation Account', company_dependent=True,
domain=[('deprecated', '=', False)],
help="When real-time inventory valuation is enabled on a product, this account will hold the current value of the products.",)
@api.onchange('property_cost_method')
def onchange_property_valuation(self):
return {
'warning': {
'title': _("Warning"),
'message': _("Changing your cost method is an important change that will impact your inventory valuation. Are you sure you want to make that change?"),
}
}