Odoo Help


Is there a way to automatically load data upon module install/upgrade/reload?

Ben Olsen
on 5/22/14, 1:32 PM 836 views

I just discovered the osv.Model init() and view_init() functions, which are really useful for some of the things I want to do. However, I'd like to be able to have my custom module come pre-loaded with some data when it's installed (or upgraded/reloaded). Is there a function that would allow this, similar to how init() lets me do things on module initialization? 



| 2 2 4
Buenos Aires, Argentina

Python developer, big fan of sailing

On 5/22/14, 4:52 PM

You can load data when the module is installed/upgraded/reloaded with xml files in the module itself. These files need to be declared in the __openerp__.py file, in the data section

Hope this  helps,

About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 5/22/14, 1:32 PM
Seen: 836 times
Last updated: 3/16/15, 8:10 AM