diff --git a/product.py b/product.py index f640874485..8b9ecd71f2 100644 --- a/product.py +++ b/product.py @@ -13,8 +13,12 @@ class Category(ModelSQL, ModelView): ('company', '=', Eval('context', {}).get('company', 0)), ], states={ - 'invisible': ~Eval('context', {}, ).get('company'), - })) + 'invisible': (~Eval('context', {}, ).get('company') + | Eval('account_parent')), + }, + depends=['account_parent'])) + account_cogs_used = fields.Function(fields.Many2One('account.account', + 'Account Cost of Goods Sold Used'), 'get_account') Category()