Merge lp:~camptocamp/openobject-addons/6.1-fix-1087311 into lp:openobject-addons/6.1

Proposed by Alexandre Fayolle - camptocamp
Status: Needs review
Proposed branch: lp:~camptocamp/openobject-addons/6.1-fix-1087311
Merge into: lp:openobject-addons/6.1
Diff against target: 12 lines (+1/-1)
1 file modified
stock/stock_view.xml (+1/-1)
To merge this branch: bzr merge lp:~camptocamp/openobject-addons/6.1-fix-1087311
Reviewer Review Type Date Requested Status
Rucha (Open ERP) Pending
OpenERP Core Team Pending
Review via email: mp+140372@code.launchpad.net

Commit message

[FIX] lp:1087311 lp:928233 (Production lot upstream traceability error)

the code of the server side does not expect context['type'] to be an empty string.

Description of the change

fix lp:1087311 by setting 'type' in the context of the Upstream traceability button to a non empty string.

To post a comment you must log in.

Unmerged revisions

7106. By Alexandre Fayolle @ camptocamp <email address hidden>

[FIX] stock: fix nasty bug when clicking on "Upstream Traceability" button for production lots

The issue was created when stoc/wizard/stock_traceability.py had line

type1 = context['type'] or 'move_history_ids2'

rewritten as:

type1 = context.get('type', 'move_history_ids2')

which returned an empty string for that button which set context['type'] to an
empty string. This was introduced in rev. 6259, which introduced bug lp:920841,
fixed in rev. 6370.6.2 which fixed the symptom but not the second layer bug.

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 2012-11-16 16:43:29 +0000
3+++ stock/stock_view.xml 2012-12-18 09:21:22 +0000
4@@ -331,7 +331,7 @@
5 <group col="2" colspan="2">
6 <separator string="Traceability" colspan="2"/>
7 <field name="stock_available" colspan="2"/>
8- <button name="action_traceability" string="Upstream Traceability" type="object" context="{'type': '', 'field': 'prodlot_id'}" icon="gtk-go-up" colspan="2"/>
9+ <button name="action_traceability" string="Upstream Traceability" type="object" context="{'type': 'move_history_ids2', 'field': 'prodlot_id'}" icon="gtk-go-up" colspan="2"/>
10 <button name="action_traceability" string="Downstream Traceability" type="object" context="{'type': 'move_history_ids', 'field': 'prodlot_id'}" icon="gtk-go-down" colspan="2"/>
11 </group>
12 <notebook colspan="4">