我需要去掉“由Odoo提供动力”在发送邮件时。有人能告诉我,我的代码出了什么问题吗?
<odoo>
<data>
<template id="mail_notification_borders_id" inherit_id="mail.mail_notification_borders">
<xpath expr="//t[1]/div[1]/table[1]/tbody[1]/tr[4]" position="replace"/>
</template>
<template id="mail_notification_light_id" inherit_id="mail.mail_notification_light">
<xpath expr="//t[1]/table[1]/tr[2]" position="replace"/>
</template>
<template id="notification_email_id" inherit_id="mail.message_notification_email">
<xpath expr="//t[1]/div[1]/p[1]" position="replace"/>
</template>
</data>
</odoo>致以问候。
发布于 2021-03-29 17:15:56
在Odoo 14中:进入网页,右击“自定义主题”,然后点击"HTML/CSS编辑器“,点击”主页“(白条),然后搜索”品牌推广信息“:
评论:<t t-set="final_message">Powered by %s%s</t>如下:
<?xml version="1.0"?>
<t name="Brand Promotion Message" t-name="web.brand_promotion_message">
<t t-set="odoo_logo">
<a target="_blank" t-attf-href="http://www.odoo.com?utm_source=db&utm_medium=#{_utm_medium}" class="badge badge-light">
<img alt="Odoo" src="/web/static/src/img/odoo_logo_tiny.png" style="height: 1em; vertical-align: baseline;"/>
</a>
</t>
<!-- <t t-set="final_message">Powered by %s%s</t>
<t t-raw="final_message % (odoo_logo, _message and ('- %s' % _message) or '')"/>
-->
</t>它起作用了!享受吧!
发布于 2021-04-09 05:33:27
在Odoo14中:您可以通过注释掉<t t-set="final message">来删除消息,但块仍然会占用页脚中的空间。要从页脚中删除div :转到web,右键单击“自定义”,然后单击"HTML/CSS编辑器“,单击”主页“(白条),然后搜索”前端布局“。在html中,更改:
<div class="col-sm text-center text-sm-right">至
<div class="col-sm text-center text-sm-right" style="display: none;">发布于 2021-08-11 14:58:48
看起来您的xpath有问题。
以下代码部分负责"Sent by odoo“电子邮件页脚:
<p style="color: #555555; margin-top:32px;">
Sent
<span t-if="company.name">
by
<a t-if="website_url" t-att-href="website_url" style="text-decoration:none; color: #875A7B;">
<span t-esc="company.name"/>
</a>
<span t-if="not website_url" t-esc="company.name"/>
</span>
using
<a target="_blank" href="https://www.odoo.com?utm_source=db&utm_medium=email" style="text-decoration:none; color: #875A7B;">Odoo</a>.
对我来说,用以下命令删除它很有效
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<template id="message_notification_email_without_branding" inherit_id="mail.message_notification_email">
<xpath expr="//p[@style='color: #555555; margin-top:32px;']" position="replace">
<p/>
</xpath>
</template>
</odoo>https://stackoverflow.com/questions/65222462
复制相似问题