当我尝试恢复 odoo 数据库时,我发现了错误
在处理上述异常的过程中,又发生了一个异常:
Traceback (most recent call last):
File "/home/beyondex/odoo15/odoo/addons/http_routing/models/ir_http.py", line 672, in _handle_exception
code, html = cls._get_error_html(env, code, values)
File "/home/beyondex/odoo15/odoo/addons/website/models/ir_http.py", line 415, in _get_error_html
return super(Http, cls)._get_error_html(env, code, values)
File "/home/beyondex/odoo15/odoo/addons/http_routing/models/ir_http.py", line 617, in _get_error_html
return code, env['ir.ui.view']._render_template('http_routing.%s' % code, values)
File "/home/beyondex/odoo15/odoo/odoo/addons/base/models/ir_ui_view.py", line 1992, in _render_template
return self.browse(self.get_view_id(template))._render(values, engine)
File "/home/beyondex/odoo15/odoo/addons/website/models/ir_ui_view.py", line 435, in _render
return super(View, self)._render(values, engine=engine, minimal_qcontext=minimal_qcontext)
File "/home/beyondex/odoo15/odoo/addons/web_editor/models/ir_ui_view.py", line 29, in _render
return super(IrUiView, self)._render(values=values, engine=engine, minimal_qcontext=minimal_qcontext)
File "/home/beyondex/odoo15/odoo/odoo/addons/base/models/ir_ui_view.py", line 2000, in _render
return self.env[engine]._render(self.id, qcontext)
File "/home/beyondex/odoo15/odoo/odoo/tools/profiler.py", line 292, in _tracked_method_render
return method_render(self, template, values, **options)
File "/home/beyondex/odoo15/odoo/odoo/addons/base/models/ir_qweb.py", line 76, in _render
result = super()._render(template, values=values, **compile_options)
File "/home/beyondex/odoo15/odoo/odoo/addons/base/models/qweb.py", line 134, in _render
result = ''.join(rendering)
File "/home/beyondex/odoo15/odoo/odoo/addons/base/models/qweb.py", line 221, in render_template
raise e
File "/home/beyondex/odoo15/odoo/odoo/addons/base/models/qweb.py", line 219, in render_template
yield from compiled_fn(self, values, log)
File "<template_248>", line 20, in template_248
File "/home/beyondex/odoo15/odoo/odoo/addons/base/models/qweb.py", line 223, in render_template
raise QWebException("Error when render the template", self, options,
odoo.addons.base.models.qweb.QWebException: 'res.config.settings' object has no attribute 'get_debranding_settings'
Traceback (most recent call last):
File "/home/beyondex/odoo15/odoo/odoo/addons/base/models/qweb.py", line 219, in render_template
yield from compiled_fn(self, values, log)
File "<template_186>", line 363, in template_186
AttributeError: 'res.config.settings' object has no attribute 'get_debranding_settings'
Error when render the template
AttributeError: 'res.config.settings' object has no attribute 'get_debranding_settings'
Template: web.frontend_layout
Path: /t/html/head/t[7]
Node: <t t-set="favicon_url" t-value="request.env['res.config.settings'].sudo().get_debranding_settings()['favicon_url']"/>
在您的自定义插件(src/user?)中搜索哪个模块包含 get_debranding_settings。并在导入数据库之前重新安装它。
或者,您可以查看您的database_restore 文件并注释所涉及的行:
<!--t t-set="favicon_url" t-value="request.env['res.config.settings'].sudo().get_debranding_settings()['favicon_url']"/-->