<commit_before><?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>

        <menuitem icon="terp-mrp" id="menu_mrp_root" name="Manufacturing"
            groups="group_mrp_user,group_mrp_manager"/>
        <menuitem id="menu_mrp_reordering" name="Automatic Procurements" parent="stock.menu_stock_root" sequence="4"/>

        <!--
    Property / Property Group
    -->

        <record id="mrp_property_group_form_view" model="ir.ui.view">
            <field name="name">mrp.property.group.form</field>
            <field name="model">mrp.property.group</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <form string="Properties categories">
                    <separator colspan="4" string="General Information"/>
                    <field colspan="4" name="name" select="1"/>
                    <field colspan="4" name="description"/>
                </form>
            </field>
        </record>
        <record id="mrp_property_group_action" model="ir.actions.act_window">
            <field name="name">Property Categories</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">mrp.property.group</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>
        </record>
        <menuitem
            id="menu_mrp_configuration"
            name="Configuration"
            parent="menu_mrp_root"
            groups="group_mrp_manager"/>
        <menuitem
            id="menu_mrp_property_group_action_prop"
            name="Properties"
            parent="menu_mrp_configuration"
            groups="base.group_extended"/>
        <menuitem
            action="mrp_property_group_action"
            id="menu_mrp_property_group_action"
            parent="menu_mrp_property_group_action_prop"/>

        <record id="mrp_property_tree_view" model="ir.ui.view">
            <field name="name">mrp.property.tree</field>
            <field name="model">mrp.property</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <tree string="Properties">
                    <field name="name"/>
                    <field name="composition"/>
                    <field name="group_id"/>
                </tree>
            </field>
        </record>
        <record id="mrp_property_form_view" model="ir.ui.view">
            <field name="name">mrp.property.form</field>
            <field name="model">mrp.property</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <form string="Properties">
                    <separator colspan="4" string="General Information"/>
                    <field colspan="4" name="name" select="1"/>
                    <field name="group_id" select="1"/>
                    <field name="composition" select="1"/>
                    <separator colspan="4" string="Description"/>
                    <field colspan="4" name="description"/>
                </form>
            </field>
        </record>
        <record id="mrp_property_action" model="ir.actions.act_window">
            <field name="name">Properties</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">mrp.property</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>
        </record>
        <menuitem
            action="mrp_property_action"
            id="menu_mrp_property_action"
            parent="menu_mrp_property_group_action_prop"/>

        <!--
    Workcenters
    -->

        <record id="mrp_workcenter_tree_view" model="ir.ui.view">
            <field name="name">mrp.workcenter.tree</field>
            <field name="model">mrp.workcenter</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <tree string="Workcenter">
                    <field name="code"/>
                    <field name="name"/>
                </tree>
            </field>
        </record>
        <record id="mrp_workcenter_view" model="ir.ui.view">
            <field name="name">mrp.workcenter.form</field>
            <field name="model">mrp.workcenter</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <form string="Workcenter">
                    <group col="6" colspan="4">
                        <field name="name" select="1"/>
                        <field name="code" select="1"/>
                        <field name="active" select="2"/>
                    </group>
                    <notebook colspan="4">
                        <page string="Workcenter">
                            <field name="type"/>
                            <field name="timesheet_id"/>
                            <separator colspan="4" string="Description"/>
                            <field colspan="4" name="note" nolabel="1"/>
                            <separator colspan="4" string="Capacity Information"/>
                            <group col="4" colspan="4">
                                <field name="capacity_per_cycle"/>
                                <newline/>
                                <field name="time_cycle"/>
                                <field name="time_efficiency"/>
                                <field name="time_start"/>
                                <field name="time_stop"/>
                            </group>
                        </page>
                        <page string="Analytic Accounting">
                            <field name="costs_hour"/>
                            <field name="costs_hour_account_id"/>
                            <field name="costs_cycle"/>
                            <field name="costs_cycle_account_id"/>
                            <field name="costs_journal_id"/>
                            <field name="costs_general_account_id"/>
                        </page>
                    </notebook>
                </form>
            </field>
        </record>
        <record id="mrp_workcenter_action" model="ir.actions.act_window">
            <field name="name">Workcenters</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">mrp.workcenter</field>
            <field name="view_type">form</field>
            <field name="view_id" ref="mrp_workcenter_tree_view"/>
        </record>
        <menuitem action="mrp_workcenter_action" id="menu_mrp_workcenter_action" parent="menu_mrp_configuration"/>

        <!--
    Routings
    -->

        <record id="mrp_routing_workcenter_tree_view" model="ir.ui.view">
            <field name="name">mrp.routing.workcenter.tree</field>
            <field name="model">mrp.routing.workcenter</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <tree string="Routing Workcenters">
                    <field name="sequence"/>
                    <field name="workcenter_id" select="1"/>
                    <field name="cycle_nbr"/>
                    <field name="hour_nbr"/>
                </tree>
            </field>
        </record>

        <record id="mrp_routing_workcenter_form_view" model="ir.ui.view">
            <field name="name">mrp.routing.workcenter.form</field>
            <field name="model">mrp.routing.workcenter</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <form string="Routing Workcenters">
                    <separator colspan="4" string="General Information"/>
                    <field colspan="4" name="name" select="1"/>
                    <field name="sequence" select="1"/>
                    <field name="workcenter_id" select="1"/>
                    <field name="cycle_nbr"/>
                    <field name="hour_nbr"/>
                    <field colspan="4" name="note"/>
                </form>
            </field>
        </record>

        <record id="mrp_routing_form_view" model="ir.ui.view">
            <field name="name">mrp.routing.form</field>
            <field name="model">mrp.routing</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <form string="Routing">
                    <separator colspan="4" string="General Information"/>
                    <field name="name" select="1"/>
                    <field name="active" select="1"/>
                    <field name="code" select="1"/>
                    <field name="location_id"/>
                    <separator colspan="4" string="Description"/>
                    <field colspan="4" name="note" nolabel="1"/>
                    <separator colspan="4" string="Workcenter Operations"/>
                    <field colspan="4" name="workcenter_lines" nolabel="1" widget="one2many_list"/>
                </form>
            </field>
        </record>
        <record id="mrp_routing_tree_view" model="ir.ui.view">
            <field name="name">mrp.routing.tree</field>
            <field name="model">mrp.routing</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <tree string="Routing">
                    <field name="code"/>
                    <field name="name"/>
                    <field name="location_id"/>
                </tree>
            </field>
        </record>
        <record id="mrp_routing_action" model="ir.actions.act_window">
            <field name="name">Routings</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">mrp.routing</field>
            <field name="view_type">form</field>
            <field name="view_id" ref="mrp_routing_tree_view"/>
        </record>
        <menuitem action="mrp_routing_action" id="menu_mrp_routing_action" parent="menu_mrp_configuration"/>

        <!--
    Bill of Materials
    -->

        <record id="mrp_bom_form_view" model="ir.ui.view">
            <field name="name">mrp.bom.form</field>
            <field name="model">mrp.bom</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <form string="Bill of Material">
                    <field name="product_id" on_change="onchange_product_id(product_id, name)" select="1"/>
                    <newline/>
                    <field name="product_uom"/>
                    <field name="product_qty"/>
                    <field name="name" select="1"/>
                    <field name="code" select="1"/>
                    <newline/>
                    <field name="product_uos" groups="product.group_uos"/>
                    <field name="product_uos_qty" groups="product.group_uos"/>
                    <field name="routing_id" select="2" groups="base.group_extended"/>
                    <field name="type" groups="base.group_extended"/>
                    <notebook colspan="4">
                        <page string="General Information">
                            <field colspan="4" name="bom_lines" nolabel="1" widget="one2many_list"/>
                        </page>
                        <page string="Revisions" groups="base.group_extended">
                            <field colspan="4" name="revision_ids" nolabel="1" widget="one2many_list"/>
                        </page>
                        <page string="Properties">
                            <field name="position" select="2"/>
                            <field name="active" select="2"/>
                            <field name="sequence"/>
                            <field name="bom_id"/>

                            <field name="date_start" select="2"/>
                            <field name="date_stop" select="2"/>
                            <field name="product_rounding"/>
                            <field name="product_efficiency"/>
                            <field colspan="4" name="property_ids" nolabel="2" groups="base.group_extended"/>
                        </page>
                    </notebook>
                </form>
            </field>
        </record>

       <record id="mrp_bom_tree_view" model="ir.ui.view">
            <field name="name">mrp.bom.tree</field>
            <field name="model">mrp.bom</field>
            <field name="type">tree</field>
            <field name="field_parent">child_complete_ids</field>
            <field name="arch" type="xml">
                <tree string="BoM Structure" colors="blue:method">
                    <field name="name"/>
                    <field name="code"/>
                    <field name="product_id"/>
                    <field name="product_qty"/>
                    <field name="product_uom"/>
                    <field name="method"/>
                    <field name="routing_id" groups="base.group_extended"/>
                    <field name="date_start"/>
                    <field name="date_stop"/>
                </tree>
            </field>
        </record>
        <record id="mrp_bom_form_action" model="ir.actions.act_window">
            <field name="name">Bill of Materials</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">mrp.bom</field>
            <field name="view_type">form</field>
            <field name="domain">[('bom_id','=',False)]</field>
            <field name="view_id" ref="mrp_bom_tree_view"/>
        </record>
        <menuitem action="mrp_bom_form_action" id="menu_mrp_bom_form_action" parent="menu_mrp_configuration"/>

        <record id="mrp_bom_tree_action" model="ir.actions.act_window">
            <field name="name">Bill of Material Structure</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">mrp.bom</field>
            <field name="view_type">tree</field>
            <field name="domain">[('bom_id','=',False)]</field>
            <field name="view_id" ref="mrp_bom_tree_view"/>
        </record>
        <menuitem action="mrp_bom_tree_action" id="menu_bom_tree" parent="menu_mrp_bom_form_action"/>
        <record id="mrp_bom_form_action_new" model="ir.actions.act_window">
            <field name="name">New Bill of Materials</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">mrp.bom</field>
            <field name="view_type">form</field>
            <field name="view_mode">form,tree</field>
            <field name="domain">[('bom_id','=',False)]</field>
        </record>
        <menuitem action="mrp_bom_form_action_new" id="menu_mrp_bom_form_action_new" parent="menu_mrp_bom_form_action"/>

        <record id="mrp_bom_form_action2" model="ir.actions.act_window">
            <field name="name">Bill of Materials Components</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">mrp.bom</field>
            <field name="view_type">form</field>
            <field name="domain">[('bom_id','!=',False)]</field>
        </record>
        <menuitem action="mrp_bom_form_action2" id="menu_mrp_bom_form_action2" parent="menu_mrp_configuration"/>

        <record id="action2" model="ir.actions.act_window">
            <field name="name">Bill of Materials Structure</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">mrp.bom</field>
            <field name="domain">[('id','=',active_id)]</field>
            <field name="view_type">tree</field>
            <field name="view_id" ref="mrp_bom_tree_view"/>
        </record>
        <record id="ir_BOM_structure" model="ir.values">
            <field eval="'client_action_multi'" name="key2"/>
            <field eval="'mrp.bom'" name="model"/>
            <field name="name">Bill of Materials Structure</field>
            <field eval="'ir.actions.act_window,'+str(action2)" name="value"/>
            <field eval="True" name="object"/>
        </record>

        <record id="mrp_bom_revision_tree" model="ir.ui.view">
            <field name="name">mrp.bom.revision</field>
            <field name="model">mrp.bom.revision</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <tree string="BoM Revisions">
                    <field name="indice"/>
                    <field name="author_id"/>
                    <field name="date"/>
                    <field colspan="4" name="name"/>
                </tree>
            </field>
        </record>
        <record id="mrp_bom_revision_form" model="ir.ui.view">
            <field name="name">mrp.bom.revision</field>
            <field name="model">mrp.bom.revision</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <form string="BoM Revisions">
                    <field colspan="4" name="name"/>
                    <field colspan="1" name="indice"/>
                    <field colspan="1" name="date"/>
                    <field name="author_id" readonly="1"/>
                    <field colspan="4" name="description"/>
                </form>
            </field>
        </record>

        <!--
    Production Management
    -->

        <record id="mrp_production_tree_view" model="ir.ui.view">
            <field name="name">mrp.production.tree</field>
            <field name="model">mrp.production</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <tree colors="red:date_planned&lt;current_date and state not in ('done','cancel')" string="Production orders">
                    <field name="name"/>
                    <field name="product_id"/>
                    <field name="product_qty" sum="Total Qty"/>
                    <field name="date_planned"/>
                    <field name="routing_id" groups="base.group_extended"/>
                    <field name="hour_total" sum="Total Hours" groups="base.group_extended"/>
                    <field name="cycle_total" sum="Total Cycles" groups="base.group_extended"/>
                    <field name="origin"/>
                    <field name="state"/>
                </tree>
            </field>
        </record>

        <record id="view_production_calendar" model="ir.ui.view">
            <field name="name">mrp.production.calendar</field>
            <field name="model">mrp.production</field>
            <field name="type">calendar</field>
            <field eval="2" name="priority"/>
            <field name="arch" type="xml">
                <calendar color="routing_id" date_start="date_planned" string="Production Orders">
                    <field name="origin"/>
                    <field name="product_id"/>
                    <field name="product_qty"/>
                </calendar>
            </field>
        </record>


        <record id="view_production_gantt" model="ir.ui.view">
            <field name="name">mrp.production.gantt</field>
            <field name="model">mrp.production</field>
            <field name="type">gantt</field>
            <field name="arch" type="xml">
                <gantt color="product_id" date_stop="date_finnished" date_start="date_start" string="Productions">
                    <level object="mrp.routing" link="routing_id" domain="[]">
                        <field name="name"/>
                        <field name="origin"/>
                    </level>
                </gantt>
            </field>
        </record>


        <record model="ir.ui.view" id="view_production_graph">
            <field name="name">mrp.production.graph</field>
            <field name="model">mrp.production</field>
            <field name="type">graph</field>
            <field name="arch" type="xml">
                <graph string="Production orders" type="bar">
                    <field name="date_planned_date"/>
                    <field name="hour_total" operator="+"/>
                    <field name="cycle_total" operator="+"/>
                </graph>
            </field>
        </record>
        <wizard
            string="Change Product Qty."
            model="mrp.production"
            name="change_production_qty"
            id="mrp.wizard_change_production_qty"
            keyword="client_action_multi"
            multi="True"/>

        <record id="mrp_production_form_view" model="ir.ui.view">
            <field name="name">mrp.production.form</field>
            <field name="model">mrp.production</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <form string="Production orders">
                    <group colspan="4" col="7">
                        <field name="name" select="1"/>
                        <field name="date_planned" select="1"/>
                        <field name="origin" select="1"/>
                        <newline/>
                        <field name="product_id" on_change="product_id_change(product_id)" select="1"/>
                        <field name="product_qty"/>
                        <field name="product_uom"/>
                        <button type="action" name="%(mrp.wizard_change_production_qty)d" string="Change Qty" states="ready,confirmed,in_production"/>
                        <newline/>
                        <label string="" colspan="2"/>
                        <field name="product_uos_qty" groups="product.group_uos"/>
                        <field name="product_uos" groups="product.group_uos"/>
                    </group>

                    <notebook colspan="4">
                        <page string="Consumed Products">
                            <field name="location_src_id" select="2" domain="[('usage','=','internal')]" on_change="location_id_change(location_src_id,location_dest_id)"/>
                            <field name="location_dest_id" domain="[('usage','=','internal')]"/>
                            <field name="bom_id" select="2" domain="[('product_id','=',product_id),('bom_id','=',False)]" on_change="bom_id_change(bom_id)"/>
                            <field name="routing_id" groups="base.group_extended" select="1"/>
                            <newline/>
                            <field colspan="4" name="move_lines" nolabel="1" widget="one2many_list"/>
                            <group col="9" colspan="4">
                                <field name="state" select="2"/>
                                <button name="action_compute" states="draft" string="Compute Data" type="object"/>
                                <button name="button_confirm" states="draft" string="Confirm Production"/>
                                <button name="button_produce" states="ready" string="Start Production"/>
                                <button name="button_produce_done" states="in_production" string="Production done"/>
                                <button name="force_production" states="confirmed,picking_except" string="Force Reservation" type="object"/>
                                <button name="button_cancel" states="draft,ready,confirmed,in_production,picking_except" string="Cancel"/>
                                <button name="button_recreate" states="picking_except" string="Recreate Picking"/>
                            </group>
                        </page>
                        <page string="Scheduled Products">
                            <field colspan="4" name="product_lines" nolabel="1" widget="one2many_list"/>
                        </page>
                        <page string="Finished Products">
                            <field colspan="4" name="move_created_ids" nolabel="1"/>
                        </page>
                        <page string="Work Orders">
                            <field colspan="4" name="workcenter_lines" nolabel="1">
                                <form string="Production Workcenters">
                                    <field colspan="4" name="name" select="1"/>
                                    <field colspan="4" name="workcenter_id" select="1"/>
                                    <field name="sequence"/>
                                    <field name="cycle"/>
                                    <field name="hour"/>
                                </form>
                                <tree string="Production Workcenters">
                                    <field name="sequence"/>
                                    <field name="name"/>
                                    <field name="workcenter_id"/>
                                    <field name="cycle"/>
                                    <field name="hour"/>
                                </tree>
                            </field>

                        </page>
                        <page string="Extra Information">
                            <field name="priority" groups="base.group_extended"/>
                            <newline/>
                            <field name="date_start" select="2"/>
                            <field name="date_finnished"/>
                            <field name="picking_id"/>
                            <field name="move_prod_id"/>
                            <field name="sale_name"/>
                            <field name="sale_ref"/>
                        </page>
                    </notebook>
                </form>
            </field>
        </record>
        <record id="mrp_production_action" model="ir.actions.act_window">
            <field name="name">Production Orders</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">mrp.production</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form,calendar,graph,gantt</field>
            <field name="view_id" eval="False"/>
        </record>
        <menuitem action="mrp_production_action" id="menu_mrp_production_action" parent="menu_mrp_root"/>

        <record id="mrp_production_action2_gantt" model="ir.actions.act_window">
            <field name="name">Production Orders Planning</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">mrp.production</field>
            <field name="view_type">form</field>
            <field name="view_mode">gantt,tree,form,calendar,graph</field>
            <field name="domain">[('state','in',('ready','confirmed','in_production'))]</field>
        </record>
        <menuitem
            action="mrp_production_action2_gantt"
            id="menu_production_orders_start_gantt"
            parent="menu_mrp_production_action"
            sequence="20"/>

        <record id="mrp_production_action2" model="ir.actions.act_window">
            <field name="name">Production Orders To Start</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">mrp.production</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form,calendar,graph,gantt</field>
            <field name="domain">[('state','=','ready')]</field>
        </record>
        <menuitem action="mrp_production_action2" id="menu_production_orders_start" parent="menu_mrp_production_action"/>
        <record id="mrp_production_action3" model="ir.actions.act_window">
            <field name="name">Production Orders in Progress</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">mrp.production</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form,calendar,graph,gantt</field>
            <field name="domain">[('state','=','in_production')]</field>
        </record>
        <menuitem action="mrp_production_action3" id="menu_mrp_production_action3" parent="menu_mrp_production_action"/>
        <record id="mrp_production_action4" model="ir.actions.act_window">
            <field name="name">Production Orders Waiting Products</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">mrp.production</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form,calendar,graph,gantt</field>
            <field name="domain">[('state','=','confirmed')]</field>
        </record>
        <menuitem action="mrp_production_action4" id="menu_production_orders_waiting4" parent="mrp.menu_mrp_production_action"/>

         <record id="mrp_production_new" model="ir.actions.act_window">
            <field name="name">New Production Order</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">mrp.production</field>
            <field name="view_type">form</field>
            <field name="view_mode">form,tree,calendar,graph,gantt</field>
        </record>
        <menuitem action="mrp_production_new" id="menu_production_orders_new" parent="mrp.menu_mrp_production_action"/>

        <record id="mrp_production_lot_form_view" model="ir.ui.view">
            <field name="name">mrp.production.lot.line.form</field>
            <field name="model">mrp.production.lot.line</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <form string="Production Products">
                    <field colspan="4" name="move_id" on_change="onchange_lot_line_id(lot_id)"/>
                    <field name="name"/>
                    <field name="product_id"/>
                    <field name="product_qty"/>
                    <field name="product_uom"/>
                    <field name="product_uos_qty"/>
                    <field name="product_uos"/>
                    <field name="tracking_id"/>
                </form>
            </field>
        </record>
        <record id="mrp_production_lot_tree_view" model="ir.ui.view">
            <field name="name">mrp.production.lot.line.tree</field>
            <field name="model">mrp.production.lot.line</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <tree string="Production Products Consommation">
                    <field name="product_id"/>
                    <field name="product_qty"/>
                    <field name="product_uom"/>
                    <field name="product_uos_qty"/>
                    <field name="product_uos"/>
                    <field name="tracking_id"/>
                </tree>
            </field>
        </record>

        <record id="mrp_production_product_form_view" model="ir.ui.view">
            <field name="name">mrp.production.product.line.form</field>
            <field name="model">mrp.production.product.line</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <form string="Scheduled Products">
                    <field name="name"/>
                    <field name="product_id"/>
                    <field name="product_qty"/>
                    <field name="product_uom"/>
                    <field name="product_uos_qty"/>
                    <field name="product_uos"/>
                </form>
            </field>
        </record>
        <record id="mrp_production_product_tree_view" model="ir.ui.view">
            <field name="name">mrp.production.product.line.tree</field>
            <field name="model">mrp.production.product.line</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <tree string="Scheduled Products">
                    <field name="product_id"/>
                    <field name="product_qty"/>
                    <field name="product_uom"/>
                    <field name="product_uos_qty"/>
                    <field name="product_uos"/>
                </tree>
            </field>
        </record>

        <!--
    Procurement
    -->

        <record id="mrp_procurement_tree_view" model="ir.ui.view">
            <field name="name">mrp.procurement.tree</field>
            <field name="model">mrp.procurement</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <tree string="Procurement Lines">
                    <field name="name"/>
                    <field name="product_id"/>
                    <field name="product_qty"/>
                    <field name="product_uom" string="UOM"/>
                    <field name="date_planned"/>
                    <field name="procure_method"/>
                    <field name="origin"/>
                    <field name="state"/>
                    <field name="message"/>
                </tree>
            </field>
        </record>
        <record id="mrp_procurement_form_view" model="ir.ui.view">
            <field name="name">mrp.procurement.form</field>
            <field name="model">mrp.procurement</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <form string="Procurement">
                    <group col="2" colspan="2">
                        <separator colspan="2" string="References"/>
                        <field name="name" select="1" string="Procurement Reason"/>
                        <field name="origin" select="2"/>
                    </group>
                    <group col="2" colspan="2">
                        <separator colspan="2" string="Planification"/>
                        <field name="date_planned" select="1"/>
                        <field name="procure_method" select="2"/>
                        <field name="priority" groups="base.group_extended"/>
                    </group>
                    <notebook colspan="4">
                    <page string="Procurement Details">
                        <separator colspan="4" string="Product &amp; Location"/>
                        <field name="product_id" select="1" on_change="onchange_product_id(product_id)"/>
                        <field name="location_id" select="2"/>
                        <field name="product_qty"/>
                        <field name="product_uom"/>

                        <field name="product_uos_qty" groups="product.group_uos"/>
                        <field name="product_uos" groups="product.group_uos"/>

                        <separator colspan="4" string="Status"/>
                        <field colspan="4" name="message" readonly="1"/>
                        <field name="state" readonly="1" select="2"/>
                        <group col="7" colspan="2">
                            <button name="button_confirm" states="draft" string="Confirm"/>
                            <button name="button_restart" states="exception" string="Retry"/>
                            <button name="button_cancel" states="exception,waiting" string="Cancel"/>
                            <button name="button_check" states="confirmed" string="Run procurement"/>
                            <button name="button_cancel" states="draft,running" string="Cancel"/>
                        </group>
                    </page>
                    <page string="Extra Information">
                        <separator colspan="4" string="Details"/>
                        <field name="bom_id" select="2" domain="[('product_id','=',product_id),('bom_id','=',False)]"/>
                        <field name="move_id" groups="base.group_extended"/>
                        <field name="date_close" select="2"/>
                        <field name="close_move" groups="base.group_extended"/>
                        <field name="purchase_id"/>
                        <separator colspan="4" string="Properties"/>
                        <field colspan="4" name="property_ids" nolabel="1" groups="base.group_extended"/>
                    </page>
                    <page string="Notes">
                        <separator colspan="4" string="Note" />
                        <field name="note" colspan="4" nolabel="1"/>
                    </page>
                    </notebook>
                </form>
            </field>
        </record>
        <record id="mrp_procurement_action" model="ir.actions.act_window">
            <field name="name">Procurement Orders</field><commit_msg>[FIX] MRP : procurement does not need cancel button when its Running<commit_after><?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>

        <menuitem icon="terp-mrp" id="menu_mrp_root" name="Manufacturing"
            groups="group_mrp_user,group_mrp_manager"/>
        <menuitem id="menu_mrp_reordering" name="Automatic Procurements" parent="stock.menu_stock_root" sequence="4"/>

        <!--
    Property / Property Group
    -->

        <record id="mrp_property_group_form_view" model="ir.ui.view">
            <field name="name">mrp.property.group.form</field>
            <field name="model">mrp.property.group</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <form string="Properties categories">
                    <separator colspan="4" string="General Information"/>
                    <field colspan="4" name="name" select="1"/>
                    <field colspan="4" name="description"/>
                </form>
            </field>
        </record>
        <record id="mrp_property_group_action" model="ir.actions.act_window">
            <field name="name">Property Categories</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">mrp.property.group</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>
        </record>
        <menuitem
            id="menu_mrp_configuration"
            name="Configuration"
            parent="menu_mrp_root"
            groups="group_mrp_manager"/>
        <menuitem
            id="menu_mrp_property_group_action_prop"
            name="Properties"
            parent="menu_mrp_configuration"
            groups="base.group_extended"/>
        <menuitem
            action="mrp_property_group_action"
            id="menu_mrp_property_group_action"
            parent="menu_mrp_property_group_action_prop"/>

        <record id="mrp_property_tree_view" model="ir.ui.view">
            <field name="name">mrp.property.tree</field>
            <field name="model">mrp.property</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <tree string="Properties">
                    <field name="name"/>
                    <field name="composition"/>
                    <field name="group_id"/>
                </tree>
            </field>
        </record>
        <record id="mrp_property_form_view" model="ir.ui.view">
            <field name="name">mrp.property.form</field>
            <field name="model">mrp.property</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <form string="Properties">
                    <separator colspan="4" string="General Information"/>
                    <field colspan="4" name="name" select="1"/>
                    <field name="group_id" select="1"/>
                    <field name="composition" select="1"/>
                    <separator colspan="4" string="Description"/>
                    <field colspan="4" name="description"/>
                </form>
            </field>
        </record>
        <record id="mrp_property_action" model="ir.actions.act_window">
            <field name="name">Properties</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">mrp.property</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>
        </record>
        <menuitem
            action="mrp_property_action"
            id="menu_mrp_property_action"
            parent="menu_mrp_property_group_action_prop"/>

        <!--
    Workcenters
    -->

        <record id="mrp_workcenter_tree_view" model="ir.ui.view">
            <field name="name">mrp.workcenter.tree</field>
            <field name="model">mrp.workcenter</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <tree string="Workcenter">
                    <field name="code"/>
                    <field name="name"/>
                </tree>
            </field>
        </record>
        <record id="mrp_workcenter_view" model="ir.ui.view">
            <field name="name">mrp.workcenter.form</field>
            <field name="model">mrp.workcenter</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <form string="Workcenter">
                    <group col="6" colspan="4">
                        <field name="name" select="1"/>
                        <field name="code" select="1"/>
                        <field name="active" select="2"/>
                    </group>
                    <notebook colspan="4">
                        <page string="Workcenter">
                            <field name="type"/>
                            <field name="timesheet_id"/>
                            <separator colspan="4" string="Description"/>
                            <field colspan="4" name="note" nolabel="1"/>
                            <separator colspan="4" string="Capacity Information"/>
                            <group col="4" colspan="4">
                                <field name="capacity_per_cycle"/>
                                <newline/>
                                <field name="time_cycle"/>
                                <field name="time_efficiency"/>
                                <field name="time_start"/>
                                <field name="time_stop"/>
                            </group>
                        </page>
                        <page string="Analytic Accounting">
                            <field name="costs_hour"/>
                            <field name="costs_hour_account_id"/>
                            <field name="costs_cycle"/>
                            <field name="costs_cycle_account_id"/>
                            <field name="costs_journal_id"/>
                            <field name="costs_general_account_id"/>
                        </page>
                    </notebook>
                </form>
            </field>
        </record>
        <record id="mrp_workcenter_action" model="ir.actions.act_window">
            <field name="name">Workcenters</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">mrp.workcenter</field>
            <field name="view_type">form</field>
            <field name="view_id" ref="mrp_workcenter_tree_view"/>
        </record>
        <menuitem action="mrp_workcenter_action" id="menu_mrp_workcenter_action" parent="menu_mrp_configuration"/>

        <!--
    Routings
    -->

        <record id="mrp_routing_workcenter_tree_view" model="ir.ui.view">
            <field name="name">mrp.routing.workcenter.tree</field>
            <field name="model">mrp.routing.workcenter</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <tree string="Routing Workcenters">
                    <field name="sequence"/>
                    <field name="workcenter_id" select="1"/>
                    <field name="cycle_nbr"/>
                    <field name="hour_nbr"/>
                </tree>
            </field>
        </record>

        <record id="mrp_routing_workcenter_form_view" model="ir.ui.view">
            <field name="name">mrp.routing.workcenter.form</field>
            <field name="model">mrp.routing.workcenter</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <form string="Routing Workcenters">
                    <separator colspan="4" string="General Information"/>
                    <field colspan="4" name="name" select="1"/>
                    <field name="sequence" select="1"/>
                    <field name="workcenter_id" select="1"/>
                    <field name="cycle_nbr"/>
                    <field name="hour_nbr"/>
                    <field colspan="4" name="note"/>
                </form>
            </field>
        </record>

        <record id="mrp_routing_form_view" model="ir.ui.view">
            <field name="name">mrp.routing.form</field>
            <field name="model">mrp.routing</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <form string="Routing">
                    <separator colspan="4" string="General Information"/>
                    <field name="name" select="1"/>
                    <field name="active" select="1"/>
                    <field name="code" select="1"/>
                    <field name="location_id"/>
                    <separator colspan="4" string="Description"/>
                    <field colspan="4" name="note" nolabel="1"/>
                    <separator colspan="4" string="Workcenter Operations"/>
                    <field colspan="4" name="workcenter_lines" nolabel="1" widget="one2many_list"/>
                </form>
            </field>
        </record>
        <record id="mrp_routing_tree_view" model="ir.ui.view">
            <field name="name">mrp.routing.tree</field>
            <field name="model">mrp.routing</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <tree string="Routing">
                    <field name="code"/>
                    <field name="name"/>
                    <field name="location_id"/>
                </tree>
            </field>
        </record>
        <record id="mrp_routing_action" model="ir.actions.act_window">
            <field name="name">Routings</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">mrp.routing</field>
            <field name="view_type">form</field>
            <field name="view_id" ref="mrp_routing_tree_view"/>
        </record>
        <menuitem action="mrp_routing_action" id="menu_mrp_routing_action" parent="menu_mrp_configuration"/>

        <!--
    Bill of Materials
    -->

        <record id="mrp_bom_form_view" model="ir.ui.view">
            <field name="name">mrp.bom.form</field>
            <field name="model">mrp.bom</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <form string="Bill of Material">
                    <field name="product_id" on_change="onchange_product_id(product_id, name)" select="1"/>
                    <newline/>
                    <field name="product_uom"/>
                    <field name="product_qty"/>
                    <field name="name" select="1"/>
                    <field name="code" select="1"/>
                    <newline/>
                    <field name="product_uos" groups="product.group_uos"/>
                    <field name="product_uos_qty" groups="product.group_uos"/>
                    <field name="routing_id" select="2" groups="base.group_extended"/>
                    <field name="type" groups="base.group_extended"/>
                    <notebook colspan="4">
                        <page string="General Information">
                            <field colspan="4" name="bom_lines" nolabel="1" widget="one2many_list"/>
                        </page>
                        <page string="Revisions" groups="base.group_extended">
                            <field colspan="4" name="revision_ids" nolabel="1" widget="one2many_list"/>
                        </page>
                        <page string="Properties">
                            <field name="position" select="2"/>
                            <field name="active" select="2"/>
                            <field name="sequence"/>
                            <field name="bom_id"/>

                            <field name="date_start" select="2"/>
                            <field name="date_stop" select="2"/>
                            <field name="product_rounding"/>
                            <field name="product_efficiency"/>
                            <field colspan="4" name="property_ids" nolabel="2" groups="base.group_extended"/>
                        </page>
                    </notebook>
                </form>
            </field>
        </record>

       <record id="mrp_bom_tree_view" model="ir.ui.view">
            <field name="name">mrp.bom.tree</field>
            <field name="model">mrp.bom</field>
            <field name="type">tree</field>
            <field name="field_parent">child_complete_ids</field>
            <field name="arch" type="xml">
                <tree string="BoM Structure" colors="blue:method">
                    <field name="name"/>
                    <field name="code"/>
                    <field name="product_id"/>
                    <field name="product_qty"/>
                    <field name="product_uom"/>
                    <field name="method"/>
                    <field name="routing_id" groups="base.group_extended"/>
                    <field name="date_start"/>
                    <field name="date_stop"/>
                </tree>
            </field>
        </record>
        <record id="mrp_bom_form_action" model="ir.actions.act_window">
            <field name="name">Bill of Materials</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">mrp.bom</field>
            <field name="view_type">form</field>
            <field name="domain">[('bom_id','=',False)]</field>
            <field name="view_id" ref="mrp_bom_tree_view"/>
        </record>
        <menuitem action="mrp_bom_form_action" id="menu_mrp_bom_form_action" parent="menu_mrp_configuration"/>

        <record id="mrp_bom_tree_action" model="ir.actions.act_window">
            <field name="name">Bill of Material Structure</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">mrp.bom</field>
            <field name="view_type">tree</field>
            <field name="domain">[('bom_id','=',False)]</field>
            <field name="view_id" ref="mrp_bom_tree_view"/>
        </record>
        <menuitem action="mrp_bom_tree_action" id="menu_bom_tree" parent="menu_mrp_bom_form_action"/>
        <record id="mrp_bom_form_action_new" model="ir.actions.act_window">
            <field name="name">New Bill of Materials</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">mrp.bom</field>
            <field name="view_type">form</field>
            <field name="view_mode">form,tree</field>
            <field name="domain">[('bom_id','=',False)]</field>
        </record>
        <menuitem action="mrp_bom_form_action_new" id="menu_mrp_bom_form_action_new" parent="menu_mrp_bom_form_action"/>

        <record id="mrp_bom_form_action2" model="ir.actions.act_window">
            <field name="name">Bill of Materials Components</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">mrp.bom</field>
            <field name="view_type">form</field>
            <field name="domain">[('bom_id','!=',False)]</field>
        </record>
        <menuitem action="mrp_bom_form_action2" id="menu_mrp_bom_form_action2" parent="menu_mrp_configuration"/>

        <record id="action2" model="ir.actions.act_window">
            <field name="name">Bill of Materials Structure</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">mrp.bom</field>
            <field name="domain">[('id','=',active_id)]</field>
            <field name="view_type">tree</field>
            <field name="view_id" ref="mrp_bom_tree_view"/>
        </record>
        <record id="ir_BOM_structure" model="ir.values">
            <field eval="'client_action_multi'" name="key2"/>
            <field eval="'mrp.bom'" name="model"/>
            <field name="name">Bill of Materials Structure</field>
            <field eval="'ir.actions.act_window,'+str(action2)" name="value"/>
            <field eval="True" name="object"/>
        </record>

        <record id="mrp_bom_revision_tree" model="ir.ui.view">
            <field name="name">mrp.bom.revision</field>
            <field name="model">mrp.bom.revision</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <tree string="BoM Revisions">
                    <field name="indice"/>
                    <field name="author_id"/>
                    <field name="date"/>
                    <field colspan="4" name="name"/>
                </tree>
            </field>
        </record>
        <record id="mrp_bom_revision_form" model="ir.ui.view">
            <field name="name">mrp.bom.revision</field>
            <field name="model">mrp.bom.revision</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <form string="BoM Revisions">
                    <field colspan="4" name="name"/>
                    <field colspan="1" name="indice"/>
                    <field colspan="1" name="date"/>
                    <field name="author_id" readonly="1"/>
                    <field colspan="4" name="description"/>
                </form>
            </field>
        </record>

        <!--
    Production Management
    -->

        <record id="mrp_production_tree_view" model="ir.ui.view">
            <field name="name">mrp.production.tree</field>
            <field name="model">mrp.production</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <tree colors="red:date_planned&lt;current_date and state not in ('done','cancel')" string="Production orders">
                    <field name="name"/>
                    <field name="product_id"/>
                    <field name="product_qty" sum="Total Qty"/>
                    <field name="date_planned"/>
                    <field name="routing_id" groups="base.group_extended"/>
                    <field name="hour_total" sum="Total Hours" groups="base.group_extended"/>
                    <field name="cycle_total" sum="Total Cycles" groups="base.group_extended"/>
                    <field name="origin"/>
                    <field name="state"/>
                </tree>
            </field>
        </record>

        <record id="view_production_calendar" model="ir.ui.view">
            <field name="name">mrp.production.calendar</field>
            <field name="model">mrp.production</field>
            <field name="type">calendar</field>
            <field eval="2" name="priority"/>
            <field name="arch" type="xml">
                <calendar color="routing_id" date_start="date_planned" string="Production Orders">
                    <field name="origin"/>
                    <field name="product_id"/>
                    <field name="product_qty"/>
                </calendar>
            </field>
        </record>


        <record id="view_production_gantt" model="ir.ui.view">
            <field name="name">mrp.production.gantt</field>
            <field name="model">mrp.production</field>
            <field name="type">gantt</field>
            <field name="arch" type="xml">
                <gantt color="product_id" date_stop="date_finnished" date_start="date_start" string="Productions">
                    <level object="mrp.routing" link="routing_id" domain="[]">
                        <field name="name"/>
                        <field name="origin"/>
                    </level>
                </gantt>
            </field>
        </record>


        <record model="ir.ui.view" id="view_production_graph">
            <field name="name">mrp.production.graph</field>
            <field name="model">mrp.production</field>
            <field name="type">graph</field>
            <field name="arch" type="xml">
                <graph string="Production orders" type="bar">
                    <field name="date_planned_date"/>
                    <field name="hour_total" operator="+"/>
                    <field name="cycle_total" operator="+"/>
                </graph>
            </field>
        </record>
        <wizard
            string="Change Product Qty."
            model="mrp.production"
            name="change_production_qty"
            id="mrp.wizard_change_production_qty"
            keyword="client_action_multi"
            multi="True"/>

        <record id="mrp_production_form_view" model="ir.ui.view">
            <field name="name">mrp.production.form</field>
            <field name="model">mrp.production</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <form string="Production orders">
                    <group colspan="4" col="7">
                        <field name="name" select="1"/>
                        <field name="date_planned" select="1"/>
                        <field name="origin" select="1"/>
                        <newline/>
                        <field name="product_id" on_change="product_id_change(product_id)" select="1"/>
                        <field name="product_qty"/>
                        <field name="product_uom"/>
                        <button type="action" name="%(mrp.wizard_change_production_qty)d" string="Change Qty" states="ready,confirmed,in_production"/>
                        <newline/>
                        <label string="" colspan="2"/>
                        <field name="product_uos_qty" groups="product.group_uos"/>
                        <field name="product_uos" groups="product.group_uos"/>
                    </group>

                    <notebook colspan="4">
                        <page string="Consumed Products">
                            <field name="location_src_id" select="2" domain="[('usage','=','internal')]" on_change="location_id_change(location_src_id,location_dest_id)"/>
                            <field name="location_dest_id" domain="[('usage','=','internal')]"/>
                            <field name="bom_id" select="2" domain="[('product_id','=',product_id),('bom_id','=',False)]" on_change="bom_id_change(bom_id)"/>
                            <field name="routing_id" groups="base.group_extended" select="1"/>
                            <newline/>
                            <field colspan="4" name="move_lines" nolabel="1" widget="one2many_list"/>
                            <group col="9" colspan="4">
                                <field name="state" select="2"/>
                                <button name="action_compute" states="draft" string="Compute Data" type="object"/>
                                <button name="button_confirm" states="draft" string="Confirm Production"/>
                                <button name="button_produce" states="ready" string="Start Production"/>
                                <button name="button_produce_done" states="in_production" string="Production done"/>
                                <button name="force_production" states="confirmed,picking_except" string="Force Reservation" type="object"/>
                                <button name="button_cancel" states="draft,ready,confirmed,in_production,picking_except" string="Cancel"/>
                                <button name="button_recreate" states="picking_except" string="Recreate Picking"/>
                            </group>
                        </page>
                        <page string="Scheduled Products">
                            <field colspan="4" name="product_lines" nolabel="1" widget="one2many_list"/>
                        </page>
                        <page string="Finished Products">
                            <field colspan="4" name="move_created_ids" nolabel="1"/>
                        </page>
                        <page string="Work Orders">
                            <field colspan="4" name="workcenter_lines" nolabel="1">
                                <form string="Production Workcenters">
                                    <field colspan="4" name="name" select="1"/>
                                    <field colspan="4" name="workcenter_id" select="1"/>
                                    <field name="sequence"/>
                                    <field name="cycle"/>
                                    <field name="hour"/>
                                </form>
                                <tree string="Production Workcenters">
                                    <field name="sequence"/>
                                    <field name="name"/>
                                    <field name="workcenter_id"/>
                                    <field name="cycle"/>
                                    <field name="hour"/>
                                </tree>
                            </field>

                        </page>
                        <page string="Extra Information">
                            <field name="priority" groups="base.group_extended"/>
                            <newline/>
                            <field name="date_start" select="2"/>
                            <field name="date_finnished"/>
                            <field name="picking_id"/>
                            <field name="move_prod_id"/>
                            <field name="sale_name"/>
                            <field name="sale_ref"/>
                        </page>
                    </notebook>
                </form>
            </field>
        </record>
        <record id="mrp_production_action" model="ir.actions.act_window">
            <field name="name">Production Orders</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">mrp.production</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form,calendar,graph,gantt</field>
            <field name="view_id" eval="False"/>
        </record>
        <menuitem action="mrp_production_action" id="menu_mrp_production_action" parent="menu_mrp_root"/>

        <record id="mrp_production_action2_gantt" model="ir.actions.act_window">
            <field name="name">Production Orders Planning</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">mrp.production</field>
            <field name="view_type">form</field>
            <field name="view_mode">gantt,tree,form,calendar,graph</field>
            <field name="domain">[('state','in',('ready','confirmed','in_production'))]</field>
        </record>
        <menuitem
            action="mrp_production_action2_gantt"
            id="menu_production_orders_start_gantt"
            parent="menu_mrp_production_action"
            sequence="20"/>

        <record id="mrp_production_action2" model="ir.actions.act_window">
            <field name="name">Production Orders To Start</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">mrp.production</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form,calendar,graph,gantt</field>
            <field name="domain">[('state','=','ready')]</field>
        </record>
        <menuitem action="mrp_production_action2" id="menu_production_orders_start" parent="menu_mrp_production_action"/>
        <record id="mrp_production_action3" model="ir.actions.act_window">
            <field name="name">Production Orders in Progress</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">mrp.production</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form,calendar,graph,gantt</field>
            <field name="domain">[('state','=','in_production')]</field>
        </record>
        <menuitem action="mrp_production_action3" id="menu_mrp_production_action3" parent="menu_mrp_production_action"/>
        <record id="mrp_production_action4" model="ir.actions.act_window">
            <field name="name">Production Orders Waiting Products</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">mrp.production</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form,calendar,graph,gantt</field>
            <field name="domain">[('state','=','confirmed')]</field>
        </record>
        <menuitem action="mrp_production_action4" id="menu_production_orders_waiting4" parent="mrp.menu_mrp_production_action"/>

         <record id="mrp_production_new" model="ir.actions.act_window">
            <field name="name">New Production Order</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">mrp.production</field>
            <field name="view_type">form</field>
            <field name="view_mode">form,tree,calendar,graph,gantt</field>
        </record>
        <menuitem action="mrp_production_new" id="menu_production_orders_new" parent="mrp.menu_mrp_production_action"/>

        <record id="mrp_production_lot_form_view" model="ir.ui.view">
            <field name="name">mrp.production.lot.line.form</field>
            <field name="model">mrp.production.lot.line</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <form string="Production Products">
                    <field colspan="4" name="move_id" on_change="onchange_lot_line_id(lot_id)"/>
                    <field name="name"/>
                    <field name="product_id"/>
                    <field name="product_qty"/>
                    <field name="product_uom"/>
                    <field name="product_uos_qty"/>
                    <field name="product_uos"/>
                    <field name="tracking_id"/>
                </form>
            </field>
        </record>
        <record id="mrp_production_lot_tree_view" model="ir.ui.view">
            <field name="name">mrp.production.lot.line.tree</field>
            <field name="model">mrp.production.lot.line</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <tree string="Production Products Consommation">
                    <field name="product_id"/>
                    <field name="product_qty"/>
                    <field name="product_uom"/>
                    <field name="product_uos_qty"/>
                    <field name="product_uos"/>
                    <field name="tracking_id"/>
                </tree>
            </field>
        </record>

        <record id="mrp_production_product_form_view" model="ir.ui.view">
            <field name="name">mrp.production.product.line.form</field>
            <field name="model">mrp.production.product.line</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <form string="Scheduled Products">
                    <field name="name"/>
                    <field name="product_id"/>
                    <field name="product_qty"/>
                    <field name="product_uom"/>
                    <field name="product_uos_qty"/>
                    <field name="product_uos"/>
                </form>
            </field>
        </record>
        <record id="mrp_production_product_tree_view" model="ir.ui.view">
            <field name="name">mrp.production.product.line.tree</field>
            <field name="model">mrp.production.product.line</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <tree string="Scheduled Products">
                    <field name="product_id"/>
                    <field name="product_qty"/>
                    <field name="product_uom"/>
                    <field name="product_uos_qty"/>
                    <field name="product_uos"/>
                </tree>
            </field>
        </record>

        <!--
    Procurement
    -->

        <record id="mrp_procurement_tree_view" model="ir.ui.view">
            <field name="name">mrp.procurement.tree</field>
            <field name="model">mrp.procurement</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <tree string="Procurement Lines">
                    <field name="name"/>
                    <field name="product_id"/>
                    <field name="product_qty"/>
                    <field name="product_uom" string="UOM"/>
                    <field name="date_planned"/>
                    <field name="procure_method"/>
                    <field name="origin"/>
                    <field name="state"/>
                    <field name="message"/>
                </tree>
            </field>
        </record>
        <record id="mrp_procurement_form_view" model="ir.ui.view">
            <field name="name">mrp.procurement.form</field>
            <field name="model">mrp.procurement</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <form string="Procurement">
                    <group col="2" colspan="2">
                        <separator colspan="2" string="References"/>
                        <field name="name" select="1" string="Procurement Reason"/>
                        <field name="origin" select="2"/>
                    </group>
                    <group col="2" colspan="2">
                        <separator colspan="2" string="Planification"/>
                        <field name="date_planned" select="1"/>
                        <field name="procure_method" select="2"/>
                        <field name="priority" groups="base.group_extended"/>
                    </group>
                    <notebook colspan="4">
                    <page string="Procurement Details">
                        <separator colspan="4" string="Product &amp; Location"/>
                        <field name="product_id" select="1" on_change="onchange_product_id(product_id)"/>
                        <field name="location_id" select="2"/>
                        <field name="product_qty"/>
                        <field name="product_uom"/>

                        <field name="product_uos_qty" groups="product.group_uos"/>
                        <field name="product_uos" groups="product.group_uos"/>

                        <separator colspan="4" string="Status"/>
                        <field colspan="4" name="message" readonly="1"/>
                        <field name="state" readonly="1" select="2"/>
                        <group col="7" colspan="2">
                            <button name="button_confirm" states="draft" string="Confirm"/>
                            <button name="button_restart" states="exception" string="Retry"/>
                            <button name="button_cancel" states="draft,exception,waiting" string="Cancel"/>
                            <button name="button_check" states="confirmed" string="Run procurement"/>
                        </group>
                    </page>
                    <page string="Extra Information">
                        <separator colspan="4" string="Details"/>
                        <field name="bom_id" select="2" domain="[('product_id','=',product_id),('bom_id','=',False)]"/>
                        <field name="move_id" groups="base.group_extended"/>
                        <field name="date_close" select="2"/>
                        <field name="close_move" groups="base.group_extended"/>
                        <field name="purchase_id"/>
                        <separator colspan="4" string="Properties"/>
                        <field colspan="4" name="property_ids" nolabel="1" groups="base.group_extended"/>
                    </page>
                    <page string="Notes">
                        <separator colspan="4" string="Note" />
                        <field name="note" colspan="4" nolabel="1"/>
                    </page>
                    </notebook>
                </form>
            </field>
        </record>
        <record id="mrp_procurement_action" model="ir.actions.act_window">
            <field name="name">Procurement Orders</field>
{'fraction_non_alphanumeric': 0.14237050670988832, 'fraction_numerical': 0.004038295125200884, 'mean_word_length': 1.674552735020756, 'pattern_counts': {'":': 0, '<': 1610, '<?xml version=': 2, '>': 1610, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 50}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 20, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6851112', 'n_tokens_mistral': 19741, 'n_tokens_neox': 18889, 'n_words': 3163}