hide_powered_by_odoo/views/web_templates.xml
2026-06-02 09:15:26 +07:00

47 lines
2.2 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- 1. Brand Promotion Message Override (Web/Portal) -->
<template id="brand_promotion_message" inherit_id="web.brand_promotion_message">
<xpath expr="//t[@t-set='odoo_logo']" position="replace"/>
<xpath expr="//t[@t-set='final_message']" position="replace"/>
<xpath expr="//t[@t-out]" position="replace">
<span>Powered by IT Mapan</span>
</xpath>
</template>
<!-- 2. Website Brand Promotion Override (Website) -->
<template id="website_brand_promotion" inherit_id="website.brand_promotion">
<xpath expr="//t[@t-call='web.brand_promotion_message']" position="replace">
<span>Powered by IT Mapan</span>
</xpath>
</template>
<!-- 3. Portal Record Sidebar Override (Portal) -->
<template id="portal_record_sidebar" inherit_id="portal.portal_record_sidebar">
<xpath expr="//div[contains(@class, 'card-footer')]/a[contains(@href, 'odoo.com')]" position="replace">
<span class="badge text-bg-light">IT Mapan</span>
</xpath>
</template>
<!-- 4. Login Page Footer Override (Web) -->
<template id="login_layout" inherit_id="web.login_layout">
<xpath expr="//a[@href='https://www.odoo.com?utm_source=db&amp;utm_medium=auth'] | //a[@href='https://www.odooai.cn']" position="replace">
<span>Powered by <span>IT Mapan</span></span>
</xpath>
</template>
<!-- 5. Email Notification Layout Footer Override (Mail) -->
<template id="mail_notification_layout" inherit_id="mail.mail_notification_layout">
<xpath expr="//div[contains(@style, 'color: #555555;')]/a[contains(@href, 'odoo.com')]" position="replace">
<span t-att-style="'color: ' + (company.email_secondary_color or '#875A7B') + ';'">IT Mapan</span>
</xpath>
</template>
<!-- 6. Email Notification Light Layout Footer Override (Mail) -->
<template id="mail_notification_light" inherit_id="mail.mail_notification_light">
<xpath expr="//tr[td[contains(., 'Powered by')]]/td/a[contains(@href, 'odoo.com')]" position="replace">
<span t-att-style="'color: ' + (company.email_secondary_color or '#875A7B') + ';'">IT Mapan</span>
</xpath>
</template>
</odoo>