Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

2

what is 'data' field in __openerp__.py file [Closed]

By
priyankahdp
on 3/14/13, 12:46 AM 1,992 views

The Question has been closed

by
priyankahdp
on 04/18/2013 07:31:06
{
    'name' : "OpenAcademy",
    'version' : "1.0",
    'author' : "OpenERP SA",
    'category' : "Tools",
    'depends' : ['mail'],
    'data' : [
        'openacademy_view.xml',
        'openacademy_data.xml',
        'report/module_report.xml',
        'wizard/module_wizard.xml',
    ],
    'demo' : [
        'openacademy_demo.xml'
    ],
    'installable': True,
}

please tell me what is the usage of that 'data' field. if you can please show & explain the sample using student module

2

Serpent Consulting Services Pvt. Ltd.

--Serpent Consulting Services Pvt. Ltd.--
4341
| 6 6 8
Gandhinagar, India
--Serpent Consulting Services Pvt. Ltd.--

Serpent Consulting Services Pvt. Ltd. Your Odoo/OpenERP Solution, just an email away!

Serpent Consulting Services Pvt. Ltd.
On 3/19/13, 2:11 AM

Hello,

"data" field in v7 is same as "update_xml" field in v6.1. You can also write "update_xml" instead of "data" in v7.

This field is list of .xml files to load when the server is launched with the “–update=module” launched. Filepaths must be relative to the directory where the module is. OpenERP XML File Format is detailed in this section.

Thanks, Serpent Consulting Services.

DATA not the same as UPDATE_XML. It can load data only at INSTALL or always (depending from attribute of record), but UPDATE_XML load always. Always mean INSTALL and UPDATE. For new modules better use DATA, because UPDATE_XML will deprecated.

qwq
on 3/21/13, 1:27 AM
4

Vasiliy Birukov

--Vasiliy Birukov--
3446
| 6 6 8
Russian Federation
--Vasiliy Birukov--

Help develop and implement any project on base Odoo.

Vasiliy Birukov
On 3/14/13, 1:39 AM

It describe list of files (CSV, YAML or XML) with data, that load to DB when module install or update.

thanks wowas, then what is the usage of it.? is it like __openerp__.py depends field.?it also load the data.isn't it.?

priyankahdp
on 3/14/13, 2:14 AM

If you need use in module, for example, file FILENAME.XML you must add it to DATA list in __openerp__.py: 'data' : [ 'filename.xml', ], then when you install or update your module system will scan this file. DEPENDS list cause that system will install pointed modules, when you install your module.

Vasiliy Birukov
on 3/15/13, 2:11 AM

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 3/14/13, 12:46 AM
Seen: 1992 times
Last updated: 3/27/15, 5:35 PM