【问题标题】:Error occurred while rendering the template web.frontend_layout呈现模板 web.frontend_layout 时出错
【发布时间】:2021-01-06 11:51:11
【问题描述】:
在迁移 ODOO 数据库(使用 OpenUpdgrade 从 11 到 12 到 13)后,我尝试访问应用程序并收到以下错误。
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>
【问题讨论】:
标签:
odoo
internal-server-error
odoo-13
【解决方案1】:
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
只要删除那条路径,一切都会好起来的