[FIX] bug with invoice

lp bug: https://launchpad.net/bugs/310919 fixed

bzr revid: christophe@cobalt-20081223162210-chbr8wg9ae19cwbm
This commit is contained in:
Christophe Simonis 2008-12-23 17:22:10 +01:00
parent cd6b3e1941
commit 1babad50c2
1 changed files with 1 additions and 1 deletions

View File

@ -448,10 +448,10 @@ class account_invoice(osv.osv):
ait_obj = self.pool.get('account.invoice.tax')
cur_obj = self.pool.get('res.currency')
acc_obj = self.pool.get('account.account')
self.button_compute(cr, uid, ids, context={}, set_total=True)
for inv in self.browse(cr, uid, ids):
if inv.move_id:
continue
self.button_compute(cr, uid, ids, context={},set_total=True)
if inv.type in ('in_invoice', 'in_refund') and abs(inv.check_total - inv.amount_total) >= (inv.currency_id.rounding/2.0):
raise osv.except_osv(_('Bad total !'), _('Please verify the price of the invoice !\nThe real total does not match the computed total.'))
if not inv.date_invoice: