document: fix regressions at storage and node_descriptor
[odoo/odoo.git] / addons / mrp / mrp_view.xml
index 8b14158..adc517f 100644 (file)
@@ -2,15 +2,16 @@
 <openerp>
     <data>
 
-        <menuitem icon="terp-mrp" id="base.menu_mrp_root" name="Manufacturing"
-            groups="group_mrp_user,group_mrp_manager" sequence="3"/>
-        <menuitem id="menu_mrp_reordering" name="Automatic Procurements" parent="stock.menu_stock_root" sequence="4"/>
+        <menuitem icon="terp-mrp" id="base.menu_mrp_root" parent="" name="Manufacturing"
+            groups="group_mrp_user,group_mrp_manager" sequence="8"/>
+
         <menuitem id="menu_mrp_manufacturing" name="Manufacturing" parent="base.menu_mrp_root" sequence="1"/>
 
-<!--        <menuitem name="Control" id="menu_mrp_control" parent="base.menu_mrp_root"  sequence="3" />-->
+
         <menuitem name="Master Data"
                   id="menu_mrp_bom"
                   parent="base.menu_mrp_root"
+                  groups="mrp.group_mrp_manager"
                   sequence="5" />
 
         <!--
             </field>
         </record>
         <record id="mrp_property_group_action" model="ir.actions.act_window">
-            <field name="name">Property Categories</field>
+            <field name="name">Property Groups</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>
+            <field name="help">Define specific property groups that can be assigned to the properties of your bills of materials.</field>
         </record>
         <menuitem
             id="menu_mrp_configuration"
             name="Configuration"
             parent="base.menu_mrp_root"
-            groups="group_mrp_manager"
+            groups="base.group_extended"
             sequence="50" />
 
         <record id="mrp_property_tree_view" model="ir.ui.view">
             <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"/>
+                    <field colspan="4" name="description" nolabel="1"/>
                 </form>
             </field>
         </record>
+
+        <record id="view_mrp_property_search" model="ir.ui.view">
+            <field name="name">mrp.property.search</field>
+            <field name="model">mrp.property</field>
+            <field name="type">search</field>
+            <field name="arch" type="xml">
+                <search string="Search">
+                   <group col='15' colspan='4'>
+                       <field name="name"/>
+                       <field name="composition"/>
+                       <field name="group_id"  widget="selection" />
+                   </group>
+                   <newline/>
+                   <group expand="0" string="Group By..." colspan="4" col="20">
+                        <filter string="Property Group" icon="terp-personal" domain="[]" context="{'group_by':'group_id'}"/>
+                    </group>
+               </search>
+            </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>
+            <field name="search_view_id" ref="view_mrp_property_search"/>
+            <field name="help">The Properties in OpenERP are used to select the right bill of material in order to manufacture a product, when you have different ways of building the same product. You can assign several properties to each Bill of Materials. When a sales person creates a sales order, he can relate it to several properties and OpenERP will select automatically the BoM to use according the the needs.</field>
         </record>
-        <menuitem name="Properties"
+        <menuitem name="Master Bill of Materials"
             id="menu_mrp_property"
             parent="menu_mrp_configuration"
             groups="base.group_extended"
                 <tree string="Work Center">
                     <field name="code"/>
                     <field name="name"/>
+                    <field name="resource_type"/>
+                    <field name="company_id" groups="base.group_multi_company"/>
                 </tree>
             </field>
         </record>
                         <field name="name" select="1"/>
                         <field name="code" select="1"/>
                         <field name="active"/>
+                        <field name="resource_type"/>
+                        <field name="calendar_id" widget="selection"/>
                         <field name="company_id" select="1" groups="base.group_multi_company" widget="selection"/>
                     </group>
                     <notebook colspan="4">
-                        <page string="Work Center">
-                            <field name="resource_type"/>
-                            <field name="calendar_id" widget="selection"/>
-                            <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"/>
+                        <page string="General Information">
+                            <group col="2" colspan="2">
+                            <separator colspan="2" string="Capacity Information"/>
+                            <field name="time_efficiency"/>
+                            <field name="capacity_per_cycle"/>
+                            <field name="time_cycle" widget="float_time"/>
+                            <field name="time_start" widget="float_time"/>
+                            <field name="time_stop" widget="float_time"/>
                             </group>
