[FIX] stock_account: onchange on product category

Don't warn when creating a product category. Related to rev 0ca4b0f373
This commit is contained in:
Simon Lejeune
2017-12-12 16:39:19 +01:00
parent fda755b885
commit ac4155c8dc
+3
View File
@@ -237,6 +237,9 @@ class ProductCategory(models.Model):
@api.onchange('property_cost_method')
def onchange_property_valuation(self):
if not self._origin:
# don't display the warning when creating a product category
return
return {
'warning': {
'title': _("Warning"),