[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
This commit is contained in:
Ahmed Khalaf
2023-06-01 11:43:43 +02:00
parent 096be6e66e
commit 23a75f5a7a
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -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(
+1 -1
View File
@@ -552,7 +552,7 @@
<field name="product_id"/>
<field name="product_variant_attributes"/>
<field name="move_raw_ids" string="Component" filter_domain="[('move_raw_ids.product_id', 'ilike', self)]"/>
<field name="name" string="Work Center" filter_domain="[('bom_id.operation_ids.workcenter_id', 'ilike', self)]"/>
<field name="workcenter_id" string="Work Center" filter_domain="[('workorder_ids.workcenter_id', 'ilike', self)]"/>
<field name="origin"/>
<filter string="To Do" name="todo" domain="[('state', 'in', ('draft', 'confirmed', 'progress', 'to_close'))]"
help="Manufacturing Orders which are in confirmed state."/>