[MERGE] merged with main addons
[odoo/odoo.git] / addons / mrp / mrp_view.xml
index 1969e2e..cc24def 100644 (file)
                 Define specific property groups that can be assigned to your
                 bill of materials and sales orders. Properties allows OpenERP
                 to automatically select the right bill of materials according
-                to properties selected in the sale order by salesperson.
+                to properties selected in the sales order by salesperson.
               </p><p>
                 For instance, in the property group "Warranty", you an have
                 two properties: 1 year warranty, 3 years warranty. Depending
-                on the propoerties selected in the sale order, OpenERP will
+                on the propoerties selected in the sales order, OpenERP will
                 schedule a production using the matching bill of materials.
               </p>
             </field>
                 materials for manufacturing a product when you have different
                 ways of building the same product.  You can assign several
                 properties to each bill of materials.  When a salesperson
-                creates a sale order, they can relate it to several properties
+                creates a sales order, they can relate it to several properties
                 and OpenERP will automatically select the BoM to use according
                 the needs.
               </p>
                                 <label string="-" attrs="{'invisible':[('product_uos','=',False)]}" class="oe_inline"/>
                                 <field name="product_uos" class="oe_inline"/>
                             </div>
+                            <label for="routing_id" class="oe_inline" groups="mrp.group_mrp_routings"/>
                             <div groups="mrp.group_mrp_routings">
-                                <label for="routing_id" class="oe_edit_only"/>
-                                <h2><field name="routing_id" class="oe_inline"/></h2>
+                               <field name="routing_id" class="oe_inline"/>
                             </div>
                         </group>
                         <group>
                             <field name="code" string="Reference"/>
                             <field name="type"/>
                             <p colspan="2" class="oe_grey" attrs="{'invisible': [('type','=','normal')]}">
-                                When processing a sale order for this product, the delivery order
+                                When processing a sales order for this product, the delivery order
                                 will contain the raw materials, instead of the finished product.
                             </p>
                             <field name="company_id" groups="base.group_multi_company" widget="selection"/>
                         <filter string='Default Unit of Measure' icon="terp-mrp" domain="[]" context="{'group_by' : 'product_uom'}"/>
                         <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'}"/>
-                        <filter string="Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_start'}" help="Starting Date"/>
+                        <filter string="Month" icon="terp-go-month" domain="[]" context="{'group_by':'date_start'}" help="Start Date by Month"/>
                    </group>
                 </search>
             </field>
             <field name="model">mrp.bom</field>
             <field name="field_parent">child_complete_ids</field>
             <field name="arch" type="xml">
-                <tree string="Bill of Materials" colors="blue:method">
+                <tree string="Bill of Materials">
                     <field name="sequence" invisible="1"/>
                     <field name="name" invisible="1"/>
                     <field name="product_id"/>
                     <field name="product_uom" groups="product.group_uom"/>
                     <field name="code"/>
                     <field name="type"/>
-                    <field name="method"/>
                     <field name="routing_id" groups="mrp.group_mrp_routings"/>
                     <field name="date_start"/>
                     <field name="date_stop"/>
             <field name="model">mrp.bom</field>
             <field name="field_parent">child_complete_ids</field>
             <field name="arch" type="xml">
-                <tree string="BoM Structure" colors="blue:method">
+                <tree string="BoM Structure">
                     <field name="sequence" invisible="1"/>
                     <field name="name" groups="base.group_no_one"/>
                     <field name="code"/>
                     <field name="product_id"/>
-                    <field name="bom_id"/>
+                    <field name="bom_id" groups="product.group_mrp_properties"/>
                     <field name="product_qty"/>
                     <field name="product_uom" groups="product.group_uom"/>
                     <field name="type"/>
-                    <field name="method"/>
                     <field name="routing_id" groups="mrp.group_mrp_routings"/>
-                    <field name="date_start"/>
-                    <field name="date_stop"/>
+                    <field name="date_start" groups="product.group_mrp_properties"/>
+                    <field name="date_stop" groups="product.group_mrp_properties"/>
                 </tree>
             </field>
         </record>
             <field name="type">ir.actions.act_window</field>
             <field name="res_model">mrp.bom</field>
             <field name="domain">[('bom_id', '=',active_ids)]</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 name="name">mrp.production.gantt</field>
             <field name="model">mrp.production</field>
             <field name="arch" type="xml">
-                <gantt date_stop="date_finished" date_start="date_start" string="Productions" default_group_by="routing_id">
+                <gantt date_stop="date_finished" date_start="date_start" progress="progress" string="Productions" default_group_by="routing_id">
                 </gantt>
             </field>
         </record>
                     <button name="%(act_mrp_product_produce)d" states="confirmed,ready,in_production" string="Produce" type="action" class="oe_highlight"/>
                     <button name="force_production" states="confirmed" string="Force Reservation" type="object"/>
                     <button name="force_production" states="picking_except" string="Force Reservation" type="object"/>
-                    <button name="button_produce" states="confirmed,ready" string="Mark as Started"/>
+                    <button name="button_produce" states="ready" string="Mark as Started"/>
                     <button name="button_recreate" states="picking_except" string="Recreate Picking"/>
