<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2024 - TODAY, Kaynnan Lemes <kaynnan.lemes@escodoo.com.br>
     License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<odoo>

    <record model="ir.ui.view" id="mgmtsystem_hazard_form_view">
        <field
            name="name"
        >mgmtsystem.hazard.form (in mgmtsystem_hazard_maintenance_equipment)</field>
        <field name="model">mgmtsystem.hazard</field>
        <field name="inherit_id" ref="mgmtsystem_hazard.view_mgmtsystem_hazard_form" />
        <field name="arch" type="xml">
            <xpath expr="//field[@name='origin_id']" position="after">
                <field name="equipment_ids" widget="many2many_tags" />
            </xpath>
        </field>
    </record>


    <record model="ir.ui.view" id="mgmtsystem_hazard_tree_view">
        <field
            name="name"
        >mgmtsystem.hazard.tree (in mgmtsystem_hazard_maintenance_equipment)</field>
        <field name="model">mgmtsystem.hazard</field>
        <field name="inherit_id" ref="mgmtsystem_hazard.view_mgmtsystem_hazard_tree" />
        <field name="arch" type="xml">
            <xpath expr="//field[@name='origin_id']" position="after">
                <field name="equipment_ids" widget="many2many_tags" />
            </xpath>
        </field>
    </record>

    <record model="ir.ui.view" id="mgmtsystem_hazard_filter_view">
        <field name="name">mgmtsystem.hazard.filter (in
            mgmtsystem_hazard_maintenance_equipment)</field>
        <field name="model">mgmtsystem.hazard</field>
        <field
            name="inherit_id"
            ref="mgmtsystem_hazard.view_mgmtsystem_hazard_filter"
        />
        <field name="arch" type="xml">
            <xpath expr="//filter[@name='group_by_type_id']" position="after">
                <filter
                    name="groupby_equipment"
                    string="Equipment"
                    icon="terp-personal"
                    context="{'group_by':'equipment_ids'}"
                />
            </xpath>
        </field>
    </record>

</odoo>
