From cd342a9bae37c5563d21320bf1b3c7a267ae56f2 Mon Sep 17 00:00:00 2001 From: qdp Date: Tue, 2 Dec 2008 15:51:56 +0100 Subject: [PATCH] *removed dummy test on write of account_move_line (Both Credit and Debit cannot be zero!: Wrong Accounting Entry!) bzr revid: qdp@tinyerp.com-20081202145156-q83ophwr2cwcweei --- addons/account/account_move_line.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py index 21f5b96848b..453ec9e9067 100644 --- a/addons/account/account_move_line.py +++ b/addons/account/account_move_line.py @@ -692,17 +692,7 @@ class account_move_line(osv.osv): def write(self, cr, uid, ids, vals, context=None, check=True, update_check=True): if not context: context={} - raise_ex=False - if ('debit' in vals and 'credit' in vals) and not vals['debit'] and not vals['credit']: - raise_ex=True - if ('debit' in vals and 'credit' not in vals) and not vals['debit']: - raise_ex=True - if ('credit' in vals and 'debit' not in vals) and not vals['credit']: - raise_ex=True - - if raise_ex: - raise osv.except_osv(_('Wrong Accounting Entry!'), _('Both Credit and Debit cannot be zero!')) account_obj = self.pool.get('account.account') if ('account_id' in vals) and not account_obj.read(cr, uid, vals['account_id'], ['active'])['active']: raise osv.except_osv(_('Bad account!'), _('You can not use an inactive account!'))