In v8, some fields were added for the product.pricelist formview by template inheritance : after the active field. For v9, this active field was moved in a button_box button (archive stat_button), so the added fields (inheritance) landed in the stat_button too.
176 lines
9.3 KiB
XML
176 lines
9.3 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<openerp>
|
|
<data>
|
|
|
|
<menuitem id="base.menu_sale_config_sales" name="Configuration"
|
|
parent="base.menu_base_partner" sequence="100" groups="base.group_configuration"/>
|
|
<menuitem id="menu_product_pricelist_main" name="Pricelists"
|
|
parent="base.menu_sale_config" groups="product.group_sale_pricelist" sequence="3"/>
|
|
|
|
<record id="product_pricelist_item_tree_view" model="ir.ui.view">
|
|
<field name="name">product.pricelist.item.tree</field>
|
|
<field name="model">product.pricelist.item</field>
|
|
<field name="arch" type="xml">
|
|
<tree string="Pricelist Items">
|
|
<field name="sequence" widget="handle"/>
|
|
<field colspan="4" name="name"/>
|
|
<field name="product_id" groups="product.group_product_variant"/>
|
|
<field name="product_tmpl_id"/>
|
|
<field name="categ_id"/>
|
|
<field name="min_quantity"/>
|
|
<field name="date_start"/>
|
|
<field name="date_end"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="product_pricelist_item_form_view" model="ir.ui.view">
|
|
<field name="name">product.pricelist.item.form</field>
|
|
<field name="model">product.pricelist.item</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Pricelist Items">
|
|
<h1><field name="name"/></h1>
|
|
<group>
|
|
<group>
|
|
<field name="applied_on" widget="radio"/>
|
|
<field name="categ_id" attrs="{'invisible':[('applied_on', '!=', '2_product_category')], 'required':[('applied_on', '=', '2_product_category')]}"/>
|
|
<field name="product_tmpl_id" attrs="{'invisible':[('applied_on', '!=', '1_product')],'required':[('applied_on', '=', '1_product')]}" string="Product"/>
|
|
<field name="product_id" attrs="{'invisible':[('applied_on', '!=', '0_product_variant')],'required':[('applied_on', '=', '0_product_variant')]}" string="Product Variant"/>
|
|
</group>
|
|
<group>
|
|
<field name="min_quantity"/>
|
|
<field name="date_start"/>
|
|
<field name="date_end"/>
|
|
</group>
|
|
</group>
|
|
<separator string="Price Computation"/>
|
|
<group>
|
|
<group>
|
|
<label for="compute_price" string="Compute Price"/>
|
|
<div>
|
|
<field name="compute_price" widget="radio"/>
|
|
<field name="currency_id" invisible="1"/>
|
|
<div attrs="{'invisible':[('compute_price', '!=', 'fixed')]}">
|
|
<field name="fixed_price" nolabel= "1" widget='monetary' options="{'currency_field': 'currency_id'}"/></div>
|
|
<div attrs="{'invisible':[('compute_price', '!=', 'percentage')]}">
|
|
<field name="percent_price" nolabel="1" class="oe_inline"/>%%
|
|
</div>
|
|
</div>
|
|
</group>
|
|
</group>
|
|
<div class="oe_grey" groups="product.group_uom">
|
|
<p>The computed price is expressed in the default Unit of Measure of the product.</p>
|
|
</div>
|
|
<group col="6" attrs="{'invisible':[('compute_price', '!=', 'formula')]}">
|
|
<field name="base" colspan="6"/>
|
|
|
|
<label string="New Price ="/>
|
|
<div>
|
|
<span attrs="{'invisible':[('base', 'not in', ('list_price','standard_price'))]}">Public Price - </span>
|
|
<span attrs="{'invisible':[('base', '!=', 'pricelist')]}">Other Pricelist - </span>
|
|
</div>
|
|
<label for="price_discount"/>
|
|
<div class="o_row">
|
|
<field name="price_discount"/>
|
|
<span>%%</span>
|
|
</div>
|
|
<label string=" + " for="price_surcharge"/>
|
|
<field name="price_surcharge" nolabel="1"/>
|
|
|
|
<field name="price_round" string="Rounding Method"/>
|
|
<field name="price_min_margin" string="Min. Margin"/>
|
|
<field name="price_max_margin" string="Max. Margin"/>
|
|
|
|
<field name="base_pricelist_id" attrs="{'invisible':[('base', '!=', 'pricelist')],'required': [('base','=', 'pricelist')], 'readonly': [('base','!=', 'pricelist')]}"/>
|
|
</group>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<record model="ir.ui.view" id="product_pricelist_view_search">
|
|
<field name="name">product.pricelist.search</field>
|
|
<field name="model">product.pricelist</field>
|
|
<field name="arch" type="xml">
|
|
<search string="Products Price Search">
|
|
<field name="name" string="Products Price"/>
|
|
<field name="currency_id" groups="base.group_multi_currency"/>
|
|
<filter string="Archived" name="inactive" domain="[('active','=',False)]"/>
|
|
</search>
|
|
</field>
|
|
</record>
|
|
|
|
|
|
<record id="product_pricelist_view_tree" model="ir.ui.view">
|
|
<field name="name">product.pricelist.tree</field>
|
|
<field name="model">product.pricelist</field>
|
|
<field name="arch" type="xml">
|
|
<tree string="Products Price List">
|
|
<field name="name"/>
|
|
<field name="currency_id" groups="base.group_multi_currency"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
<record id="product_pricelist_view" model="ir.ui.view">
|
|
<field name="name">product.pricelist.form</field>
|
|
<field name="model">product.pricelist</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Products Price List">
|
|
<sheet>
|
|
<div class="oe_button_box" name="button_box">
|
|
<button name="toggle_active" type="object"
|
|
class="oe_stat_button" icon="fa-archive">
|
|
<field name="active" widget="boolean_button"
|
|
options='{"terminology": "archive"}'/>
|
|
</button>
|
|
</div>
|
|
<div class="oe_title">
|
|
<h1><field name="name" placeholder="e.g. USD Retailers"/></h1>
|
|
</div>
|
|
<group>
|
|
<field name="currency_id" groups="base.group_multi_currency"/>
|
|
<field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/>
|
|
</group>
|
|
<div groups="product.group_pricelist_item">
|
|
<separator string="Pricelist Items"/>
|
|
<field name="item_ids" nolabel="1" context="{'default_base':'list_price'}">
|
|
<tree string="Pricelist Items">
|
|
<field name="name" string="Applicable On"/>
|
|
<field name="min_quantity"/>
|
|
<field name="date_start"/>
|
|
<field name="date_end"/>
|
|
<field name="price" string="Price"/>
|
|
</tree>
|
|
</field>
|
|
</div>
|
|
</sheet>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
<record id="product_pricelist_action2" model="ir.actions.act_window">
|
|
<field name="name">Pricelists</field>
|
|
<field name="type">ir.actions.act_window</field>
|
|
<field name="res_model">product.pricelist</field>
|
|
<field name="view_type">form</field>
|
|
<field name="view_mode">tree,form</field>
|
|
<field name="search_view_id" ref="product_pricelist_view_search" />
|
|
<field name="context">{"default_base":'list_price'}</field>
|
|
<field name="help" type="html">
|
|
<p class="oe_view_nocontent_create">
|
|
Click to create a pricelist.
|
|
</p><p>
|
|
A price list contains rules to be evaluated in order to compute
|
|
the sales price of the products.
|
|
</p><p>
|
|
Each rule include a set of applicability criteria (date range,
|
|
product category...) and a computation that easily helps to achieve
|
|
any kind of pricing.
|
|
</p>
|
|
</field>
|
|
</record>
|
|
|
|
<menuitem
|
|
action="product_pricelist_action2" id="menu_product_pricelist_action2"
|
|
parent="product.menu_product_pricelist_main" sequence="1" groups="product.group_sale_pricelist"/>
|
|
</data>
|
|
</openerp>
|