Amit Parik (OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-bug-942159-amp into
lp:openobject-addons.
Requested reviews:
OpenERP Core Team (openerp)
Related bugs:
Bug #942159 in OpenERP Addons: "[6.1/Trunk] stock: Traceability broken input."
https://bugs.launchpad.net/openobject-addons/+bug/942159
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-942159-amp/+merge/98780
steps:
1) Create product(set purchase tracking true) with minimum stock rule (real
stock=0.0) now create a SO for this product.
2) Run the scheduler, PO will be created for this product from the scheduler.
3) Confirm the PO and go to reception assign the production lot done the
reception.
4) Open the done procurement (which was created PO), you can see your
production lot doesn't link to the procurement.
This functionality properly works with 6.0
Due to this fix this problem will solved
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-942159-amp/+merge/98780
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-bug-942159-amp.
=== modified file 'stock/stock.py'
--- stock/stock.py 2012-03-20 18:29:12 +0000
+++ stock/stock.py 2012-03-22 05:27:19 +0000
@@ -2211,6 +2211,12 @@
""" Makes the move done and if all moves are done, it will finish the picking.
@return:
"""
+ partial_datas=''
+ partial_obj=self.pool.get('stock.partial.picking')
+ partial_id=partial_obj.search(cr,uid,[])
+ if partial_id:
+ partial_datas = partial_obj.read(cr, uid, partial_id, context=context)[0]
+
picking_ids = []
move_ids = []
wf_service = netsvc.LocalService("workflow")
@@ -2236,6 +2242,10 @@
self.write(cr, uid, [move.id], {'move_history_ids': [(4, move.move_dest_id.id)]})
#cr.execute('insert into stock_move_history_ids (parent_id,child_id) values (%s,%s)', (move.id, move.move_dest_id.id))
if move.move_dest_id.state in ('waiting', 'confirmed'):
+ if partial_datas['picking_id'][1][:2] == 'IN' and move.location_dest_id:
+ self.write(cr, uid, [move.move_dest_id.id], {'location_dest_id': move.location_dest_id.id})
+ if move.prodlot_id.id and move.product_id.id == move.move_dest_id.product_id.id:
+ self.write(cr, uid, [move.move_dest_id.id], {'prodlot_id':move.prodlot_id.id})
self.force_assign(cr, uid, [move.move_dest_id.id], context=context)
if move.move_dest_id.picking_id:
wf_service.trg_write(uid, 'stock.picking', move.move_dest_id.picking_id.id, cr)
@@ -2243,6 +2253,9 @@
self.action_done(cr, uid, [move.move_dest_id.id], context=context)
self._create_product_valuation_moves(cr, uid, move, context=context)
+ prodlot_id = partial_datas and partial_datas.get('move%s_prodlot_id' % (move.id), False)
+ if prodlot_id:
+ self.write(cr, uid, [move.id], {'prodlot_id': prodlot_id}, context=context)
if move.state not in ('confirmed','done','assigned'):
todo.append(move.id)
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp