From e2f7e0dfaab83c2d3c53698b7e2e748d569f1937 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 17 Jun 2008 19:38:32 +0200 Subject: [PATCH] Hide balance_sheet and income_statement for non root type --- account.py | 8 ++++++-- account.xml | 6 +++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/account.py b/account.py index b89970bafa..83f5887d63 100644 --- a/account.py +++ b/account.py @@ -31,8 +31,12 @@ class Type(OSV): help='Use to order the account type') #TODO fix digits depend of the currency amount = fields.Function('get_amount', digits=(16, 2), string='Amount') - balance_sheet = fields.Boolean('Balance Sheet') - income_statement = fields.Boolean('Income Statement') + balance_sheet = fields.Boolean('Balance Sheet', states={ + 'invisible': "parent", + }) + income_statement = fields.Boolean('Income Statement', states={ + 'invisible': "parent", + }) display_balance = fields.Selection([ ('debit-credit', 'Debit - Credit'), ('credit-debit', 'Credit - Debit'), diff --git a/account.xml b/account.xml index 15fdbca389..87e6dc4779 100644 --- a/account.xml +++ b/account.xml @@ -43,14 +43,14 @@