3

I have received a compressed Odoo instance as a ZIP file. My purpose was to unzip it and make it work in my computer. I was able to do it with no problem.

Now, I have to make that instance work in another server, so I have moved the instance from my computer to the mentioned server.

The only difference (apparently) between both installations is that in the new server I am using virtualenv to install all the Python3 packages and to run Odoo. In this new server, when I start Odoo, I see the message:

The database manager has been disabled by the administrator

And I have no chance to create a new database from the interface.

The same instance of Odoo, in my computer, shows the database manager to create a new database, as always.

Any ideas? Could be the virtualenv the problem?

forvas
  • 9,801
  • 7
  • 62
  • 158

1 Answers1

3

When I searched Using IDE for this sentence I found it in this file \web\views\database_manager.html There is a condition to show this sentence it's:

  {% if not list_db %}
  <div class="alert alert-danger text-center">
  The database manager has been disabled by the administrator
  </div>

It's shown when this list_db variable have falsy value. now this variable is passed to this template (html page) by this method:

 def _render_template(self, **d):
    d.setdefault('manage',True)
    d['insecure'] = odoo.tools.config.verify_admin_password('admin')
    d['list_db'] = odoo.tools.config['list_db']
    .....
    .....
    return env.get_template("database_manager.html").render(d)

This means that this value is retrieved from configuration file, So make sure that this value is set to True in the configuration file:

   [options]
   addons_path = .....
   admin_passwd =  ....
   ....
   ....
   list_db = True

Didn't know about this option until know, Very good question as always @forvas.

Charif DZ
  • 14,415
  • 3
  • 21
  • 40
  • 1
    Finally there were not problems with the `virtualenv`. In the instance of my computer, in its config file, I had forgotten to change the `addons_path` and it was pointing to the addons of the instance I usually work with. In the new server, the `addons_path` was right, pointing to the addons of the instance I had to migrate. The problem is that those addons were full of junk code. The old Odoo supplier had modified the core, forcing the workflow to always show "Database manager has been disabled by the administrator", no matter the value of `list_db`. Even so, thank you for the useful info! – forvas Oct 18 '19 at 18:05
  • This means that The configuration value was not loaded correctly? because of value of `addons_path`? – Charif DZ Oct 18 '19 at 18:12
  • 1
    The configuration values were loaded OK but the code of the module `web` (among others) was altered by the old Odoo provider, replacing conditions like `{% if not list_db %}` with `{% if True %}` to always show the message. In my computer I had that same instance too, but I did not get the message because when I filled in the `addons_path`, I made a mistake and pointed to other module `web` (one which was OK). – forvas Oct 21 '19 at 08:49
  • 2
    list_db = True -> thanks! – Ayse Mar 16 '22 at 17:26