This question has been flagged
5 Replies
12725 Views

I'm using the Debian package version 7.0-20130620-231038-1. I'm trying to get a custom module (for testing I used the notebook example from iBCScorp) running, but failed. I first tried to just put the directory in /usr/share/pyshared/openerp/addons/ (the permission are OK, everything world-readable), restarted the server with --update=all, but it didn't work. I also tried with putting the module into (again world-readable) path and the additional parameter --addons-path=/usr/local/src/openerp/testbed/addons/, but again, I can't see the module in the web interface. Is there anything obvious, I forgot? TIA!

Avatar
Discard
Author Best Answer

OK, it does now work for me! Even, if I'm not sure, whether the solution is correct or not:

I need to put the modules under

/usr/share/pyshared/openerp/addons/mymodule/

plus - and this is the point I missed before:

symlinks for every single file in above directory under the directory

/usr/lib/pymodules/python2.7/openerp/addons/mymodule/

e.g. /usr/lib/pymodules/python2.7/openerp/addons/mymodule/__init__.py points to /usr/share/pyshared/openerp/addons/mymodule/__init__.py etc.

Thanks to everybody for your help!

Avatar
Discard

Does anyone know, if there is a smart little Linux shell script to do this task? Creating all the symlinks can be quite time-consuming... In our installation we have also a second directory "/usr/lib/pymodules/python2.6/openerp/addons/" where the links should be created.

Best Answer

When an OpenERP database is created, the systems looks in the addons path and 'loads' metadata about the modules it finds.

--update=all will look at this metadata and re-load all of the module sources, but won't do anything with 'new' modules.

If you put a module into the addons path, you need to trigger OpenERP to update the module metadata.

Settings --> Modules --> Update Module List

Then, any modules that have been added to the system since the creation of the database, or since the last time the module list was updated, will appear (providing they are valid and can be seen by the OpenERP process).

Avatar
Discard
Author

Unfortunately, this does not have any visible effect. Is there any way to debug this? Of course, I already looked for errors and the module names in the log files, but nothing... I'm sure, I'm missing something very stupid, but what?

Best Answer

I usually place my custom modules in /usr/lib/pymodules/python2.7/openerp/addons/ ...then do Settings --> Modules --> Update Module List ...and they work. Try it!

Avatar
Discard
Author

Unfortunately, this did not work for me. I wonder, whether maybe my example modules are broken in some way...

Best Answer

Hi,

Please check file __openerp__.py There is one attribute you have to check :

'installable': True

It may be "False" so check it.

Thanks
Acespritech Solutions Pvt Ltd
http://www.acespritech.com
http://acespritechblog.wordpress.com

Avatar
Discard
Author

It is set to True already. The complete notebook example __openerp__.py is: { "name" : "notebook", "version" : "0.1", "author" : "Keerthi Bandara @ iBCScorp", "website" : "http://www.ibcscorp.com/", "category" : "Generic Modules/Others", "depends" : ["base"], "description" : "Simple demo module", "init_xml" : ["notebook_view.xml"], "demo_xml" : [], "update_xml" : [], "active": False, "installable": True }

Best Answer

Hi Martin,

sometimes when you are installing OpenERP you can be accident create multiple locations where the openerp directories (server,web.,addons,..) are stored. It sounds like you may be placing your custom module in an addons directory that is different from the one used from the start up script.

I suggest that you first look at the startup script and find which openerp.config file it is pointing to. In this openerp.config file you will find the location of the addons folder being accessed by the openerp server. Finally place your custom module in this addons folder, restart the openerp server and hopefully you will now see your module.

An addtional thing that sometimes confuses people is when searching for your module in the web interface (Settings->Modules->Installed Modules) the default filter only shows modules which have already been installed. Make sure that yuo delete this filter so that you can see all installed and not installed modules.

Maybe one of both of these things can help you.

kind regards

Paul Pawri Group BV www.pawri.nl

Avatar
Discard
Author

I checked this, but there were no additional directories. As I wrote, I'm using the Debian package directly from the nightly builds directory, not a custom install. I'm also aware of the filtered view.