-
-
Notifications
You must be signed in to change notification settings - Fork 714
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIG] product_pricelist_item_list_view: Migration to 16.0
- Loading branch information
1 parent
7081746
commit a108f21
Showing
6 changed files
with
35 additions
and
161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +0,0 @@ | ||
# Copyright 2016 Lorenzo Battistini - Agile Business Group | ||
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). | ||
9 changes: 6 additions & 3 deletions
9
...t_pricelist_item_list_view/__openerp__.py → ..._pricelist_item_list_view/__manifest__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
182 changes: 28 additions & 154 deletions
182
product_pricelist_item_list_view/views/pricelist_view.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,174 +1,48 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<odoo> | ||
<record id="product_pricelist_item_search_view" model="ir.ui.view"> | ||
<field name="name">product.pricelist.item.search</field> | ||
<field name="model">product.pricelist.item</field> | ||
<field name="arch" type="xml"> | ||
<search string="Pricelist Rules"> | ||
<field name="pricelist_id" /> | ||
<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" /> | ||
</search> | ||
</field> | ||
</record> | ||
<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="priority">99</field> | ||
<field name="arch" type="xml"> | ||
<tree string="Pricelist Rules"> | ||
<field name="pricelist_id" /> | ||
<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="priority">99</field> | ||
<field name="inherit_id" ref="product.product_pricelist_item_form_view" /> | ||
<field name="arch" type="xml"> | ||
<form string="Pricelist Items"> | ||
<h1><field name="name" /></h1> | ||
<group> | ||
<group> | ||
<field name="pricelist_id" /> | ||
<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="name" position="before"> | ||
<group name="pricelist"> | ||
<field | ||
name="base_pricelist_id" | ||
attrs="{'invisible':[('base', '!=', 'pricelist')],'required': [('base','=', 'pricelist')], 'readonly': [('base','!=', 'pricelist')]}" | ||
name="pricelist_id" | ||
invisible="not context.get('show_item_pricelist_id')" | ||
/> | ||
</group> | ||
</form> | ||
</field> | ||
</field> | ||
</record> | ||
|
||
<record id="product_pricelist_items_action" model="ir.actions.act_window"> | ||
<field name="name">Pricelist Rules</field> | ||
<field name="type">ir.actions.act_window</field> | ||
<field name="res_model">product.pricelist.item</field> | ||
<field name="view_type">form</field> | ||
<field name="view_mode">tree,form</field> | ||
<field name="search_view_id" ref="product_pricelist_item_search_view" /> | ||
<field name="help" type="html"> | ||
<p class="oe_view_nocontent_create"> | ||
Click to create a pricelist rule. | ||
</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> | ||
<record id="product_pricelist_item_view_search" model="ir.ui.view"> | ||
<field name="name">product.pricelist.item.search</field> | ||
<field name="model">product.pricelist.item</field> | ||
<field name="inherit_id" ref="product.product_pricelist_item_view_search" /> | ||
<field name="arch" type="xml"> | ||
<field name="pricelist_id" position="after"> | ||
<field name="product_id" groups="product.group_product_variant" /> | ||
<field name="product_tmpl_id" /> | ||
<field name="categ_id" /> | ||
</field> | ||
<filter name="Variant Rule" position="after"> | ||
<filter name="date_start" string="Start Date" date="date_start" /> | ||
<filter name="date_end" string="End Date" date="date_end" /> | ||
</filter> | ||
</field> | ||
</record> | ||
<record id="product_pricelist_items_action_tree" model="ir.actions.act_window.view"> | ||
<field name="sequence" eval="1" /> | ||
<field name="act_window_id" ref="product_pricelist_items_action" /> | ||
<field name="view_id" ref="product_pricelist_item_tree_view" /> | ||
<field name="view_mode">tree</field> | ||
</record> | ||
<record id="product_pricelist_items_action_form" model="ir.actions.act_window.view"> | ||
<field name="sequence" eval="2" /> | ||
<field name="act_window_id" ref="product_pricelist_items_action" /> | ||
<field name="view_id" ref="product_pricelist_item_form_view" /> | ||
<field name="view_mode">form</field> | ||
|
||
<record id="product.product_pricelist_item_action" model="ir.actions.act_window"> | ||
<field name="context">{'show_item_pricelist_id': 1}</field> | ||
</record> | ||
|
||
<menuitem | ||
action="product_pricelist_items_action" | ||
action="product.product_pricelist_item_action" | ||
id="product_pricelist_items_action_menu" | ||
parent="product.menu_product_pricelist_main" | ||
sequence="2" | ||
groups="product.group_sale_pricelist" | ||
parent="sale.product_menu_catalog" | ||
sequence="40" | ||
groups="product.group_product_pricelist" | ||
/> | ||
</odoo> |
1 change: 1 addition & 0 deletions
1
setup/product_pricelist_item_list_view/odoo/addons/product_pricelist_item_list_view
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../../product_pricelist_item_list_view |
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
setup/product_pricelist_item_list_view/odoo_addons/product_pricelist_item_list_view
This file was deleted.
Oops, something went wrong.