From b058f1bd182087facd11aac17db376cc51541a84 Mon Sep 17 00:00:00 2001 From: Simon Lejeune Date: Mon, 10 Jun 2019 20:36:28 +0000 Subject: [PATCH] [FIX] purchase_stock: key is not a string stems from 3936d655c4bfd845b6ead724cecdc8e7c62816eb why the urnbot isn't red before this branch is beyond me at the moment. task-1875873 --- 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 6ec075c7f2f..78292718a55 100644 --- a/addons/purchase_stock/models/account_invoice.py +++ b/addons/purchase_stock/models/account_invoice.py @@ -103,7 +103,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']