diff --git a/setup/web_company_context_highlight/odoo/addons/web_company_context_highlight b/setup/web_company_context_highlight/odoo/addons/web_company_context_highlight new file mode 120000 index 000000000000..56319ff076b4 --- /dev/null +++ b/setup/web_company_context_highlight/odoo/addons/web_company_context_highlight @@ -0,0 +1 @@ +../../../../web_company_context_highlight \ No newline at end of file diff --git a/setup/web_company_context_highlight/setup.py b/setup/web_company_context_highlight/setup.py new file mode 100644 index 000000000000..28c57bb64031 --- /dev/null +++ b/setup/web_company_context_highlight/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) diff --git a/web_company_context_highlight/README.rst b/web_company_context_highlight/README.rst new file mode 100644 index 000000000000..dd3604a63d91 --- /dev/null +++ b/web_company_context_highlight/README.rst @@ -0,0 +1,115 @@ +.. image:: https://odoo-community.org/readme-banner-image + :target: https://odoo-community.org/get-involved?utm_source=readme + :alt: Odoo Community Association + +============================= +Web Company Context Highlight +============================= + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:c430fb18f50a6b23688d23cddf31b3343447d8c5154739dc1911be05e79916e8 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png + :target: https://odoo-community.org/page/development-status + :alt: Alpha +.. |badge2| image:: https://img.shields.io/badge/license-LGPL--3-blue.png + :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github + :target: https://github.com/OCA/web/tree/16.0/web_company_context_highlight + :alt: OCA/web +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/web-16-0/web-16-0-web_company_context_highlight + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/web&target_branch=16.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module highlights the company switcher in the top bar of the web +client when multiple companies are selected. + +In a multi-company Odoo environment, users can easily lose track of +their active company context. When more than one company is selected, +they might unintentionally create or view records in the wrong context. + +By applying a visual highlight to the company switcher when multiple +companies are selected, this module provides an immediate visual cue, +helping users remain aware of their active companies and reducing the +risk of data entry errors. + +- with multiple companies selected + + |web_company_context_highlight_multiple_companies_selected| + +- with one company selected + + |web_company_context_highlight_one_company_selected| + +.. |web_company_context_highlight_multiple_companies_selected| image:: https://raw.githubusercontent.com/OCA/web/16.0/web_company_context_highlight/static/img/web_company_context_highlight_multiple_companies_selected.png +.. |web_company_context_highlight_one_company_selected| image:: https://raw.githubusercontent.com/OCA/web/16.0/web_company_context_highlight/static/img/web_company_context_highlight_one_company_selected.png + +.. IMPORTANT:: + This is an alpha version, the data model and design can change at any time without warning. + Only for development or testing purpose, do not use in production. + `More details on development status `_ + +**Table of contents** + +.. contents:: + :local: + +Known issues / Roadmap +====================== + +backport configuration introduced by original PR +(https://github.com/OCA/web/pull/3611). + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +------- + +* Acsone + +Maintainers +----------- + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +.. |maintainer-pverkest| image:: https://github.com/pverkest.png?size=40px + :target: https://github.com/pverkest + :alt: pverkest + +Current `maintainer `__: + +|maintainer-pverkest| + +This module is part of the `OCA/web `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/web_company_context_highlight/__init__.py b/web_company_context_highlight/__init__.py new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/web_company_context_highlight/__manifest__.py b/web_company_context_highlight/__manifest__.py new file mode 100644 index 000000000000..d79e1d66627c --- /dev/null +++ b/web_company_context_highlight/__manifest__.py @@ -0,0 +1,22 @@ +# Copyright 2026 Acsone +# @author Pierre Verkest +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). + +{ + "name": "Web Company Context Highlight", + "summary": "Highlight the company switcher when multiple companies are selected", + "version": "16.0.1.0.0", + "author": "Acsone, Odoo Community Association (OCA)", + "maintainers": ["pverkest"], + "website": "https://github.com/OCA/web", + "development_status": "Alpha", + "license": "LGPL-3", + "category": "Web", + "depends": ["web", "base_setup"], + "assets": { + "web.assets_backend": [ + "web_company_context_highlight/static/src/**/*.scss", + "web_company_context_highlight/static/src/**/*.xml", + ], + }, +} diff --git a/web_company_context_highlight/pyproject.toml b/web_company_context_highlight/pyproject.toml new file mode 100644 index 000000000000..4231d0cccb3d --- /dev/null +++ b/web_company_context_highlight/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/web_company_context_highlight/readme/DESCRIPTION.md b/web_company_context_highlight/readme/DESCRIPTION.md new file mode 100644 index 000000000000..1934d6032545 --- /dev/null +++ b/web_company_context_highlight/readme/DESCRIPTION.md @@ -0,0 +1,13 @@ +This module highlights the company switcher in the top bar of the web client when multiple companies are selected. + +In a multi-company Odoo environment, users can easily lose track of their active company context. When more than one company is selected, they might unintentionally create or view records in the wrong context. + +By applying a visual highlight to the company switcher when multiple companies are selected, this module provides an immediate visual cue, helping users remain aware of their active companies and reducing the risk of data entry errors. + +* with multiple companies selected + + ![web_company_context_highlight_multiple_companies_selected](../static/img/web_company_context_highlight_multiple_companies_selected.png) + +* with one company selected + + ![web_company_context_highlight_one_company_selected](../static/img/web_company_context_highlight_one_company_selected.png) diff --git a/web_company_context_highlight/readme/ROADMAP.md b/web_company_context_highlight/readme/ROADMAP.md new file mode 100644 index 000000000000..93289bb89ed6 --- /dev/null +++ b/web_company_context_highlight/readme/ROADMAP.md @@ -0,0 +1 @@ +backport configuration introduced by original PR (https://github.com/OCA/web/pull/3611). \ No newline at end of file diff --git a/web_company_context_highlight/static/description/index.html b/web_company_context_highlight/static/description/index.html new file mode 100644 index 000000000000..704f5a5f0f0f --- /dev/null +++ b/web_company_context_highlight/static/description/index.html @@ -0,0 +1,452 @@ + + + + + +README.rst + + + +
+ + + +Odoo Community Association + +
+

