diff --git a/addons/stock/__openerp__.py b/addons/stock/__openerp__.py index ae066b45eac..0c8fc5ab56f 100644 --- a/addons/stock/__openerp__.py +++ b/addons/stock/__openerp__.py @@ -72,7 +72,6 @@ Dashboard / Reports for Warehouse Management will include: 'security/ir.model.access.csv', 'stock_data.xml', 'stock_data.yml', - 'stock_set_ir_model_data.yml', 'wizard/stock_move_view.xml', 'wizard/stock_change_product_qty_view.xml', 'wizard/stock_inventory_merge_view.xml', diff --git a/addons/stock/stock_data.yml b/addons/stock/stock_data.yml index e620c98d0f8..f27cb7edd8a 100644 --- a/addons/stock/stock_data.yml +++ b/addons/stock/stock_data.yml @@ -2,5 +2,15 @@ !python {model: res.partner}: | main_warehouse = self.pool.get('stock.warehouse').browse(cr, uid, ref('warehouse0'), context=context) self.write(cr, uid, ref('base.main_partner'), {'property_stock_customer':main_warehouse.lot_stock_id.id}) +- + !python {model: ir.model.data, noupdate: True}: | + main_warehouse = self.pool.get('stock.warehouse').browse(cr, uid, ref('warehouse0'), context=context) + self.create(cr,uid,{'name':'stock_location_stock','module':'stock', 'model':'stock.location','res_id':main_warehouse.lot_stock_id.id}, context=context) + self.create(cr,uid,{'name':'stock_location_company','module':'stock', 'model':'stock.location','res_id':main_warehouse.wh_input_stock_loc_id.id}, context=context) + self.create(cr,uid,{'name':'stock_location_output','module':'stock', 'model':'stock.location','res_id':main_warehouse.wh_output_stock_loc_id.id}, context=context) + self.create(cr,uid,{'name':'location_pack_zone','module':'stock', 'model':'stock.location','res_id':main_warehouse.wh_pack_stock_loc_id.id}, context=context) + self.create(cr,uid,{'name':'picking_type_internal','module':'stock', 'model':'stock.picking.type','res_id':main_warehouse.int_type_id.id}, context=context) + self.create(cr,uid,{'name':'picking_type_in','module':'stock', 'model':'stock.picking.type','res_id':main_warehouse.in_type_id.id}, context=context) + self.create(cr,uid,{'name':'picking_type_out','module':'stock', 'model':'stock.picking.type','res_id':main_warehouse.out_type_id.id}, context=context) diff --git a/addons/stock/stock_set_ir_model_data.yml b/addons/stock/stock_set_ir_model_data.yml deleted file mode 100644 index c7d55707903..00000000000 --- a/addons/stock/stock_set_ir_model_data.yml +++ /dev/null @@ -1,11 +0,0 @@ -- - !python {model: ir.model.data, noupdate: True}: | - main_warehouse = self.pool.get('stock.warehouse').browse(cr, uid, ref('warehouse0'), context=context) - self.create(cr,uid,{'name':'stock_location_stock','module':'stock', 'model':'stock.location','res_id':main_warehouse.lot_stock_id.id}, context=context) - self.create(cr,uid,{'name':'stock_location_company','module':'stock', 'model':'stock.location','res_id':main_warehouse.wh_input_stock_loc_id.id}, context=context) - self.create(cr,uid,{'name':'stock_location_output','module':'stock', 'model':'stock.location','res_id':main_warehouse.wh_output_stock_loc_id.id}, context=context) - self.create(cr,uid,{'name':'location_pack_zone','module':'stock', 'model':'stock.location','res_id':main_warehouse.wh_pack_stock_loc_id.id}, context=context) - - self.create(cr,uid,{'name':'picking_type_internal','module':'stock', 'model':'stock.picking.type','res_id':main_warehouse.int_type_id.id}, context=context) - self.create(cr,uid,{'name':'picking_type_in','module':'stock', 'model':'stock.picking.type','res_id':main_warehouse.in_type_id.id}, context=context) - self.create(cr,uid,{'name':'picking_type_out','module':'stock', 'model':'stock.picking.type','res_id':main_warehouse.out_type_id.id}, context=context)