From 5ae7708e04a435c6ecd93796d26153b6e804cc3a Mon Sep 17 00:00:00 2001 From: "ARA (OpenERP)" Date: Thu, 9 Dec 2010 18:23:12 +0530 Subject: [PATCH] [REF] add for loop instead in bank statement wizard bzr revid: ara@tinyerp.com-20101209125312-o6kv5z2kxkmjtwtc --- addons/account_voucher/account_voucher.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py index 541702dccb4..be2e61060a3 100644 --- a/addons/account_voucher/account_voucher.py +++ b/addons/account_voucher/account_voucher.py @@ -964,11 +964,11 @@ class account_bank_statement_line(osv.osv): return res def _check_amount(self, cr, uid, ids, context=None): - obj = self.browse(cr, uid, ids[0]) - if obj.voucher_id: - if not (obj.amount == obj.voucher_id.amount): - return False - return True + for obj in self.browse(cr, uid, ids): + if obj.voucher_id: + if not (obj.amount == obj.voucher_id.amount): + return False + return True _constraints = [ (_check_amount, 'The amount of the voucher must be the same amount as the one on the statement line', ['statement_id']),