From e9837fcc09a7113d100d709fc6128de80d8bcb0b Mon Sep 17 00:00:00 2001 From: "Lucas Perais (lpe)" Date: Thu, 29 Aug 2019 09:05:27 +0000 Subject: [PATCH] [FIX] purchase_stock: typo tax in anglosaxon Have a product valued in real time make a PO to a vendor with that product, with a tax validate Before this commit, it crashed because of a typo After this commit, the invoice is validated OPW 2061472 closes odoo/odoo#36216 Signed-off-by: Lucas Perais (lpe) --- addons/purchase_stock/models/account_invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/purchase_stock/models/account_invoice.py b/addons/purchase_stock/models/account_invoice.py index eecbd1f8a90..4b8f633f9a1 100644 --- a/addons/purchase_stock/models/account_invoice.py +++ b/addons/purchase_stock/models/account_invoice.py @@ -101,7 +101,7 @@ class AccountInvoice(models.Model): tax_ids = [] if line['tax_ids']: #line['tax_ids'] is -2many commands list for account.move.line - tax_ids = [tax_data[id] for tax_data in self.env['account.move.line'].resolve_2many_commands('tax_ids', line['tax_ids'], ['id'])] + tax_ids = [tax_data['id'] for tax_data in self.env['account.move.line'].resolve_2many_commands('tax_ids', line['tax_ids'], ['id'])] taxes = self.env['account.tax'].browse(tax_ids) price_unit = taxes.compute_all(price_unit, currency=inv.currency_id, quantity=1.0, is_refund=inv.type in ('in_refund', 'out_refund'))['total_excluded']