Skip to content

Commit

Permalink
Merge pull request #70 from itpp-labs/17.0-pos_debranding
Browse files Browse the repository at this point in the history
  • Loading branch information
itpp-bot authored Dec 19, 2023
2 parents ac140c5 + aead0fb commit ecee2e7
Show file tree
Hide file tree
Showing 17 changed files with 276 additions and 3 deletions.
27 changes: 27 additions & 0 deletions pos_debranding/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
.. image:: https://itpp.dev/images/infinity-readme.png
:alt: Tested and maintained by IT Projects Labs
:target: https://itpp.dev

================
POS debranding
================

Removes references to odoo.com:

* Replaces Odoo logo with company logo, i.e. ``/logo.png``

Roadmap
=======

* ``/logo.png`` should be used with ``?company_id=123`` to avoid cache issues on multi-company environment

Further information
===================

HTML Description: https://apps.odoo.com/apps/modules/17.0/pos_debranding

Usage instructions: `<doc/index.rst>`_

Changelog: `<doc/changelog.rst>`_

Tested on `Odoo 17.0 <https://github.com/odoo/odoo/commit/40b19d89846303016098840f4958fe7cc105067c>`_
Empty file added pos_debranding/__init__.py
Empty file.
24 changes: 24 additions & 0 deletions pos_debranding/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright 2015-2018,2020,2022-2023 Ivan Yelizariev <https://twitter.com/yelizariev>
# License MIT (https://opensource.org/licenses/MIT).
{
"name": "POS debranding",
"version": "17.0.1.0.0",
"author": "IT-Projects LLC, Ivan Yelizariev",
"license": "Other OSI approved licence", # MIT
"category": "Debranding",
"support": "[email protected]",
"website": "https://odoo-debranding.com",
"depends": ["point_of_sale"],
"assets": {
"point_of_sale.assets_prod": [
"pos_debranding/static/src/xml/pos_debranding.xml",
],
"web.assets_tests": [
"pos_debranding/static/src/js/tour.js",
],
},
"data": [
"views/pos.xml",
],
"installable": True,
}
4 changes: 4 additions & 0 deletions pos_debranding/doc/changelog.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
`1.0.0`
-------

- **Init version**
14 changes: 14 additions & 0 deletions pos_debranding/doc/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
================
POS Debranding
================

Installation
============

* `Install <https://odoo-development.readthedocs.io/en/latest/odoo/usage/install-module.html>`__ this module in a usual way

Usage
=====

* Open POS in a usual way
* Result: no more Odoo branding
1 change: 1 addition & 0 deletions pos_debranding/doc/src/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<section class="oe_container"></section>
1 change: 1 addition & 0 deletions pos_debranding/doc/src/info.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
slogan: Replace Odoo logo to your company logo
14 changes: 14 additions & 0 deletions pos_debranding/i18n/pos_debranding.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

Binary file added pos_debranding/static/description/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
99 changes: 99 additions & 0 deletions pos_debranding/static/description/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@

<section class="container">
<div class="row">
<div class="col-md-offset-1 col-md-8 mb64 mt64">
<div class="">
<h2 class="display-3">POS debranding</h2>
<h4 class="text-default">Replace Odoo logo to your company logo</h4>
<p class="text-default mt16">Version: v<b>17.0</b>.1.0.0</p>
</div>
</div>
<div class="col-md-3 text-right">
<p>
<img src="https://itpp.dev/images/favicon.png"/>
<br/>Tested and maintained by
<br/><b>IT Projects Labs</b>
<br/>Assistance: <a href="mailto:[email protected]">[email protected]</a>
</p>
</div>
</div>
</section>


<section class="oe_container"></section>



<section class="container text-center">
<div class="mt-4 mb-3">
<h2>Let our expertise work for you!</h2>
<h4 class="d-none d-md-block">(Doors and windows below are clickable)</h4>
<div class="mb32 d-md-none">
<ul class="list-unstyled">
<li><a target="_blank" href="https://apps.odoo.com/apps/browse?repo_maintainer_id=59928">All modules</a></li>
<li><a target="_blank" href="https://apps.odoo.com/apps/browse?price=Free&order=Downloads&repo_maintainer_id=59928">Free Modules</a></li>
<li><a target="_blank" href="https://apps.odoo.com/apps/modules/category/Point%20of%20Sale/browse?repo_maintainer_id=59928">All POS modules</a></li>
<li><a target="_blank" href="https://apps.odoo.com/apps/modules/category/Discuss/browse?repo_maintainer_id=59928">All Mail modules</a></li>
<li><a target="_blank" href="https://apps.odoo.com/apps/modules/category/Website/browse?repo_maintainer_id=59928">All Website modules</a></li>
<li><a target="_blank" href="https://apps.odoo.com/apps/modules/category/eCommerce/browse?repo_maintainer_id=59928">All eCommerce modules</a></li>
<li><a target="_blank" href="https://apps.odoo.com/apps/modules/browse?search=sync+studio&repo_maintainer_id=59928">Sync Studio</a></li>
<li><a target="_blank" href="https://apps.odoo.com/apps/modules/14.0/openapi/">REST API</a></li>
<li><a target="_blank" href="https://apps.odoo.com/apps/modules/14.0/base_automation_webhook/">Webhooks</a></li>
<li><a target="_blank" href="https://apps.odoo.com/apps/modules/14.0/pos_product_available/">POS: show product qty</a></li>
<li><a target="_blank" href="https://apps.odoo.com/apps/modules/14.0/web_login_background/">Web Login Background</a></li>
</ul>
</div>
<div class="mb64 d-none d-xl-block">
<img class="img img-responsive" src="https://itpp.dev/images/apps/;-)/itpp-labs-1100.jpg" usemap="#itpp-xl" />
<map name="itpp-xl">
<area alt="Free Modules" target="_blank" href="https://apps.odoo.com/apps/browse?price=Free&order=Downloads&repo_maintainer_id=59928" shape="rect" class="" coords="900,220,1080,625" />
<area alt="Sync Studio" target="_blank" href="https://apps.odoo.com/apps/modules/browse?search=sync+studio&repo_maintainer_id=59928" shape="rect" class="" coords="552,186,721,274" />
<area alt="REST API" target="_blank" href="https://apps.odoo.com/apps/modules/14.0/openapi/" shape="rect" class="" coords="646,279,720,365" />
<area alt="Webhooks" target="_blank" href="https://apps.odoo.com/apps/modules/14.0/base_automation_webhook/" shape="rect" class="" coords="646,370,720,458" />
<area alt="POS: show product qty" target="_blank" href="https://apps.odoo.com/apps/modules/14.0/pos_product_available/" shape="rect" class="" coords="82,373,251,459" />
<area alt="All modules" target="_blank" href="https://apps.odoo.com/apps/browse?repo_maintainer_id=59928" shape="rect" class="" coords="326,267,381,456" />
<area alt="All POS modules" target="_blank" href="https://apps.odoo.com/apps/modules/category/Point%20of%20Sale/browse?repo_maintainer_id=59928" shape="rect" class="" coords="82,191,154,276" />
<area alt="All Mail modules" target="_blank" href="https://apps.odoo.com/apps/modules/category/Discuss/browse?repo_maintainer_id=59928" shape="rect" class="" coords="82,282,155,368" />
<area alt="All Website modules" target="_blank" href="https://apps.odoo.com/apps/modules/category/Website/browse?repo_maintainer_id=59928" shape="rect" class="" coords="176,282,250,368" />
<area alt="All eCommerce modules" target="_blank" href="https://apps.odoo.com/apps/modules/category/eCommerce/browse?repo_maintainer_id=59928" shape="rect" class="" coords="175,189,250,275" />
<area alt="Ivan Yelizariev" target="_blank" href="https://apps.odoo.com/apps/modules/browse?search=Ivan+Yelizariev&repo_maintainer_id=59928" shape="rect" class="" coords="554,280,625,456" />
<area alt="Web Login Background" target="_blank" href="https://apps.odoo.com/apps/modules/14.0/web_login_background/" shape="rect" class="" coords="420,267,477,456" />
</map>
</div>
<div class="mb64 d-none d-lg-block d-xl-none">
<img class="img img-responsive" src="https://itpp.dev/images/apps/;-)/itpp-labs-930.jpg" usemap="#itpp-lg" />
<map name="itpp-lg">
<area alt="Free Modules" target="_blank" href="https://apps.odoo.com/apps/browse?price=Free&order=Downloads&repo_maintainer_id=59928" shape="rect" class="" coords="760,186,913,528" />
<area alt="Sync Studio" target="_blank" href="https://apps.odoo.com/apps/modules/browse?search=sync+studio&repo_maintainer_id=59928" shape="rect" class="" coords="466,157,609,231" />
<area alt="REST API" target="_blank" href="https://apps.odoo.com/apps/modules/14.0/openapi/" shape="rect" class="" coords="546,235,608,308" />
<area alt="Webhooks" target="_blank" href="https://apps.odoo.com/apps/modules/14.0/base_automation_webhook/" shape="rect" class="" coords="546,312,608,387" />
<area alt="POS: show product qty" target="_blank" href="https://apps.odoo.com/apps/modules/14.0/pos_product_available/" shape="rect" class="" coords="69,315,212,388" />
<area alt="All modules" target="_blank" href="https://apps.odoo.com/apps/browse?repo_maintainer_id=59928" shape="rect" class="" coords="275,225,322,385" />
<area alt="All POS modules" target="_blank" href="https://apps.odoo.com/apps/modules/category/Point%20of%20Sale/browse?repo_maintainer_id=59928" shape="rect" class="" coords="69,161,130,233" />
<area alt="All Mail modules" target="_blank" href="https://apps.odoo.com/apps/modules/category/Discuss/browse?repo_maintainer_id=59928" shape="rect" class="" coords="69,238,131,311" />
<area alt="All Website modules" target="_blank" href="https://apps.odoo.com/apps/modules/category/Website/browse?repo_maintainer_id=59928" shape="rect" class="" coords="148,238,211,311" />
<area alt="All eCommerce modules" target="_blank" href="https://apps.odoo.com/apps/modules/category/eCommerce/browse?repo_maintainer_id=59928" shape="rect" class="" coords="147,159,211,232" />
<area alt="Ivan Yelizariev" target="_blank" href="https://apps.odoo.com/apps/modules/browse?search=Ivan+Yelizariev&repo_maintainer_id=59928" shape="rect" class="" coords="468,236,528,385" />
<area alt="Web Login Background" target="_blank" href="https://apps.odoo.com/apps/modules/14.0/web_login_background/" shape="rect" class="" coords="355,225,403,385" />
</map>
</div>
<div class="mb64 d-lg-none">
<img class="img img-responsive" src="https://itpp.dev/images/apps/;-)/itpp-labs-690.jpg" usemap="#itpp-md" />
<map name="itpp-md">
<area alt="Free Modules" target="_blank" href="https://apps.odoo.com/apps/browse?price=Free&order=Downloads&repo_maintainer_id=59928" shape="rect" class="" coords="564,138,677,392" />
<area alt="Sync Studio" target="_blank" href="https://apps.odoo.com/apps/modules/browse?search=sync+studio&repo_maintainer_id=59928" shape="rect" class="" coords="346,116,452,171" />
<area alt="REST API" target="_blank" href="https://apps.odoo.com/apps/modules/14.0/openapi/" shape="rect" class="" coords="405,175,451,228" />
<area alt="Webhooks" target="_blank" href="https://apps.odoo.com/apps/modules/14.0/base_automation_webhook/" shape="rect" class="" coords="405,232,451,287" />
<area alt="POS: show product qty" target="_blank" href="https://apps.odoo.com/apps/modules/14.0/pos_product_available/" shape="rect" class="" coords="51,233,157,287" />
<area alt="All modules" target="_blank" href="https://apps.odoo.com/apps/browse?repo_maintainer_id=59928" shape="rect" class="" coords="204,167,238,286" />
<area alt="All POS modules" target="_blank" href="https://apps.odoo.com/apps/modules/category/Point%20of%20Sale/browse?repo_maintainer_id=59928" shape="rect" class="" coords="51,119,96,173" />
<area alt="All Mail modules" target="_blank" href="https://apps.odoo.com/apps/modules/category/Discuss/browse?repo_maintainer_id=59928" shape="rect" class="" coords="51,176,97,230" />
<area alt="All Website modules" target="_blank" href="https://apps.odoo.com/apps/modules/category/Website/browse?repo_maintainer_id=59928" shape="rect" class="" coords="110,176,156,230" />
<area alt="All eCommerce modules" target="_blank" href="https://apps.odoo.com/apps/modules/category/eCommerce/browse?repo_maintainer_id=59928" shape="rect" class="" coords="109,118,156,172" />
<area alt="Ivan Yelizariev" target="_blank" href="https://apps.odoo.com/apps/modules/browse?search=Ivan+Yelizariev&repo_maintainer_id=59928" shape="rect" class="" coords="347,175,392,286" />
<area alt="Web Login Background" target="_blank" href="https://apps.odoo.com/apps/modules/14.0/web_login_background/" shape="rect" class="" coords="263,167,299,286" />
</map>
</div>
</div>
</section>