-                    <button name="button_cancel" states="draft,ready,in_production,picking_except" string="Cancel"/>
-                    <button name="action_cancel" type="object" states="confirmed" string="Cancel"/>
+                    <button name="button_cancel" states="draft,ready,in_production,picking_except" string="Cancel Production"/>
+                    <button name="action_cancel" type="object" states="confirmed" string="Cancel Production"/>
                     <field name="state" widget="statusbar" statusbar_visible="draft,ready,in_production,done" statusbar_colors='{"picking_except":"red","confirmed":"blue"}'/>
                 </header>
                 <sheet>
                                                    groups="stock.group_production_lot"/>
                                             <button name="%(stock.move_scrap)d"
                                                 string="Scrap Products" type="action"
-                                                icon="gtk-convert" context="{'scrap': True}"
+                                                icon="terp-gtk-jump-to-ltr" context="{'scrap': True}"
                                                 states="draft,waiting,confirmed,assigned"/>
                                         </tree>
                                     </field>
                                            <field name="prodlot_id" context="{'product_id': product_id}" groups="stock.group_production_lot"/>
                                            <field name="state" invisible="1"/>
                                            <field name="scrapped" invisible="1"/>
-                                           <button
-                                               name="%(stock.move_scrap)d"
-                                               string="Scrap Products" type="action"
-                                               icon="gtk-convert"
-                                               states="done,cancel"/>
                                        </tree>
                                     </field>
                                 </group>
                                                 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}"
-                                                states="draft,waiting,confirmed,assigned"/>
                                         </tree>
                                     </field>
                                 </group>
                                             <button name="%(stock.track_line)d"
                                                  string="Split in Serial Numbers" type="action" icon="gtk-justify-fill" states="done,cancel"/>
                                             <button name="%(stock.move_scrap)d"
-                                                string="Scrap Products" type="action" icon="gtk-convert"
+                                                string="Scrap Products" type="action" icon="terp-gtk-jump-to-ltr"
                                                 states="done,cancel"/>
                                         </tree>
                                     </field>
                         <filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
                         <filter string="Routing" icon="terp-stock_align_left_24" domain="[]" context="{'group_by':'routing_id'}"/>
                         <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
-                        <filter string="Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_planned'}" help="Scheduled Date"/>
+                        <filter string="Month" icon="terp-go-month" domain="[]" context="{'group_by':'date_planned'}" help="Scheduled Date by Month"/>
                     </group>
                </search>
             </field>
             </field>
         </record>
 
-        <act_window
-            context="{'search_default_product_id': [active_id]}"
-            id="act_product_manufacturing_open"
-            name="Manufacturing Orders"
-            view_id="mrp_production_tree_view"
-            res_model="mrp.production"
-            src_model="product.product"/>
-
-        <act_window
-            id="action_product_bom_structure"
-            name="Product BoM Structure"
-            domain="[('product_id', 'in', active_ids),('bom_id','=',False)]"
-            context="{'default_product_id': active_id}"
-            view_type="tree"
-            view_mode="tree"
-            view_id="mrp_bom_tree_view"
-            res_model="mrp.bom"
-            src_model="product.product"
-            groups="mrp.group_mrp_user"/>
-
         <!-- Menu for Resource for MRP-->
 
         <record id="mrp_workcenter_action" model="ir.actions.act_window">
         <menuitem id="menu_mrp_planning" name="Planning"
                 parent="base.menu_mrp_root" sequence="2"/>
         <menuitem action="mrp.mrp_production_action_planning"
-                id="menu_mrp_production_order_action" name="Orders Planning"
+                id="menu_mrp_production_order_action" name="Order Planning"
                 parent="menu_mrp_planning" sequence="1"/>
 
-
+        <record id="act_product_mrp_bom_open" model="ir.actions.act_window">
+            <field name="name">BoM Structure</field>
+            <field name="context">{'default_product_id': active_id}</field>
+            <field name="domain">[('product_id', 'in', active_ids),('bom_id','=',False)]</field>
+            <field name="res_model">mrp.bom</field>
+        </record>
         <record model="ir.actions.act_window" id="product_open_bom">
             <field name="context">{'default_product_id': active_id, 'search_default_product_id': active_id}</field>
             <field name="name">Bill of Materials</field>
             <field name="domain">[('bom_id','=',False)]</field>
             <field name="res_model">mrp.bom</field>
         </record>
-
+        <record id="act_product_mrp_production" model="ir.actions.act_window">
+            <field name="context">{'search_default_product_id': [active_id]}</field>
+            <field name="name">Manufacturing Orders</field>
+            <field name="res_model">mrp.production</field>
+            <field name="view_id" ref="mrp_production_tree_view"/>
+        </record>
         <record model="ir.ui.view" id="product_form_view_bom_button">
             <field name="name">product.product.procurement</field>
             <field name="model">product.product</field>
             <field name="inherit_id" ref="product.product_normal_form_view"/>
             <field name="arch" type="xml">
                 <xpath expr="//div[@name='buttons']" position="inside">
-                    <button string="Bill of Materials" name="%(product_open_bom)d" type="action"/>
+                    <button string="Bill of Materials" name="%(product_open_bom)d" type="action" attrs="{'invisible':[('type', '=', 'service')]}"/>
+                    <button string="BoM Structure" name="%(act_product_mrp_bom_open)d" type="action" groups="mrp.group_mrp_user" attrs="{'invisible':[('type', '=', 'service')]}"/>
+                    <button string="Manufacturing Orders" name="%(act_product_mrp_production)d" type="action" groups="mrp.group_mrp_user" attrs="{'invisible':[('type', '=', 'service')]}"/>
                 </xpath>
             </field>
         </record>