forked from OCA/margin-analysis
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IMP] added wizard to display margins and magin information in produc…
…t form view (lp:c2c-addons/6.1 rev 28.3.13)
- Loading branch information
1 parent
b390141
commit 646e19f
Showing
6 changed files
with
160 additions
and
66 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
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
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
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,32 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<openerp> | ||
<data> | ||
<record id="view_product_historical_margin_form" model="ir.ui.view"> | ||
<field name="name">product_historical_margin.form</field> | ||
<field name="model">product.product</field> | ||
<field name="inherit_id" ref='product.product_normal_form_view'/> | ||
<field name="type">form</field> | ||
<field name="arch" type="xml"> | ||
<field name="list_price" position="after"> | ||
<field name="margin_absolute" groups="base.group_sale_manager"/> | ||
<field name="margin_relative" groups="base.group_sale_manager"/> | ||
</field> | ||
</field> | ||
</record> | ||
|
||
<record id="view_product_historical_margin" model="ir.ui.view"> | ||
<field name="name">product.product.historical_margin.tree</field> | ||
<field name="model">product.product</field> | ||
<field name="type">tree</field> | ||
<field name="arch" type="xml"> | ||
<tree string="Historical Margins"> | ||
<field name="default_code"/> | ||
<field name="name"/> | ||
<field name="margin_absolute"/> | ||
<field name="margin_relative"/> | ||
</tree> | ||
</field> | ||
</record> | ||
|
||
</data> | ||
</openerp> |
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
32 changes: 13 additions & 19 deletions
32
product_historical_margin/wizard/historical_margin_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,39 +1,33 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
|
||
<!-- XXX This file is not processed (not listed in __openerp__.py) --> | ||
<openerp> | ||
<data> | ||
<record id="view_historical_margin" model="ir.ui.view"> | ||
<field name="name">historical_margin.form</field> | ||
<field name="model">historical_margin</field> | ||
<field name="name">historical.margin.form</field> | ||
<field name="model">historical.margin</field> | ||
<field name="type">form</field> | ||
<field name="arch" type="xml"> | ||
<form string="Historical Margin"> | ||
<form string="Historical Margin Properties"> | ||
<group colspan="4"> | ||
<field name="start_date" "/> | ||
<field name="end_date"/> | ||
<field name="from_date" /> | ||
<field name="to_date"/> | ||
</group> | ||
<separator string="" colspan="4"/> | ||
<group colspan="4" col="6"> | ||
<button icon="gtk-cancel" special="cancel" string="Cancel"/> | ||
<button icon="terp-gtk-go-back-rtl" string="Compute margins" name="historical_margin_open_window" type="object"/> | ||
<button icon="terp-gtk-go-back-rtl" string="Compute margins" name="action_open_window" type="object"/> | ||
</group> | ||
</form> | ||
</field> | ||
</record> | ||
|
||
<record id="action_historical_margin" model="ir.actions.act_window"> | ||
<field name="name">Product historical margine</field> | ||
<field name="res_model">historical_margin</field> | ||
<field name="view_type">form</field> | ||
<field name="view_mode">form</field> | ||
<field name="view_id" ref="view_historical_margin"/> | ||
<field name="target">new</field> | ||
<field name="help">Display the historical margin of your products</field> | ||
</record> | ||
<act_window name="Product Historical Margins" | ||
res_model="historical.margin" | ||
src_model="product.product" | ||
view_mode="form" | ||
target="new" | ||
key2="client_action_multi" | ||
id="historical_margin_act_window"/> | ||
|
||
<menuitem icon="STOCK_INDENT" action="action_historical_margin" | ||
id="menu_action_account_tree2" | ||
parent="account.menu_finance_charts" /> | ||
</data> | ||
</openerp> |