-                        </page>
-                        <page string="Analytic Accounting" groups="base.group_extended">
+                            <group col="2" colspan="2">
+                            <separator colspan="2" string="Costing Information"/>
                             <field name="costs_hour"/>
-                            <field name="costs_hour_account_id"/>
+                            <field name="costs_hour_account_id" groups="analytic.group_analytic_accounting"/>
                             <field name="costs_cycle"/>
-                            <field name="costs_cycle_account_id"/>
-                            <field name="costs_journal_id"/>
-                            <field name="costs_general_account_id"/>
+                            <field name="costs_cycle_account_id" groups="analytic.group_analytic_accounting"/>
+                            <field name="costs_journal_id" groups="analytic.group_analytic_accounting"/>
+                            <field name="costs_general_account_id" groups="analytic.group_analytic_accounting"/>
+                            </group>
+                            <separator colspan="4" string="Description"/>
+                            <field colspan="4" name="note" nolabel="1"/>
                         </page>
                     </notebook>
                 </form>
             </field>
         </record>
-        <record id="mrp_workcenter_action" model="ir.actions.act_window">
-            <field name="name">Work Centers</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"/>
+
+        <!-- Search Views -->
+
+        <record id="view_mrp_workcenter_search" model="ir.ui.view">
+            <field name="name">mrp.workcenter.search</field>
+            <field name="model">mrp.workcenter</field>
+            <field name="type">search</field>
+            <field name="arch" type="xml">
+                <search string="Search for mrp workcenter">
+                   <group col='15' colspan='4'>
+                        <filter string="Inactive" icon="terp-gdu-smart-failing" domain="[('active','=',False)]"/>
+                        <separator orientation="vertical"/>
+                           <field name="code"/>
+                           <field name="name"/>
+                           <field name="resource_type"/>
+                   </group>
+                   <newline/>
+                   <group expand="0" string="Group By..." colspan="4" col="20" groups="base.group_extended">
+                        <filter string="Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'resource_type'}"/>
+                        <separator orientation="vertical" groups="base.group_multi_company"/>
+                        <filter string="Company" icon="terp-go-home" domain="[]" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
+                    </group>
+               </search>
+            </field>
         </record>
 
         <!--
             <field name="arch" type="xml">
                 <tree string="Routing Work Centers">
                     <field name="sequence"/>
+                    <field name="name"/>
                     <field name="workcenter_id"/>
                     <field name="cycle_nbr"/>
                     <field name="hour_nbr"/>
+                    <field name="company_id" widget="selection" groups="base.group_multi_company"/>
                 </tree>
             </field>
         </record>
                     <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="workcenter_id" select="1" widget="selection"/>
                     <field name="cycle_nbr"/>
-                    <field name="hour_nbr"/>
-                    <field colspan="4" name="note"/>
+                    <field name="hour_nbr" widget="float_time"/>
+                    <field name="company_id" widget="selection" groups="base.group_multi_company"/>
+                    <separator colspan="4" string="Description"/>
+                    <field colspan="4" name="note" nolabel="1"/>
                 </form>
             </field>
         </record>
             <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" groups="base.group_extended"/>
-                    <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="Work Center Operations"/>
-                    <field colspan="4" name="workcenter_lines" nolabel="1" widget="one2many_list"/>
+                    <group colspan="4" col="6">
+                        <field name="name"/>
+                        <field name="code"/>
+                        <field name="active" groups="base.group_extended"/>
+                        <field name="location_id"/>
+                        <field name="company_id" widget="selection" groups="base.group_multi_company"/>
+                    </group>
+                    <notebook colspan="4">
+                        <page string="Work Center Operations">
+                           <field colspan="4" name="workcenter_lines" nolabel="1" widget="one2many_list"/>
+                        </page>
+                        <page string="Notes">
+                           <field colspan="4" name="note" nolabel="1"/>
+                        </page>
+                    </notebook>
                 </form>
             </field>
         </record>
                     <field name="code"/>
                     <field name="name"/>
                     <field name="location_id"/>
+                    <field name="company_id" groups="base.group_multi_company"/>
                 </tree>
             </field>
         </record>
