From fc39c30330bca78b4e5aca78dea782b1ae3ef7b4 Mon Sep 17 00:00:00 2001 From: Korbinian Preisler Date: Mon, 12 Oct 2009 20:44:05 +0200 Subject: [PATCH] fix domain of accounts for issue1226 --- tax.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tax.py b/tax.py index b9ec0bb007..0beac79e8d 100644 --- a/tax.py +++ b/tax.py @@ -618,13 +618,15 @@ class Tax(ModelSQL, ModelView): company = fields.Many2One('company.company', 'Company', required=True, domain=["('id', '=', context.get('company', 0))"]) invoice_account = fields.Many2One('account.account', 'Invoice Account', - domain=["('company', '=', company)"], + domain=["('company', '=', company)", + ('kind', '!=', 'view')], states={ 'readonly': "type == 'none' or not company", 'required': "type != 'none' and company", }, depends=['company']) credit_note_account = fields.Many2One('account.account', 'Credit Note Account', - domain=["('company', '=', company)"], + domain=["('company', '=', company)", + ('kind', '!=', 'view')], states={ 'readonly': "type == 'none' or not company", 'required': "type != 'none' and company",