如何解决渲染模板 web.frontend_layout 时出错
在迁移 ODOO 数据库后(从 11 到 12 到 13 使用 OpenUpdgrade),我尝试访问该应用程序并收到以下错误。
Error to render compiling AST
AttributeError: 'website' object has no attribute 'social_googleplus'
Template: web.frontend_layout
Path: /t/html/body/div/footer/div[1]/div/div[2]/h2/a[5]
Node: <a t-att-href="website.social_googleplus" t-if="website.social_googleplus" rel="publisher">
<i class="fa fa-google-plus-square"/>
</a>
The error occured while rendering the template web.frontend_layout and evaluating the following expression: <a t-att-href="website.social_googleplus" t-if="website.social_googleplus" rel="publisher"> <i class="fa fa-google-plus-square"/> </a>
解决方法
AttributeError: 'website' object has no attribute 'social_googleplus'
您的网站现在没有字段 social_googleplus
这是我从 odoo 13 上的网站模型中得到的
social_twitter = fields.Char('Twitter Account',default=_default_social_twitter)
social_facebook = fields.Char('Facebook Account',default=_default_social_facebook)
social_github = fields.Char('GitHub Account',default=_default_social_github)
social_linkedin = fields.Char('LinkedIn Account',default=_default_social_linkedin)
social_youtube = fields.Char('Youtube Account',default=_default_social_youtube)
social_instagram = fields.Char('Instagram Account',default=_default_social_instagram)
social_default_image = fields.Binary(string="Default Social Share Image",help="If set,replaces the company logo as the default social share image.")
你看到了吗?不再有 social_googleplus
只需删除该路径,一切都会好起来
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。