Merge lp:~camptocamp/openobject-addons/7.0-fix-form_ref_context_lp1214801-afe into lp:openobject-addons/7.0

Proposed by Alexandre Fayolle - camptocamp
Status: Needs review
Proposed branch: lp:~camptocamp/openobject-addons/7.0-fix-form_ref_context_lp1214801-afe
Merge into: lp:openobject-addons/7.0
Diff against target: 30 lines (+3/-3)
1 file modified
stock/stock_view.xml (+3/-3)
To merge this branch: bzr merge lp:~camptocamp/openobject-addons/7.0-fix-form_ref_context_lp1214801-afe
Reviewer Review Type Date Requested Status
Olivier Dony (Odoo) Approve
Review via email: mp+181237@code.launchpad.net

Description of the change

Use the qualified name when specifying sub views

To post a comment you must log in.
Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

Looks fine, but since the list view "stock.view_move_picking_tree" is configured to have the highest priority, it's in fact redundant to force it every time, and the `tree_view_ref` elements could be dropped altogether.

The `form_view_ref` element will on the other hand cause the stock.move view to switch to the simplified version meant for use inside pickings, which was the intended effect.

Thanks!

review: Approve

Unmerged revisions

9372. By Alexandre Fayolle - camptocamp on 2013-08-21

[FIX] stock: use qualified xml id in form_view_ref and tree_view_ref context values

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'stock/stock_view.xml'
2--- stock/stock_view.xml 2013-08-21 08:53:04 +0000
3+++ stock/stock_view.xml 2013-08-21 10:03:27 +0000
4@@ -776,7 +776,7 @@
5 </group>
6 <notebook>
7 <page string="Products">
8- <field name="move_lines" context="{'address_in_id': partner_id, 'form_view_ref':'view_move_picking_form', 'tree_view_ref':'view_move_picking_tree', 'picking_type': 'internal'}" options='{"reload_on_button": true}'/>
9+ <field name="move_lines" context="{'address_in_id': partner_id, 'form_view_ref':'stock.view_move_picking_form', 'tree_view_ref':'stock.view_move_picking_tree', 'picking_type': 'internal'}" options='{"reload_on_button": true}'/>
10 <field name="note" placeholder="Add an internal note..." class="oe_inline"/>
11 </page>
12 <page string="Additional Info">
13@@ -911,7 +911,7 @@
14 <field name="partner_id" on_change="onchange_partner_in(partner_id)" string="Customer" domain="[('customer','=',True)]" />
15 </xpath>
16 <xpath expr="//field[@name='move_lines']" position="replace">
17- <field name="move_lines" context="{'address_out_id': partner_id, 'picking_type': 'out', 'form_view_ref':'view_move_picking_form', 'tree_view_ref':'view_move_picking_tree'}" options='{"reload_on_button": true}'/>
18+ <field name="move_lines" context="{'address_out_id': partner_id, 'picking_type': 'out', 'form_view_ref':'stock.view_move_picking_form', 'tree_view_ref':'stock.view_move_picking_tree'}" options='{"reload_on_button": true}'/>
19 </xpath>
20 <xpath expr="/form/sheet" position="after">
21 <div class="oe_chatter">
22@@ -1038,7 +1038,7 @@
23 <field name="partner_id" on_change="onchange_partner_in(partner_id)" string="Supplier" domain="[('supplier','=',True)]" />
24 </xpath>
25 <xpath expr="//field[@name='move_lines']" position="replace">
26- <field name="move_lines" context="{'address_in_id': partner_id, 'picking_type': 'in', 'form_view_ref':'view_move_picking_form', 'tree_view_ref':'view_move_picking_tree'}" options='{"reload_on_button": true}'/>
27+ <field name="move_lines" context="{'address_in_id': partner_id, 'picking_type': 'in', 'form_view_ref':'stock.view_move_picking_form', 'tree_view_ref':'stock.view_move_picking_tree'}" options='{"reload_on_button": true}'/>
28 </xpath>
29 <xpath expr="/form/sheet" position="after">
30 <div class="oe_chatter">