From 89df4aa5ec9af4e9ac8875d3c4402b3c1a125be9 Mon Sep 17 00:00:00 2001 From: Damien Bouvy Date: Thu, 25 Feb 2016 11:37:04 +0100 Subject: [PATCH] [FIX] sale: when creating the invoice, call the additional fields helper function This function is there to avoid creating link modules, it is extended by account modules and should be called by methods that create invoices. This call was missing in sale. --- addons/sale/sale.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/sale/sale.py b/addons/sale/sale.py index 24bf36fab9c..bd5eab6c943 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -319,6 +319,9 @@ class SaleOrder(models.Model): invoice.type = 'out_refund' for line in invoice.invoice_line_ids: line.quantity = -line.quantity + # Use additional field helper function (for account extensions) + for line in invoice.invoice_line_ids: + line._set_additional_fields(invoice) # Necessary to force computation of taxes. In account_invoice, they are triggered # by onchanges, which are not triggered when doing a create. invoice.compute_taxes()