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.
Imagine yourself in a module's form, as if you were going to update it.
You can see the name, the summary the version... but, for some reason, you need to know where the module physically is. You need to know the actual path to the files.
How can you do that? Should you run a search on every addon folder in the config, looking for a folder with the same name of the module or is there any "secret" way of getting that info?
Thanks Bole but that was pretty much what I was doing and it would only show me the current module. The script had to tell me the path of the module where it was beeing executed from and not where the python file was located.
This is how I eventually did the trick:
for addons_folder in addons_path:
readme_path=addons_folder + '\\' + self.name
raise osv.except_osv(_('Error!'),_('Unable to write file at ' + readme_path))
if not folder_found:
raise osv.except_osv(_('Error!'),_("Unable to find '%s' folder " % self.name))
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: 12/12/14, 11:21 AM|
|Seen: 1117 times|
|Last updated: 3/16/15, 8:10 AM|