From 784f3a4b1eb7b2198986aff123da46680435facd Mon Sep 17 00:00:00 2001 From: "DBR (OpenERP)" Date: Thu, 8 Dec 2011 18:12:52 +0530 Subject: [PATCH] [IMP]stock: remove production lot. bzr revid: dbr@tinyerp.com-20111208124252-rz31o2moypxijb8i --- addons/stock/test/stock_chain_location.yml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/addons/stock/test/stock_chain_location.yml b/addons/stock/test/stock_chain_location.yml index f13ed368aec..33e3437afae 100644 --- a/addons/stock/test/stock_chain_location.yml +++ b/addons/stock/test/stock_chain_location.yml @@ -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"