Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
18791 Prikazi

Hi

There is a custom_addons folder and there is no __init__.py file in it. There are two separate modules, lets say - module_one and module_two . In module_one there is a py file which I need in module_two to get a declared global variable.

Now when I write:

from odoo.addons.module_one import model

It shows error and doesn't find the module, because the module_one isn't in addons folder. I can't add __init__.py in the custom addons folder due to some restrictions. 

How can I get the custom modules py file in another custom module?

Thanks

Avatar
Opusti
Avtor Best Answer

It worked with: 

from odoo.addons.custom_addon_name.models.py_file_name import IMPORT_LIST

It looks like IDE was conning with me.

Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
7
dec. 23
26783
1
mar. 15
9936
2
okt. 23
3935
1
jan. 23
6207
0
sep. 17
5275