Purpose: Having the res_group defined in base and sales_team auto installed with mail doens't make sense. - Move the empty res_config class and the related view from base_setup to sales_team (base_setup only contains the 'General Settings' model and views - Move the 'sale' related content from product to sale module (Access rights, menuitems,...) - Set sales_team at autoinstall False. The module is installed when needed by crm or sale for example - Set sales_team as a dependency of voip. (Access rights defined for configuration purpose) - Set sales_team ad a dependency of subscription (Access rights issue too) [FIX] account: move some ir.model.access to sale module [FIX] payment: Move some ir.rule to website_sale [FIX] stock: move some ir.model.access rule to sale_stock [FIX] project: Move some ir.model.access rules to crm_project_issue [FIX] mrp: Move some ir.model.access rules to sale_mrp [FIX] calendar: move some ir.model.access rules to crm Rename xmlids accordingly. Example: 'base.group_sale_manager' becomes sales_team.group_sale_manager. [ADD] sales_team: See own documents => See only his sales team Moved the "User: Own Leads Only", "User: All Leads" and "Manager" groups from sale and crm into sales_team module. Add the record rules so that user can see only his Own Sales Team if "See Own Leads" is sales right and can see all sales teams if he is having sales rights of "See All Leads" or manager.
179 lines
9.6 KiB
XML
179 lines
9.6 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<openerp>
|
|
<data>
|
|
|
|
<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', '!=', 'list_price')]}">Public Price - </span>
|
|
<span attrs="{'invisible':[('base', '!=', 'standard_price')]}">Cost - </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"/>
|
|
<field name="base" invisible="1"/>
|
|
<field name="sequence" invisible="1"/>
|
|
<field name="price_discount" invisible="1"/>
|
|
<field name="applied_on" invisible="1"/>
|
|
<field name="compute_price" invisible="1"/>
|
|
</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 id="product_config_pricelist_section" name="Pricelists"
|
|
parent="product_catalog_menu_configuration" groups="product.group_sale_pricelist" sequence="3"/>
|
|
<menuitem action="product_pricelist_action2" id="product_config_pricelists"
|
|
parent="product_config_pricelist_section" sequence="1" groups="product.group_sale_pricelist"/>
|
|
|
|
</data>
|
|
</openerp>
|