[FIX] Account voucher => check_amount constraints updated with abs() because voucher amount always abs

bzr revid: mra@mra-laptop-20101224113341-xxt1d32ab97ulai3
This commit is contained in:
Mustufa Rangwala 2010-12-24 17:03:41 +05:30
parent 7cd178554d
commit 45915a7d1e
1 changed files with 1 additions and 1 deletions

View File

@ -982,7 +982,7 @@ class account_bank_statement_line(osv.osv):
def _check_amount(self, cr, uid, ids, context=None):
for obj in self.browse(cr, uid, ids, context=context):
if obj.voucher_id:
if not (obj.amount == obj.voucher_id.amount):
if not (abs(obj.amount) == obj.voucher_id.amount):
return False
return True