<?xml version="1.0" encoding="utf-8" ?>
<odoo>
    <record id="mrp_production_form_view" model="ir.ui.view">
        <field name="name">mrp.production.form - mrp_production_serial_matrix</field>
        <field name="model">mrp.production</field>
        <field name="inherit_id" ref="mrp.mrp_production_form_view" />
        <field name="arch" type="xml">
            <button name="action_confirm" position="after">
                <field name="show_serial_matrix" invisible="1" />
                <button
                    name="%(mrp_production_serial_matrix.action_mrp_production_serial_matrix)d"
                    type="action"
                    class="oe_highlight"
                    string="Serial Numbers Matrix"
                    attrs="{'invisible':['|', ('show_serial_matrix', '=', False), ('state','in',('draft', 'cancel', 'done'))]}"
                />
            </button>
        </field>
    </record>
</odoo>
