From 189e0088e08109f0374d4b2518f8928b7010611c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul=20=28ACSONE=29?= Date: Wed, 11 Jul 2018 16:56:59 +0200 Subject: [PATCH] [FIX] account: preserve deactivated taxes on move lines MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Similar to cd3f52ba1064000483f1a4cd781cf576767b4e01 that was made for invoices. Was PR #25655. Courtesy of Stéphane Bidoul (ACSONE) --- addons/account/models/account_move.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py index e59d6c78101..0271807a235 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -413,7 +413,7 @@ class AccountMoveLine(models.Model): help="This field is used for payable and receivable journal entries. You can put the limit date for the payment of this line.") date = fields.Date(related='move_id.date', string='Date', required=True, index=True, default=fields.Date.context_today, store=True, copy=False) analytic_line_ids = fields.One2many('account.analytic.line', 'move_id', string='Analytic lines', oldname="analytic_lines") - tax_ids = fields.Many2many('account.tax', string='Taxes') + tax_ids = fields.Many2many('account.tax', string='Taxes', domain=['|', ('active', '=', False), ('active', '=', True)]) tax_line_id = fields.Many2one('account.tax', string='Originator tax', ondelete='restrict') analytic_account_id = fields.Many2one('account.analytic.account', string='Analytic Account') company_id = fields.Many2one('res.company', related='account_id.company_id', string='Company', store=True)