Take this as example of how to load an xml data in a module, at the end you just need to install the module:
File at the path views/data.xml
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">
<record id="product_product_consultant" model="product.product">
<field name="categ_id" ref="product.product_category_5"/>
<field name="sale_ok" eval="True"/>
</record>
<record id="product_product_4" model="product.product">
<field name="name">iPad Retina Display</field>
<field name="categ_id" ref="ipad"/>
<field name="standard_price">500.0</field>
<field name="list_price">750.0</field>
<field name="type">consu</field>
<field name="uom_id" ref="product_uom_unit"/>
<field name="uom_po_id" ref="product_uom_unit"/>
<field name="description_sale">7.9‑inch (diagonal) LED-backlit, 128Gb
Dual-core A5 with quad-core graphics
FaceTime HD Camera, 1.2 MP Photos</field>
<field name="default_code">A2323</field>
<field name="attribute_value_ids" eval="[(6,0,[ref('product.product_attribute_value_1'), ref('product.product_attribute_value_3')])]"/>
</record>
<record id="product_product_4b" model="product.product">
<field name="default_code">A2324</field>
<field name="product_tmpl_id" ref="product_product_4_product_template"/>
<field name="attribute_value_ids" eval="[(6,0,[ref('product.product_attribute_value_1'), ref('product.product_attribute_value_4')])]"/>
</record>
</data>
</openerp>
Registered in __openerp__.py of your module like:
# -*- coding: utf-8 -*-
{
'name': 'Products Data',
'version': '1.1',
'author': 'OpenERP SA',
'depends': ['base', 'product'],
'website': 'https://www.odoo.com',
'description': """
""",
'data': [
'views/data.xml',
],
'installable': True,
'auto_install': False,
}
Do I really need to create a module for this? I have large sets of records to load, having to install and reinstall all modules sounds weird. Is there any bulk load mechanism?