+        <record id="mrp_routing_search_view" model="ir.ui.view">
+            <field name="name">mrp.routing.search</field>
+            <field name="model">mrp.routing</field>
+            <field name="type">search</field>
+            <field name="arch" type="xml">
+                <search string="Routing">
+                    <filter string="Inactive" icon="terp-gdu-smart-failing" domain="[('active','=',False)]"/>
+                    <separator orientation="vertical"/>
+                    <field name="code"/>
+                    <field name="name"/>
+                    <field name="location_id"/>
+                    <field name="company_id" groups="base.group_multi_company"/>
+                    <newline/>
+                    <group expand="0" string="Group By..." colspan="4" col="8" groups="base.group_extended">
+                        <filter string="Production Location" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'location_id'}"/>
+                    </group>
+                </search>
+            </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"/>
+            <field name="search_view_id" ref="mrp_routing_search_view"/>
+            <field name="help">Routings allows you to create and manage the manufacturing operations that should be followed within your work centers in order to produce a product. They are attached to bills of materials that will define the required raw materials.</field>
         </record>
- <!--       <menuitem name="Routings" id="menu_mrp_routing_and_workcenters" parent="mrp.menu_mrp_bom" groups="base.group_extended"
-                  sequence="100" />-->
-        <menuitem action="mrp_workcenter_action" id="menu_mrp_workcenter_action" parent="mrp.menu_mrp_bom" groups="base.group_extended" sequence="40" />
-        <menuitem action="mrp_routing_action" id="menu_mrp_routing_action" parent="mrp.menu_mrp_bom" groups="base.group_extended" sequence="30"/>
+        <menuitem action="mrp_routing_action" id="menu_mrp_routing_action" parent="mrp.menu_mrp_property" groups="base.group_extended" sequence="30"/>
 
         <!--
           Bill of Materials
                         <field name="name" select="1"/>
                         <field name="code" select="1" string="Reference" groups="base.group_extended"/>
                         <newline/>
-                        <field name="product_uom"/>
                         <field name="product_qty"/>
-                        <field name="routing_id" groups="base.group_extended"/>
+                        <field name="product_uom" widget="selection"/>
+                        <field name="routing_id" widget="selection" groups="base.group_extended"/>
                         <newline/>
-                        <field name="product_uos" groups="product.group_uos"/>
                         <field name="product_uos_qty" groups="product.group_uos" />
+                        <field name="product_uos" widget="selection" groups="product.group_uos"/>
                         <newline/>
                         <field name="type" groups="base.group_extended"/>
                         <field name="company_id" select="1" groups="base.group_multi_company" widget="selection"/>
                             <field colspan="4" name="bom_lines" nolabel="1" widget="one2many_list">
                                 <tree string="Components" editable="bottom">
                                     <field name="product_id" on_change="onchange_product_id(product_id, name)" select="1"/>
-                                    <field name="product_uom"/>
                                     <field name="product_qty"/>
+                                    <field name="product_uom"/>
                                     <field name="name" invisible="1"/>
                                     <field name="date_start"/>
                                     <field name="date_stop"/>
             <field name="arch" type="xml">
                 <search string="Search Bill Of Material">
                     <group col='4' colspan='4'>
-                      <field name="name"/>
-                        <field name="code" string="Reference"/>
-                        <field name="product_id"/>
-                        <field name="company_id" groups="base.group_multi_company"/>
+                         <field name="name"/>
+                         <field name="code" string="Reference"/>
+                         <field name="product_id"/>
+                         <field name="company_id" groups="base.group_multi_company"/>
                     </group>
                     <newline/>
-                    <group expand="0" string="Group By" colspan="4" col="8" groups="base.group_extended">
+                    <group expand="0" string="Group By..." colspan="4" col="8" groups="base.group_extended">
                         <filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
+                        <filter string='Default UOM' icon="terp-mrp" domain="[]" context="{'group_by' : 'product_uom'}" />
+                        <separator orientation="vertical"/>
                         <filter string="Routing" icon="terp-stock_align_left_24" domain="[]" context="{'group_by':'routing_id'}"/>
+                        <filter string='Type' icon="terp-stock_symbol-selection" domain="[]" context="{'group_by' : 'type'}" />
+                        <separator orientation="vertical"/>
+                        <filter string="Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_start'}" help="Starting Date"/>
                    </group>
                 </search>
             </field>
                     <field name="product_id"/>
                     <field name="product_qty"/>
                     <field name="product_uom"/>
-                    <field name="method"/>
+                    <field name="type"/>
+                    <field name="method" groups="base.group_extended"/>
                     <field name="routing_id" groups="base.group_extended"/>
