diff --git a/web_debranding/README.rst b/web_debranding/README.rst deleted file mode 100644 index 9191f7bf..00000000 --- a/web_debranding/README.rst +++ /dev/null @@ -1,65 +0,0 @@ -.. 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 `__ 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 `__ (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 `__ - - -Further information -=================== - -Odoo Apps Store: https://www.odoo.com/apps/modules/17.0/web_debranding/ - -Notifications on updates: `via Atom `_, `by Email `_ - -Tested on `Odoo 17.0 `_ diff --git a/web_debranding/__init__.py b/web_debranding/__init__.py deleted file mode 100644 index c518d00d..00000000 --- a/web_debranding/__init__.py +++ /dev/null @@ -1,14 +0,0 @@ -# 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]) diff --git a/web_debranding/__manifest__.py b/web_debranding/__manifest__.py deleted file mode 100644 index c17c4aa1..00000000 --- a/web_debranding/__manifest__.py +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright 2015-2023 Ivan Yelizariev -# Copyright 2017 Ilmir Karamov -# Copyright 2018-2019 Kolushov Alexandr -# Copyright 2018 Ildar Nasyrov -# Copyright 2018 WohthaN -# Copyright 2019-2020 Eugene Molotov -# Copyright 2020 Denis Mudarisov -# 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, -} diff --git a/web_debranding/controllers/__init__.py b/web_debranding/controllers/__init__.py deleted file mode 100644 index 9153c2c3..00000000 --- a/web_debranding/controllers/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# License MIT (https://opensource.org/licenses/MIT). - -from . import main diff --git a/web_debranding/controllers/main.py b/web_debranding/controllers/main.py deleted file mode 100644 index 4626fce8..00000000 --- a/web_debranding/controllers/main.py +++ /dev/null @@ -1,104 +0,0 @@ -# Copyright 2015-2018,2020 Ivan Yelizariev -# Copyright 2016 Stanislav Krotov -# Copyright 2017 Ilmir Karamov -# Copyright 2017 Nicolas JEUDY -# Copyright 2017 Ildar Nasyrov -# Copyright 2018 Kolushov Alexandr -# 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 diff --git a/web_debranding/data.xml b/web_debranding/data.xml deleted file mode 100644 index dfdfd3ca..00000000 --- a/web_debranding/data.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - web_debranding.default_logo_module - web_debranding - - - Bot - bot@example.com - - diff --git a/web_debranding/doc/changelog.rst b/web_debranding/doc/changelog.rst deleted file mode 100644 index fe40e857..00000000 --- a/web_debranding/doc/changelog.rst +++ /dev/null @@ -1,213 +0,0 @@ -`3.0.0` --------- - -- **Fix:** module installation was crashed because of `recent update in Odoo v16 `__ - -`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 diff --git a/web_debranding/doc/index.rst b/web_debranding/doc/index.rst deleted file mode 100644 index 68c8ce26..00000000 --- a/web_debranding/doc/index.rst +++ /dev/null @@ -1,79 +0,0 @@ -==================== - Backend debranding -==================== - -Installation -============ - -* `Install `__ 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 `__ below. - -Further debranding -================== - -* Install `portal_debranding `__ if module *Portal* is already installed in your system -* Install `website_debranding `__ if module *Website Builder* is already installed in your system -* Install `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 `__ 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 `__ 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 diff --git a/web_debranding/doc/src/index.html b/web_debranding/doc/src/index.html deleted file mode 100644 index 387c90db..00000000 --- a/web_debranding/doc/src/index.html +++ /dev/null @@ -1,70 +0,0 @@ -
- -
- -
-
-
-
    -
  1. Replaces "Odoo" in page title
  2. -
  3. - Deletes Documentation, Support, About links from the top right-hand User Menu. -
  4. -
  5. Replaces "Odoo" in Dialog Box
  6. -
  7. Replaces "Odoo" in all strings marked for translation
  8. -
  9. Replaces "odoo.com" in hints, examples, etc.
  10. -
  11. Hides Enterprise features in Settings
  12. -
  13. - Replaces links to - documentation (e.g. "Help" - in Import tool, "How-to" in paypal, etc.) to custom website -
  14. -
  15. Deletes Google Play, Apps Store links
  16. -
  17. Deletes "Powered by Odoo" in Website (when installed)
  18. -
  19. - Disables server requests to odoo.com (publisher_warranty_url) - optional. - Works only for non-enterprise versions of odoo -
  20. -
-
-
-
diff --git a/web_debranding/doc/src/info.yaml b/web_debranding/doc/src/info.yaml deleted file mode 100644 index 8b8cf654..00000000 --- a/web_debranding/doc/src/info.yaml +++ /dev/null @@ -1,3 +0,0 @@ -slogan: - Build and enhance your Brand by removing references to odoo.com diff --git a/web_debranding/i18n/es_CR.po b/web_debranding/i18n/es_CR.po deleted file mode 100644 index 99fa5205..00000000 --- a/web_debranding/i18n/es_CR.po +++ /dev/null @@ -1,164 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * web_debranding -# -# Translators: -# Randall , 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 , 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" diff --git a/web_debranding/i18n/ru.po b/web_debranding/i18n/ru.po deleted file mode 100644 index e098d793..00000000 --- a/web_debranding/i18n/ru.po +++ /dev/null @@ -1,155 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * web_debranding -# -# Translators: -# Translation Bot , 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 , 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 "" diff --git a/web_debranding/i18n/web_debranding.pot b/web_debranding/i18n/web_debranding.pot deleted file mode 100644 index b58ae6e5..00000000 --- a/web_debranding/i18n/web_debranding.pot +++ /dev/null @@ -1,167 +0,0 @@ -# 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 "" - diff --git a/web_debranding/images/web_debranding.png b/web_debranding/images/web_debranding.png deleted file mode 100644 index dbf25a00..00000000 Binary files a/web_debranding/images/web_debranding.png and /dev/null differ diff --git a/web_debranding/models/__init__.py b/web_debranding/models/__init__.py deleted file mode 100644 index 4b64a1d9..00000000 --- a/web_debranding/models/__init__.py +++ /dev/null @@ -1,14 +0,0 @@ -# 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 diff --git a/web_debranding/models/base.py b/web_debranding/models/base.py deleted file mode 100644 index 0c4a8f3a..00000000 --- a/web_debranding/models/base.py +++ /dev/null @@ -1,24 +0,0 @@ -# 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 diff --git a/web_debranding/models/ir_actions.py b/web_debranding/models/ir_actions.py deleted file mode 100644 index 9f86023a..00000000 --- a/web_debranding/models/ir_actions.py +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright 2015-2018 Ivan Yelizariev -# Copyright 2017 Ilmir Karamov -# 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 diff --git a/web_debranding/models/ir_config_parameter.py b/web_debranding/models/ir_config_parameter.py deleted file mode 100644 index 9ba9fed4..00000000 --- a/web_debranding/models/ir_config_parameter.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright 2015-2018,2022 Ivan Yelizariev -# Copyright 2016 Stanislav Krotov -# Copyright 2017 ArtyomLosev -# Copyright 2017 Ilmir Karamov -# Copyright 2018 Kolushov Alexandr -# Copyright 2019 Eugene Molotov -# 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 " ") diff --git a/web_debranding/models/ir_http.py b/web_debranding/models/ir_http.py deleted file mode 100644 index 0d8bc660..00000000 --- a/web_debranding/models/ir_http.py +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright 2022 Ivan 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 diff --git a/web_debranding/models/ir_model.py b/web_debranding/models/ir_model.py deleted file mode 100644 index 42124dbc..00000000 --- a/web_debranding/models/ir_model.py +++ /dev/null @@ -1,13 +0,0 @@ -# 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] diff --git a/web_debranding/models/ir_module_module.py b/web_debranding/models/ir_module_module.py deleted file mode 100644 index 1545676e..00000000 --- a/web_debranding/models/ir_module_module.py +++ /dev/null @@ -1,10 +0,0 @@ -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) diff --git a/web_debranding/models/ir_translation.py b/web_debranding/models/ir_translation.py deleted file mode 100644 index cbfac26a..00000000 --- a/web_debranding/models/ir_translation.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2015-2018,2020,2022 Ivan Yelizariev -# Copyright 2016 Stanislav Krotov -# Copyright 2017 Ilmir Karamov -# Copyright 2017 Nicolas JEUDY -# Copyright 2018 Kolushov Alexandr -# Copyright 2018 Ildar Nasyrov -# Copyright 2019 Eugene 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(? - 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] \ No newline at end of file diff --git a/web_debranding/models/ir_ui_view.py b/web_debranding/models/ir_ui_view.py deleted file mode 100644 index 2a7cfb09..00000000 --- a/web_debranding/models/ir_ui_view.py +++ /dev/null @@ -1,73 +0,0 @@ -# Copyright 2016-2018 Ivan Yelizariev -# Copyright 2017 ArtyomLosev -# Copyright 2017 Ilmir Karamov -# Copyright 2022 IT-Projects -# 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 diff --git a/web_debranding/models/publisher_warranty_contract.py b/web_debranding/models/publisher_warranty_contract.py deleted file mode 100644 index 75205c5f..00000000 --- a/web_debranding/models/publisher_warranty_contract.py +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright 2015-2018 Ivan Yelizariev -# Copyright 2016 Stanislav Krotov -# Copyright 2017 Ilmir Karamov -# 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 diff --git a/web_debranding/models/res_company.py b/web_debranding/models/res_company.py deleted file mode 100644 index 2cc31dc5..00000000 --- a/web_debranding/models/res_company.py +++ /dev/null @@ -1,12 +0,0 @@ -# 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) diff --git a/web_debranding/models/res_config_settings.py b/web_debranding/models/res_config_settings.py deleted file mode 100644 index d3c6e231..00000000 --- a/web_debranding/models/res_config_settings.py +++ /dev/null @@ -1,73 +0,0 @@ -# Copyright 2021-2022 Ivan 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 diff --git a/web_debranding/models/res_users.py b/web_debranding/models/res_users.py deleted file mode 100644 index 219b583a..00000000 --- a/web_debranding/models/res_users.py +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright 2018 Kolushov Alexandr -# 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") diff --git a/web_debranding/pre_install.xml b/web_debranding/pre_install.xml deleted file mode 100644 index aa865017..00000000 --- a/web_debranding/pre_install.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/web_debranding/static/description/Group.png b/web_debranding/static/description/Group.png deleted file mode 100644 index 1480958f..00000000 Binary files a/web_debranding/static/description/Group.png and /dev/null differ diff --git a/web_debranding/static/description/Group2.png b/web_debranding/static/description/Group2.png deleted file mode 100644 index 1287a996..00000000 Binary files a/web_debranding/static/description/Group2.png and /dev/null differ diff --git a/web_debranding/static/description/Group3.png b/web_debranding/static/description/Group3.png deleted file mode 100644 index 62ad6c0c..00000000 Binary files a/web_debranding/static/description/Group3.png and /dev/null differ diff --git a/web_debranding/static/description/Group4.png b/web_debranding/static/description/Group4.png deleted file mode 100644 index bea6a0b6..00000000 Binary files a/web_debranding/static/description/Group4.png and /dev/null differ diff --git a/web_debranding/static/description/Group5.png b/web_debranding/static/description/Group5.png deleted file mode 100644 index 0479d035..00000000 Binary files a/web_debranding/static/description/Group5.png and /dev/null differ diff --git a/web_debranding/static/description/Group6.png b/web_debranding/static/description/Group6.png deleted file mode 100644 index d8ca5b1d..00000000 Binary files a/web_debranding/static/description/Group6.png and /dev/null differ diff --git a/web_debranding/static/description/icon.png b/web_debranding/static/description/icon.png deleted file mode 100644 index b43a0a13..00000000 Binary files a/web_debranding/static/description/icon.png and /dev/null differ diff --git a/web_debranding/static/description/index.html b/web_debranding/static/description/index.html deleted file mode 100644 index 9e326c20..00000000 --- a/web_debranding/static/description/index.html +++ /dev/null @@ -1,168 +0,0 @@ - -
-
-
-
-

Backend debranding

-

Build and enhance your Brand by removing references to odoo.com

-

Version: v17.0.3.0.0

-
-
-
-

- -
Tested and maintained by -
IT Projects Labs -
Assistance: apps@itpp.dev -

-
-
-
- - -
- -
- -
-
-
-
    -
  1. Replaces "Odoo" in page title
  2. -
  3. - Deletes Documentation, Support, About links from the top right-hand User Menu. -
  4. -
  5. Replaces "Odoo" in Dialog Box
  6. -
  7. Replaces "Odoo" in all strings marked for translation
  8. -
  9. Replaces "odoo.com" in hints, examples, etc.
  10. -
  11. Hides Enterprise features in Settings
  12. -
  13. - Replaces links to - documentation (e.g. "Help" - in Import tool, "How-to" in paypal, etc.) to custom website -
  14. -
  15. Deletes Google Play, Apps Store links
  16. -
  17. Deletes "Powered by Odoo" in Website (when installed)
  18. -
  19. - Disables server requests to odoo.com (publisher_warranty_url) - optional. - Works only for non-enterprise versions of odoo -
  20. -
-
-
-
- - - -
-
-

Let our expertise work for you!

-

(Doors and windows below are clickable)

- -
- - - Free Modules - Sync Studio - REST API - Webhooks - POS: show product qty - All modules - All POS modules - All Mail modules - All Website modules - All eCommerce modules - Ivan Yelizariev - Web Login Background - -
-
- - - Free Modules - Sync Studio - REST API - Webhooks - POS: show product qty - All modules - All POS modules - All Mail modules - All Website modules - All eCommerce modules - Ivan Yelizariev - Web Login Background - -
-
- - - Free Modules - Sync Studio - REST API - Webhooks - POS: show product qty - All modules - All POS modules - All Mail modules - All Website modules - All eCommerce modules - Ivan Yelizariev - Web Login Background - -
-
-
- diff --git a/web_debranding/static/src/css/web.css b/web_debranding/static/src/css/web.css deleted file mode 100644 index 92ffef93..00000000 --- a/web_debranding/static/src/css/web.css +++ /dev/null @@ -1,3 +0,0 @@ -.o_application_switcher .o_application_switcher_footer { - display: none; -} diff --git a/web_debranding/static/src/img/logo.png b/web_debranding/static/src/img/logo.png deleted file mode 100644 index 639bbf85..00000000 Binary files a/web_debranding/static/src/img/logo.png and /dev/null differ diff --git a/web_debranding/static/src/img/nologo.png b/web_debranding/static/src/img/nologo.png deleted file mode 100644 index 639bbf85..00000000 Binary files a/web_debranding/static/src/img/nologo.png and /dev/null differ diff --git a/web_debranding/static/src/js/base.js b/web_debranding/static/src/js/base.js deleted file mode 100644 index 042d4f56..00000000 --- a/web_debranding/static/src/js/base.js +++ /dev/null @@ -1,38 +0,0 @@ -/** @odoo-module **/ -/* Copyright 2015-2018,2022-2023 Ivan Yelizariev - Copyright 2017 ArtyomLosev - Copyright 2022 IT-Projects - 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(); - }, -}); diff --git a/web_debranding/static/src/js/dialog.js b/web_debranding/static/src/js/dialog.js deleted file mode 100644 index 4d31cb5a..00000000 --- a/web_debranding/static/src/js/dialog.js +++ /dev/null @@ -1,25 +0,0 @@ -/** @odoo-module **/ -/* Copyright 2015-2018,2021,2023 Ivan Yelizariev - Copyright 2015 igallyamov - Copyright 2017 Gabbasov Dinar - Copyright 2022 IT-Projects - 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(); - }, -}); diff --git a/web_debranding/static/src/js/field_upgrade.js b/web_debranding/static/src/js/field_upgrade.js deleted file mode 100644 index 944af96a..00000000 --- a/web_debranding/static/src/js/field_upgrade.js +++ /dev/null @@ -1,26 +0,0 @@ -/** @odoo-module **/ -/* Copyright 2023 Ivan 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; - }, -}); diff --git a/web_debranding/static/src/js/translation.js b/web_debranding/static/src/js/translation.js deleted file mode 100644 index 090fbe79..00000000 --- a/web_debranding/static/src/js/translation.js +++ /dev/null @@ -1,30 +0,0 @@ -/** @odoo-module **/ -/* Copyright 2022-2023 Ivan 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; -}; diff --git a/web_debranding/static/src/js/user_menu_items.js b/web_debranding/static/src/js/user_menu_items.js deleted file mode 100644 index d2ca7515..00000000 --- a/web_debranding/static/src/js/user_menu_items.js +++ /dev/null @@ -1,9 +0,0 @@ -/** @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"); diff --git a/web_debranding/static/src/xml/upgradeEnterprise.xml b/web_debranding/static/src/xml/upgradeEnterprise.xml deleted file mode 100644 index 7b7f0b65..00000000 --- a/web_debranding/static/src/xml/upgradeEnterprise.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - -
- - - - diff --git a/web_debranding/static/src/xml/web.xml b/web_debranding/static/src/xml/web.xml deleted file mode 100644 index b1116a58..00000000 --- a/web_debranding/static/src/xml/web.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - https://www.example.com/logo.png - - - - - - https://www.example.com/mydocument - - - - diff --git a/web_debranding/tests/__init__.py b/web_debranding/tests/__init__.py deleted file mode 100644 index 93a43037..00000000 --- a/web_debranding/tests/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# License MIT (https://opensource.org/licenses/MIT). - -from . import test_misc diff --git a/web_debranding/tests/test_misc.py b/web_debranding/tests/test_misc.py deleted file mode 100644 index 0d157509..00000000 --- a/web_debranding/tests/test_misc.py +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright 2019 Eugene Molotov -# 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" diff --git a/web_debranding/translate.py b/web_debranding/translate.py deleted file mode 100644 index 29d8da45..00000000 --- a/web_debranding/translate.py +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright 2022-2023 Ivan 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, _) diff --git a/web_debranding/views.xml b/web_debranding/views.xml deleted file mode 100644 index 04d299be..00000000 --- a/web_debranding/views.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - -