[FIX] purchase_stock: key <built-in function id> is not a string

stems from 3936d655c4
why the urnbot isn't red before this branch is beyond me at the moment.

task-1875873
This commit is contained in:
Simon Lejeune
2019-06-10 20:43:30 +00:00
parent 8b965ba294
commit b058f1bd18
@@ -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']