[IMP] Improved code

bzr revid: tpa@tinyerp.com-20120306055401-wem2vsnpffv7xjf4
This commit is contained in:
Turkesh Patel (Open ERP) 2012-03-06 11:24:01 +05:30
parent 2501d12b39
commit a1776c5b96
3 changed files with 40 additions and 43 deletions

View File

@ -25,11 +25,11 @@ class product_groups_configuration(osv.osv_memory):
_inherit = 'res.config.settings'
_columns = {
'group_purchase_pricelist_per_supplier':fields.boolean("Pricelist per Supplier",
'group_purchase_pricelist_per_supplier':fields.boolean("Pricelist per Supplier",group='base.group_user', xml_id='base.group_purchase_pricelist_per_supplier',
help="""Allows to manage different prices based on rules per category of Supplier.
Example: 10% for retailers, promotion of 5 EUR on this product, etc.
It assigns the "Pricelist" group to all employees."""),
'group_purchase_uom_per_product':fields.boolean("UOM per purchase product",
'group_purchase_uom_per_product':fields.boolean("UOM per purchase product",group='base.group_user', xml_id='base.group_purchase_uom_per_product',
help="""
Allows you to select and maintain different unit of measures per product.
It assigns the "UOM per purchase product" group to all employees.

View File

@ -47,8 +47,8 @@ class purchase_configuration(osv.osv_memory):
* Manufacturer
* Manufacturer Product Name
* Manufacturer Product Code
* Product Attributes
.It installs the product_manufacturer module."""),
* Product Attributes.
It installs the product_manufacturer module."""),
'module_purchase_double_validation': fields.boolean("Configure Limit amount",
help="""This allows you double-validation for purchases exceeding minimum amount.
It installs the purchase_double_validation module."""),

View File

@ -1,50 +1,47 @@
<openerp>
<data>
<record id="view_purchase_config" model="ir.ui.view">
<record id="view_purchase_configuration" model="ir.ui.view">
<field name="name">Purchase Application</field>
<field name="model">res.config.settings</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.view_res_config_settings"/>
<field name="arch" type="xml">
<form position ="replace">
<form string ="Purchase Application">
<separator string="Default Invoicing Control" colspan="4"/>
<group colspan="4" col="4">
<field name="default_method"/>
</group>
<form string="Purchase Application">
<separator string="Default Invoicing Control" colspan="4"/>
<group colspan="4" col="4">
<field name="default_method"/>
</group>
<separator string="Purchase Order" colspan="4"/>
<group colspan="4" col="8" name="Purchase_order">
<group colspan="4" col="4">
<field name="group_purchase_pricelist_per_supplier"/>
<newline/>
<!--group col="2" colspan="1">
<field name="tax_policy" on_change="onchange_tax_policy(tax_policy)"/>
</group-->
<newline/>
<field name="module_warning"/>
<newline/>
<field name="module_purchase_analytic_plans"/>
<newline/>
</group>
<group colspan="4" col="4">
<newline/>
<field name="group_purchase_uom_per_product"/>
<newline/>
<field name="module_purchase_double_validation"/>
<newline/>
<field name="module_purchase_requisition"/>
<newline/>
</group>
</group>
<separator string="Products" colspan="4"/>
<separator string="Purchase Order" colspan="4"/>
<group colspan="4" col="8" name="Purchase_order">
<group colspan="4" col="4">
<field name="module_product_manufacturer"/>
<field name="group_purchase_pricelist_per_supplier"/>
<newline/>
<!--group col="2" colspan="1">
<field name="tax_policy" on_change="onchange_tax_policy(tax_policy)"/>
</group-->
<newline/>
<field name="module_warning"/>
<newline/>
<field name="module_purchase_analytic_plans"/>
<newline/>
</group>
</form>
</form>
<group colspan="4" col="4">
<newline/>
<field name="group_purchase_uom_per_product"/>
<newline/>
<field name="module_purchase_double_validation"/>
<newline/>
<field name="module_purchase_requisition"/>
<newline/>
</group>
</group>
<separator string="Products" colspan="4"/>
<group colspan="4" col="4">
<field name="module_product_manufacturer"/>
</group>
</form>
</field>
</record>
@ -52,12 +49,12 @@
<field name="name">Configure Purchase Application</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">res.config.settings</field>
<field name="view_id" ref="view_purchase_config"/>
<field name="view_id" ref="view_purchase_configuration"/>
<field name="view_type">form</field>
<field name="view_mode">form</field>
</record>
<menuitem id="base.menu_purchse_config" name="Purchase" parent="base.menu_config" sequence="1" action="purchase.action_purchase_configuration"/>
<menuitem id="menu_purchse_config" name="Purchase" parent="base.menu_config" sequence="1" action="action_purchase_configuration"/>
</data>
</openerp>