-                    <field name="date_start"/>
-                    <field name="date_stop"/>
+                    <field name="date_start" groups="base.group_extended"/>
+                    <field name="date_stop" groups="base.group_extended"/>
                 </tree>
             </field>
         </record>
         <record id="mrp_bom_form_action" model="ir.actions.act_window">
-            <field name="name">Master Bill of Materials</field>
+            <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),('multi_level_bom','=',True)]</field>
+            <field name="domain">[('bom_id','=',False)]</field>
             <field name="search_view_id" ref="view_mrp_bom_filter"/>
+            <field name="help">Master Bill of Materials allows you to create and manage the list of necessary raw materials used to make a finished product. OpenERP will use these BoM in order to propose automatically manufacturing orders according to products' needs. You can either create a bill of materials to define specific production steps or define a single multi-level bill of materials.</field>
         </record>
         <record id="mrp_bom_form_action2" model="ir.actions.act_window">
             <field name="name">Bill of Material Components</field>
             <field name="res_model">mrp.bom</field>
             <field name="view_type">form</field>
             <field name="domain">[('bom_id','!=',False)]</field>
+            <field name="help">Bills of materials Components are components and sub-products used to create master bills of materials. Use this menu to search in which BoM is used a specific component.</field>
         </record>
 
         <!-- BOM menus -->
 
-  <!--      <menuitem name="Bill of Materials"
-                  id="menu_mrp_bom"
-                  parent="menu_mrp_bom"
-                  sequence="50" />-->
         <menuitem
             action="mrp_bom_form_action"
             id="menu_mrp_bom_form_action"
             parent="menu_mrp_bom"
+            groups="mrp.group_mrp_user,mrp.group_mrp_manager"
             sequence="10"/>
         <menuitem
             action="mrp_bom_form_action2"
                     <field colspan="1" name="indice"/>
                     <field colspan="1" name="date"/>
                     <field name="author_id" readonly="1"/>
-                    <field colspan="4" name="description"/>
+                    <separator colspan="4" string="Description"/>
+                    <field colspan="4" name="description" nolabel="1"/>
                 </form>
             </field>
         </record>
 
         <!--
-        Procurement
-        -->
-
-        <menuitem action="procurement.procurement_action" id="menu_mrp_procurement_action"
-                  parent="mrp.menu_mrp_manufacturing" sequence="2" />
-<!--        <menuitem action="procurement.procurement_action5" id="menu_mrp_procurement_exception_action"-->
-<!--                  parent="mrp.menu_mrp_control" sequence="1" />-->
-
-         <menuitem id="menu_mrp_scheduler" name="Schedulers" parent="base.menu_mrp_root" sequence="4"/>
-        <menuitem action="procurement.action_compute_schedulers" id="mrp_Sched_all" parent="mrp.menu_mrp_scheduler" sequence="90"/>
-
-        <!--
-        Order Point
-        -->
-        <menuitem action="procurement.action_orderpoint_form" id="menu_action_orderpoint_form" parent="mrp.menu_mrp_reordering"/>
-
-        <!--
         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="blue:state in ('confirmed');red:date_planned&lt;current_date and state not in ('done','cancel');black:date_planned&gt;=current_date;gray:state in ('done','cancel') " string="Manufacturing Orders">
+                <tree colors="blue:state in ('draft','confirmed');red:date_planned&lt;current_date and state not in ('done','cancel');black:date_planned&gt;=current_date;gray:state in ('done','cancel') " string="Manufacturing Orders">
                     <field name="name"/>
+                    <field name="date_planned"/>
                     <field name="product_id"/>
                     <field name="product_qty" sum="Total Qty"/>
                     <field name="product_uom"/>
-                    <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 eval="2" name="priority"/>
             <field name="arch" type="xml">
                 <calendar color="routing_id" date_start="date_planned" string="Manufacturing Orders">
-                    <field name="origin"/>
+                    <field name="name"/>
                     <field name="product_id"/>
                     <field name="product_qty"/>
                 </calendar>
             <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">
+                <gantt color="product_id" date_stop="date_finished" date_start="date_start" string="Productions">
                     <level object="mrp.routing" link="routing_id" domain="[]">
                         <field name="name"/>
                         <field name="origin"/>
                         <field name="product_id" on_change="product_id_change(product_id)"/>
                         <field name="product_qty"/>
                         <group colspan="2" col="3">
