[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) <nim@odoo.com>
This commit is contained in:
jvm-odoo
2019-10-30 12:05:31 +00:00
committed by fw-bot
parent 19cc72e5ab
commit a7bf579008
@@ -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,