Merge lp:~camptocamp/margin-analysis/fix-view-for-all-use-cases-jge into lp:~margin-analysis-core-editors/margin-analysis/7.0

Proposed by Joël Grand-Guillaume @ camptocamp
Status: Merged
Approved by: Yannick Vaucher @ Camptocamp
Approved revision: 56
Merged at revision: 56
Proposed branch: lp:~camptocamp/margin-analysis/fix-view-for-all-use-cases-jge
Merge into: lp:~margin-analysis-core-editors/margin-analysis/7.0
Diff against target: 39 lines (+6/-5)
2 files modified
product_get_cost_field/product_view.xml (+1/-1)
product_stock_cost_field_report/product_stock_view.xml (+5/-4)
To merge this branch: bzr merge lp:~camptocamp/margin-analysis/fix-view-for-all-use-cases-jge
Reviewer Review Type Date Requested Status
Sandy Carter (http://www.savoirfairelinux.com) code review, no test Approve
Yannick Vaucher @ Camptocamp code review, no tests Approve
Review via email: mp+198907@code.launchpad.net

Commit message

[FIX] Product views after trying to install every module separately. Now it works for every kind of setup.

Description of the change

Hi,

Just fix the view to ensure product view is always well computed independently of the set of margin product installed.

To post a comment you must log in.
56. By Guewen Baconnier @ Camptocamp

[MRG] the view inheritance is wrong, fix from: lp:~camptocamp/margin-analysis/7.0-wrong-view-inheritance

Revision history for this message
Yannick Vaucher @ Camptocamp (yvaucher-c2c) wrote :

LGTM

review: Approve (code review, no tests)
Revision history for this message
Sandy Carter (http://www.savoirfairelinux.com) (sandy-carter) wrote :

LGTM

review: Approve (code review, no test)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'product_get_cost_field/product_view.xml'
2--- product_get_cost_field/product_view.xml 2013-12-12 10:02:14 +0000
3+++ product_get_cost_field/product_view.xml 2013-12-16 09:37:07 +0000
4@@ -7,7 +7,7 @@
5 <field name="model">product.product</field>
6 <field name="inherit_id" ref="product.product_normal_form_view" />
7 <field name="arch" type="xml">
8- <field name="standard_price" attrs="{'readonly':[('cost_method','=','average')]}" position="before">
9+ <field name="cost_method" groups="product.group_costing_method" position="after">
10 <field name="cost_price"/>
11 </field>
12 </field>
13
14=== modified file 'product_stock_cost_field_report/product_stock_view.xml'
15--- product_stock_cost_field_report/product_stock_view.xml 2013-12-12 10:02:14 +0000
16+++ product_stock_cost_field_report/product_stock_view.xml 2013-12-16 09:37:07 +0000
17@@ -9,17 +9,18 @@
18 <field name="model">product.product</field>
19 <field name="inherit_id" ref="product.product_normal_form_view" />
20 <field name="arch" type="xml">
21- <field name="standard_price" attrs="{'readonly':[('cost_method','=','average')]}" position="before">
22- </field>
23+ <field name="cost_method" groups="product.group_costing_method" position="after">
24+ </field>
25 </field>
26 </record>
27
28 <record id="view_product_standard_price_form" model="ir.ui.view">
29 <field name="name">product.product.standard.price.form.inherit</field>
30 <field name="model">product.product</field>
31- <field name="inherit_id" ref="product.product_normal_form_view"/>
32+ <field name="priority">20</field>
33+ <field name="inherit_id" ref="stock.view_product_standard_price_form"/>
34 <field name="arch" type="xml">
35- <label string="Cost Price" for="standard_price" align="1.0" groups="base.group_user" position="before">
36+ <label for="standard_price" position="before">
37 <label for="cost_price" align="1.0" groups="base.group_user"/>
38 <div groups="base.group_user">
39 <field name="cost_price" nolabel="1"/>

Subscribers

People subscribed via source and target branches