[FIX] stock: when unboxing, the package must be given explicitelly (introduced in revision 9583)

bzr revid: qdp-launchpad@openerp.com-20140302235750-c8s99jzhsqqu7v9a
This commit is contained in:
Quentin (OpenERP)
2014-03-03 00:57:50 +01:00
parent 65aa1424f7
commit 485ac1ab76
+1 -1
View File
@@ -106,7 +106,7 @@
for rec in delivery_id.pack_operation_ids:
if rec.package_id.name == 'Pallet 2':
lot_ids = self.pool.get("stock.production.lot").search(cr, uid, [('product_id', '=', ref('product1')), ('name','=','Lot A')])
stock_pack.write(cr, uid, [rec.id], {'product_id': ref('product1'), 'product_qty': 20, 'lot_id': lot_ids[0], 'package_id': False, 'product_uom_id': ref('product.product_uom_unit')}, context=context)
stock_pack.write(cr, uid, [rec.id], {'product_id': ref('product1'), 'product_qty': 20, 'lot_id': lot_ids[0], 'product_uom_id': ref('product.product_uom_unit')}, context=context)
if rec.package_id.name == 'Pallet 3':
stock_pack.write(cr, uid, [rec.id], {'product_id': ref('product1'),'product_qty': 10, 'product_uom_id': ref('product.product_uom_unit')}, context=context)
-