Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
In a custom module, I'm trying to import a file that doesn't exist in the addons directory.
My file path: /home/wided/settings.py
Addons path: /usr/local/lib/python2.7/dist-packages/openerp-server/addons
How can I import settings.py to my module?
Make a symbolic link to the file in your module?
cd /usr/local/lib/python2.7/dist-packages/openerp-server/addons/my_module/ ln -s /home/wided/settings.py
This creates the symlink settings.py in the folder my_module. Then in a different script in that folder,
I can't think of a situation where I'd want to use this setup over just putting the settings.py file in the module folder itself though. Even making a symlink from the module folder to your home folder sounds like a better idea.
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.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 9/26/13, 6:13 AM|
|Seen: 1944 times|
|Last updated: 3/16/15, 8:10 AM|