mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
[IMP] mrp_tag: add tags to `mrp.production` search view
This commit is contained in:
@@ -18,8 +18,8 @@ class MrpTag(models.Model):
|
||||
|
||||
name = fields.Char("Tag Name", required=True, translate=True)
|
||||
color = fields.Integer(default=lambda self: self._get_default_color())
|
||||
parent_id = fields.Many2one("purchase.tag", index=True, ondelete="cascade")
|
||||
child_ids = fields.One2many("purchase.tag", "parent_id")
|
||||
parent_id = fields.Many2one("mrp.tag", index=True, ondelete="cascade")
|
||||
child_ids = fields.One2many("mrp.tag", "parent_id")
|
||||
parent_path = fields.Char(index=True)
|
||||
|
||||
_sql_constraints = [
|
||||
|
||||
@@ -37,5 +37,19 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_mrp_production_filter" model="ir.ui.view">
|
||||
<field name="name">mrp.production.search</field>
|
||||
<field name="model">mrp.production</field>
|
||||
<field name="inherit_id" ref="mrp.view_mrp_production_filter" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="/search/field[@name='origin']" position="after">
|
||||
<field
|
||||
name="tag_ids"
|
||||
string="Tag"
|
||||
filter_domain="[('tag_ids', 'child_of', self)]"
|
||||
/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
|
||||
Reference in New Issue
Block a user