[FIX] stock_account: onchange on product category
Don't warn when creating a product category. Related to rev 0ca4b0f373
This commit is contained in:
@@ -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"),
|
||||
|
||||
Reference in New Issue
Block a user