Make group invisible on tax template with parent

This copies the behavior of tax.

issue9444
review325661002
This commit is contained in:
Cédric Krier
2020-07-13 21:19:44 +02:00
parent a9752a8df7
commit 002edc557f
+6 -1
View File
@@ -475,7 +475,12 @@ class TaxTemplate(sequence_ordered(), ModelSQL, ModelView, DeactivableMixin):
__name__ = 'account.tax.template'
name = fields.Char('Name', required=True)
description = fields.Char('Description', required=True)
group = fields.Many2One('account.tax.group', 'Group')
group = fields.Many2One(
'account.tax.group', 'Group',
states={
'invisible': Bool(Eval('parent')),
},
depends=['parent'])
start_date = fields.Date('Starting Date')
end_date = fields.Date('Ending Date')
amount = fields.Numeric('Amount', digits=(16, 8),