From 1f24bd28aa68dbe795ec8a99b07381790c1b4441 Mon Sep 17 00:00:00 2001 From: "John Laterre (jol)" Date: Thu, 27 Jan 2022 16:21:48 +0000 Subject: [PATCH] [FIX] sale: fix archived tax on sales orders When archiving a Tax, you do not want that action to invalidate Sales Orders and Invoices confirmed in the past and that were using it. The purpose of Archiving it is that it would not appear or be proposed to new items created. Until now, we had an inconsistency between Sales Orders and Invoices when a Tax was archived. The tax "disappeared" from old SOs, but the amounts remained unchanged, which created an inconsitency. The domain in the field definition no longer works because a custom domain in the view is shadowing the current domain. task-2745094 closes odoo/odoo#83712 X-original-commit: 09f6d682669e4e9d898f89706fece3fa9ce59da3 Signed-off-by: Laurent Smet --- addons/sale/models/sale_order_line.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/sale/models/sale_order_line.py b/addons/sale/models/sale_order_line.py index fbe093a6e43..c475059c2d1 100644 --- a/addons/sale/models/sale_order_line.py +++ b/addons/sale/models/sale_order_line.py @@ -253,7 +253,7 @@ class SaleOrderLine(models.Model): tax_id = fields.Many2many( 'account.tax', string='Taxes', compute='_compute_tax_id', store=True, readonly=False, precompute=True, - domain=['|', ('active', '=', False), ('active', '=', True)]) + context={'active_test': False}) discount = fields.Float( string='Discount (%)', digits='Discount',