From 0978401fab9b67a73d69f02772110b9b5da0f67b Mon Sep 17 00:00:00 2001 From: Walid Date: Thu, 8 Feb 2024 12:45:54 +0100 Subject: [PATCH] [FIX] purchase: do not apply archived taxes Steps to reproduce: - Create a new purchase tax and archive it - Create a new PO Bug: the archived tax is still sugested on the PO Line Fix: apply same logic as for sales opw-3701429 closes odoo/odoo#153156 X-original-commit: 79e0c4383fe72b5d04af8a81b57a65044a91d273 Signed-off-by: Quentin Wolfs (quwo) Signed-off-by: Walid Hanniche (waha) --- addons/purchase/models/purchase_order_line.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/purchase/models/purchase_order_line.py b/addons/purchase/models/purchase_order_line.py index 0bbaffe63d5..e3cc9f9e6c6 100644 --- a/addons/purchase/models/purchase_order_line.py +++ b/addons/purchase/models/purchase_order_line.py @@ -30,7 +30,7 @@ class PurchaseOrderLine(models.Model): compute='_compute_price_unit_and_date_planned_and_name', digits='Discount', store=True, readonly=False) - taxes_id = fields.Many2many('account.tax', string='Taxes', domain=['|', ('active', '=', False), ('active', '=', True)], context={'active_test': False}) + taxes_id = fields.Many2many('account.tax', string='Taxes', context={'active_test': False}) product_uom = fields.Many2one('uom.uom', string='Unit of Measure', domain="[('category_id', '=', product_uom_category_id)]") product_uom_category_id = fields.Many2one(related='product_id.uom_id.category_id') product_id = fields.Many2one('product.product', string='Product', domain=[('purchase_ok', '=', True)], change_default=True, index='btree_not_null')