我已收到一个压缩的Odoo实例作为ZIP文件。我的目的是将其解压缩并使其在计算机上运行。我完全可以做到。
现在,我必须使该实例在另一台服务器上工作,因此我已将该实例从我的计算机移至所提到的服务器。
这两个安装之间的唯一区别(显然)是,在新服务器中,我正在使用virtualenv
安装所有Python3软件包并运行Odoo。在此新服务器中,当我启动Odoo时,会看到以下消息:
数据库管理员已被管理员禁用
而且我没有机会从该界面创建新数据库。
与我的计算机中相同的Odoo实例,一如既往地显示了用于创建新数据库的数据库管理器。
有什么想法吗?可能是virtualenv
问题吗?
{% if not list_db %}
<div class="alert alert-danger text-center">
The database manager has been disabled by the administrator
</div>
此list_db
变量的值为假时显示。现在,此变量通过以下方法传递到此模板(html page)
:
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)
这意味着此值是从配置文件中检索的,因此请确保在配置文件中将此值设置为True
:
[options]
addons_path = .....
admin_passwd = ....
....
....
list_db = True
直到知道才知道这个选项,就像@forvas一样,这是一个很好的问题。