[FIX] stock: updated demo data so that the module can be reinstalled (wrong reference for an unused field removed)

bzr revid: qdp-launchpad@openerp.com-20131112105550-3389icz99jxaj9gs
This commit is contained in:
Quentin (OpenERP) 2013-11-12 11:55:50 +01:00
parent b4af523ef4
commit d54e377a40
2 changed files with 2 additions and 37 deletions

View File

@ -35,17 +35,6 @@
<field name="usage">customer</field>
</record>
<!--
<record id="stock_location_14" model="stock.location">
<field name="name">Shelf 2</field>
<field name="location_id" ref="stock_location_stock"/>
</record>
<record id="stock_location_components" model="stock.location">
<field name="name">Shelf 1</field>
<field name="location_id" ref="stock_location_stock"/>
</record>
-->
<!-- Resource: stock.inventory -->

View File

@ -66,42 +66,18 @@
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})
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'])
Create STOCK_MOVE for OUT
-
!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')});
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'])
Create STOCK_MOVE for IN
-
!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