- !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 location_id: location_refrigerator - !record {model: stock.location, id: location_opening}: name: opening usage: inventory - !record {model: stock.location, id: location_convenience_shop}: name: Convenient Store usage: supplier - !record {model: stock.warehouse, id: warehouse_icecream}: name: Ice Cream Shop code: ICE lot_stock_id: location_refrigerator code: Cream - !record {model: product.product, id: product_icecream}: default_code: 001 name: Ice Cream type: product categ_id: product.product_category_1 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 product_id: product_icecream - !record {model: stock.inventory.line, id: stock_inventory_line_icecream_lot0}: product_id: product_icecream product_uom_id: product.product_uom_kgm 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 product_uom_id: product.product_uom_kgm inventory_id: stock_inventory_icecream product_qty: 40.0 prod_lot_id: lot_icecream_1 location_id: location_refrigerator - 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 create_id = self.create(cr,uid,{'location_dest_id':ref('location_delivery_counter'),'picking_type_id':my_picking_type_out}); self.pool.get('ir.model.data').create(cr,uid,{'name':'outgoing_shipment','module':'stock', 'model':'stock.picking','res_id':create_id}, context=context) - !record {model: stock.move, id: outgoing_shipment_icecream}: picking_id: outgoing_shipment product_id: product_icecream product_uom: product.product_uom_kgm product_uom_qty: 130.0 location_id: location_refrigerator location_dest_id: location_delivery_counter - 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')}); self.pool.get('ir.model.data').create(cr,uid,{'name':'incomming_shipment','module':'stock', 'model':'stock.picking','res_id':create_id}, context=context) - !record {model: stock.move, id: incomming_shipment_icecream}: picking_id: incomming_shipment product_id: product_icecream product_uom: product.product_uom_kgm product_uom_qty: 50.0 location_id: location_convenience_shop location_dest_id: location_refrigerator