Public release from ruodoo-project: 19.0 - 2026-05-31 21:19:12 UTC

This commit is contained in:
CI Publish Bot
2026-05-31 21:19:21 +00:00
commit aa4214c195
1213 changed files with 183945 additions and 0 deletions

65
web_debranding/README.rst Normal file
View File

@ -0,0 +1,65 @@
.. image:: https://itpp.dev/images/infinity-readme.png
:alt: Tested and maintained by IT Projects Labs
:target: https://itpp.dev
====================
Backend debranding
====================
Build and enhance brand by removing references to `odoo.com <https://www.odoo.com/>`__ and customizing company logo, favicon, page title, etc.
1. *(feature is not required in 12.0+ versions)*
2. Replaces **Odoo** in page title
3. Replaces **Odoo** in help message for empty list
4. *(feature is not required in 9.0+ versions)*
5. Deletes Documentation, Support, About links from the top right-hand User Menu.
6. *(feature is not required in 11.0+ versions)*
7. Replaces **Odoo** in Dialog Box
8. Replaces **Odoo** in strings marked for translation
9. Replaces default favicon to a custom one (it applies for new companies only, otherwise you should change it manually)
10. *Hides Apps menu* (related `access_apps` module is excluded from dependencies since Odoo v15.0 and must be installed explicitly)
11. Disables server requests to odoo.com (publisher_warranty_url) - optional. Works only for non-enterprise versions of odoo
12. *(feature is a part of p.5)*
13. *(feature is not required in 13.0+ versions)*
14. *(feature is not required in 12.0+ versions)*
15. *(feature is not required in 12.0+ versions)*
16. *(feature is not required in 12.0+ versions)*
17. *(feature is not required in 15.0+ versions)*
18. Hides Enterprise features in Settings
19. Replaces **Odoo** in all backend qweb templates
20. Replaces **odoo.com** in hints, examples, etc.
21. Renames **OdooBot** to *Bot*. (Bot's avatar is not changed since Odoo v15, because one can change it manually via Bot User)
22. *(feature is not required in 15.0+ versions)*
23. Replaces links to `documentation <https://www.odoo.com/documentation>`__ (e.g. "Help" in Import tool, "How-to" in paypal, etc.) to custom website
24. *(feature is not required in 12.0+ versions)*
25. *(feature is not required in 12.0+ versions)*
26. Deletes Google Play, Apps Store apps links
27. *(feature in deleted in favor of OCA module mail_debrand)*
28. Deletes **Powered by Odoo** in Website (when installed)
29. Hides iap links in Settings
Roadmap
=======
* TODO: replace hardcoded placeholders and make them based on `web_debranding.new_website`
* TODO: support debranding in `--dev=xml` mode
Questions?
==========
To get an assistance on this module contact us by email :arrow_right: help@itpp.dev
Contributors
============
* `Ivan Yelizariev <https://it-projects.info/team/yelizariev>`__
Further information
===================
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 17.0 <https://github.com/odoo/odoo/commit/40b19d89846303016098840f4958fe7cc105067c>`_

View File

@ -0,0 +1,14 @@
# License MIT (https://opensource.org/licenses/MIT).
from . import models
from . import controllers
# from . import translate
from odoo import SUPERUSER_ID, api
MODULE = "_web_debranding"
def uninstall_hook(env):
env = env(su=True)
env["ir.model.data"]._module_data_uninstall([MODULE])

View File

@ -0,0 +1,49 @@
# Copyright 2015-2023 Ivan Yelizariev <https://twitter.com/yelizariev>
# Copyright 2017 Ilmir Karamov <https://it-projects.info/team/ilmir-k>
# Copyright 2018-2019 Kolushov Alexandr <https://it-projects.info/team/KolushovAlexandr>
# Copyright 2018 Ildar Nasyrov <https://it-projects.info/team/iledarn>
# Copyright 2018 WohthaN <https://github.com/WohthaN>
# Copyright 2019-2020 Eugene Molotov <https://github.com/em230418>
# Copyright 2020 Denis Mudarisov <https://github.com/trojikman>
# License MIT (https://opensource.org/licenses/MIT).
# License OPL-1 (https://www.odoo.com/documentation/user/14.0/legal/licenses/licenses.html#odoo-apps) for derivative work.
{
"name": "Backend debranding",
"version": "19.0.3.0.0",
"author": "IT-Projects LLC, Ivan Yelizariev",
"license": "OPL-1",
"category": "Debranding",
"images": ["images/web_debranding.png"],
"website": "https://odoo-debranding.com",
"support": "apps@itpp.dev",
"price": 300.00,
"currency": "EUR",
"depends": [
"base_setup",
"web",
"mail",
"mail_bot",
"base",
],
"external_dependencies": {"python": ["lxml"]},
"data": [
"data.xml",
"views.xml",
"pre_install.xml",
"views/res_config.xml",
],
"assets": {
"web.assets_backend": [
"web_debranding/static/src/css/web.css",
"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/user_menu_items.js",
"web_debranding/static/src/js/translation.js",
"web_debranding/static/src/xml/web.xml",
],
},
"auto_install": False,
"uninstall_hook": "uninstall_hook",
"installable": True,
}

View File

@ -0,0 +1,3 @@
# License MIT (https://opensource.org/licenses/MIT).
from . import main

View File

@ -0,0 +1,104 @@
# Copyright 2015-2018,2020 Ivan Yelizariev <https://it-projects.info/team/yelizariev>
# Copyright 2016 Stanislav Krotov <https://it-projects.info/team/ufaks>
# Copyright 2017 Ilmir Karamov <https://it-projects.info/team/ilmir-k>
# Copyright 2017 Nicolas JEUDY <https://github.com/njeudy>
# Copyright 2017 Ildar Nasyrov <https://it-projects.info/team/iledarn>
# Copyright 2018 Kolushov Alexandr <https://it-projects.info/team/KolushovAlexandr>
# License MIT (https://opensource.org/licenses/MIT).
# License OPL-1 (https://www.odoo.com/documentation/user/14.0/legal/licenses/licenses.html#odoo-apps) for derivative work.
import base64
import functools
import io
try:
from werkzeug.utils import send_file
except ImportError:
from odoo.tools._vendor.send_file import send_file
import odoo
from odoo import http
from odoo.http import request
from odoo.tools.mimetypes import guess_mimetype
from odoo.addons.web.controllers.binary import Binary
class BinaryCustom(Binary):
@http.route(
["/web/binary/company_logo", "/logo", "/logo.png"], type="http", auth="none"
)
def company_logo(self, dbname=None, **kw):
imgname = "logo"
imgext = ".png"
default_logo_module = "web_debranding"
if request.session.db:
default_logo_module = (
request.env["ir.config_parameter"]
.sudo()
.get_param("web_debranding.default_logo_module")
)
placeholder = functools.partial(
lambda module, *args: os.path.join(
odoo.modules.module.get_module_path(module), *args
),
default_logo_module, "static", "img"
)
dbname = request.db
uid = (request.session.uid if dbname else None) or odoo.SUPERUSER_ID
if not dbname:
response = http.Stream.from_path(
placeholder(imgname + imgext)
).get_response()
else:
try:
# create an empty registry
registry = odoo.modules.registry.Registry(dbname)
with registry.cursor() as cr:
company = int(kw["company"]) if kw and kw.get("company") else False
if company:
cr.execute(
"""SELECT logo_web, write_date
FROM res_company
WHERE id = %s
""",
(company,),
)
else:
cr.execute(
"""SELECT c.logo_web, c.write_date
FROM res_users u
LEFT JOIN res_company c
ON c.id = u.company_id
WHERE u.id = %s
""",
(uid,),
)
row = cr.fetchone()
if row and row[0]:
image_base64 = base64.b64decode(row[0])
image_data = io.BytesIO(image_base64)
mimetype = guess_mimetype(image_base64, default="image/png")
imgext = "." + mimetype.split("/")[1]
if imgext == ".svg+xml":
imgext = ".svg"
response = send_file(
image_data,
request.httprequest.environ,
download_name=imgname + imgext,
mimetype=mimetype,
last_modified=row[1],
)
else:
response = http.Stream.from_path(
placeholder("nologo.png")
).get_response()
except Exception:
response = http.Stream.from_path(
placeholder(imgname + imgext)
).get_response()
return response

14
web_debranding/data.xml Normal file
View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<!--Copyright 2015-2018,2020 Ivan Yelizariev <https://it-projects.info/team/yelizariev>
Copyright 2017 Ilmir Karamov <https://it-projects.info/team/ilmir-k>
License MIT (https://opensource.org/licenses/MIT).-->
<record id="default_logo_module" model="ir.config_parameter">
<field name="key">web_debranding.default_logo_module</field>
<field name="value">web_debranding</field>
</record>
<record id="base.partner_root" model="res.partner">
<field name="name">Bot</field>
<field name="email">bot@example.com</field>
</record>
</odoo>

View File

@ -0,0 +1,213 @@
`3.0.0`
--------
- **Fix:** module installation was crashed because of `recent update in Odoo v16 <https://github.com/odoo/odoo/pull/116368>`__
`2.0.2`
--------
- **Fix:** fix error 'NoneType' object has no attribute 'cr'. It happens under following conditions: website module is installed and `--db-filter` is not set.
`2.0.1`
--------
- **Fix:** delete obsolete code related to dropped feature about bot's avatar. That code caused an error on clicking chat icon
- **Fix:** error on using custom selection field
`2.0.0`
--------
- **Improvement:** make some features optional: access to Settings and Apps menus, restricted administration rights.
- **Improvement:** `web_debranding.new_documentation_website` is now full link to the documentation, i.e. `/documentation/` path is not mandatory anymore. Also, use official docs by default
- **Improvement:** bot's avatar is not changed on module installation and can be customized manually via Users menu
`1.1.1`
--------
- **Fix:** Debrand "session expired" popup
`1.1.0`
--------
- **New:** delete iap links in Settings
- **Fix:** hide Enterprise checkboxes in Settings
`1.0.32`
--------
- **Fix:** add missing dependency ``mail_bot``
`1.0.31`
--------
- **Fix:** delete Odoo placeholders in user's preferences
`1.0.30`
--------
- **Fix:** delete "Powered by Odoo" in website
`1.0.29`
--------
- **Fix:** error in Discuss menu on first usage
`1.0.28`
--------
**Fix:** debrand_bytes now accepts bytes and str types
**Fix:** fixed "OdooBot has a request" item in notifications
**Fix:** included mail_channel fixes
`1.0.27`
--------
**Fix:** error on res.config form opening
`1.0.26`
--------
- FIX: developer mode was availabile via dropdown menu for non-admins
`1.0.25`
--------
- FIX: error in Planner
`1.0.24`
--------
- FIX: Save\Create button didn't react in ``Point of Sale`` records
`1.0.23`
--------
- FIX: Debranding problems after introducing new features
`1.0.22`
--------
- FIX: method create didn't work via xmlrpc (e.g. on using Mail Composer)
`1.0.21`
--------
- FIX: In some cases, default parameters were used instead of custom ones
`1.0.20`
--------
- FIX: Hiding a custom logo
- FIX: Error when creating second empty database
- FIX: Remove official videos in planner
- FIX: Replace "Odoo" in 'install aplication' mails
- FIX: Remove Enterprise radio-buttons in Settings
`1.0.19`
--------
- FIX: Page title was empty even when it doesn't contain references to odoo
`1.0.18`
--------
- FIX: Replace icons for android and apple devices with custom url
`1.0.17`
--------
- FIX: Do not reset config values to default ones after upgrade or reinstall the module
`1.0.16`
--------
- FIX: Removed odoo.com link from left bottom of the page
`1.0.15`
--------
- FIX: Updating Title didn't work on *Optimize SEO* website tool
`1.0.14`
--------
- FIX: Compatibility with Timesheet Grid View module
`1.0.13`
--------
- IMP: Add "Developer mode" link to the top right-hand User Menu
`1.0.12`
--------
- FIX: Forbid to disable odoo.com binding for enterprise due to terms of Odoo Enterprise Subscription Agreement
`1.0.11`
--------
- FIX desktop notifications: replace odoo icon company log and debrand text
`1.0.10`
--------
- FIX: Reconsile button didn't work
- FIX: Updated title was not set
`1.0.9`
-------
- FIX: don't hide whole section in Settings if it not all fields are enterprise
`1.0.8`
-------
- IMP: 11. Disables server requests to odoo.com (publisher_warranty_url) - optional
`1.0.7`
-------
- FIX: bug with fields on User form in Odoo Enterprise
`1.0.6`
-------
- FIX: bug with replacing the word "odoo" in JS functions
- FIX: replace title and favicon in Odoo Enterprise
`1.0.5`
-------
- ADD: Replaces "Odoo" in all backend qweb templates (e.g. FAQ in import tool)
`1.0.4`
-------
- ADD: hide Enterprise features in Settings
`1.0.3`
-------
- ADD: support Enterprise release
- ADD: 16. Deletes "Odoo" in a request message for permission desktop notifications
- ADD: 17. [ENTERPRISE] Deletes odoo logo in application switcher
`1.0.2`
-------
- ADD: debrand Planner
- FIX: updates for recent odoo 9.0
`1.0.1`
-------
- FIX: updates for recent odoo 9.0
- REF: compatible with other Dashboard modules
`1.0.0`
-------
- init version

View File

@ -0,0 +1,79 @@
====================
Backend debranding
====================
Installation
============
* `Install <https://odoo-development.readthedocs.io/en/latest/odoo/usage/install-module.html>`__ this module in a usual way
Configuration
=============
By default the module replaces ``Odoo`` to ``紫色💃团子``.
* Switch to Developer mode
* Open ``[[ General Settings ]] >> Technical >> Parameters >> System Parameters`` and modify:
* ``web_debranding.new_title`` (put space in *Value field* if you don't need Brand in Title)
* ``web_debranding.new_name`` (your Brand)
* ``web_debranding.new_website`` (your website)
* ``web_debranding.new_documentation_website`` (website with documentation instead of official one)
* ``web_debranding.favicon_url``
* ``web_debranding.send_publisher_warranty_url`` - set 0 to disable server requests to odoo.com and 1 otherwise (useful for enterprise contractors). Works only for non-enterprise versions of odoo, check `note <https://www.odoo.com/apps/modules/17.0/web_debranding/#enterprise-users-notice>`__ below.
Further debranding
==================
* Install `portal_debranding <https://apps.odoo.com/apps/modules/17.0/portal_debranding/>`__ if module *Portal* is already installed in your system
* Install `website_debranding <https://apps.odoo.com/apps/modules/17.0/website_debranding/>`__ if module *Website Builder* is already installed in your system
* Install `pos_debranding <https://apps.odoo.com/apps/modules/17.0/pos_debranding/>`__ if module *POS* is already installed in your system
* Delete *Odoo.com Accounts* record at *Settings >> Users & Companies >> OAuth Providers* if module ``OAuth2 Authentication`` has been already installed in your system
* Database switcher ``/web/database/manager``: edit *addons/web/static/src/public/database_manager.qweb.html* file
* Favicon: open ``[[ Settings ]] >> Users & Companies >> Companies`` and change **Company Favicon**
* Bot's Avatar: open Users menu, apply filter *Inactive Users*, change avatar of the bot to a custom one
* Emails: use OCA's `Mail Debrand <https://apps.odoo.com/apps/modules/17.0/mail_debrand/>`__ module
Auto-debrand new databases
==========================
To automatically install this module for every new databases set ``'auto_install': True`` in ``web_debranding/__manifest__.py`` file.
Usage
=====
* Open *Backend*
* Perform usual workflow
RESULT: references to `Odoo <https://www.odoo.com/>`__ are hidden as much as possible (let us know if you found one)..
Examples
========
* Search a random string at the menu ``[[ Settings ]] >> Users & Companies >> Companies``
Create and manage the companies that will be managed by **Odoo** from here. Shops or subsidiaries can be created and maintained from here.
* Try to delete archived Bot user (login: ``__system__``) via menu ``[[ Settings ]] >> Users & Copanies >> Users``
You can not remove the admin user as it is used internally for resources created by *Odoo** (updates, module installation, ...).
* When you create new company it shows placeholder for field **Website**
e.g. www.odoo.com
* Install `website_twitter` module and open menu ``[[ Settings ]] >> General Settings >> Website``.
Name: **Odoo** Twitter Integration
* Open menu ``[[ Discuss ]] >> CHANNELS >> #general``
* Send ``/help`` to the chat and **OdooBot** will send you some text
* Open two browser tabs with Odoo. Then logout in one of it. Open any menu in another one.
Your **Odoo** session expired. The current page is about to be refreshed.
* Install `sale_management` module and open menu ``[[ Settings ]] >> Sales``.
* RESULT: the Enterprise features are hidden

View File

@ -0,0 +1,70 @@
<section class="oe_container">
<div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel">
<div class="carousel-inner">
<div class="carousel-item active">
<img class="d-block w-100" src="Group.png" alt="First slide" />
</div>
<div class="carousel-item">
<img class="d-block w-100" src="Group2.png" alt="Second slide" />
</div>
<div class="carousel-item">
<img class="d-block w-100" src="Group3.png" alt="Third slide" />
</div>
<div class="carousel-item">
<img class="d-block w-100" src="Group4.png" alt="Forth slide" />
</div>
<div class="carousel-item">
<img class="d-block w-100" src="Group5.png" alt="Fiveth slide" />
</div>
<div class="carousel-item">
<img class="d-block w-100" src="Group6.png" alt="Sixth slide" />
</div>
</div>
<a
class="carousel-control-prev"
href="#carouselExampleIndicators"
role="button"
data-slide="prev"
>
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a
class="carousel-control-next"
href="#carouselExampleIndicators"
role="button"
data-slide="next"
>
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<div class="oe_span12">
<ol>
<li>Replaces "Odoo" in page title</li>
<li>
Deletes Documentation, Support, About links from the top right-hand User Menu.
</li>
<li>Replaces "Odoo" in Dialog Box</li>
<li>Replaces "Odoo" in all strings marked for translation</li>
<li>Replaces "odoo.com" in hints, examples, etc.</li>
<li>Hides Enterprise features in Settings</li>
<li>
Replaces links to
<a href="https://www.odoo.com/documentation"> documentation </a> (e.g. "Help"
in Import tool, "How-to" in paypal, etc.) to custom website
</li>
<li>Deletes Google Play, Apps Store links</li>
<li>Deletes "Powered by Odoo" in Website (when installed)</li>
<li>
Disables server requests to odoo.com (publisher_warranty_url) - optional.
Works only for non-enterprise versions of odoo
</li>
</ol>
</div>
</div>
</section>

View File

@ -0,0 +1,3 @@
slogan:
Build and enhance your Brand by removing references to <a
href="https://www.odoo.com/"> odoo.com </a>

View File

@ -0,0 +1,164 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * web_debranding
#
# Translators:
# Randall <randall_castro@me.com>, 2018
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-04-30 21:57+0000\n"
"PO-Revision-Date: 2018-04-30 21:57+0000\n"
"Last-Translator: Randall <randall_castro@me.com>, 2018\n"
"Language-Team: Spanish (Costa Rica) (https://www.transifex.com/it-projects-"
"llc/teams/76080/es_CR/)\n"
"Language: es_CR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: web_debranding
#. openerp-web
#: code:addons/web_debranding/static/src/xml/web.xml:27
#, python-format
msgid "(with assets)"
msgstr ""
#. module: web_debranding
#: model:ir.model,name:web_debranding.model_ir_actions_act_window
msgid "Action Window"
msgstr ""
#. module: web_debranding
#: model:ir.model.fields,field_description:web_debranding.field_res_users__odoobot_state
msgid "Bot Status"
msgstr ""
#. module: web_debranding
#. openerp-web
#: code:addons/web_debranding/static/src/xml/web.xml:26
#: code:addons/web_debranding/static/src/xml/web.xml:27
#, python-format
msgid "Developer mode"
msgstr "Modo desarrollador"
#. module: web_debranding
#. openerp-web
#: code:addons/web_debranding/static/src/js/user_menu.js:36
#: code:addons/web_debranding/static/src/js/user_menu.js:42
#, python-format
msgid "Developer mode is already activated"
msgstr "El modo desarrollador ya se encuentra activado"
#. module: web_debranding
#: selection:res.users,odoobot_state:0
msgid "Disabled"
msgstr ""
#. module: web_debranding
#: selection:res.users,odoobot_state:0
msgid "Idle"
msgstr ""
#. module: web_debranding
#: model:ir.model,name:web_debranding.model_mail_message
msgid "Message"
msgstr "Mensaje"
#. module: web_debranding
#: selection:res.users,odoobot_state:0
msgid "Not initialized"
msgstr ""
#. module: web_debranding
#: selection:res.users,odoobot_state:0
msgid "Onboarding attachement"
msgstr ""
#. module: web_debranding
#: selection:res.users,odoobot_state:0
msgid "Onboarding command"
msgstr ""
#. module: web_debranding
#: selection:res.users,odoobot_state:0
msgid "Onboarding emoji"
msgstr ""
#. module: web_debranding
#: selection:res.users,odoobot_state:0
msgid "Onboarding ping"
msgstr ""
#. module: web_debranding
#. openerp-web
#: code:addons/web_debranding/static/src/js/native_notifications.js:15
#, python-format
msgid "Permission denied"
msgstr ""
#. module: web_debranding
#: model:ir.model,name:web_debranding.model_publisher_warranty_contract
#, fuzzy
msgid "Publisher Warranty Contract"
msgstr "publisher_warranty.contract"
#. module: web_debranding
#: code:addons/web_debranding/models/ir_config_parameter.py:12
#: code:addons/web_debranding/models/ir_config_parameter.py:13
#, python-format
msgid "Software"
msgstr "Software"
#. module: web_debranding
#: model:ir.model,name:web_debranding.model_ir_config_parameter
msgid "System Parameter"
msgstr ""
#. module: web_debranding
#: model:ir.model,name:web_debranding.model_ir_translation
#, fuzzy
msgid "Translation"
msgstr "ir.translation"
#. module: web_debranding
#: model:ir.model,name:web_debranding.model_res_users
msgid "Users"
msgstr ""
#. module: web_debranding
#: model:ir.model,name:web_debranding.model_ir_ui_view
msgid "View"
msgstr ""
#. module: web_debranding
#. openerp-web
#: code:addons/web_debranding/static/src/js/native_notifications.js:15
#, python-format
msgid "Yay, push notifications are enabled!"
msgstr ""
#. module: web_debranding
#. openerp-web
#: code:addons/web_debranding/static/src/xml/web.xml:8
#, python-format
msgid "Your permission is required to"
msgstr "Se requieren permisos para"
#. module: web_debranding
#. openerp-web
#: code:addons/web_debranding/static/src/xml/web.xml:9
#, python-format
msgid "enable desktop notifications"
msgstr "Habilitar notificaciones de escritorio"
#~ msgid "Planner"
#~ msgstr "Planificador"
#~ msgid "ir.actions.act_window"
#~ msgstr "ir.actions.act_window"
#~ msgid "ir.config_parameter"
#~ msgstr "ir.config_parameter"

155
web_debranding/i18n/ru.po Normal file
View File

@ -0,0 +1,155 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * web_debranding
#
# Translators:
# Translation Bot <i18n-bot@it-projects.info>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-12-08 15:03+0000\n"
"PO-Revision-Date: 2017-12-08 15:03+0000\n"
"Last-Translator: Translation Bot <i18n-bot@it-projects.info>, 2017\n"
"Language-Team: Russian (https://www.transifex.com/it-projects-llc/"
"teams/76080/ru/)\n"
"Language: ru\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n"
"%100>=11 && n%100<=14)? 2 : 3);\n"
#. module: web_debranding
#. openerp-web
#: code:addons/web_debranding/static/src/xml/web.xml:27
#, python-format
msgid "(with assets)"
msgstr ""
#. module: web_debranding
#: model:ir.model,name:web_debranding.model_ir_actions_act_window
msgid "Action Window"
msgstr ""
#. module: web_debranding
#: model:ir.model.fields,field_description:web_debranding.field_res_users__odoobot_state
msgid "Bot Status"
msgstr ""
#. module: web_debranding
#. openerp-web
#: code:addons/web_debranding/static/src/xml/web.xml:26
#: code:addons/web_debranding/static/src/xml/web.xml:27
#, python-format
msgid "Developer mode"
msgstr "Режим разработчика"
#. module: web_debranding
#. openerp-web
#: code:addons/web_debranding/static/src/js/user_menu.js:36
#: code:addons/web_debranding/static/src/js/user_menu.js:42
#, python-format
msgid "Developer mode is already activated"
msgstr "Режим разработчика уже активирован"
#. module: web_debranding
#: selection:res.users,odoobot_state:0
msgid "Disabled"
msgstr ""
#. module: web_debranding
#: selection:res.users,odoobot_state:0
msgid "Idle"
msgstr ""
#. module: web_debranding
#: model:ir.model,name:web_debranding.model_mail_message
msgid "Message"
msgstr ""
#. module: web_debranding
#: selection:res.users,odoobot_state:0
msgid "Not initialized"
msgstr ""
#. module: web_debranding
#: selection:res.users,odoobot_state:0
msgid "Onboarding attachement"
msgstr ""
#. module: web_debranding
#: selection:res.users,odoobot_state:0
msgid "Onboarding command"
msgstr ""
#. module: web_debranding
#: selection:res.users,odoobot_state:0
msgid "Onboarding emoji"
msgstr ""
#. module: web_debranding
#: selection:res.users,odoobot_state:0
msgid "Onboarding ping"
msgstr ""
#. module: web_debranding
#. openerp-web
#: code:addons/web_debranding/static/src/js/native_notifications.js:15
#, python-format
msgid "Permission denied"
msgstr ""
#. module: web_debranding
#: model:ir.model,name:web_debranding.model_publisher_warranty_contract
msgid "Publisher Warranty Contract"
msgstr ""
#. module: web_debranding
#: code:addons/web_debranding/models/ir_config_parameter.py:12
#: code:addons/web_debranding/models/ir_config_parameter.py:13
#, python-format
msgid "Software"
msgstr ""
#. module: web_debranding
#: model:ir.model,name:web_debranding.model_ir_config_parameter
msgid "System Parameter"
msgstr ""
#. module: web_debranding
#: model:ir.model,name:web_debranding.model_ir_translation
msgid "Translation"
msgstr ""
#. module: web_debranding
#: model:ir.model,name:web_debranding.model_res_users
msgid "Users"
msgstr ""
#. module: web_debranding
#: model:ir.model,name:web_debranding.model_ir_ui_view
msgid "View"
msgstr ""
#. module: web_debranding
#. openerp-web
#: code:addons/web_debranding/static/src/js/native_notifications.js:15
#, python-format
msgid "Yay, push notifications are enabled!"
msgstr ""
#. module: web_debranding
#. openerp-web
#: code:addons/web_debranding/static/src/xml/web.xml:8
#, python-format
msgid "Your permission is required to"
msgstr ""
#. module: web_debranding
#. openerp-web
#: code:addons/web_debranding/static/src/xml/web.xml:9
#, python-format
msgid "enable desktop notifications"
msgstr ""

View File

@ -0,0 +1,167 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * web_debranding
#
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"
#. module: web_debranding
#. openerp-web
#: code:addons/web_debranding/static/src/xml/web.xml:27
#, python-format
msgid "(with assets)"
msgstr ""
#. module: web_debranding
#: model:ir.model,name:web_debranding.model_ir_actions_act_window
msgid "Action Window"
msgstr ""
#. module: web_debranding
#: model:ir.model.fields,field_description:web_debranding.field_res_users__odoobot_state
msgid "Bot Status"
msgstr ""
#. module: web_debranding
#. openerp-web
#: code:addons/web_debranding/static/src/js/bot.js:33
#, python-format
msgid "Bot has a request"
msgstr ""
#. module: web_debranding
#. openerp-web
#: code:addons/web_debranding/static/src/xml/web.xml:26
#: code:addons/web_debranding/static/src/xml/web.xml:27
#, python-format
msgid "Developer mode"
msgstr ""
#. module: web_debranding
#. openerp-web
#: code:addons/web_debranding/static/src/js/user_menu.js:36
#: code:addons/web_debranding/static/src/js/user_menu.js:42
#, python-format
msgid "Developer mode is already activated"
msgstr ""
#. module: web_debranding
#: selection:res.users,odoobot_state:0
msgid "Disabled"
msgstr ""
#. module: web_debranding
#: model:ir.model,name:web_debranding.model_mail_channel
msgid "Discussion Channel"
msgstr ""
#. module: web_debranding
#: selection:res.users,odoobot_state:0
msgid "Idle"
msgstr ""
#. module: web_debranding
#: model:ir.model,name:web_debranding.model_mail_message
msgid "Message"
msgstr ""
#. module: web_debranding
#: selection:res.users,odoobot_state:0
msgid "Not initialized"
msgstr ""
#. module: web_debranding
#. openerp-web
#: code:addons/web_debranding/static/src/js/bot.js:32
#, python-format
msgid "OdooBot has a request"
msgstr ""
#. module: web_debranding
#: selection:res.users,odoobot_state:0
msgid "Onboarding attachement"
msgstr ""
#. module: web_debranding
#: selection:res.users,odoobot_state:0
msgid "Onboarding command"
msgstr ""
#. module: web_debranding
#: selection:res.users,odoobot_state:0
msgid "Onboarding emoji"
msgstr ""
#. module: web_debranding
#: selection:res.users,odoobot_state:0
msgid "Onboarding ping"
msgstr ""
#. module: web_debranding
#. openerp-web
#: code:addons/web_debranding/static/src/js/native_notifications.js:15
#, python-format
msgid "Permission denied"
msgstr ""
#. module: web_debranding
#: model:ir.model,name:web_debranding.model_publisher_warranty_contract
msgid "Publisher Warranty Contract"
msgstr ""
#. module: web_debranding
#: code:addons/web_debranding/models/ir_config_parameter.py:13
#: code:addons/web_debranding/models/ir_config_parameter.py:14
#, python-format
msgid "Software"
msgstr ""
#. module: web_debranding
#: model:ir.model,name:web_debranding.model_ir_config_parameter
msgid "System Parameter"
msgstr ""
#. module: web_debranding
#: model:ir.model,name:web_debranding.model_ir_translation
msgid "Translation"
msgstr ""
#. module: web_debranding
#: model:ir.model,name:web_debranding.model_res_users
msgid "Users"
msgstr ""
#. module: web_debranding
#: model:ir.model,name:web_debranding.model_ir_ui_view
msgid "View"
msgstr ""
#. module: web_debranding
#. openerp-web
#: code:addons/web_debranding/static/src/js/native_notifications.js:15
#, python-format
msgid "Yay, push notifications are enabled!"
msgstr ""
#. module: web_debranding
#. openerp-web
#: code:addons/web_debranding/static/src/xml/web.xml:8
#, python-format
msgid "Your permission is required to"
msgstr ""
#. module: web_debranding
#. openerp-web
#: code:addons/web_debranding/static/src/xml/web.xml:9
#, python-format
msgid "enable desktop notifications"
msgstr ""

Binary file not shown.

After

Width:  |  Height:  |  Size: 528 KiB

View File

@ -0,0 +1,14 @@
# License MIT (https://opensource.org/licenses/MIT).
from . import base
from . import ir_actions
from . import ir_translation
from . import publisher_warranty_contract
from . import ir_config_parameter
from . import ir_ui_view
from . import res_users
from . import ir_model
from . import res_company
from . import ir_module_module
from . import res_config_settings
from . import ir_http

View File

@ -0,0 +1,24 @@
# Copyright 2020,2022-2023 Ivan Yelizariev
# License OPL-1 (https://www.odoo.com/documentation/user/14.0/legal/licenses/licenses.html#odoo-apps).
from odoo import api, models
from .ir_translation import debrand
BRANDED_FIELDS = {}
class Base(models.AbstractModel):
_inherit = "base"
@api.model
def search(self, domain, offset=0, limit=None, order=None):
res = super().search(domain, offset, limit, order)
if self._name == "payment.provider":
res = res.filtered(lambda a: not a.module_to_buy)
return res
def get_view(self, view_id=None, view_type="form", **options):
res = super().get_view(view_id=view_id, view_type=view_type, **options)
res["arch"] = debrand(self.env, res["arch"], is_code=True)
return res

View File

@ -0,0 +1,21 @@
# Copyright 2015-2018 Ivan Yelizariev <https://it-projects.info/team/yelizariev>
# Copyright 2017 Ilmir Karamov <https://it-projects.info/team/ilmir-k>
# License MIT (https://opensource.org/licenses/MIT).
from odoo import models
class IrActionsActWindowDebranding(models.Model):
_inherit = "ir.actions.act_window"
def read(self, fields=None, load="_classic_read"):
results = super(IrActionsActWindowDebranding, self).read(
fields=fields, load=load
)
if not fields or "help" in fields:
params = self.env["ir.config_parameter"].get_debranding_parameters()
new_name = params.get("web_debranding.new_name")
for res in results:
if isinstance(res, dict) and res.get("help"):
res["help"] = res["help"].replace("Odoo", new_name)
return results

View File

@ -0,0 +1,41 @@
# Copyright 2015-2018,2022 Ivan Yelizariev <https://it-projects.info/team/yelizariev>
# Copyright 2016 Stanislav Krotov <https://it-projects.info/team/ufaks>
# Copyright 2017 ArtyomLosev <https://github.com/ArtyomLosev>
# Copyright 2017 Ilmir Karamov <https://it-projects.info/team/ilmir-k>
# Copyright 2018 Kolushov Alexandr <https://it-projects.info/team/KolushovAlexandr>
# Copyright 2019 Eugene Molotov <https://github.com/em230418>
# License MIT (https://opensource.org/licenses/MIT).
from odoo import api, models
from odoo.tools.translate import _
PARAMS = [
("web_debranding.new_name", _("Руодоо")),
("web_debranding.new_title", _("Руодоо")),
("web_debranding.new_website", "example.com"),
("web_debranding.new_documentation_website", "https://www.odoo.COM/documentation/"),
("web_debranding.favicon_url", ""),
("web_debranding.send_publisher_warranty_url", "0"),
]
def get_debranding_parameters_env(env):
res = {}
for param, default in PARAMS:
value = env["ir.config_parameter"].sudo().get_param(param, default)
res[param] = value.strip()
return res
class IrConfigParameter(models.Model):
_inherit = "ir.config_parameter"
@api.model
def get_debranding_parameters(self):
return get_debranding_parameters_env(self.env)
@api.model
def create_debranding_parameters(self):
for param, default in PARAMS:
if not self.env["ir.config_parameter"].sudo().get_param(param):
self.env["ir.config_parameter"].sudo().set_param(param, default or " ")

View File

@ -0,0 +1,23 @@
# Copyright 2022 Ivan Yelizariev <https://twitter.com/yelizariev>
# License MIT (https://opensource.org/licenses/MIT).
# License OPL-1 (https://www.odoo.com/documentation/user/14.0/legal/licenses/licenses.html#odoo-apps) for derivative work.
from odoo import api, models
from .ir_translation import debrand
class IrHttp(models.AbstractModel):
_inherit = "ir.model.fields"
@api.model
def get_translations_for_webclient(self, *args, **kwargs):
translations_per_module, lang_params = super(
IrHttp, self
).get_translations_for_webclient(*args, **kwargs)
for _module_key, module_vals in translations_per_module.items():
for message in module_vals["messages"]:
message["id"] = debrand(self.env, message["id"])
message["string"] = debrand(self.env, message["string"])
return translations_per_module, lang_params

View File

@ -0,0 +1,13 @@
# Copyright 2020,2022 Ivan Yelizariev
# License OPL-1 (https://www.odoo.com/documentation/user/14.0/legal/licenses/licenses.html#odoo-apps).
from odoo import models
from .ir_translation import debrand
class IrModelSelection(models.Model):
_inherit = "ir.model.fields.selection"
def _get_selection_data(self, *args, **kwargs):
data = super(IrModelSelection, self)._get_selection_data(*args, **kwargs)
return [(value, debrand(self.env, name)) for value, name in data]

View File

@ -0,0 +1,10 @@
from odoo import api, models
class IrModuleModule(models.Model):
_inherit = "ir.module.module"
@api.model
def search(self, domain, offset=0, limit=None, order=None):
domain = [("to_buy", "=", False)] + domain
return super().search(domain, offset, limit, order)

View File

@ -0,0 +1,113 @@
# Copyright 2015-2018,2020,2022 Ivan Yelizariev <https://twitter.com/yelizariev>
# Copyright 2016 Stanislav Krotov <https://it-projects.info/team/ufaks>
# Copyright 2017 Ilmir Karamov <https://it-projects.info/team/ilmir-k>
# Copyright 2017 Nicolas JEUDY <https://github.com/njeudy>
# Copyright 2018 Kolushov Alexandr <https://it-projects.info/team/KolushovAlexandr>
# Copyright 2018 Ildar Nasyrov <https://it-projects.info/team/iledarn>
# Copyright 2019 Eugene Molotov <https://it-projects.info/team/molotov>
# License MIT (https://opensource.org/licenses/MIT).
# License OPL-1 (https://www.odoo.com/documentation/user/14.0/legal/licenses/licenses.html#odoo-apps) for derivative work.
import re
from odoo import api, models, tools
from odoo.addons.base.models.ir_model import IrModelFields as IrModelFieldsOriginal
from .ir_config_parameter import get_debranding_parameters_env
def debrand_documentation_links(source, new_documentation_website):
return re.sub(
r"https://www.odoo.com/documentation/",
new_documentation_website,
source,
flags=re.IGNORECASE,
)
def debrand_links(source, new_website):
return re.sub(r"\bodoo.com\b", new_website, source)
def debrand(env, source, is_code=False):
if not source or not re.search(r"\bodoo\b", source, re.IGNORECASE):
return source
params = get_debranding_parameters_env(env)
new_name = params.get("web_debranding.new_name")
new_website = params.get("web_debranding.new_website")
new_documentation_website = params.get("web_debranding.new_documentation_website")
source = debrand_documentation_links(source, new_documentation_website)
source = debrand_links(source, new_website)
# We must exclude the next cases, which occur only in a code,
# Since JS functions are also contained in the localization files.
# Next regular expression exclude from substitution 'odoo.SMTH', 'odoo =', 'odoo=', 'odooSMTH', 'odoo['
# Where SMTH is an any symbol or number or '_'. Option odoo.com were excluded previously.
# Examples:
# odoo.
# xml file: https://github.com/odoo/odoo/blob/9.0/addons/im_livechat/views/im_livechat_channel_templates.xml#L148
# odooSMTH
# https://github.com/odoo/odoo/blob/11.0/addons/website_google_map/views/google_map_templates.xml#L14
# odoo =
# https://github.com/odoo/odoo/blob/11.0/addons/web/views/webclient_templates.xml#L260
# odoo[
# https://github.com/odoo/odoo/blob/11.0/addons/web_editor/views/iframe.xml#L43-L44
# SMTH.odoo
# https://github.com/odoo/odoo/blob/11.0/addons/web_editor/views/iframe.xml#L43
source = re.sub(
r"\b(?<!\.)odoo(?!\.\S|\s?=|\w|\[)\b", new_name, source, flags=re.IGNORECASE
)
return source
def debrand_bytes(env, source):
if type(source) is bytes:
source = source.decode("utf-8")
return bytes(debrand(env, source), "utf-8")
class IrModelFields(models.Model):
_inherit = "ir.model.fields"
@api.model
def _debrand_dict(self, res):
for k in res:
res[k] = self._debrand(res[k])
return res
@api.model
def _debrand(self, source):
return debrand(self.env, source)
@api.model
@tools.ormcache("model_name")
def get_field_string(self, model_name):
res = super(IrModelFields, self).get_field_string(model_name)
return self._debrand_dict(res)
@api.model
@tools.ormcache("model_name")
def get_field_help(self, model_name):
res = super(IrModelFields, self).get_field_help(model_name)
return self._debrand_dict(res)
@api.model
def decorated_clear_caches(self):
"""For calling clear_caches from via xml <function ... />
we wrapped it in the api.model decorator
"""
self.env.registry.clear_cache()
@api.model
@tools.ormcache("model_name", "field_name")
def get_field_selection(self, model_name, field_name):
# FIXED for Odoo 19: безопасный вызов оригинала
original_method = IrModelFieldsOriginal.get_field_selection
if hasattr(original_method, '__wrapped__'):
selection = original_method.__wrapped__(self, model_name, field_name)
else:
selection = original_method(self, model_name, field_name)
return [(value, debrand(self.env, name)) for value, name in selection]

View File

@ -0,0 +1,73 @@
# Copyright 2016-2018 Ivan Yelizariev <https://it-projects.info/team/yelizariev>
# Copyright 2017 ArtyomLosev <https://github.com/ArtyomLosev>
# Copyright 2017 Ilmir Karamov <https://it-projects.info/team/ilmir-k>
# Copyright 2022 IT-Projects <https://it-projects.info/>
# License MIT (https://opensource.org/licenses/MIT).
import logging
from odoo import api, models
from odoo.tools import mute_logger
from .ir_translation import debrand
_logger = logging.getLogger(__name__)
MODULE = "_web_debranding"
class View(models.Model):
_inherit = "ir.ui.view"
def get_combined_arch(self):
res = super(View, self).get_combined_arch()
res = debrand(self.env, res, is_code=True)
return res
@api.model
def _create_debranding_views(self):
"""Create UI views that may work only in one Odoo edition"""
return True
@api.model
def _create_view(self, name, inherit_id, arch, noupdate=False, view_type="qweb"):
view = self.env.ref("{}.{}".format(MODULE, name), raise_if_not_found=False)
if view:
try:
view.write({"arch": arch})
view._check_xml()
except Exception:
_logger.warning(
"Cannot update view %s. Delete it.", name, exc_info=True
)
view.unlink()
return
return view.id
try:
with self.env.cr.savepoint(), mute_logger("odoo.models"):
view = self.env["ir.ui.view"].create(
{
"name": name,
"type": view_type,
"arch": arch,
"inherit_id": self.env.ref(
inherit_id, raise_if_not_found=True
).id,
}
)
view._check_xml()
except Exception:
_logger.debug("Cannot create view %s. Cancel.", name, exc_info=True)
return
self.env["ir.model.data"].create(
{
"name": name,
"model": "ir.ui.view",
"module": MODULE,
"res_id": view.id,
"noupdate": noupdate,
}
)
return view.id

View File

@ -0,0 +1,30 @@
# Copyright 2015-2018 Ivan Yelizariev <https://it-projects.info/team/yelizariev>
# Copyright 2016 Stanislav Krotov <https://it-projects.info/team/ufaks>
# Copyright 2017 Ilmir Karamov <https://it-projects.info/team/ilmir-k>
# License MIT (https://opensource.org/licenses/MIT).
import logging
from odoo import models
from odoo.release import version_info
_logger = logging.getLogger(__name__)
class PublisherWarrantyContract(models.AbstractModel):
_inherit = "publisher_warranty.contract"
def update_notification(self, cron_mode=True):
is_enterprise = version_info[5] == "e"
_logger.debug("is_enterprise=%s", is_enterprise)
# Running Odoo EE without calling super is illegal. So, make it impossible to disable in enterprise. See README.rst for details
if (
is_enterprise
or self.env["ir.config_parameter"]
.get_debranding_parameters()
.get("web_debranding.send_publisher_warranty_url")
== "1"
):
return super(PublisherWarrantyContract, self).update_notification(cron_mode)
else:
return True

View File

@ -0,0 +1,12 @@
# Copyright 2020 Ivan Yelizariev
# License OPL-1 (https://www.odoo.com/documentation/user/14.0/legal/licenses/licenses.html#odoo-apps).
from odoo import fields, models
class Company(models.Model):
_inherit = "res.company"
def _get_default_favicon(self, original=False):
return None
favicon = fields.Binary(default=_get_default_favicon)

View File

@ -0,0 +1,73 @@
# Copyright 2021-2022 Ivan Yelizariev <https://it-projects.info/team/yelizariev>
# License OPL-1 (https://www.odoo.com/documentation/user/14.0/legal/licenses/licenses.html#odoo-apps) for derivative work.
from lxml import etree
from odoo import api, models
class ResConfigSettings(models.TransientModel):
_inherit = "res.config.settings"
@api.model
def fields_view_get(
self, view_id=None, view_type="form", toolbar=False, submenu=False
):
ret_val = super(ResConfigSettings, self).fields_view_get(
view_id=view_id, view_type=view_type, toolbar=toolbar, submenu=submenu
)
page_name = ret_val["name"]
if not page_name == "res.config.settings.view.form":
return ret_val
doc = etree.XML(ret_val["arch"])
general_redirect_queries = [
"//div[@id='sms']",
"//div[@id='partner_autocomplete']",
"//div[@id='iap_portal']",
]
for query in general_redirect_queries:
for item in doc.xpath(query):
item.getparent().remove(item)
crm_redirect_queries = [
"//div[@id='crm_iap_lead_settings']",
"//div[@id='crm_iap_lead_website_settings']",
"//div[@id='crm_iap_lead_enrich']",
"//div[@id='crm_iap_mine_settings']",
"//div[@id='crm_iap_enrich_settings']",
]
for query in crm_redirect_queries:
for item in doc.xpath(query):
checkbox = item.getprevious()
checkbox.getparent().remove(checkbox)
item.getparent().remove(item)
snailmail_query = "//div[@id='send_invoices_followups']"
for item in doc.xpath(snailmail_query):
item.set("style", "display:none")
sms_confirmation_query = "//div[@id='stock_sms']"
for item in doc.xpath(sms_confirmation_query):
item.set("style", "display:none")
enterprise_query = "//div[div[field[@widget='upgrade_boolean']]]"
for item in doc.xpath(enterprise_query):
item.set("style", "display:none")
# Hide doc links in Settings (unmaintained feature, because the module already replaces links to custom ones)
# question_mark_query = "//a[@class='o_doc_link']"
# for item in doc.xpath(question_mark_query):
# item.set("style", "display:none")
container_query = "//div[@class='row mt16 o_settings_container']"
for item in doc.xpath(container_query):
if not item.getchildren():
title = item.getprevious()
title.getparent().remove(title)
item.getparent().remove(item)
ret_val["arch"] = etree.tostring(doc)
return ret_val

View File

@ -0,0 +1,10 @@
# Copyright 2018 Kolushov Alexandr <https://it-projects.info/team/KolushovAlexandr>
# License MIT (https://opensource.org/licenses/MIT).
from odoo import fields, models
class ResUsers(models.Model):
_inherit = "res.users"
odoobot_state = fields.Selection(string="Bot Status")

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<function model="ir.config_parameter" name="create_debranding_parameters" />
<function model="ir.model.fields" name="decorated_clear_caches" />
<function model="ir.ui.view" name="_create_debranding_views" />
</odoo>

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@ -0,0 +1,168 @@
<section class="container">
<div class="row">
<div class="col-md-offset-1 col-md-8 mb64 mt64">
<div class="">
<h2 class="display-3">Backend debranding</h2>
<h4 class="text-default">Build and enhance your Brand by removing references to <a href="https://www.odoo.com/"> odoo.com </a></h4>
<p class="text-default mt16">Version: v<b>17.0</b>.3.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:apps@itpp.dev">apps@itpp.dev</a>
</p>
</div>
</div>
</section>
<section class="oe_container">
<div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel">
<div class="carousel-inner">
<div class="carousel-item active">
<img class="d-block w-100" src="Group.png" alt="First slide" />
</div>
<div class="carousel-item">
<img class="d-block w-100" src="Group2.png" alt="Second slide" />
</div>
<div class="carousel-item">
<img class="d-block w-100" src="Group3.png" alt="Third slide" />
</div>
<div class="carousel-item">
<img class="d-block w-100" src="Group4.png" alt="Forth slide" />
</div>
<div class="carousel-item">
<img class="d-block w-100" src="Group5.png" alt="Fiveth slide" />
</div>
<div class="carousel-item">
<img class="d-block w-100" src="Group6.png" alt="Sixth slide" />
</div>
</div>
<a
class="carousel-control-prev"
href="#carouselExampleIndicators"
role="button"
data-slide="prev"
>
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a
class="carousel-control-next"
href="#carouselExampleIndicators"
role="button"
data-slide="next"
>
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<div class="oe_span12">
<ol>
<li>Replaces "Odoo" in page title</li>
<li>
Deletes Documentation, Support, About links from the top right-hand User Menu.
</li>
<li>Replaces "Odoo" in Dialog Box</li>
<li>Replaces "Odoo" in all strings marked for translation</li>
<li>Replaces "odoo.com" in hints, examples, etc.</li>
<li>Hides Enterprise features in Settings</li>
<li>
Replaces links to
<a href="https://www.odoo.com/documentation"> documentation </a> (e.g. "Help"
in Import tool, "How-to" in paypal, etc.) to custom website
</li>
<li>Deletes Google Play, Apps Store links</li>
<li>Deletes "Powered by Odoo" in Website (when installed)</li>
<li>
Disables server requests to odoo.com (publisher_warranty_url) - optional.
Works only for non-enterprise versions of odoo
</li>
</ol>
</div>
</div>
</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>

View File

@ -0,0 +1,3 @@
.o_application_switcher .o_application_switcher_footer {
display: none;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 799 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 799 B

View File

@ -0,0 +1,38 @@
/** @odoo-module **/
/* Copyright 2015-2018,2022-2023 Ivan Yelizariev <https://twitter.com/yelizariev>
Copyright 2017 ArtyomLosev <https://github.com/ArtyomLosev>
Copyright 2022 IT-Projects <https://it-projects.info/>
License MIT (https://opensource.org/licenses/MIT). */
import { debrandTranslation } from "@web_debranding/js/translation";
import { patch } from "@web/core/utils/patch";
import { useService } from "@web/core/utils/hooks";
import { WebClient } from "@web/webclient/webclient";
const { onMounted } = owl;
const components = { WebClient };
patch(components.WebClient.prototype, {
setup() {
super.setup();
odoo.debranding_new_name = "";
odoo.debranding_new_website = "";
odoo.debranding_new_title = "";
this.title.setParts({ zopenerp: odoo.debranding_new_title });
this.orm = useService("orm");
onMounted(() => {
this.updateDebrandingValues();
});
},
async updateDebrandingValues() {
const result = await this.orm.call(
"ir.config_parameter",
"get_debranding_parameters"
);
odoo.debranding_new_name = result["web_debranding.new_name"];
odoo.debranding_new_website = result["web_debranding.new_website"];
odoo.debranding_new_title = result["web_debranding.new_title"];
this.title.setParts({ zopenerp: odoo.debranding_new_title });
debrandTranslation();
},
});

View File

@ -0,0 +1,25 @@
/** @odoo-module **/
/* Copyright 2015-2018,2021,2023 Ivan Yelizariev <https://twitter.com/yelizariev>
Copyright 2015 igallyamov <https://github.com/igallyamov>
Copyright 2017 Gabbasov Dinar <https://it-projects.info/team/GabbasovDinar>
Copyright 2022 IT-Projects <https://it-projects.info/>
License OPL-1 (https://www.odoo.com/documentation/user/14.0/legal/licenses/licenses.html#odoo-apps). */
import "@web_debranding/js/base";
import { Dialog } from "@web/core/dialog/dialog";
import { patch } from "@web/core/utils/patch";
const component = { Dialog };
patch(component.Dialog.prototype, {
setup() {
const debranding_new_name = odoo.debranding_new_name;
if (this.constructor.title && this.constructor.title.replace) {
var title = this.constructor.title.replace(/Odoo/gi, debranding_new_name);
this.constructor.title = title;
} else {
this.constructor.title = debranding_new_name;
}
super.setup();
},
});

View File

@ -0,0 +1,26 @@
/** @odoo-module **/
/* Copyright 2023 Ivan Yelizariev <https://twitter.com/yelizariev>
License OPL-1 (https://www.odoo.com/documentation/user/14.0/legal/licenses/licenses.html#odoo-apps) for derivative work. */
import { patch } from "@web/core/utils/patch";
import { SearchableSetting } from "@web/webclient/settings_form_view/settings/searchable_setting";
patch(SearchableSetting.prototype, {
visible() {
if (!super.visible()) {
return false;
}
// Copy-pasted from addons/web/static/src/webclient/settings_form_view/highlight_text/form_label_highlight_text.js
const isEnterprise = odoo.info && odoo.info.isEnterprise;
let upgradeEnterprise = false;
if (
this.props.fieldInfo &&
this.props.fieldInfo.field &&
this.props.fieldInfo.field.isUpgradeField &&
!isEnterprise
) {
upgradeEnterprise = true;
}
return !upgradeEnterprise;
},
});

View File

@ -0,0 +1,30 @@
/** @odoo-module **/
/* Copyright 2022-2023 Ivan Yelizariev <https://twitter.com/yelizariev>
License OPL-1 (https://www.odoo.com/documentation/user/14.0/legal/licenses/licenses.html#odoo-apps). */
import { localizationService } from "@web/core/l10n/localization_service";
import { translatedTerms } from "@web/core/l10n/translation";
const odoo_terms = [
"Odoo Session Expired",
"Your Odoo session expired. The current page is about to be refreshed.",
];
export const debrandTranslation = () => {
if (!odoo.debranding_new_name) {
return;
}
odoo_terms.forEach((term) => {
if (!translatedTerms[term]) {
translatedTerms[term] = term;
}
translatedTerms[term] = term.replace(/Odoo/gi, odoo.debranding_new_name);
});
};
const start = localizationService.start;
localizationService.start = async (env, { user }) => {
const localization = await start(env, { user });
debrandTranslation();
return localization;
};

View File

@ -0,0 +1,9 @@
/** @odoo-module **/
import "@web/webclient/user_menu/user_menu_items";
import { registry } from "@web/core/registry";
const menuItems = registry.category("user_menuitems");
menuItems.remove("documentation");
menuItems.remove("support");
menuItems.remove("odoo_account");

View File

@ -0,0 +1,12 @@
<?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 xml:space="preserve">
<t t-inherit="web.SearchableSetting" t-inherit-mode="extension">
<xpath expr="//div[@t-att-class='classNames']" position="replace">
<t t-if="!upgradeEnterprise">
<div t-att-class="classNames" t-out="0" />
</t>
</xpath>
</t>
</templates>

View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--Copyright 2015-2018,2020 Ivan Yelizariev <https://it-projects.info/team/yelizariev>
Copyright 2016 Stanislav Krotov <https://it-projects.info/team/ufaks>
Copyright 2016 Gabbasov Dinar <https://it-projects.info/team/GabbasovDinar>
Copyright 2020 Denis Mudarisov <https://github.com/trojikman>
License MIT (https://opensource.org/licenses/MIT).
License OPL-1 (https://www.odoo.com/documentation/user/14.0/legal/licenses/licenses.html#odoo-apps) for derivative work. -->
<templates xml:space="preserve">
<t t-name="web_debranding.placeholder_patch" owl="1">
<t t-extend="wysiwyg.widgets.image">
<t t-jquery="t[t-set='urlPlaceholder']" t-operation="inner">
https://www.example.com/logo.png
</t>
</t>
<t t-extend="wysiwyg.widgets.document">
<t t-jquery="t[t-set='urlPlaceholder']" t-operation="inner">
https://www.example.com/mydocument
</t>
</t>
</t>
</templates>

View File

@ -0,0 +1,3 @@
# License MIT (https://opensource.org/licenses/MIT).
from . import test_misc

View File

@ -0,0 +1,19 @@
# Copyright 2019 Eugene Molotov <https://github.com/em230418>
# License MIT (https://opensource.org/licenses/MIT).
import odoo.tests
from ..models.ir_translation import debrand_bytes
@odoo.tests.common.tagged("at_install", "post_install")
class TestMisc(odoo.tests.TransactionCase):
def test_debrand_bytes(self):
env = self.env
env["ir.config_parameter"].sudo().set_param(
"web_debranding.new_name", "SuperName"
)
assert debrand_bytes(env, b"odoo") == b"SuperName"
assert debrand_bytes(env, "odoo") == b"SuperName"
assert debrand_bytes(env, b"test") == b"test"
assert debrand_bytes(env, "test") == b"test"

View File

@ -0,0 +1,36 @@
# Copyright 2022-2023 Ivan Yelizariev <https://twitter.com/yelizariev>
# License OPL-1 (https://www.odoo.com/documentation/user/14.0/legal/licenses/licenses.html#odoo-apps)
import inspect
import logging
import types
import odoo
from odoo.tools.translate import _
from .models.ir_translation import debrand
_logger = logging.getLogger(__name__)
_get_translation_original = _.get_translation
def _get_translation(self, source, module=None):
source = _get_translation_original(source, module)
frame = inspect.currentframe().f_back.f_back
try:
(cr, dummy) = _._get_cr(frame, allow_create=False)
except AttributeError:
return source
try:
uid = self._get_uid(frame)
except Exception:
return source
if cr and uid:
env = odoo.api.Environment(cr, uid, {})
source = debrand(env, source)
return source
_.get_translation = types.MethodType(_get_translation, _)

40
web_debranding/views.xml Normal file
View File

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--Copyright 2015-2018,2020,2022 Ivan Yelizariev <https://twitter.com/yelizariev>
Copyright 2015 igallyamov <https://github.com/igallyamov>
Copyright 2016 Stanislav Krotov <https://it-projects.info/team/ufaks>
Copyright 2017 Ilmir Karamov <https://it-projects.info/team/ilmir-k>
Copyright 2017 auyeung112002 <https://github.com/auyeung112002>
Copyright 2020 Denis Mudarisov <https://it-projects.info/team/trojikman>
License MIT (https://opensource.org/licenses/MIT).
License OPL-1 (https://www.odoo.com/documentation/user/14.0/legal/licenses/licenses.html#odoo-apps) for derivative work.-->
<odoo>
<template id="login_layout" inherit_id="web.login_layout" priority="8">
<xpath expr="//div[@t-if='not disable_footer']" position="replace" />
</template>
<template id="web_layout" inherit_id="web.layout">
<xpath expr="//title" position="replace">
<title t-out="title" />
</xpath>
<xpath expr="//link[@rel='shortcut icon']" position="replace">
<t
t-set="favicon"
t-value="request and request.env['ir.config_parameter'].sudo().get_param('web_debranding.favicon_url', '')"
/>
<link
t-if="favicon"
rel="shortcut icon"
t-att-href="favicon"
type="image/x-icon"
/>
</xpath>
</template>
<template
id="brand_promotion_message"
inherit_id="web.brand_promotion_message"
priority="99"
>
<xpath expr="//t[@t-out]" position="replace">
</xpath>
</template>
</odoo>

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2018 Ivan Yelizariev <https://it-projects.info/team/yelizariev>
License OPL-1 (https://www.odoo.com/documentation/user/14.0/legal/licenses/licenses.html#odoo-apps).-->
<odoo>
<record id="res_config_settings_view_form" model="ir.ui.view">
<field name="name">res.config.settings.view.form.web_debranding</field>
<field name="model">res.config.settings</field>
<field name="inherit_id" ref="base_setup.res_config_settings_view_form" />
<field name="priority" eval="99" />
<field name="arch" type="xml">
<!-- delete android/iOS apps links -->
<xpath expr="//div[@id='about']" position="replace">
</xpath>
</field>
</record>
</odoo>