-                        <field name="product_uom"/>
+                        <field name="product_uom" widget="selection"/>
                         <button type="action"
+                            icon="terp-accessories-archiver+"
                             name="%(mrp.action_change_production_qty)d"
                             string="Change Qty" states="ready,confirmed" />
                         </group>
                         <label string="" colspan="2"/>
                         <field name="product_uos_qty" groups="product.group_uos"/>
-                        <group colspan="2" col="3" groups="product.group_uos">
-                            <field name="product_uos"/>
-                            <label string=""/>
-                        </group>
+                        <field name="product_uos" groups="product.group_uos"/>
                     </group>
 
                     <notebook colspan="4">
                         <page string="Consumed Products">
-                            <field name="bom_id" 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"/>
-                            <field name="location_src_id" 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" 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" widget="selection"/>
+                            <field name="location_src_id" domain="[('usage','=','internal')]" on_change="location_id_change(location_src_id,location_dest_id)" widget="selection"/>
+                            <field name="location_dest_id" domain="[('usage','=','internal')]" widget="selection"/>
                             <separator string="" colspan="4"/>
 
                             <field colspan="2" name="move_lines" nolabel="1" widget="one2many_list"
                                 mode="tree,form" height="275" domain="[('state','&lt;&gt;', ('done', 'cancel'))]">
-                                <tree string="Products to Consume">
+                                <tree colors="blue:state in ('draft');black:state in ('picking_except','confirmed','ready','in_production');gray:state in ('cancel','done') " string="Products to Consume">
                                     <field name="product_id" />
                                     <field name="product_qty"  string="Qty"/>
-                                    <field name="product_uom"  string="UOM"/>
-                                    <field name="location_id"  string="Source Loc."/>
+                                    <field name="product_uom"  string="UOM" widget="selection"/>
+                                    <field name="location_id"  string="Source Loc." widget="selection"/>
                                     <field name="state" invisible="1"/>
                                     <button name="%(stock.move_consume)d"
                                         string="Consume Products" type="action"
 
                             <field colspan="2" name="move_lines2" nolabel="1"  domain="[('state','in', ('done', 'cancel'))]"
                                        widget="one2many_list" mode="tree,form" height="275">
-                                   <tree string="Consumed Products" editable="bottom" colors="red:scraped==True">
+                                   <tree colors="red:scrapped==True;blue:state in('draft');black:state in('picking_except','confirmed','ready','in_production');gray:state in('cancel') " string="Consumed Products" editable="bottom">
                                        <field name="product_id" readonly="1"/>
                                        <field name="product_qty" readonly="1" string="Qty"/>
-                                    <field name="product_uom" readonly="1" string="UOM"/>
-                                    <field name="location_dest_id"  readonly="1" string="Destination Loc."/>
-                                    <field name="prodlot_id" />
-                                    <field name="state" invisible="1"/>
-                                    <field name="scraped" invisible="1"/>
+                                       <field name="product_uom" readonly="1" string="UOM" widget="selection"/>
+                                       <field name="location_dest_id"  readonly="1" string="Destination Loc." widget="selection"/>
+                                       <field name="prodlot_id" context="{'product_id': product_id}"/>
+                                       <field name="state" invisible="1"/>
+                                       <field name="scrapped" invisible="1"/>
                                        <button
                                            name="%(stock.track_line)d"
                                            string="Split in production lots"
                                            states="done,cancel"/>
                                    </tree>
                                </field>
-
+                            <separator colspan="4"/>
                             <group col="9" colspan="4">
                                 <field name="state"/>
-                                <button name="action_compute" states="draft" string="Compute Data" type="object" icon="gtk-execute"/>
+                                <button name="button_cancel" states="draft,ready,confirmed,in_production,picking_except" string="Cancel" icon="gtk-stop"/>
+                                <button name="action_compute" states="draft" string="Compute Data" type="object" icon="terp-stock_format-scientific"/>
                                 <button name="button_confirm" states="draft" string="Confirm Production" icon="gtk-apply"/>
-                                <button name="button_produce" states="ready" string="Mark as Started" icon="gtk-execute"/>
+                                <button name="button_produce" states="ready" string="Start Production" icon="terp-gtk-jump-to-ltr"/>
                                 <button name="%(act_mrp_product_produce)d" states="in_production" string="Produce" icon="gtk-ok" type="action"/>
                                 <button name="force_production" states="confirmed,picking_except" string="Force Reservation" type="object" icon="gtk-jump-to"/>
