From 053b77fc9eccda12df418d29cad5121acc97a02b Mon Sep 17 00:00:00 2001 From: Laurent Smet Date: Tue, 6 Aug 2019 14:29:24 +0000 Subject: [PATCH] [FIX] account_voucher: Set tax_repartition_line_id on move.lines created from vouchers closes odoo/odoo#35530 Signed-off-by: Cedric Snauwaert (csn) --- addons/account_voucher/models/account_voucher.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/addons/account_voucher/models/account_voucher.py b/addons/account_voucher/models/account_voucher.py index a34367ddedd..149f862cab4 100644 --- a/addons/account_voucher/models/account_voucher.py +++ b/addons/account_voucher/models/account_voucher.py @@ -331,13 +331,12 @@ class AccountVoucher(models.Model): current_cur = Currency.browse(current_currency) for tax_vals in tax_group['taxes']: if tax_vals['amount']: - tax = self.env['account.tax'].browse([tax_vals['id']]) account_id = (amount > 0 and tax_vals['account_id'] or tax_vals['refund_account_id']) if not account_id: account_id = line.account_id.id temp = { 'account_id': account_id, 'name': line.name + ' ' + tax_vals['name'], - 'tax_line_id': tax_vals['id'], + 'tax_repartition_line_id': tax_vals['tax_repartition_line_id'], 'move_id': move_id, 'date': self.account_date, 'partner_id': self.partner_id.id,