From aaafb43c2b9acb6965581141a2dbe3bbcbae8772 Mon Sep 17 00:00:00 2001 From: "DBR (OpenERP)" Date: Thu, 8 Dec 2011 16:10:30 +0530 Subject: [PATCH] [IMP]stock: update product id bzr revid: dbr@tinyerp.com-20111208104030-xte7iw35irho7tn4 --- addons/product/product_demo.xml | 2 +- addons/stock/__openerp__.py | 1 - addons/stock/stock_demo_picking.yml | 11 +---------- addons/stock/test/stock_chain_location.yml | 12 ++++++------ 4 files changed, 8 insertions(+), 18 deletions(-) diff --git a/addons/product/product_demo.xml b/addons/product/product_demo.xml index 3a80dfac86d..12f7b146516 100644 --- a/addons/product/product_demo.xml +++ b/addons/product/product_demo.xml @@ -321,7 +321,7 @@ product - + Ice buy 100.0 diff --git a/addons/stock/__openerp__.py b/addons/stock/__openerp__.py index ea1a5a0f13c..a3e9a2b9963 100644 --- a/addons/stock/__openerp__.py +++ b/addons/stock/__openerp__.py @@ -86,7 +86,6 @@ Thanks to the double entry management, the inventory controlling is powerful and 'test/stock_update.yml', 'test/stock_chain_location.yml', 'test/stock_demo_backorder.yml', - #'test/stock_new_pack.yml', 'test/stock_report.yml', 'test/delete_stock.yml', 'test/cancel_stock.yml', diff --git a/addons/stock/stock_demo_picking.yml b/addons/stock/stock_demo_picking.yml index 3a728cf53e8..51834619b55 100644 --- a/addons/stock/stock_demo_picking.yml +++ b/addons/stock/stock_demo_picking.yml @@ -23,13 +23,4 @@ location_id: stock.stock_location_stock name: CPU3, Processor AMD Athlon XP 1800 picking_id: stock_picking_1 -- - !record {model: stock.move, id: stock_move_3}: - product_id: product.product_product_pc1 - product_uom: product.product_uom_unit - product_uos_qty: 5.0 - product_qty: 5.0 - location_dest_id: stock.stock_location_customers - location_id: stock.stock_location_stock - name: PC1, Basic PC - picking_id: stock_picking_1 + diff --git a/addons/stock/test/stock_chain_location.yml b/addons/stock/test/stock_chain_location.yml index 7f131f63b58..f13ed368aec 100644 --- a/addons/stock/test/stock_chain_location.yml +++ b/addons/stock/test/stock_chain_location.yml @@ -4,7 +4,7 @@ I create stock production lot for product. - !record {model: stock.production.lot, id: stock_production_lot2}: - product_id: product.product_product_sprouting + product_id: product.product_product_ice date: !eval time.strftime('%Y-%m-%d %H:%M:%S') name: 00000002 - @@ -12,14 +12,14 @@ - !python {model: product.product}: | change_qty = self.pool.get('stock.change.product.qty') - product = self.browse(cr, uid, ref('product.product_product_sprouting')) + 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')}) 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. - !python {model: stock.move}: | - ids = self.search(cr, uid, [('product_id','=',ref('product.product_product_sprouting'))]) + ids = self.search(cr, uid, [('product_id','=',ref('product.product_product_ice'))]) for move in self.browse(cr, uid, ids): assert move.product_qty >= 1,"Product is not correspond" if move.location_id.name == 'Inventory loss': @@ -32,7 +32,7 @@ I create a move and scrap some quantities from it. - !python {model: stock.move.scrap}: | - ids = self.pool.get('stock.move').search(cr, uid, [('product_id','=',ref('product.product_product_sprouting')),('location_dest_id','=',ref('stock_location_customers'))]) + ids = self.pool.get('stock.move').search(cr, uid, [('product_id','=',ref('product.product_product_ice')),('location_dest_id','=',ref('stock_location_customers'))]) self.pool.get('stock.move').browse(cr, uid, ids)[0] context = {'active_model':'stock.move', 'active_id':ids[0],'active_ids': ids} values = self.default_get(cr, uid, ['location_id','product_id','product_uom','product_qty'], context) @@ -42,7 +42,7 @@ I check scraped move details. - !python {model: stock.move}: | - ids = self.search(cr, uid, [('product_id','=',ref('product.product_product_sprouting')),('location_dest_id','=',ref('stock_location_customers'))]) + ids = self.search(cr, uid, [('product_id','=',ref('product.product_product_ice')),('location_dest_id','=',ref('stock_location_customers'))]) for scrap_move in self.browse(cr, uid, ids): if scrap_move.product_qty == 5.0 and scrap_move.location_dest_id == ref('stock_location_scrapped'): assert scrap_move.state == 'done',"The scraped move should be in Done state" @@ -51,7 +51,7 @@ - !python {model: stock.move }: | import time - ids = self.pool.get('stock.move').search(cr, uid, [('product_id','=',ref('product.product_product_sprouting')),('location_dest_id','=',ref('stock_location_customers'))]) + ids = self.pool.get('stock.move').search(cr, uid, [('product_id','=',ref('product.product_product_ice')),('location_dest_id','=',ref('stock_location_customers'))]) old_move=self.browse(cr,uid,ids)[0] context = {'active_model': 'stock.move','active_id':ids[0],'active_ids': ids} tracking_id = self.pool.get('stock.tracking').create(cr, uid, {'name': '0000007', 'date': time.strftime('%Y-%m-%d %H:%M:%S')})