changeset d93f693d2df1 in modules/account:default
details: https://hg.tryton.org/modules/account?cmd=changeset;node=d93f693d2df1
description:
Make group invisible on tax template with parent
This copies the behavior of tax.
issue9444
review325661002
diffstat:
tax.py | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diffs (17 lines):
diff -r 1f2e3a57e0fd -r d93f693d2df1 tax.py
--- a/tax.py Thu Jul 09 10:21:05 2020 +0100
+++ b/tax.py Mon Jul 13 21:19:44 2020 +0200
@@ -475,7 +475,12 @@
__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),