[FIX] sale: taxes were not computed on invoice when created from SO

This commit is contained in:
qdp-odoo
2015-06-19 15:59:10 +02:00
parent 66f9ec0249
commit 20339a77bd
+3 -1
View File
@@ -365,7 +365,9 @@ class sale_order(osv.osv):
lines.append(inv_line_id)
inv = self._prepare_invoice(cr, uid, order, lines, context=context)
inv_id = inv_obj.create(cr, uid, inv, context=context)
self.pool['account.invoice'].browse(cr, uid, inv_id, context=context)._onchange_payment_term_date_invoice()
invoice = self.pool['account.invoice'].browse(cr, uid, inv_id, context=context)
invoice._onchange_payment_term_date_invoice()
invoice.compute_taxes()
return inv_id
def print_quotation(self, cr, uid, ids, context=None):