[IMP]stock: update product id
authorDBR (OpenERP) <dbr@tinyerp.com>
Thu, 8 Dec 2011 10:40:30 +0000 (16:10 +0530)
committerDBR (OpenERP) <dbr@tinyerp.com>
Thu, 8 Dec 2011 10:40:30 +0000 (16:10 +0530)
bzr revid: dbr@tinyerp.com-20111208104030-xte7iw35irho7tn4

addons/product/product_demo.xml
addons/stock/__openerp__.py
addons/stock/stock_demo_picking.yml
addons/stock/test/stock_chain_location.yml

index 3a80dfa..12f7b14 100644 (file)
             <field name="type">product</field>
             <field name="categ_id" ref="product_category_10"/>
         </record>
-        <record id="product_product_sprouting" model="product.product">
+        <record id="product_product_ice" model="product.product">
             <field name="default_code">Ice</field>
             <field name="supply_method">buy</field>
             <field name="list_price">100.0</field>
index ea1a5a0..a3e9a2b 100644 (file)
@@ -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',
index 3a728cf..5183461 100644 (file)
     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
+
index 7f131f6..f13ed36 100644 (file)
@@ -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
 -
 -
   !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')})