[IMP]:Improve view and change label
authorajay javiya (OpenERP) <aja@tinyerp.com>
Thu, 6 Sep 2012 06:58:35 +0000 (12:28 +0530)
committerajay javiya (OpenERP) <aja@tinyerp.com>
Thu, 6 Sep 2012 06:58:35 +0000 (12:28 +0530)
bzr revid: aja@tinyerp.com-20120906065835-lmh0dscu20t2tptt

addons/mrp/mrp_view.xml
addons/stock/wizard/stock_move.py

index 8811fcf..881c1c5 100644 (file)
             <field name="model">mrp.bom</field>
             <field name="arch" type="xml">
                 <form string="Bill of Material" version="7.0">
-                    <sheet>
-                        <div class="oe_title">
-                            <h1>Bill of Material <field name="name" class="oe_inline"/></h1>
-                        </div>
+                    <group>
                         <group>
-                            <group>
-                                <field name="product_id" on_change="onchange_product_id(product_id, name, context)" class="oe_inline"/>
-                                <label for="product_qty"/>
-                                <div>
-                                    <field name="product_qty" class="oe_inline"/>
-                                    <field name="product_uom" class="oe_inline" groups="product.group_uom"/>
-                                </div>
-                                <label for="product_uos_qty" groups="product.group_uos"/>
-                                <div groups="product.group_uos" >
-                                    <field name="product_uos_qty"
-                                        class="oe_inline"/>
-                                    <label string="-" attrs="{'invisible':[('product_uos','=',False)]}" class="oe_inline"/>
-                                    <field name="product_uos" class="oe_inline"/>
-                                </div>
-                            </group>
-                            <group>
-                                <field name="routing_id" class="oe_inline"/>
-                                <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
-                                    will contain the raw materials, instead of the finished product.
-                                </p>
-                                <field name="company_id" groups="base.group_multi_company" widget="selection"/>
-                            </group>
+                            <field name="product_id" on_change="onchange_product_id(product_id, name, context)" class="oe_inline"/>
+                            <label for="product_qty" string="Quantity"/>
+                            <div>
+                                <field name="product_qty" class="oe_inline"/>
+                                <field name="product_uom" class="oe_inline" groups="product.group_uom"/>
+                            </div>
+                            <label for="product_uos_qty" groups="product.group_uos"/>
+                            <div groups="product.group_uos" >
+                                <field name="product_uos_qty"
+                                    class="oe_inline"/>
+                                <label string="-" attrs="{'invisible':[('product_uos','=',False)]}" class="oe_inline"/>
+                                <field name="product_uos" class="oe_inline"/>
+                            </div>
+                            <div groups="mrp.group_mrp_routings">
+                                <label for="routing_id" class="oe_edit_only"/>
+                                <h2><field name="routing_id" class="oe_inline"/></h2>
+                            </div>
                         </group>
-                        <notebook>
-                            <page string="Components">
-                                <field name="bom_lines" widget="one2many_list">
-                                    <tree string="Components" editable="bottom">
-                                        <field name="product_id" on_change="onchange_product_id(product_id, name)"/>
-                                        <field name="product_qty"/>
-                                        <field name="product_uom" groups="product.group_uom"/>
-                                        <field name="name" invisible="1"/>
-                                        <field name="date_start"/>
-                                        <field name="date_stop"/>
-                                    </tree>
-                                </field>
-                            </page>
-                            <page string="Properties" groups="product.group_mrp_properties">
+                        <group>
+                            <field name="name" class="oe_inline"/>
+                            <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
+                                will contain the raw materials, instead of the finished product.
+                            </p>
+                            <field name="company_id" groups="base.group_multi_company" widget="selection"/>
+                        </group>
+                    </group>
+                    <notebook>
+                        <page string="Components">
+                            <field name="bom_lines" widget="one2many_list">
+                                <tree string="Components" editable="bottom">
+                                    <field name="product_id" on_change="onchange_product_id(product_id, name)"/>
+                                    <field name="product_qty"/>
+                                    <field name="product_uom" groups="product.group_uom"/>
+                                    <field name="name" invisible="1"/>
+                                    <field name="date_start"/>
+                                    <field name="date_stop"/>
+                                </tree>
+                            </field>
+                        </page>
+                        <page string="Properties" groups="product.group_mrp_properties">
+                            <group>
                                 <group>
-                                    <group>
-                                        <field name="position"/>
-                                        <field name="bom_id"/>
-                                        <field name="sequence"/>
-                                        <field name="active"/>
-                                    </group>
-                                    <group>
-                                        <field name="date_start"/>
-                                        <field name="date_stop"/>
-                                        <field name="product_rounding"/>
-                                        <field name="product_efficiency"/>
-                                    </group>
+                                    <field name="position"/>
+                                    <field name="bom_id"/>
+                                    <field name="sequence"/>
+                                    <field name="active"/>
+                                </group>
+                                <group>
+                                    <field name="date_start"/>
+                                    <field name="date_stop"/>
+                                    <field name="product_rounding"/>
+                                    <field name="product_efficiency"/>
                                 </group>
-                                <separator string="Properties"/>
-                                <field name="property_ids" widget="many2many_tags"/>
-                            </page>
-                        </notebook>
-                        <div class="oe_chatter">
-                             <field name="message_ids" colspan="4" widget="mail_thread" nolabel="1"/>
-                             <field name="message_follower_ids" widget="mail_followers"/>
-                        </div>
-                    </sheet>
+                            </group>
+                            <separator string="Properties"/>
+                            <field name="property_ids" widget="many2many_tags"/>
+                        </page>
+                    </notebook>
+                    <div class="oe_chatter">
+                         <field name="message_ids" colspan="4" widget="mail_thread" nolabel="1"/>
+                         <field name="message_follower_ids" widget="mail_followers"/>
+                    </div>
                 </form>
             </field>
         </record>
                     </div>
                     <group>
                         <group>
-                            <field name="product_id" on_change="product_id_change(product_id)" domain="[('bom_ids','&lt;&gt;',False),('bom_ids.bom_id','=',False)]" class="oe_inline"/>
+                            <field name="product_id" on_change="product_id_change(product_id)" domain="[('bom_ids','&lt;&gt;',False),('bom_ids.bom_id','=',False)]" class="oe_inline" context='{"default_supply_method":"produce"}'/>
                             <label for="product_qty"/>
                             <div>
                                 <field name="product_qty" class="oe_inline"/>
index e0e738e..1ff60f8 100644 (file)
@@ -170,7 +170,7 @@ class split_in_production_lot(osv.osv_memory):
         'product_uom': fields.many2one('product.uom', 'Unit of Measure'),
         'line_ids': fields.one2many('stock.move.split.lines', 'wizard_id', 'Serial Numbers'),
         'line_exist_ids': fields.one2many('stock.move.split.lines', 'wizard_exist_id', 'Serial Numbers'),
-        'use_exist' : fields.boolean('Existing Lots', help="Check this option to select existing lots in the list below, otherwise you should enter new ones line by line."),
+        'use_exist' : fields.boolean('Existing Serial Number', help="Check this option to select existing serial number in the list below, otherwise you should enter new ones line by line."),
         'location_id': fields.many2one('stock.location', 'Source Location')
      }