Skip to Content
Menu
This question has been flagged
1 Reply
6775 Views

In case there are multiple databases in the server, are you supposed to install the 'server-wide' module in every single database, or should installing in one database suffice?

My understanding has been the latter.  However, we have one situation that's been puzzling us.

We have installed a module (dbfilter_from_header) which is supposed to be loaded as a 'server-wide' module.  We have set the module as a server-wide module in the configuration file (server_wide_modules = dbfilter_from_header) to limit database access according to the URL based on the web server configuration.

The settings work as expected most of the time, except after database backup script runs which stops Odoo server, takes database dump and starts Odoo server.  It seems right after the script is run, database filtering does not work as expected and you can see all the databases (then the situation gets back to normal after some fiddling on the screen).

My understanding of the 'server-wide' module being like mentioned above, I had only installed the dbfilter_from_header module in one of the databases.  However, I now wonder if you are actually supposed to install the module in all the databases in the server.  Does anyone have an insight on this?

Avatar
Discard
Best Answer

Server-wide module is a bit messed and confusing name..
In fact it is module wich has auto_install : True in __openerp__.py , and it means that module will be installed when you cretae new database... ( such modules are base, web ... ) 
If you have some custom module you want to install on every new created db ( for example.. you create a moduel wich sets admin user technical features enabled on db cretatin) then you put auto_install : True and call that module server_wide mdoule.. 

However. this will not impact existing databases... 
For them you have 2 choices: 
1. manualy install suchmodule on every db
2. start server with -u module_name parameter ( -u = --update ) so it will update selected module or modules when you first logn to db

(note.. WHEN you login , not done to all dabases when server is started!) 

 

hope it helps..

Avatar
Discard

Do you mean that selecting a module as 'server_wide_modules' when starting service makes just brings exactly the same effect as installing the module in every database (auto_install is a practical way to do it)?

Well no, slightly different.. It is not the effect of installing a module to every database... but that module WILL BE INSTALLED ON EVERY NEW CREATED DB... and the sam is done with auto_install.... the databases that are already ste will have no impact from such thing... on them you still need to manually install desired module...

Related Posts Replies Views Activity
0
Jan 24
378
2
May 23
6768
1
Feb 22
21395
5
Dec 21
15003
0
Dec 20
3650