From 6f60153e5d47c5b96befc7382686cb5872f5afb8 Mon Sep 17 00:00:00 2001 From: Daniel Dico Date: Wed, 23 Jul 2014 12:22:45 -0400 Subject: [PATCH] [IMP] account: useless records browsing A variable "lines" is instancied few lines above, with the exact same browse call, and there is no operation that could lead to an update of the result between these two browse calls. Closes #1394 --- addons/account/account_move_line.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py index 4d070ed963e..82407dc262c 100644 --- a/addons/account/account_move_line.py +++ b/addons/account/account_move_line.py @@ -953,7 +953,7 @@ class account_move_line(osv.osv): if context is None: context = {} company_list = [] - for line in self.browse(cr, uid, ids, context=context): + for line in lines: if company_list and not line.company_id.id in company_list: raise osv.except_osv(_('Warning!'), _('To reconcile the entries company should be the same for all entries.')) company_list.append(line.company_id.id)