From 55c33e83c81fb363ed0fd23d6f74ac5dd2f3075b Mon Sep 17 00:00:00 2001 From: "DBR (OpenERP)" Date: Wed, 7 Dec 2011 16:31:16 +0530 Subject: [PATCH] [IMP]stock: Update the product demo data and remove the case of productionlot record bzr revid: dbr@tinyerp.com-20111207110116-x61am8rwblg0nyks --- addons/product/product_demo.xml | 10 +++++----- addons/stock/stock_demo.xml | 4 ++-- addons/stock/test/stock_chain_location.yml | 19 +++---------------- addons/stock/test/stock_new_pack.yml | 2 +- 4 files changed, 11 insertions(+), 24 deletions(-) diff --git a/addons/product/product_demo.xml b/addons/product/product_demo.xml index 775f24a101a..3a80dfac86d 100644 --- a/addons/product/product_demo.xml +++ b/addons/product/product_demo.xml @@ -322,15 +322,15 @@ - Sprouting + Ice buy - 250.0 - 200.0 + 100.0 + 70.0 make_to_stock - 7.0 - Sprouting Foods + 1.0 + Ice cream product diff --git a/addons/stock/stock_demo.xml b/addons/stock/stock_demo.xml index ef85f5a494b..553b7b6b3be 100644 --- a/addons/stock/stock_demo.xml +++ b/addons/stock/stock_demo.xml @@ -50,8 +50,8 @@ Shelf 1 - - Refrigerated Vehicles + + Convenience Store auto fixed diff --git a/addons/stock/test/stock_chain_location.yml b/addons/stock/test/stock_chain_location.yml index f310534196c..dc40e64a0e3 100644 --- a/addons/stock/test/stock_chain_location.yml +++ b/addons/stock/test/stock_chain_location.yml @@ -1,18 +1,11 @@ - 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_sprouting - date: !eval time.strftime('%Y-%m-%d %H:%M:%S') - name: 0000002 - I update product quantity and check the stock moves are properly done or not - !python {model: stock.change.product.qty}: | product = self.pool.get('product.product').browse(cr, uid, ref('product.product_product_sprouting')) - fields = {'location_id' : ref('refrigerate_location_stock'), 'new_quantity': 1, 'product_id': product.id, 'prodlot_id': ref('stock.stock_production_lot2')} + fields = {'location_id' : ref('convenience_location_stock'), 'new_quantity': 1, 'product_id': product.id} ids = self.create(cr, uid, fields) self.change_product_qty(cr, uid, [ids], {'active_model':'product.product', 'active_id': product.id, 'active_ids':[product.id]}) - @@ -23,14 +16,8 @@ for i in self.browse(cr, uid, ids): assert i.product_qty >= 1,"Product is not correspond" if i.location_id.name == 'Inventory loss': - assert i.location_dest_id.name == 'Refrigerated Vehicles',"Destination location must be 'Refrigerated Vehicles'" - if i.location_id.name == 'Refrigerated Vehicles': + assert i.location_dest_id.name == 'Convenience Store',"Destination location must be 'Refrigerated Vehicles'" + if i.location_id.name == 'Convenience Store': assert i.location_dest_id.name == 'Cold Storage',"Destination location must be 'Cold Storage' because the source location is 'Refrigerated Vehicles'" if i.location_id.name == 'Cold Storage': assert i.location_dest_id.name == 'Customers',"Destination location must be 'Customers' because the source location is 'Cold Storage'" -- - I trace the stock production lot for product. -- - !python {model: stock.production.lot }: | - self.action_traceability(cr,uid,[ref('stock_production_lot2')], {'active_model': 'ir.ui.menu', 'field': '', 'type': ''}) - diff --git a/addons/stock/test/stock_new_pack.yml b/addons/stock/test/stock_new_pack.yml index 2165481d71a..371a3f493d0 100644 --- a/addons/stock/test/stock_new_pack.yml +++ b/addons/stock/test/stock_new_pack.yml @@ -20,5 +20,5 @@ split_obj.split(cr, uid, [split_id],{"active_model": "stock.move", "active_ids": [ref('stock_move_3')],"active_id": ref('stock_move_2')}) moves = self.search(cr, uid, [('picking_id','=',move_ids.picking_id.id)]) assert len(moves) > len(old_moves),"After spliting the picking, new move should be created" - new_move = self.browse(cr, uid, moves[-1]) + new_move = self.browse(cr, uid, moves[-2]) assert new_move.tracking_id,"After spliting the picking, new move should be created with new pack"