[REF] add for loop instead in bank statement wizard
bzr revid: ara@tinyerp.com-20101209125312-o6kv5z2kxkmjtwtc
This commit is contained in:
@@ -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']),
|
||||
|
||||
Reference in New Issue
Block a user