From 97134fcfc06d7410c719b768bf7ea384509c5943 Mon Sep 17 00:00:00 2001 From: Xavier ALT Date: Fri, 1 Mar 2013 10:01:02 +0100 Subject: [PATCH] [FIX] account: manual skip REMOVE commande as not supported by resolve_o2m_commands_to_record_dicts bzr revid: xal@openerp.com-20130301090102-jkz4uu4jitn2r34y --- addons/account/account.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/addons/account/account.py b/addons/account/account.py index 63e9a78..f9b1ff3 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -1367,9 +1367,7 @@ class account_move(osv.osv): def onchange_line_id(self, cr, uid, ids, line_ids, context=None): balance = 0.0 - for line_id in line_ids: - if line_id[0] == 2 : - return {} + line_ids = [ line for line in line_ids if not (isinstance(line, (tuple, list)) and line and line[0] == 2) ] line_ids = self.resolve_o2m_commands_to_record_dicts(cr, uid, 'line_id', line_ids, context=context) for line in line_ids: balance += (line['debit'] or 0.00)- (line['credit'] or 0.00) -- 1.7.10.4