From d54e377a4011e07ffabd53e98b4222732d0f1e6b Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Tue, 12 Nov 2013 11:55:50 +0100 Subject: [PATCH] [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 --- addons/stock/stock_demo.xml | 11 ----------- addons/stock/stock_demo.yml | 28 ++-------------------------- 2 files changed, 2 insertions(+), 37 deletions(-) diff --git a/addons/stock/stock_demo.xml b/addons/stock/stock_demo.xml index ff563fdb667..6579628f83f 100644 --- a/addons/stock/stock_demo.xml +++ b/addons/stock/stock_demo.xml @@ -35,17 +35,6 @@ customer - diff --git a/addons/stock/stock_demo.yml b/addons/stock/stock_demo.yml index da5c9cad18b..9300c20c83a 100644 --- a/addons/stock/stock_demo.yml +++ b/addons/stock/stock_demo.yml @@ -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