first commit

This commit is contained in:
Suherdy Yacob 2026-06-02 09:15:26 +07:00
commit 343766c4f6
7 changed files with 134 additions and 0 deletions

4
.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
*.pyc
*.pyo
*~
__pycache__/

11
README.md Normal file
View File

@ -0,0 +1,11 @@
Hide Powered by Odoo (IT Mapan)
===============================
This module customizes various templates to replace all instances of "Powered by Odoo" with "Powered by IT Mapan".
Features:
- Replaces Odoo logo/text on POS Customer Display sidebar and main section.
- Appends/inserts "Powered by IT Mapan" at the bottom of POS receipts.
- Overrides login footer page to show "Powered by IT Mapan".
- Replaces Odoo branding in Portal/Website promotion widgets.
- Replaces Odoo branding in Email notifications layouts.

2
__init__.py Normal file
View File

@ -0,0 +1,2 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.

43
__manifest__.py Normal file
View File

@ -0,0 +1,43 @@
# -*- coding: utf-8 -*-
{
'name': 'Hide Powered by Odoo (IT Mapan)',
'version': '19.0.1.0.0',
'category': 'Hidden/Dependency',
'summary': 'Replaces "Powered by Odoo" with "Powered by IT Mapan" across Website, Portal, POS receipt, Customer display, Login page, and Email notifications.',
'description': """
Hide Powered by Odoo (IT Mapan)
===============================
This module customizes various templates to replace all instances of "Powered by Odoo" with "Powered by IT Mapan".
Customized areas:
- POS Customer Display (sidebar and main bottom branding)
- POS Receipt (appends/inserts "Powered by IT Mapan" at the bottom)
- Login Page (overrides both default Odoo and OdooAI login links)
- Portal & Website Brand Promotion
- Email Notifications (light and standard layouts)
""",
'author': 'Suherdy Yacob',
'depends': [
'web',
'portal',
'website',
'mail',
'point_of_sale',
'pos_custom_receipt',
'app_odoo_customize',
],
'data': [
'views/web_templates.xml',
],
'assets': {
'point_of_sale._assets_pos': [
'hide_powered_by_odoo/static/src/order_receipt_patch.xml',
],
'point_of_sale.customer_display_assets': [
'hide_powered_by_odoo/static/src/customer_display_patch.xml',
],
},
'installable': True,
'application': False,
'license': 'LGPL-3',
}

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<t t-name="hide_powered_by_odoo.CustomerDisplay" t-inherit="point_of_sale.CustomerDisplay" t-inherit-mode="extension">
<!-- Replace the sidebar brand logo/text -->
<xpath expr="//div[hasclass('o_customer_display_sidebar')]/div[contains(., 'Powered by')]" position="replace">
<div class="position-absolute bottom-0 mb-4 d-none d-lg-flex align-items-center ps-3 pe-2 py-1 rounded-3 text-bg-dark small">
Powered by <b class="ms-1">IT Mapan</b>
</div>
</xpath>
<!-- Replace the main brand logo/text at the bottom -->
<xpath expr="//div[hasclass('o_customer_display_main')]//div[contains(@class, 'bottom-0') and contains(., 'Powered by')]" position="replace">
<div class="bottom-0 mb-4 d-flex align-items-center ps-3 pe-2 py-1 rounded-3 small">
Powered by <b class="ms-1">IT Mapan</b>
</div>
</xpath>
</t>
</templates>

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<t t-name="hide_powered_by_odoo.OrderReceipt" t-inherit="point_of_sale.OrderReceipt" t-inherit-mode="extension">
<!-- Append Powered by IT Mapan to the bottom of the receipt container -->
<xpath expr="//div[hasclass('pos-receipt')]" position="inside">
<div class="pos-receipt-order-data text-center pt-3">
<span>Powered by <b> IT Mapan </b></span>
</div>
</xpath>
</t>
</templates>

46
views/web_templates.xml Normal file
View File

@ -0,0 +1,46 @@
<?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>