[FIX] opw 382100
authorolt@tinyerp.com <>
Fri, 10 Feb 2012 15:32:50 +0000 (16:32 +0100)
committerolt@tinyerp.com <>
Fri, 10 Feb 2012 15:32:50 +0000 (16:32 +0100)
bzr revid: olt@tinyerp.com-20120210153250-gp83r68bkk2nohyv

addons/account_voucher/account_voucher.py

index 4f330d4..c2b06c5 100644 (file)
@@ -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':