2011-12-22 06:06:59 +00:00
-
!record {model: stock.location, id: location_refrigerator}:
name : Refrigerator
usage : internal
-
!record {model: stock.location, id: location_delivery_counter}:
name : Delivery Counter
usage : internal
-
!record {model: stock.location, id: location_refrigerator_small}:
name : Small Refrigerator
usage : internal
2012-03-30 07:49:01 +00:00
location_id : location_refrigerator
2011-12-22 06:06:59 +00:00
-
!record {model: stock.location, id: location_opening}:
name : opening
usage : inventory
-
!record {model: stock.location, id: location_convenience_shop}:
name : Convenient Store
2011-12-22 10:06:58 +00:00
usage : supplier
2011-12-22 06:06:59 +00:00
-
!record {model: stock.warehouse, id: warehouse_icecream}:
name : Ice Cream Shop
2013-09-27 13:22:11 +00:00
code : ICE
2011-12-22 06:06:59 +00:00
lot_stock_id : location_refrigerator
2013-09-27 12:18:18 +00:00
code : Cream
2011-12-22 06:06:59 +00:00
-
!record {model: product.product, id: product_icecream}:
default_code : 001
name : Ice Cream
type : product
2012-06-28 09:30:01 +00:00
categ_id : product.product_category_1
2011-12-22 06:06:59 +00:00
list_price : 100.0
standard_price : 70.0
uom_id : product.product_uom_kgm
uom_po_id : product.product_uom_kgm
property_stock_inventory : location_opening
description : Ice cream can be mass-produced and thus is widely available in developed parts of the world. Ice cream can be purchased in large cartons (vats and squrounds) from supermarkets and grocery stores, in smaller quantities from ice cream shops, convenience stores, and milk bars, and in individual servings from small carts or vans at public events.
-
!record {model: stock.production.lot, id: lot_icecream_0}:
name : Lot0 for Ice cream
product_id : product_icecream
-
!record {model: stock.production.lot, id: lot_icecream_1}:
name : Lot1 for Ice cream
product_id : product_icecream
-
!record {model: stock.inventory, id: stock_inventory_icecream}:
name : Inventory for icecream
2013-08-06 15:36:01 +00:00
product_id : product_icecream
2011-12-22 06:06:59 +00:00
-
!record {model: stock.inventory.line, id: stock_inventory_line_icecream_lot0}:
product_id : product_icecream
2013-08-06 06:59:28 +00:00
product_uom_id : product.product_uom_kgm
2011-12-22 06:06:59 +00:00
inventory_id : stock_inventory_icecream
product_qty : 50.0
prod_lot_id : lot_icecream_0
location_id : location_refrigerator
-
!record {model: stock.inventory.line, id: stock_inventory_line_icecream_lot1}:
product_id : product_icecream
2013-08-06 06:59:28 +00:00
product_uom_id : product.product_uom_kgm
2011-12-22 06:06:59 +00:00
inventory_id : stock_inventory_icecream
product_qty : 40.0
prod_lot_id : lot_icecream_1
location_id : location_refrigerator
-
2013-10-10 12:03:31 +00:00
Create STOCK_PICKING for OUT
-
!python {model: stock.picking}: |
main_warehouse = self.pool.get('stock.warehouse').browse(cr, uid, ref('warehouse0'), context=context)
my_picking_type_out = main_warehouse.out_type_id.id
2013-10-16 09:34:46 +00:00
create_id = self.create(cr,uid,{'location_dest_id':ref('location_delivery_counter'),'picking_type_id':my_picking_type_out})
for xml_record in [{'name':'outgoing_shipment','module':'stock', 'model':'stock.picking','res_id':create_id}]:
xml_ids = self.pool.get('ir.model.data').search(cr, uid, [('module', '=', xml_record['module']), ('model', '=', xml_record['model']), ('name', '=', xml_record['name'])], context=context)
if not xml_ids :
self.pool.get('ir.model.data').create(cr, uid, xml_record, context=context)
#avoid the xml id and the associated resource being dropped by the orm by manually making a hit on it
self.pool.get('ir.model.data')._update_dummy(cr, uid, xml_record['model'], xml_record['module'], xml_record['name'])
2011-12-22 06:06:59 +00:00
-
!record {model: stock.move, id: outgoing_shipment_icecream}:
picking_id : outgoing_shipment
product_id : product_icecream
product_uom : product.product_uom_kgm
2013-06-30 14:10:14 +00:00
product_uom_qty : 130.0
2011-12-22 06:06:59 +00:00
location_id : location_refrigerator
location_dest_id : location_delivery_counter
-
2013-10-10 12:03:31 +00:00
Create STOCK_PICKING for IN
-
!python {model: stock.picking}: |
main_warehouse = self.pool.get('stock.warehouse').browse(cr, uid, ref('warehouse0'), context=context)
my_picking_type = main_warehouse.in_type_id.id
create_id = self.create(cr,uid,{'location_dest_id':ref('location_refrigerator'),'picking_type_id':my_picking_type,'partner_id':ref('base.res_partner_address_9')});
2013-10-16 09:34:46 +00:00
for xml_record in [{'name':'incomming_shipment','module':'stock', 'model':'stock.picking','res_id':create_id}]:
xml_ids = self.pool.get('ir.model.data').search(cr, uid, [('module', '=', xml_record['module']), ('model', '=', xml_record['model']), ('name', '=', xml_record['name'])], context=context)
if not xml_ids :
self.pool.get('ir.model.data').create(cr, uid, xml_record, context=context)
#avoid the xml id and the associated resource being dropped by the orm by manually making a hit on it
self.pool.get('ir.model.data')._update_dummy(cr, uid, xml_record['model'], xml_record['module'], xml_record['name'])
2011-12-22 06:06:59 +00:00
-
!record {model: stock.move, id: incomming_shipment_icecream}:
picking_id : incomming_shipment
product_id : product_icecream
product_uom : product.product_uom_kgm
2013-06-30 14:10:14 +00:00
product_uom_qty : 50.0
2011-12-22 06:06:59 +00:00
location_id : location_convenience_shop
location_dest_id : location_refrigerator