From 128586c59c25ca74d214b03f399ccfc4086ea89f Mon Sep 17 00:00:00 2001 From: Josse Colpaert Date: Mon, 19 Aug 2013 11:19:37 +0200 Subject: [PATCH] [IMP] location_id should be location_spec_id when applying putaway strats (psi) bzr revid: jco@openerp.com-20130819091937-r7zht49op1nupyrr --- addons/stock_location/stock_location.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/addons/stock_location/stock_location.py b/addons/stock_location/stock_location.py index d01bbbca5e0..6daaf0858b1 100644 --- a/addons/stock_location/stock_location.py +++ b/addons/stock_location/stock_location.py @@ -269,16 +269,16 @@ class stock_move(osv.osv): if putaway: # Should call different methods here in later versions # TODO: take care of lots - if putaway.method == 'fixed' and putaway.location_id: + if putaway.method == 'fixed' and putaway.location_spec_id: moveputaway_obj.create(cr, uid, {'move_id': move.id, - 'location_id': putaway.location_id.id, + 'location_id': putaway.location_spec_id.id, 'quantity': move.product_uom_qty}, context=context) return True def action_assign(self, cr, uid, ids, context=None): - result = super(stock_move, self).action_assign(cr, uid, ids, context=context) - self._putaway_apply(cr, uid, ids, context=context) - return result + result = super(stock_move, self).action_assign(cr, uid, ids, context=context) + self._putaway_apply(cr, uid, ids, context=context) + return result def action_confirm(self, cr, uid, ids, context=None): result = super(stock_move, self).action_confirm(cr, uid, ids, context) @@ -286,6 +286,8 @@ class stock_move(osv.osv): self._push_apply(cr, uid, moves, context=context) return result + + def _create_procurement(self, cr, uid, move, context=None): """ Next to creating the procurement order, it will propagate the routes