<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2020 ForgeFlow S.L. (https://www.forgeflow.com)
     License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl-3.0) -->
<odoo>
    <record id="stock_request_order_form" model="ir.ui.view">
        <field name="name">stock.request.order.form</field>
        <field name="model">stock.request.order</field>
        <field name="inherit_id" ref="stock_request.stock_request_order_form" />
        <field name="arch" type="xml">
            <div name="button_box" position="inside">
                <field
                    name="production_ids"
                    invisible="1"
                    groups="mrp.group_mrp_user"
                />
                <button
                    type="object"
                    name="action_view_mrp_production"
                    class="oe_stat_button"
                    icon="fa-wrench"
                    attrs="{'invisible': [('production_count', '=', 0)]}"
                    groups="mrp.group_mrp_user"
                >
                    <field name="production_count" widget="statinfo" string="MOs" />
                </button>
            </div>
        </field>
    </record>
</odoo>