-                                <button name="button_cancel" states="draft,ready,confirmed,in_production,picking_except" string="Cancel" icon="gtk-cancel"/>
-                                <button name="button_recreate" states="picking_except" string="Recreate Picking" icon="gtk-convert"/>
+                                <button name="button_recreate" states="picking_except" string="Recreate Picking" icon="terp-document-new"/>
                             </group>
                         </page>
                         <page string="Finished Products">
                                 <tree string="Products to Finish">
                                     <field name="product_id" />
                                     <field name="product_qty"  string="Qty"/>
-                                    <field name="product_uom"  string="UOM"/>
-                                    <field name="location_id"  string="Source Loc."/>
+                                    <field name="product_uom"  string="UOM" widget="selection"/>
+                                    <field name="location_id"  string="Source Loc." widget="selection"/>
                                     <field name="state" invisible="1"/>
-                                    <button name="%(stock.move_consume)d"
-                                        string="Consume Products" type="action"
-                                        icon="gtk-go-forward" context="{'consume': True}"
-                                        states="draft,waiting,confirmed,assigned" />
+                                    <button name="%(stock.action_partial_move)d" 
+                                        string="Partial" 
+                                        type="action" states="confirmed,assigned" 
+                                        icon="gtk-justify-fill"/>
                                     <button name="%(stock.move_scrap)d"
                                         string="Scrap Products" type="action"
                                         icon="gtk-convert" context="{'scrap': True}"
 
                             <field colspan="2" name="move_created_ids2" nolabel="1"  domain="[('state','in', ('done', 'cancel'))]"
                                        widget="one2many_list" mode="tree,form" height="275">
-                                   <tree string="Finished Products" editable="bottom" colors="red:scraped==True">
+                                   <tree colors="red:scrapped==True;blue:state in('draft');black:state in('picking_except','confirmed','ready','in_production');gray:state in('cancel','done') " string="Finished Products" editable="bottom">
                                        <field name="product_id" readonly="1"/>
                                        <field name="product_qty" readonly="1" string="Qty"/>
-                                    <field name="product_uom" readonly="1" string="UOM"/>
-                                    <field name="location_dest_id"  readonly="1" string="Destination Loc."/>
-                                       <field name="prodlot_id" />
-                                    <field name="state" invisible="1"/>
-                                    <field name="scraped" invisible="1"/>
+                                       <field name="product_uom" readonly="1" string="UOM" widget="selection"/>
+                                       <field name="location_dest_id"  readonly="1" string="Destination Loc." widget="selection"/>
+                                       <field name="prodlot_id" context="{'product_id': product_id}"/>
+                                       <field name="scrapped" invisible="1"/>
+                                       <field name="state" invisible="1"/>
                                        <button name="%(stock.track_line)d"
                                             string="Split in production lots" type="action" icon="gtk-justify-fill" states="done,cancel"/>
                                        <button name="%(stock.move_scrap)d"
                             <field colspan="4" name="workcenter_lines" nolabel="1">
                                 <form string="Production Work Centers">
                                     <field colspan="4" name="name"/>
-                                    <field colspan="4" name="workcenter_id"/>
+                                    <field name="workcenter_id" widget="selection"/>
                                     <field name="sequence"/>
                                     <field name="cycle"/>
                                     <field name="hour"/>
                                 <tree string="Production Work Centers">
                                     <field name="sequence"/>
                                     <field name="name"/>
-                                    <field name="workcenter_id"/>
+                                    <field name="workcenter_id" widget="selection"/>
                                     <field name="cycle"/>
                                     <field name="hour"/>
                                 </tree>
                             <field name="priority" groups="base.group_extended"/>
                             <newline/>
                             <field name="date_start"/>
-                            <field name="date_finnished"/>
+                            <field name="date_finished"/>
                             <field name="picking_id" groups="base.group_extended"/>
                             <field name="move_prod_id" groups="base.group_extended"/>
                         </page>
                        <filter icon="terp-document-new" string="Draft"
                            domain="[('state','=','draft')]"
                            help="Non confirmed manufacturing orders"/>
-                       <filter icon="terp-check" string="Current" name="Current"
+                       <filter icon="terp-check" string="Current" name="current"
                            default="1"
