-
-
Notifications
You must be signed in to change notification settings - Fork 536
Closed
Description
In a use case with several databases, at initial database step call "odoo.service.db.exp_list(True)" to get all explicit db names. This was only accepted with config list_db=True. But I want to prevent listing databases entirely and use db_filter option.
# queue_job/runner.py
def get_db_names(self):
if odoo.tools.config['db_name']:
db_names = odoo.tools.config['db_name'].split(',')
else:
db_names = odoo.service.db.exp_list(True)
return db_names
# odoo/service/db.py
def exp_list(document=False):
if not odoo.tools.config['list_db']:
raise odoo.exceptions.AccessDenied()
return list_dbs()
Metadata
Metadata
Assignees
Labels
No labels