[IMP]stock: remove production lot.
bzr revid: dbr@tinyerp.com-20111208124252-rz31o2moypxijb8i
This commit is contained in:
@@ -1,19 +1,12 @@
|
||||
-
|
||||
In order to test chained locations, I update the stock of product.
|
||||
-
|
||||
I create stock production lot for product.
|
||||
-
|
||||
!record {model: stock.production.lot, id: stock_production_lot2}:
|
||||
product_id: product.product_product_ice
|
||||
date: !eval time.strftime('%Y-%m-%d %H:%M:%S')
|
||||
name: 00000002
|
||||
-
|
||||
I update product quantity and check the stock moves are properly done or not
|
||||
-
|
||||
!python {model: product.product}: |
|
||||
change_qty = self.pool.get('stock.change.product.qty')
|
||||
product = self.browse(cr, uid, ref('product.product_product_ice'))
|
||||
ids = change_qty.create(cr, uid, {'location_id' : ref('convenience_location_stock'), 'new_quantity': 5, 'product_id': product.id,'prodlot_id': ref('stock_production_lot2')})
|
||||
ids = change_qty.create(cr, uid, {'location_id' : ref('convenience_location_stock'), 'new_quantity': 5, 'product_id': product.id})
|
||||
change_qty.change_product_qty(cr, uid, [ids], {'active_model':'product.product', 'active_id': product.id, 'active_ids':[product.id]})
|
||||
-
|
||||
I check stock moves of product.
|
||||
@@ -59,7 +52,7 @@
|
||||
split_obj=self.pool.get('stock.split.into')
|
||||
split_id = split_obj.create(cr, uid, {'quantity': 1 })
|
||||
split_obj.split(cr, uid, [split_id], context)
|
||||
all_ids = self.search(cr, uid, [('prodlot_id','=',ref('stock_production_lot2'))])
|
||||
all_ids = self.search(cr, uid, [('product_id','=',ref('product.product_product_ice'))])
|
||||
new_move=self.browse(cr,uid,all_ids)[-1]
|
||||
assert not old_move.tracking_id == new_move.tracking_id,"After spliting the move, new move should be created with new pack"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user