[REF] add for loop instead in bank statement wizard

bzr revid: ara@tinyerp.com-20101209125312-o6kv5z2kxkmjtwtc
This commit is contained in:
ARA (OpenERP)
2010-12-09 18:23:12 +05:30
parent bfbbc6f5e5
commit 5ae7708e04
+5 -5
View File
@@ -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']),