Context keys *_view_ref of one2many propagated to buttons

Bug #1263888 reported by Guewen Baconnier @ Camptocamp
32
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Odoo Web (MOVED TO GITHUB)
Fix Released
Low
OpenERP Publisher's Warranty Team
OpenERP Community Backports (Web)
Status tracked in 7.0
7.0
Fix Released
Undecided
Unassigned

Bug Description

The correction [0] of this bug lp:1177063 reveals another bug.

I guess that it is related to the webclient, but I could be wrong.

Steps to reproduce:

1) Apply the patch [0]
2) Make sure you have the groups: 'Track serial number on products', 'Track serial number on logistic units (pallets)' (the Packs should be displayed on the delivery orders)
3) Create a delivery order
4) Click on the "Split Into" button

You will have an error as follows:
Can't find field 'product_uos_qty' in the following view parts composing the view of object model 'stock.move':
* stock.move.form

The problem comes from the context, that is set on the move_lines m2o field:

                <xpath expr="//field[@name='move_lines']" position="replace">
                    <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}'/>
                </xpath>

This context is also propagated when we click on the button "Split Into". So the server tries to build the view stock.view_move_picking_form for the stock.split.into and fails.

The bug was not occuring before the patch of the stock view because the form_view_ref and tree_view_ref were simply ignored.

[0] https://code.launchpad.net/~alhashash/openobject-addons/7.0-bugs-1177076-1177063-alhashash/+merge/162664

Tags: maintenance

Related branches

Changed in openerp-web:
assignee: nobody → OpenERP Publisher's Warranty Team (openerp-opw)
tags: added: maintenance
Changed in openerp-web:
status: New → Fix Committed
Changed in ocb-web:
status: New → Fix Committed
Revision history for this message
Tilfried Weissenberger (tilli-6) wrote :

same problem also when you click the Scrap Product button:

Can't find field 'product_uos_qty' in the following view parts composing the view of object model 'stock.move':
* stock.move.form

Either you wrongly customized this view, or some modules bringing those views are not compatible with your current data model

Version 7.0-20140318-003107

Revision history for this message
Martin Trigaux (OpenERP) (mat-openerp) wrote :

Hello,

We have backported in 7.0 a fix present in trunk.

revno: 4181 [merge]
revision-id: <email address hidden>

Regards

Changed in openerp-web:
status: Fix Committed → Fix Released
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.