From 5aaa2cfe75c8c3b2357fffb466989644085d025e Mon Sep 17 00:00:00 2001 From: nep-OpenERP Date: Wed, 4 Apr 2012 17:00:45 +0530 Subject: [PATCH] [FIX] account_voucher : Allow to close payment voucher with 0.00 amount bzr revid: nep@tinyerp.com-20120404113045-k2lrejk3b9oigv59 --- addons/account_voucher/account_voucher.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py index 5b9726c7fab..671de5216ab 100644 --- a/addons/account_voucher/account_voucher.py +++ b/addons/account_voucher/account_voucher.py @@ -1014,7 +1014,8 @@ class account_voucher(osv.osv): for line in voucher_brw.line_ids: #create one move line per voucher line where amount is not 0.0 if not line.amount: - continue + if line.amount != line_total: + continue # convert the amount set on the voucher line into the currency of the voucher's company amount = self._convert_amount(cr, uid, line.untax_amount or line.amount, voucher_brw.id, context=ctx) # if the amount encoded in voucher is equal to the amount unreconciled, we need to compute the