Crash on returning picking

Bug #1319281 reported by Ignas Karpiejus @ hbee
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Committed
Low
OpenERP R&D Addons Team 3
OpenERP Community Backports (Addons)
New
Undecided
Unassigned

Bug Description

Hello,

crash appear in OpenERP 6.1, when opening the return wizard on picking which has lines that are not done (cancelled for example). Code line: stock/wizard/stock_return_picking.py:75 (http://bazaar.launchpad.net/~openerp/openobject-addons/6.1/view/head:/stock/wizard/stock_return_picking.py#L75)

Code line:
return_history = self.get_return_history(cr, uid, record_id, context)

get_return_history adds only "done" lines to the dictionary, and default_get method tries to get all of the lines from it:

for line in pick.move_lines:
                qty = line.product_qty - return_history[line.id]

In OpenERP 7.0 it adds all the lines (using "qty = line.product_qty - return_history.get(line.id, 0)"), I'm not sure if this is correct way, since how can you return products that are cancelled. I would suggest to add those products to wizard, but with quantity 0, for not to go far from current logic.

Tags: 6.1

Related branches

Changed in openobject-addons:
importance: Undecided → Low
status: New → Confirmed
assignee: nobody → OpenERP R&D Addons Team 3 (openerp-dev-addons3)
Changed in openobject-addons:
status: Confirmed → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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