【问题标题】:How to disable image caching in Odoo email?如何在 Odoo 电子邮件中禁用图像缓存?
【发布时间】:2019-10-15 05:45:01
【问题描述】:

我目前使用的是 Odoo 12.0+e-20181025。我已更改电子邮件的标志,但收到上一封电子邮件的 GMail 拒绝显示新标志,尽管电子邮件中的图像链接已指向新标志。

我检查了图像,它是正确的图像。我还尝试按照电子邮件中显示前一个(错误)图像的 URL 进行操作,结果显示正确的图像,只是没有在电子邮件显示中显示。

我读到它与 Gmail 图片缓存功能有关,但由于我的大多数用户都在使用 Gmail,我需要让它不会缓存图片,我目前的想法是在标题 HTML 中添加无缓存,但我不知道在我当前版本的 Odoo 中可以在哪里设置它。

感谢您的阅读和帮助。

【问题讨论】:

  • 你检查过哪个模板?
  • 帮助台工单的阶段从“新建”更改为“打开”时的模板。
  • 删除它并加载或更新模块

标签: python email gmail odoo no-cache


【解决方案1】:

好的,我找到了答案。它在视图中 > mail_notification_light

这是 XML 中的前几行代码

<?xml version="1.0"?>
<t t-name="mail.mail_notification_light">
<table border="0" cellpadding="0" cellspacing="0" style="padding-top: 16px; background-color: #F1F1F1; font-family:Verdana, Arial,sans-serif; color: #454748; width: 100%; border-collapse:separate;"><tr><td align="center">
<table border="0" cellpadding="0" cellspacing="0" width="590" style="padding: 24px; background-color: white; color: #454748; border-collapse:separate;">

然后换成这些。

<?xml version="1.0"?>
<t t-name="mail.mail_notification_light">
<meta http-equiv="Cache-control" content="no-cache" />
<table border="0" cellpadding="0" cellspacing="0" style="padding-top: 16px; background-color: #F1F1F1; font-family:Verdana, Arial,sans-serif; color: #454748; width: 100%; border-collapse:separate;"><tr><td align="center">
<table border="0" cellpadding="0" cellspacing="0" width="590" style="padding: 24px; background-color: white; color: #454748; border-collapse:separate;">

所以我把它放在那里。到目前为止,它的效果很好。再次感谢所有阅读并发表评论的人。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2022-06-11
    • 1970-01-01
    • 2012-04-17
    • 1970-01-01
    • 1970-01-01
    • 2018-12-24
    • 1970-01-01
    相关资源
    最近更新 更多