Clear account properties on category when accounting is unchecked
issue10024 review335921002
This commit is contained in:
1 parent
5d981aa53c
commit
79611f0e1c
1 file changed
+6
@@ -36,6 +36,12 @@ class Category(metaclass=PoolMeta):
|
||||
def account_cogs_used(self):
|
||||
pass
|
||||
|
||||
@fields.depends('accounting', 'account_cogs')
|
||||
def on_change_accounting(self):
|
||||
super().on_change_accounting()
|
||||
if not self.accounting:
|
||||
self.account_cogs = None
|
||||
|
||||
|
||||
class CategoryAccount(metaclass=PoolMeta):
|
||||
__name__ = 'product.category.account'
|
||||
|
||||
Reference in new issue
Block a user