[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
This commit is contained in:
Daniel Dico 2014-07-23 12:22:45 -04:00 committed by Denis Ledoux
parent 08b85e5821
commit 6f60153e5d
1 changed files with 1 additions and 1 deletions

View File

@ -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)