[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.
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user