Web Company Context Highlight

+ +

Alpha License: LGPL-3 OCA/web Translate me on Weblate Try me on Runboat

+

This module highlights the company switcher in the top bar of the web +client when multiple companies are selected.

+

In a multi-company Odoo environment, users can easily lose track of +their active company context. When more than one company is selected, +they might unintentionally create or view records in the wrong context.

+

By applying a visual highlight to the company switcher when multiple +companies are selected, this module provides an immediate visual cue, +helping users remain aware of their active companies and reducing the +risk of data entry errors.

+
    +
  • with multiple companies selected

    +

    web_company_context_highlight_multiple_companies_selected

    +
  • +
  • with one company selected

    +

    web_company_context_highlight_one_company_selected

    +
  • +
+
+

Important

+

This is an alpha version, the data model and design can change at any time without warning. +Only for development or testing purpose, do not use in production. +More details on development status

+
+

Table of contents

+ +
+

Known issues / Roadmap

+

backport configuration introduced by original PR +(https://github.com/OCA/web/pull/3611).

+
+
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Acsone
  • +
+
+
+

Maintainers

+

This module is maintained by the OCA.

+ +Odoo Community Association + +

OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

+

Current maintainer:

+

pverkest

+

This module is part of the OCA/web project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+
+ + diff --git a/web_company_context_highlight/static/img/web_company_context_highlight_multiple_companies_selected.png b/web_company_context_highlight/static/img/web_company_context_highlight_multiple_companies_selected.png new file mode 100644 index 000000000000..96fab55aa4f9 Binary files /dev/null and b/web_company_context_highlight/static/img/web_company_context_highlight_multiple_companies_selected.png differ diff --git a/web_company_context_highlight/static/img/web_company_context_highlight_one_company_selected.png b/web_company_context_highlight/static/img/web_company_context_highlight_one_company_selected.png new file mode 100644 index 000000000000..8ad3633af4a9 Binary files /dev/null and b/web_company_context_highlight/static/img/web_company_context_highlight_one_company_selected.png differ diff --git a/web_company_context_highlight/static/src/scss/switch_company_menu.scss b/web_company_context_highlight/static/src/scss/switch_company_menu.scss new file mode 100644 index 000000000000..e6b7c476bf41 --- /dev/null +++ b/web_company_context_highlight/static/src/scss/switch_company_menu.scss @@ -0,0 +1,7 @@ +.o_company_context_highlighted { + background-color: #ffc107 !important; + color: #212529 !important; + border-radius: 4px; + font-weight: bold; + padding: 6px; +} diff --git a/web_company_context_highlight/static/src/xml/switch_company_menu.xml b/web_company_context_highlight/static/src/xml/switch_company_menu.xml new file mode 100644 index 000000000000..375fcc4b0562 --- /dev/null +++ b/web_company_context_highlight/static/src/xml/switch_company_menu.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + +