lp bug: https://launchpad.net/bugs/663402 fixed
bzr revid: jvo@tinyerp.com-
20101020135803-m4wyc0uk32aulv6f
total_fixed += line.value_amount
if line.value == 'procent':
total_percent += line.value_amount
- total_fixed = (total_fixed * 100) / inv.amount_total
+ total_fixed = (total_fixed * 100) / (inv.amount_total or 1.0)
if (total_fixed + total_percent) > 100:
raise osv.except_osv(_('Error !'), _("Cannot create the invoice !\nThe payment term defined gives a computed amount greater than the total invoiced amount."))