From 45915a7d1e8d7dfe715ee3237eacf5d87ec9dc68 Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Fri, 24 Dec 2010 17:03:41 +0530 Subject: [PATCH] [FIX] Account voucher => check_amount constraints updated with abs() because voucher amount always abs bzr revid: mra@mra-laptop-20101224113341-xxt1d32ab97ulai3 --- addons/account_voucher/account_voucher.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py index e4b76cc8770..700078efd2c 100644 --- a/addons/account_voucher/account_voucher.py +++ b/addons/account_voucher/account_voucher.py @@ -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