[IMP]stock: Update the product demo data and remove the case of productionlot record
bzr revid: dbr@tinyerp.com-20111207110116-x61am8rwblg0nyks
This commit is contained in:
parent
fee67a8aba
commit
55c33e83c8
|
@ -322,15 +322,15 @@
|
|||
<field name="categ_id" ref="product_category_10"/>
|
||||
</record>
|
||||
<record id="product_product_sprouting" model="product.product">
|
||||
<field name="default_code">Sprouting</field>
|
||||
<field name="default_code">Ice</field>
|
||||
<field name="supply_method">buy</field>
|
||||
<field name="list_price">250.0</field>
|
||||
<field name="standard_price">200.0</field>
|
||||
<field name="list_price">100.0</field>
|
||||
<field name="standard_price">70.0</field>
|
||||
<field name="uom_id" ref="product_uom_kgm"/>
|
||||
<field name="uom_po_id" ref="product_uom_kgm"/>
|
||||
<field name="procure_method">make_to_stock</field>
|
||||
<field name="sale_delay">7.0</field>
|
||||
<field name="name">Sprouting Foods</field>
|
||||
<field name="sale_delay">1.0</field>
|
||||
<field name="name">Ice cream</field>
|
||||
<field name="type">product</field>
|
||||
<field name="categ_id" ref="product_category_marketableproduct0"/>
|
||||
</record>
|
||||
|
|
|
@ -50,8 +50,8 @@
|
|||
<field name="name">Shelf 1</field>
|
||||
<field name="location_id" ref="stock_location_stock"/>
|
||||
</record>
|
||||
<record id="refrigerate_location_stock" model="stock.location">
|
||||
<field name="name">Refrigerated Vehicles</field>
|
||||
<record id="convenience_location_stock" model="stock.location">
|
||||
<field name="name">Convenience Store</field>
|
||||
<field name="location_id" ref="stock_location_company"/>
|
||||
<field name="chained_auto_packing">auto</field>
|
||||
<field name="chained_location_type">fixed</field>
|
||||
|
|
|
@ -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': ''})
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue