*minor bugfix: added a call to button_compute at the begining of action_move_create (taxes weren't computed in supplier invoices)

bzr revid: qdp@tinyerp.com-20081127115753-caqyyqpn9gg0bw8i
This commit is contained in:
qdp 2008-11-27 12:57:53 +01:00
parent 910bbd52fc
commit 4cba29bf89
1 changed files with 1 additions and 0 deletions

View File

@ -419,6 +419,7 @@ class account_invoice(osv.osv):
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: