0

I need to remove "Powered by Odoo." when sending mail . Can someone tell me, what's wrong with my code?

<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>

Regards.

Ing
  • 551
  • 7
  • 20
  • may be this will help https://stackoverflow.com/questions/27372526/how-to-remove-the-powered-by-odoo-1-open-source-ecommerce-footer-from-front-end ? – Equinox Dec 09 '20 at 18:12
  • this is for website , but I need it into mail template (when sending mail in sale for example) , @ venky__ – Ing Dec 09 '20 at 18:46

3 Answers3

3

in Odoo 14: Go to the web, up right click on "Customize Theme" and then on "HTML/CSS editor" and click on "home" (white bar), then search for "Brand Promotion Message" :

Comment : <t t-set="final_message">Powered by %s%s</t> like this :

    <?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&amp;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>

It works ! Enjoy !

1

In Odoo 14: you can remove the message with commenting out the <t t-set="final message">, but the block still takes up space in the footer. To remove the div from the footer: Go to the web, up right click on "Customize" and then on "HTML/CSS editor" and click on "home" (white bar), then search for "Frontend Layout". In the html, change:

<div class="col-sm text-center text-sm-right">

to

<div class="col-sm text-center text-sm-right" style="display: none;">
ErinD
  • 11
  • 2
1

Looks like there's something wrong with your xpath.

The following code part is responsible for the "Sent by odoo" email footer:

<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&amp;utm_medium=email" style="text-decoration:none; color: #875A7B;">Odoo</a>.

For me, it worked to remove it with

<?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>