52 changes: 52 additions & 0 deletions pos_debranding/static/src/js/tour.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/** @odoo-module **/
// Copyright 2015-2018,2020,2022-2023 Ivan Yelizariev <https://twitter.com/yelizariev>
// License OPL-1 (https://www.odoo.com/documentation/17.0/legal/licenses.html#odoo-apps)
import { registry } from "@web/core/registry";
import { stepUtils } from "@web_tour/tour_service/tour_utils";

registry.category("web_tour.tours").add("pos_debranding.tour", {
url: "/web",
steps: () => [
stepUtils.showAppsMenuItem(),
{
test: true,
trigger: '.o_app[data-menu-xmlid="point_of_sale.menu_point_root"]',
content: "Ready to launch your <b>point of sale</b>? <i>Click here</i>.",
position: "right",
edition: "community",
},
{
trigger: '.o_app[data-menu-xmlid="point_of_sale.menu_point_root"]',
content: "Ready to launch your <b>point of sale</b>? <i>Click here</i>.",
position: "bottom",
edition: "enterprise",
},
{
trigger: ".o_pos_kanban button.oe_kanban_action_button",
content:
"<p>Click to start the point of sale interface. It <b>runs on tablets</b>, laptops, or industrial hardware.</p><p>Once the session launched, the system continues to run without an internet connection.</p>",
position: "bottom",
},
{
trigger: ".pos-content",
content: "waiting for loading to finish",
timeout: 20000,
run: function () {
// It's a check
},
},
{
content: "Switch to table or make dummy action",
trigger: ".table:not(.oe_invisible .neworder-button), .pos-logo",
position: "bottom",
},
{
trigger:
".pos-branding:not(:has(>.pos-logo[src='/point_of_sale/static/src/img/logo.png']))",
content: "Check logo",
run: function () {
// It's a check
},
},
],
});
15 changes: 15 additions & 0 deletions pos_debranding/static/src/xml/pos_debranding.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!-- Copyright 2023 Ivan Yelizariev <https://twitter.com/yelizariev>
License OPL-1 (https://www.odoo.com/documentation/17.0/legal/licenses.html#odoo-apps). -->
<templates id="template" xml:space="preserve">
<t
t-name="Chrome"
t-inherit="point_of_sale.Navbar"
t-inherit-mode="extension"
owl="1"
>
<xpath expr="//div[hasclass('pos-branding')]/img" position="attributes">
<attribute name="src">/logo.png</attribute>
</xpath>
</t>
</templates>
1 change: 1 addition & 0 deletions pos_debranding/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import test_default
12 changes: 12 additions & 0 deletions pos_debranding/tests/test_default.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from odoo.tests import HttpCase, tagged


@tagged("post_install", "-at_install")
class TestUi(HttpCase):
def test_01_check_logo(self):
self.start_tour(
"/web",
"pos_debranding.tour",
login="admin",
timeout=240,
)
10 changes: 10 additions & 0 deletions pos_debranding/views/pos.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2023 Ivan Yelizariev <https://twitter.com/yelizariev>
License OPL-1 (https://www.odoo.com/documentation/17.0/legal/licenses.html#odoo-apps). -->
<odoo>
<template id="pos_debranding" inherit_id="point_of_sale.index">
<xpath expr="//title" position="replace">
<title>POS</title>
</xpath>
</template>
</odoo>
4 changes: 2 additions & 2 deletions web_debranding/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ Contributors
Further information
===================

Odoo Apps Store: https://www.odoo.com/apps/modules/15.0/web_debranding/
Odoo Apps Store: https://www.odoo.com/apps/modules/17.0/web_debranding/

Notifications on updates: `via Atom <https://github.com/itpp-labs/misc-addons/commits/14.0/web_debranding.atom>`_, `by Email <https://blogtrottr.com/?subscribe=https://github.com/itpp-labs/misc-addons/commits/14.0/web_debranding.atom>`_

Tested on `Odoo 15.0 <https://github.com/odoo/odoo/commit/8dbc14f16bfb92cedbb69df491f53ea72b860275>`_
Tested on `Odoo 17.0 <https://github.com/odoo/odoo/commit/40b19d89846303016098840f4958fe7cc105067c>`_
1 change: 0 additions & 1 deletion web_debranding/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
"web_debranding/static/src/js/base.js",
"web_debranding/static/src/js/dialog.js",
"web_debranding/static/src/js/field_upgrade.js",
"web_debranding/static/src/js/native_notifications.js",
"web_debranding/static/src/js/user_menu_items.js",
"web_debranding/static/src/js/translation.js",
"web_debranding/static/src/xml/web.xml",
Expand Down

0 comments on commit ecee2e7

Please sign in to comment.