Odoo Help


Openerp handling of submodules?

Carlos Llamacho
on 9/11/13, 6:52 PM 2,288 views

Can i have a package configuration like a regular python module in OpenERP?

Something like this.


I understand that in python this would allow me to call from module.submodule import * or via import module.sub_module right? What would be the configuration of the __init__.py files to achieve this? Thanks in advance.


Daniel Reis

--Daniel Reis--
| 7 8 9
Linda-a-Velha, Portugal
--Daniel Reis--

Author of the "Odoo Development Essentials" book.

Applications Manager at Securitas Portugal

Github: https://github.com/dreispt

Twitter; @reis_pt

Daniel Reis
On 9/11/13, 7:31 PM

Yes, an OpenERP module is basically python code and like a python module. You can see examples of this in the standard modules: notice that many have subdirectories such as wizard or report with an __init__.py and additional python files.

So if wanted to create a model inside a subfolder, how would i need to call it from the __init__.py in the main folder, import submodule or from module.submodule import * (Does this way even works in openerp modules?)

Carlos Llamacho
on 9/12/13, 11:30 AM

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: 9/11/13, 6:52 PM
Seen: 2288 times
Last updated: 3/16/15, 8:10 AM