openerp-community-reviewer team mailing list archive
-
openerp-community-reviewer team
-
Mailing list archive
-
Message #02197
[Merge] lp:~camptocamp/margin-analysis/fix-view-for-all-use-cases-jge into lp:margin-analysis
Joël Grand-Guillaume @ camptocamp has proposed merging lp:~camptocamp/margin-analysis/fix-view-for-all-use-cases-jge into lp:margin-analysis.
Commit message:
[FIX] Product views after trying to install every module separately. Now it works for every kind of setup.
Requested reviews:
Margin Analysis Core Editors (margin-analysis-core-editors)
For more details, see:
https://code.launchpad.net/~camptocamp/margin-analysis/fix-view-for-all-use-cases-jge/+merge/198907
Hi,
Just fix the view to ensure product view is always well computed independently of the set of margin product installed.
--
https://code.launchpad.net/~camptocamp/margin-analysis/fix-view-for-all-use-cases-jge/+merge/198907
Your team Margin Analysis Core Editors is requested to review the proposed merge of lp:~camptocamp/margin-analysis/fix-view-for-all-use-cases-jge into lp:margin-analysis.
=== modified file 'product_get_cost_field/product_view.xml'
--- product_get_cost_field/product_view.xml 2013-12-12 10:02:14 +0000
+++ product_get_cost_field/product_view.xml 2013-12-13 10:54:50 +0000
@@ -7,7 +7,7 @@
<field name="model">product.product</field>
<field name="inherit_id" ref="product.product_normal_form_view" />
<field name="arch" type="xml">
- <field name="standard_price" attrs="{'readonly':[('cost_method','=','average')]}" position="before">
+ <field name="cost_method" groups="product.group_costing_method" position="after">
<field name="cost_price"/>
</field>
</field>
=== modified file 'product_stock_cost_field_report/product_stock_view.xml'
--- product_stock_cost_field_report/product_stock_view.xml 2013-12-12 10:02:14 +0000
+++ product_stock_cost_field_report/product_stock_view.xml 2013-12-13 10:54:50 +0000
@@ -9,8 +9,8 @@
<field name="model">product.product</field>
<field name="inherit_id" ref="product.product_normal_form_view" />
<field name="arch" type="xml">
- <field name="standard_price" attrs="{'readonly':[('cost_method','=','average')]}" position="before">
- </field>
+ <field name="cost_method" groups="product.group_costing_method" position="after">
+ </field>
</field>
</record>
@@ -18,13 +18,14 @@
<field name="name">product.product.standard.price.form.inherit</field>
<field name="model">product.product</field>
<field name="inherit_id" ref="product.product_normal_form_view"/>
+ <field name="priority">20</field>
<field name="arch" type="xml">
- <label string="Cost Price" for="standard_price" align="1.0" groups="base.group_user" position="before">
+ <xpath expr="//label[@string='Cost Price']" position="before">
<label for="cost_price" align="1.0" groups="base.group_user"/>
<div groups="base.group_user">
<field name="cost_price" nolabel="1"/>
</div>
- </label>
+ </xpath>
</field>
</record>
Follow ups