[IMP] Improve code as specified on code review

bzr revid: dbr@tinyerp.com-20120712133305-7os2hdekytjdjt4d
This commit is contained in:
DBR (OpenERP) 2012-07-12 19:03:05 +05:30
parent aa15bf9f2b
commit 3eb495b284
6 changed files with 42 additions and 58 deletions

View 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"/>
@ -127,15 +126,13 @@
<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>
@ -158,28 +155,19 @@
<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>

View File

@ -70,21 +70,21 @@
<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"/>

View 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>

View File

@ -121,16 +121,14 @@
<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">
@ -147,11 +145,6 @@
</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"/>
@ -164,6 +157,9 @@
<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>
@ -748,7 +744,7 @@
<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"/>

View File

@ -246,7 +246,7 @@
<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" />

View 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>