-                           domain="[('state','in',('confirmed','ready','exception'))]"
-                           help="Manufacturing Orders which are waiting for raw materials"/>
-                       <filter icon="terp-camera_test" string="Ready"
-                           domain="[('state','=','ready')]"
-                           help="Manufacturing Orders which are ready to produce" />
-                       <filter icon="terp-check" string="In Production"
-                           domain="[('state','=','in_production')]"
-                           help="Manufacturing Orders which are in production" />
+                           domain="[('state','in',('confirmed','ready','exception','in_production'))]"
+                           help="Manufacturing Orders which are waiting for raw materials, confirmed, ready to start or currently in production."/>
                        <separator orientation="vertical"/>
                        <filter icon="terp-gnome-cpu-frequency-applet+" string="Late"
                            domain="['&amp;', ('date_planned::date','&lt;', current_date), ('state', 'in', ('draft', 'confirmed', 'ready'))]"
                        <field name="origin"/>
                     </group>
                     <newline/>
-                    <group expand="0" string="Group By" colspan="10" col="8">
+                    <group expand="0" string="Group By..." colspan="10" col="8">
                         <filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
-                        <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
+                        <separator orientation="vertical"/>
                         <filter string="Routing" icon="terp-stock_align_left_24" domain="[]" context="{'group_by':'routing_id'}" groups="base.group_extended"/>
+                        <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
                         <separator orientation="vertical"/>
-                        <filter string="Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_planned'}"/>
+                        <filter string="Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_planned'}" help="Scheduled Date"/>
                     </group>
                </search>
             </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="context">{'search_default_current':1}</field>
             <field name="view_id" eval="False"/>
             <field name="search_view_id" ref="view_mrp_production_filter"/>
-            <field name="context">{'search_default_Current':1}</field>
+            <field name="context">{'search_default_current':1}</field>
+            <field name="help">Manufacturing Orders are usually proposed automatically by OpenERP based on the bill of materials and the procurement rules, but you can also create manufacturing orders manually. OpenERP will handle the consumation of the raw materials (stock decrease) and the production of the finished products (stock increase) when the order is processed.</field>
         </record>
-        <menuitem action="mrp_production_action" id="menu_mrp_production_action" parent="menu_mrp_manufacturing" sequence="1"/>
+        <menuitem action="mrp_production_action" id="menu_mrp_production_action" parent="menu_mrp_manufacturing" groups="mrp.group_mrp_user,mrp.group_mrp_manager" sequence="1"/>
 
-        <record id="mrp_production_action2_gantt" model="ir.actions.act_window">
-            <field name="name">Manufacturing Orders Planning</field>
+        <record id="mrp_production_action_planning" model="ir.actions.act_window">
+            <field name="name">Manufacturing 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">gantt,tree,form,calendar,graph</field>
+            <field name="view_mode">calendar,tree,form,graph</field>
             <field name="domain">[('state','in',('ready','confirmed','in_production'))]</field>
+            <field name="help">Manufacturing Orders describe the operations that need to be carried out and the raw materials usage for each stage of production. You use specifications (bills of materials or BoM) to work out the raw material requirements and the manufacturing orders needed for the finished products. Once the bills of materials have been defined, OpenERP becomes capable of automatically deciding on the manufacturing route depending on the needs of the company.</field>
         </record>
 
         <record id="mrp_production_action2" model="ir.actions.act_window">
             <field name="inherit_id" ref="procurement.procurement_form_view"/>
             <field name="type">form</field>
             <field name="arch" type="xml">
+            <data>
                 <xpath expr="/form/notebook/page/field[@name='move_id']" position="before">
                     <field name="bom_id" domain="[('product_id','=',product_id),('bom_id','=',False)]"/>
                 </xpath>
+                <xpath expr="/form/notebook/page/field[@name='close_move']" position="after">
+                    <group colspan="4"  groups="base.group_extended">
+                    <separator colspan="4" string="Properties" />
+                    <field colspan="4" name="property_ids" nolabel="1"/>
+                     </group>
+                </xpath>
+               </data>
             </field>
         </record>
-
         <act_window
             id="action_product_bom_structure"
             name="Product BoM Structure"
             view_type="tree"
             view_id="mrp_bom_tree_view"
             res_model="mrp.bom"
-            src_model="product.product"/>
+            src_model="product.product"
+            groups="base.group_extended"/>
 
         <act_window
