From 26073c14669ae4ad5e0cafb39739bf1d182756bd Mon Sep 17 00:00:00 2001 From: "olt@tinyerp.com" <> Date: Fri, 10 Feb 2012 16:32:50 +0100 Subject: [PATCH] [FIX] opw 382100 bzr revid: olt@tinyerp.com-20120210153250-gp83r68bkk2nohyv --- addons/account_voucher/account_voucher.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py index 4f330d4..c2b06c5 100644 --- a/addons/account_voucher/account_voucher.py +++ b/addons/account_voucher/account_voucher.py @@ -750,6 +750,9 @@ class account_voucher(osv.osv): 'debit': 0.0, 'date': inv.date } + if not amount: + raise osv.except_osv(_('Warning'), + _("Error while processing 'account.voucher %s' (id:%s) for partner '%s', amount: %s !") % (inv.name, inv.id, inv.partner_id.name, inv.amount)) if amount < 0: amount = -amount if line.type == 'dr': -- 1.7.10.4