From 6b59779b4598d07766720657af3e3cf053b36cd2 Mon Sep 17 00:00:00 2001 From: Quentin Date: Wed, 14 Jan 2009 14:01:37 +0100 Subject: [PATCH] [FIX] lp:315408 Added domain [('type','!=','view')] on default_debit_account_id and default_credit_account_id fields of account_journal lp bug: https://launchpad.net/bugs/315408 fixed bzr revid: qdp@jade-20090114130137-ok0pnyde622gohgj --- addons/account/account.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account/account.py b/addons/account/account.py index c249e704f81..9ae28c4ab1f 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -448,8 +448,8 @@ class account_journal(osv.osv): 'active': fields.boolean('Active'), 'view_id': fields.many2one('account.journal.view', 'View', required=True, help="Gives the view used when writing or browsing entries in this journal. The view tell Open ERP which fields should be visible, required or readonly and in which order. You can create your own view for a faster encoding in each journal."), - 'default_credit_account_id': fields.many2one('account.account', 'Default Credit Account'), - 'default_debit_account_id': fields.many2one('account.account', 'Default Debit Account'), + 'default_credit_account_id': fields.many2one('account.account', 'Default Credit Account', domain="[('type','!=','view')]"), + 'default_debit_account_id': fields.many2one('account.account', 'Default Debit Account', domain="[('type','!=','view')]"), 'centralisation': fields.boolean('Centralised counterpart', help="Check this box if you want that each entry doesn't create a counterpart but share the same counterpart for each entry of this journal. This is used in fiscal year closing."), 'update_posted': fields.boolean('Allow Cancelling Entries'), 'group_invoice_lines': fields.boolean('Group invoice lines', help="If this box is cheked, the system will try to group the accouting lines when generating them from invoices."),