[FIX] /web/login restore request.uid in case of authentication failure
[odoo/odoo.git] / addons / account_voucher / account_voucher.py
index b678136..771c6e1 100644 (file)
@@ -1666,7 +1666,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:
-                diff = abs(obj.amount) - obj.voucher_id.amount
+                diff = abs(obj.amount) - abs(obj.voucher_id.amount)
                 if not self.pool.get('res.currency').is_zero(cr, uid, obj.statement_id.currency, diff):
                     return False
         return True