-            domain="[('product_id', '=', active_id),('bom_id','=',False)]"
+            domain="[('bom_id','=',False)]"
+            context="{'search_default_product_id': [active_id]}"
             id="act_product_product_2_mrp_bom"
             name="Bill of Materials"
             res_model="mrp.bom"
             src_model="product.product"/>
 
         <!-- Menu for Resource for MRP-->
-        <menuitem icon="terp-mrp" id="base.menu_mrp_root" name="Manufacturing" sequence="3"/>
 
-        <menuitem id="menu_pm_resources_mrp" name="Resources" parent="base.menu_mrp_root"
-            groups="base.group_extended"
-            sequence="2"/>
-        <menuitem action="resource.action_resource_resource_tree" id="menu_view_resource_search_mrp" parent="menu_pm_resources_mrp" sequence="1"/>
-        <menuitem action="resource.action_resource_calendar_form" id="menu_view_resource_calendar_search_mrp" parent="menu_mrp_configuration" sequence="1"/>
-        <menuitem action="resource.action_resource_calendar_leave_tree" id="menu_view_resource_calendar_leaves_search_mrp" parent="menu_pm_resources_mrp" sequence="1"/>
-
-        <!-- Display the BoMs in the product form -->
+        <record id="mrp_workcenter_action" model="ir.actions.act_window">
+            <field name="name">Work Centers</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"/>
+            <field name="search_view_id" ref="view_mrp_workcenter_search"/>
+            <field name="help">Work Centers allows you to create and manage manufacturing units consisting of one or several people and/or machines that can be considered as a unit for capacity and planning forecasting.</field>
+        </record>
+
+        <menuitem id="menu_pm_resources_config" name="Resources" parent="menu_mrp_configuration"/>
+        <menuitem action="mrp_workcenter_action" id="menu_view_resource_search_mrp" parent="menu_pm_resources_config" sequence="1"/>
+        <menuitem action="resource.action_resource_calendar_form" id="menu_view_resource_calendar_search_mrp" parent="menu_pm_resources_config" sequence="1"/>
+        <menuitem action="resource.action_resource_calendar_leave_tree" id="menu_view_resource_calendar_leaves_search_mrp" parent="menu_pm_resources_config" sequence="1"/>
+        
+        <!-- Planning -->
+        
+        <menuitem id="menu_mrp_planning" name="Planning"
+                       parent="base.menu_mrp_root" sequence="2"
+                       groups="base.group_extended"/>
+               <menuitem action="mrp.mrp_production_action_planning"
+                       id="menu_mrp_production_order_action"
+                       parent="menu_mrp_planning" sequence="1"
+                       groups="base.group_extended"/>
 
-        <record model="ir.ui.view" id="view_product_form_expiry">
-            <field name="name">product.normal.form</field>
-            <field name="model">product.product</field>
-            <field name="inherit_id" ref="product.product_normal_form_view" />
-            <field name="type">form</field>
-            <field name="arch" type="xml">
-                <notebook position="inside">
-                    <page string="Bill of Materials">
-                        <field name="bom_ids" colspan="4" nolabel="1" widget="one2many_form">
-                            <group colspan="4" col="6">
-                                <field name="name" select="1" colspan="4"/>
-                                <field name="code" select="1" string="BoM Reference" groups="base.group_extended"/>
-                                <newline/>
-                                <field name="product_uom"/>
-                                <field name="product_qty"/>
-                                <field name="routing_id" groups="base.group_extended"/>
-                                <newline/>
-                                <field name="product_uos" groups="product.group_uos"/>
-                                <field name="product_uos_qty" groups="product.group_uos" />
-                                <newline/>
-                                <field name="type" groups="base.group_extended"/>
-                                <field name="company_id" select="1" groups="base.group_multi_company" widget="selection"/>
-                            </group>
-                            <field colspan="4" name="bom_lines" nolabel="1" widget="one2many_list">
-                                <tree string="Components" editable="bottom">
-                                    <field name="product_id" on_change="onchange_product_id(product_id, name)" select="1"/>
-                                    <field name="product_uom"/>
-                                    <field name="product_qty"/>
-                                    <field name="name" invisible="1"/>
-                                    <field name="date_start"/>
-                                    <field name="date_stop"/>
-                                </tree>
-                            </field>
-                        </field>
-                    </page>
-                </notebook>
-            </field>
-        </record>
     </data>
 </openerp>