<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2018 Simone Rubino - Agile Business Group
     License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<odoo>
    <record model="ir.ui.view" id="qc_inspection_form_view_production">
        <field name="name">qc.inspection.form.view.production</field>
        <field name="model">qc.inspection</field>
        <field name="inherit_id" ref="quality_control.qc_inspection_form_view" />
        <field name="groups_id"
               eval="[(4, ref('mrp.group_mrp_user'))]" />
        <field name="arch" type="xml">
            <field name="product_id" position="after">
                <field name="production_id" />
            </field>
        </field>
    </record>

    <record model="ir.ui.view" id="qc_inspection_tree_view_production">
        <field name="name">qc.inspection.tree.view.production</field>
        <field name="model">qc.inspection</field>
        <field name="inherit_id" ref="quality_control.qc_inspection_tree_view" />
        <field name="groups_id"
               eval="[(4, ref('mrp.group_mrp_user'))]" />
        <field name="arch" type="xml">
            <field name="product_id" position="after">
                <field name="production_id" />
            </field>
        </field>
    </record>

    <record model="ir.ui.view" id="qc_inspection_search_view_production">
        <field name="name">qc.inspection.search.view.production</field>
        <field name="model">qc.inspection</field>
        <field name="inherit_id" ref="quality_control.qc_inspection_search_view" />
        <field name="groups_id"
               eval="[(4, ref('mrp.group_mrp_user'))]" />
        <field name="arch" type="xml">
            <field name="product_id" position="after">
                <field name="production_id" />
            </field>
            <group expand="0" position="inside">
                <filter string="Production"
                        name="groupby_productions"
                        domain="[]"
                        context="{'group_by': 'production_id'}" />
            </group>
        </field>
    </record>

    <record model="ir.ui.view" id="qc_inspection_line_tree_production_view">
        <field name="name">qc.inspection.line.tree.production</field>
        <field name="model">qc.inspection.line</field>
        <field name="inherit_id" ref="quality_control.qc_inspection_line_tree_view"/>
        <field name="groups_id"
               eval="[(4, ref('mrp.group_mrp_user'))]" />
        <field name="arch" type="xml">
            <field name="product_id" position="after">
                <field name="production_id" />
            </field>
        </field>
    </record>

    <record model="ir.ui.view" id="qc_inspection_line_search_production_view">
        <field name="name">qc.inspection.line.search.production</field>
        <field name="model">qc.inspection.line</field>
        <field name="inherit_id" ref="quality_control.qc_inspection_line_search_view" />
        <field name="groups_id"
               eval="[(4, ref('mrp.group_mrp_user'))]" />
        <field name="arch" type="xml">
            <field name="product_id" position="after">
                <field name="production_id" />
            </field>
            <group expand="0" position="inside">
                <filter string="Production order"
                        name="groupby_productions"
                        domain="[]"
                        context="{'group_by': 'production_id'}" />
            </group>
        </field>
    </record>
</odoo>
