[6.1][7.0][trunk][stock] Move destination and partial picking

Bug #1137541 reported by Yann Papouin on 2013-03-01
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Committed
Low
OpenERP R&D Addons Team 2
OpenERP Community Backports (Addons)
Status tracked in 7.0
6.1
Low
Yann Papouin
7.0
Low
Yann Papouin

Bug Description

When doing a partial picking, if the quantity received/sent is lesser than the expected one, then a new move with the set quantity is created and the move is set to done by workflow.

The corresponding code is:

if product_qty != 0:
    defaults = {
            'product_qty' : product_qty,
            'product_uos_qty': product_qty, #TODO: put correct uos_qty
            'picking_id' : new_picking,
            'state': 'assigned',
            'move_dest_id': false,
            'price_unit': move.price_unit,
            'product_uom': product_uoms[move.id]
    }

I think that the "move_dest_id" value should be kept from the original move for easier traceability.

if product_qty != 0:
    defaults = {
            'product_qty' : product_qty,
            'product_uos_qty': product_qty, #TODO: put correct uos_qty
            'picking_id' : new_picking,
            'state': 'assigned',
            'move_dest_id': move.move_dest_id.id,
            'price_unit': move.price_unit,
            'product_uom': product_uoms[move.id]
    }

Related branches

Amit Parik (amit-parik) on 2013-03-05
Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 2 (openerp-dev-addons2)
importance: Undecided → Low
status: New → Confirmed
Changed in openobject-addons:
status: Confirmed → In Progress
Yann Papouin (yann-papouin) wrote :

Please note that this code is partially duplicated in the same file, so the code change should be applied in both parts:

in:
class stock_picking(osv.osv):

    # FIXME: needs refactoring, this code is partially duplicated in stock_move.do_partial()!
    def do_partial(self, cr, uid, ids, partial_datas, context=None):

and:
class stock_move(osv.osv):

    # FIXME: needs refactoring, this code is partially duplicated in stock_picking.do_partial()!
    def do_partial(self, cr, uid, ids, partial_datas, context=None):

Hello,

  It has been fixed inhttps://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-1137541-Darshan branch.
  Revision number : 8599
  Revision ID: <email address hidden>

  It will be available in trunk soon.

Thanks,
Darshan.

Changed in openobject-addons:
status: In Progress → Fix Committed
Yann Papouin (yann-papouin) wrote :

Please take a look on the following bug report, it's related:
https://bugs.launchpad.net/openobject-addons/+bug/1160927

Changed in ocb-addons:
assignee: nobody → Yann Papouin (yann-papouin)
importance: Undecided → Low
Changed in ocb-addons:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers