[FIX] opw 382100
[odoo/odoo.git] / 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':