[IMP] Improve code as specified on code review
authorDBR (OpenERP) <dbr@tinyerp.com>
Thu, 12 Jul 2012 13:33:05 +0000 (19:03 +0530)
committerDBR (OpenERP) <dbr@tinyerp.com>
Thu, 12 Jul 2012 13:33:05 +0000 (19:03 +0530)
bzr revid: dbr@tinyerp.com-20120712133305-7os2hdekytjdjt4d

addons/delivery/delivery_view.xml
addons/procurement/procurement_view.xml
addons/procurement/wizard/schedulers_all_view.xml
addons/stock/stock_view.xml
addons/stock_planning/stock_planning_view.xml
addons/stock_planning/wizard/stock_planning_createlines_view.xml

index 066643e..edd64a4 100644 (file)
@@ -28,9 +28,8 @@
                             <field name="partner_id"/>
                             <field name="product_id"/>
                             <field name="active"/>
-                            <separator string="Pricing Information" colspan="4"/>
-                            <group colspan="4" col="4">
-                                <group col="2" colspan="2">
+                            <group string="Pricing Information">
+                                <group>
                                     <field name="normal_price" attrs="{'readonly':[('use_detailed_pricelist', '=', True)]}"/>
                                     <label for="free_if_more_than"/>
                                     <div>
@@ -42,7 +41,7 @@
                             <newline/>
                             <field name="use_detailed_pricelist"/>
                         </group>
-                        <field name="pricelist_ids" attrs="{'invisible':[('use_detailed_pricelist','=',False)]}" mode="tree,form">
+                        <field name="pricelist_ids" attrs="{'invisible':[('use_detailed_pricelist','=',False)]}" mode="tree">
                             <tree string="Delivery grids">
                                   <field name="sequence"/>
                                   <field name="name"/>
                             <field name="line_ids"/>
                         </page>
                         <page string="Destination">
-                            <group>
-                                <group>
-                                    <field name="country_ids" widget="many2many_tags"/>
-                                    <field name="state_ids" widget="many2many_tags"/>
-                                </group>
-                                <group>
-                                    <field name="zip_from" class="oe_inline"/>
-                                    <field name="zip_to" class="oe_inline"/>
-                                </group>
+                            <group string="Countries">
+                                <field name="country_ids"/>
+                            </group>
+                            <group string="States">
+                                <field colspan="2" name="state_ids" nolabel="1"/>
+                                <field name="zip_from"/>
+                                <field name="zip_to"/>
                             </group>
                         </page>
                     </notebook>
             <field name="type">form</field>
             <field name="arch" type="xml">
                 <form string="Grid Lines" version="7.0">
-                    <sheet>
-                        <label for="name" class="oe_edit_only"/>
-
-                            <field name="name" col="4"/>
-
-                        <group col="4">
-                            <group>
-                                <label string="Condition" for="type"/>
-                                <div>
-                                    <field name="type"/>
-                                    <field name="operator"/>
-                                    <field name="max_value"/>
-                                </div>
-                            </group>
-                            <group>
-                                <field name="list_price"/>
-                                <field name="standard_price"/>
-                                <field name="price_type"/>
-                                <field name="variable_factor" attrs="{'invisible':[('price_type','=','fixed')]}"/>
-                            </group>
-                        </group>
-                    </sheet>
+                    <field colspan="4" name="name"/>
+                    <div>
+                        <label string="condition" for="type"/>
+                        <field name="type" class="oe_inline"/>
+                        <field name="operator" class="oe_inline"/>
+                        <field name="max_value" class="oe_inline"/>
+                    </div>
+                    <group col="4">
+                        <field name="list_price"/>
+                        <field name="standard_price"/>
+                        <field name="price_type"/>
+                        <field name="variable_factor" attrs="{'invisible':[('price_type','=','fixed')]}"/>
+                    </group>
                 </form>
             </field>
         </record>
index 65cf94e..fcf4992 100644 (file)
                             <field name="date_planned"/>
                             <field name="procure_method"/>
                             <field name="priority"/>
-                            <field name="company_id" groups="base.group_multi_company" widget="selection" invisible="1"/>
+                            <field name="company_id" groups="base.group_multi_company" widget="selection"/>
                         </group>
                         <group col="2" colspan="2"/>
                     </group>
                     <notebook>
                     <page string="Procurement Details">
-                        <group string="Product &amp; Location" col="4">
+                        <group col="4">
                             <group>
                                 <field name="product_id" on_change="onchange_product_id(product_id)"/>
-                                <label for="product_qty" />
+                                <label for="product_qty"/>
                                 <div>
                                     <field name="product_qty" class="oe_inline"/>
                                     <field name="product_uom" class="oe_inline"/>
                                 </div>
