问题描述
Traceback:
Error: Invalid generated code while compiling template 'web.ViewSwitcherButton': missing ) after argument list
at QWeb._compile (http://****/web/content/112-34b6e20/web.assets_common.js:971:133)
at Object.atNodeEncounter (http://****/web/content/112-34b6e20/web.assets_common.js:1056:140)
at QWeb._compileNode (http://****/web/content/112-34b6e20/web.assets_common.js:990:54)
at QWeb._compileChildren (http://****/web/content/112-34b6e20/web.assets_common.js:1027:108)
at QWeb._compileNode (http://****/web/content/112-34b6e20/web.assets_common.js:997:6)
at Object.atNodeEncounter (http://****/web/content/112-34b6e20/web.assets_common.js:1066:44)
at QWeb._compileNode (http://****/web/content/112-34b6e20/web.assets_common.js:990:54)
at QWeb._compileChildren (http://****/web/content/112-34b6e20/web.assets_common.js:1027:108)
at QWeb._compileNode (http://****/web/content/112-34b6e20/web.assets_common.js:997:6)
at QWeb._compileChildren (http://****/web/content/112-34b6e20/web.assets_common.js:1027:108)
此消息出现在所有页面上,我们无能为力。
当我使用资产激活开发者模式时,它工作正常。
解决方法
当我使用 Odoo 版本 14.0-20210305 时,我也面临同样的问题。问题来自文件 odoo/addons/web/static/src/xml/base.xml。
我尝试从稳定版本中获取 base.xml,在我的情况下,我从 14.0-20210108 版本中获取。然后我更换到新版本。
这里是稳定版的部分代码:
<t t-name="web.ViewSwitcherButton" owl="1">
<button type="button"
t-att-accesskey="view.accessKey"
t-attf-class="btn btn-secondary fa fa-lg o_switch_view o_{{ view.type }} {{ view.icon }}"
t-att-class="{ active: env.view.type === view.type }"
t-attf-aria-label="View {{ view.type }}"
t-attf-title="View {{ view.type }}"
data-toggle="tooltip"
tabindex="-1"
t-on-click="trigger('switch-view',{ view_type: view.type })"
/>
</t>
,
当您使用资产激活开发者模式时它工作正常,然后尝试升级网络模块!
,感谢解决方案,这对我也有帮助和作用。
这是一个错误,您可以在此处检查错误。
https://github.com/odoo/odoo/issues/68040
问候!