From 23a75f5a7a39dc17f86a2bdb8a0f96479cb880a1 Mon Sep 17 00:00:00 2001 From: Ahmed Khalaf Date: Thu, 30 Mar 2023 15:56:51 +0000 Subject: [PATCH] [FIX] mrp: MO search fields duplicate name This commit adds `workcenter_id` as the workcenter search field used to have the same name as the `name` search field in the `mrp.production` search view. Part-of: odoo/odoo#114708 --- addons/mrp/models/mrp_production.py | 1 + addons/mrp/views/mrp_production_views.xml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/mrp/models/mrp_production.py b/addons/mrp/models/mrp_production.py index 70d59ca46c1..a17d149fdc1 100644 --- a/addons/mrp/models/mrp_production.py +++ b/addons/mrp/models/mrp_production.py @@ -71,6 +71,7 @@ class MrpProduction(models.Model): readonly=True, required=True, check_company=True, states={'draft': [('readonly', False)]}) product_variant_attributes = fields.Many2many('product.template.attribute.value', related='product_id.product_template_attribute_value_ids') + workcenter_id = fields.Many2one('mrp.workcenter', store=False) # Only used for search in view_mrp_production_filter product_tracking = fields.Selection(related='product_id.tracking') product_tmpl_id = fields.Many2one('product.template', 'Product Template', related='product_id.product_tmpl_id') product_qty = fields.Float( diff --git a/addons/mrp/views/mrp_production_views.xml b/addons/mrp/views/mrp_production_views.xml index e7d9665525b..91f7298abea 100644 --- a/addons/mrp/views/mrp_production_views.xml +++ b/addons/mrp/views/mrp_production_views.xml @@ -552,7 +552,7 @@ - +