-                                <label for="product_uos_qty" />
+                                <label for="product_uos_qty" string="Quentity UoS"/>
                                 <div>
                                     <field name="product_uos_qty" groups="product.group_uos" class="oe_inline"/>
                                     <field name="product_uos"  groups="product.group_uos" class="oe_inline"/>
index 01712a0..ee2a5d3 100644 (file)
@@ -10,7 +10,7 @@
             <field name="type">form</field>
             <field name="arch" type="xml">
                 <form string="Scheduler Parameters" version="7.0">
-                    <group string="This wizard allows you to run all procurement, production and/or purchase orders that should be processed based on their configuration. By default, the scheduler is launched automatically every night by OpenERP. You can use this menu to force it to be launched now. Note that it runs in the background, you may have to wait for a few minutes until it has finished computing.">
+                    <group>
                         <field name="automatic"/>
                     </group>
                     <footer>
index 0e6e95a..4dc7e37 100644 (file)
                     <field name="state" widget="statusbar" statusbar_visible="draft,confirm"/>
                 </header>
                 <sheet>
-                    <label for="name" class="oe_edit_only"/>
-                    <h1>
-                        <field name="name" placeholder="Annual inventory" class="oe_inline"/>
-                        <span> - </span>
-                        <field name="date" class="oe_inline"/>
-                    </h1>
-                    <label for="company_id" class="oe_edit_only"/>
-                    <h2>
+                        <label for="name" class="oe_edit_only"/>
+                        <h1>
+                            <field name="name" placeholder="Annual inventory"  class="oe_inline"/> -
+                            <field name="date" class="oe_inline"/>
+                        </h1>
+                    <group>
                         <field name="company_id" groups="base.group_multi_company" widget="selection"/>
-                    </h2>
+                    </group>
                     <notebook>
                     <page string="General Informations">
                         <field name="inventory_line_id">
                             </tree>
                             <form string="Products" version="7.0">
                                 <sheet>
-                                    <div class="oe_right oe_button_box">
-                                        <button name="%(stock.action_view_stock_inventory_line_split)d"
-                                            string="Split inventory lines" groups="stock.group_inventory_valuation"
-                                            type="action" icon="terp-stock_effects-object-colorize"/>
-                                    </div>
                                     <group>
                                         <group>
                                             <field domain="[('usage','=','internal')]" name="location_id"/>
                                                 <field name="product_uom" class="oe_inline" groups="product.group_uom"/>
                                             </div>
                                             <field name="prod_lot_id" groups="stock.group_production_lot"/>
+                                            <button name="%(stock.action_view_stock_inventory_line_split)d"
+                                            string="Split inventory lines" groups="stock.group_inventory_valuation"
+                                            type="action" icon="terp-stock_effects-object-colorize"/>
                                         </group>
                                     </group>
                                 </sheet>
                     <label for="name" class="oe_edit_only"/>
                     <h1>
                         <field name="name" class="oe_inline"/>
-                        <label string="-" attrs="{'invisible':[('origin','=',False)]}"/> 
+                        <span attr="{'invisible': [('origin','=',False)]}"> - </span>
                         <field name="origin" placeholder="PO0032" class="oe_inline"/>
                     </h1>
                     <label for="partner_id" class="oe_edit_only"/>
index 34a40ac..1e6a4c0 100644 (file)
                     <sheet>
                         <group>
                             <group string = "General Info">
-                                <field name="company_id" select = "1" widget= "selection"
+                                <field name="company_id" widget= "selection"
                                              on_change="onchange_company(company_id)" groups="base.group_multi_company"/>
                                 <field name="warehouse_id" domain = "[('company_id','=',company_id)] " />
                                 <field name="period_id" />
index 00ee00f..be74498 100644 (file)
@@ -9,16 +9,16 @@
             <field name="arch" type="xml">
                 <form string="Create Stock Planning Lines" version="7.0">
                     <group col="4">
+                        <field name="period_id"/>
                         <field name="company_id" widget= "selection" on_change="onchange_company(company_id)" groups="base.group_multi_company"/>
                         <field name="warehouse_id" domain = "[('company_id','=',company_id)] "/>
                         <field name="forecasted_products"/>
-                        <field name="period_id"/>
                         <field name="product_categ_id" attrs="{'required':[('forecasted_products','=',0)]}"/>
                     </group>
                     <footer>
                         <button name="create_planning" string="Create" type="object" class="oe_highlight"/>
                         or
-                        <button string="Cancel" class="oe_link" special="cancel" />
+                        <button string="Cancel" class="oe_link" special="cancel"/>
                     </footer>
                 </form>
             </field>