From a7bf579008b8bb0c19d19777d737d0cbc9c4b218 Mon Sep 17 00:00:00 2001 From: jvm-odoo Date: Wed, 30 Oct 2019 09:02:59 +0000 Subject: [PATCH] [FIX] sale: fix down payment missing tax and product UoM In the sales modules, set a down payment product with a different UoM than the default one. If you create an invoice, select the down payment option, click on create and view. Before this commit: - The down payment tax & UoM are not on the invoice line After this commit: - They are on the invoice line, like in V12 OPW-2086146 closes odoo/odoo#39569 X-original-commit: 06db4135d4aabaa7cb2a0d593be2dff11f8c4617 Signed-off-by: Nicolas Martinelli (nim) --- addons/sale/wizard/sale_make_invoice_advance.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/sale/wizard/sale_make_invoice_advance.py b/addons/sale/wizard/sale_make_invoice_advance.py index 126ade7fd8a..0d58cda8dd5 100644 --- a/addons/sale/wizard/sale_make_invoice_advance.py +++ b/addons/sale/wizard/sale_make_invoice_advance.py @@ -99,6 +99,8 @@ class SaleAdvancePaymentInv(models.TransientModel): 'price_unit': amount, 'quantity': 1.0, 'product_id': self.product_id.id, + 'product_uom_id': so_line.product_uom.id, + 'tax_ids': [(6, 0, so_line.tax_id.ids)], 'sale_line_ids': [(6, 0, [so_line.id])], 'analytic_tag_ids': [(6, 0, so_line.analytic_tag_ids.ids)], 'analytic_account_id': order.analytic_account_id.id or False,