<odoo>

    <!-- Copyright 2022 Marcel Savegnago <marcel.savegnago@escodoo.com.br>
     License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->

    <record model="ir.ui.view" id="qc_inspection_form_view">
        <field
            name="name"
        >qc.inspection.form (in mgmtsystem_nonconformity_quality_control_oca)</field>
        <field name="model">qc.inspection</field>
        <field name="inherit_id" ref="quality_control_oca.qc_inspection_form_view" />
        <field name="arch" type="xml">
            <xpath expr="//div[hasclass('oe_button_box')]" position="inside">
                <button
                    name="action_view_nonconformities"
                    type="object"
                    class="oe_stat_button"
                    icon="fa-list"
                >
                    <div class="o_stat_info">
                        <field
                            name="mgmtsystem_nonconformity_count"
                            class="o_stat_value"
                        />
                        <span
                            class="o_stat_text"
                            attrs="{'invisible': [('mgmtsystem_nonconformity_count', '&lt;', 2)]}"
                        > Nonconformities</span>
                        <span
                            class="o_stat_text"
                            attrs="{'invisible': [('mgmtsystem_nonconformity_count', '&gt;', 1)]}"
                        > Nonconformity</span>
                    </div>
                </button>
            </xpath>
        </field>
    </record>

<!--    <record model="ir.ui.view" id="qc_inspection_search_view">-->
<!--        <field-->
<!--            name="name"-->
<!--        >qc.inspection.search (in mgmtsystem_nonconformity_quality_control_oca)</field>-->
<!--        <field name="model">qc.inspection</field>-->
<!--        <field name="inherit_id" ref="TODO othermodule.search_view" />-->
<!--        <field name="arch" type="xml">-->
<!--            &lt;!&ndash; TODO &ndash;&gt;-->
<!--        </field>-->
<!--    </record>-->

<!--    <record model="ir.ui.view" id="qc_inspection_tree_view">-->
<!--        <field-->
<!--            name="name"-->
<!--        >qc.inspection.tree (in mgmtsystem_nonconformity_quality_control_oca)</field>-->
<!--        <field name="model">qc.inspection</field>-->
<!--        <field name="inherit_id" ref="TODO othermodule.tree_view" />-->
<!--        <field name="arch" type="xml">-->
<!--            &lt;!&ndash; TODO &ndash;&gt;-->
<!--        </field>-->
<!--    </record>-->

</odoo>
