Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ addon | version | maintainers | summary
--- | --- | --- | ---
[web_calendar_slot_duration](web_calendar_slot_duration/) | 19.0.1.0.0 | <a href='https://github.com/Yajo'><img src='https://github.com/Yajo.png' width='32' height='32' style='border-radius:50%;' alt='Yajo'/></a> | Customizable calendar slot durations
[web_chatter_position](web_chatter_position/) | 19.0.1.0.0 | <a href='https://github.com/trisdoan'><img src='https://github.com/trisdoan.png' width='32' height='32' style='border-radius:50%;' alt='trisdoan'/></a> | Add an option to change the chatter position
[web_company_context_highlight](web_company_context_highlight/) | 19.0.1.0.0 | <a href='https://github.com/pverkest'><img src='https://github.com/pverkest.png' width='32' height='32' style='border-radius:50%;' alt='pverkest'/></a> | Highlight the company switcher when multiple companies are selected
[web_dark_mode](web_dark_mode/) | 19.0.1.0.0 | | Enabled Dark Mode for the Odoo Backend
[web_date_format_numeric](web_date_format_numeric/) | 19.0.1.0.0 | | Display all date/datetime fields in numeric format
[web_dialog_size](web_dialog_size/) | 19.0.1.0.0 | | A module that lets the user expand a dialog box to the full screen width.
Expand All @@ -40,7 +41,7 @@ addon | version | maintainers | summary
[web_pwa_customize](web_pwa_customize/) | 19.0.1.0.0 | <a href='https://github.com/victoralmau'><img src='https://github.com/victoralmau.png' width='32' height='32' style='border-radius:50%;' alt='victoralmau'/></a> | Web Pwa Customize
[web_refresher](web_refresher/) | 19.0.1.0.0 | | Web Refresher
[web_remember_tree_column_width](web_remember_tree_column_width/) | 19.0.1.0.0 | <a href='https://github.com/frahikLV'><img src='https://github.com/frahikLV.png' width='32' height='32' style='border-radius:50%;' alt='frahikLV'/></a> <a href='https://github.com/luisg123v'><img src='https://github.com/luisg123v.png' width='32' height='32' style='border-radius:50%;' alt='luisg123v'/></a> <a href='https://github.com/cuongnmtm'><img src='https://github.com/cuongnmtm.png' width='32' height='32' style='border-radius:50%;' alt='cuongnmtm'/></a> | Remember the tree columns' widths across sessions.
[web_responsive](web_responsive/) | 19.0.1.0.3 | <a href='https://github.com/Tardo'><img src='https://github.com/Tardo.png' width='32' height='32' style='border-radius:50%;' alt='Tardo'/></a> <a href='https://github.com/SplashS'><img src='https://github.com/SplashS.png' width='32' height='32' style='border-radius:50%;' alt='SplashS'/></a> | Responsive web client, community-supported
[web_responsive](web_responsive/) | 19.0.1.1.0 | <a href='https://github.com/Tardo'><img src='https://github.com/Tardo.png' width='32' height='32' style='border-radius:50%;' alt='Tardo'/></a> <a href='https://github.com/SplashS'><img src='https://github.com/SplashS.png' width='32' height='32' style='border-radius:50%;' alt='SplashS'/></a> | Responsive web client, community-supported
[web_search_with_and](web_search_with_and/) | 19.0.1.0.0 | | Use AND conditions on omnibar search
[web_timeline](web_timeline/) | 19.0.1.0.0 | | Interactive visualization chart to show events in time
[web_tree_many2one_clickable](web_tree_many2one_clickable/) | 19.0.1.0.0 | | Open the linked resource when clicking on their name
Expand Down
3 changes: 2 additions & 1 deletion setup/_metapackage/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
[project]
name = "odoo-addons-oca-web"
version = "19.0.20260728.0"
version = "19.0.20260803.0"
dependencies = [
"odoo-addon-web_calendar_slot_duration==19.0.*",
"odoo-addon-web_chatter_position==19.0.*",
"odoo-addon-web_company_context_highlight==19.0.*",
"odoo-addon-web_dark_mode==19.0.*",
"odoo-addon-web_date_format_numeric==19.0.*",
"odoo-addon-web_dialog_size==19.0.*",
Expand Down
128 changes: 128 additions & 0 deletions web_company_context_highlight/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
.. 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:e7d371068bb835bfcf14b5909de48dd0900be0bac8a939338d49e966b337af09
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |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/19.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-19-0/web-19-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=19.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

|company switcher with multiple companies selected|

- with one company selected

|company switcher with one company selected|

.. |company switcher with multiple companies selected| image:: https://raw.githubusercontent.com/OCA/web/19.0/web_company_context_highlight/static/img/web_company_context_highlight_multiple_companies_selected.png
.. |company switcher with one company selected| image:: https://raw.githubusercontent.com/OCA/web/19.0/web_company_context_highlight/static/img/web_company_context_highlight_one_company_selected.png

**Table of contents**

.. contents::
:local:

Configuration
=============

To configure the highlight colors:

1. Go to **Settings** > **General Settings**.
2. Scroll to the **Companies** section.
3. Under **Company Switcher Highlight**, set the desired **Background
Color** and **Text Color** using the color pickers.
4. Click **Save**.

|color configuration|

Alternatively, you can configure these values by modifying the following
System Parameters (in debug mode, under **Settings** > **Technical** >
**System Parameters**):

- ``web_company_context_highlight.color``: The background color code
(default: ``#ffc107``).
- ``web_company_context_highlight.text_color``: The text color code
(default: ``#212529``).

.. |color configuration| image:: https://raw.githubusercontent.com/OCA/web/19.0/web_company_context_highlight/static/img/web_company_context_highlight_config_color.png

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/web/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 <https://github.com/OCA/web/issues/new?body=module:%20web_company_context_highlight%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

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 <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-pverkest|

This module is part of the `OCA/web <https://github.com/OCA/web/tree/19.0/web_company_context_highlight>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
3 changes: 3 additions & 0 deletions web_company_context_highlight/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).

from . import models
26 changes: 26 additions & 0 deletions web_company_context_highlight/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Copyright 2026 Acsone
# @author Pierre Verkest <pierre.verkest@apycod.fr>
# 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": "19.0.1.0.0",
"author": "Acsone, Odoo Community Association (OCA)",
"maintainers": ["pverkest"],
"website": "https://github.com/OCA/web",
"license": "LGPL-3",
"category": "Web",
"depends": ["web", "base_setup"],
"data": ["views/res_config_settings_views.xml"],
"assets": {
"web.assets_backend": [
"web_company_context_highlight/static/src/**/*.js",
"web_company_context_highlight/static/src/**/*.scss",
"web_company_context_highlight/static/src/**/*.xml",
],
"web.assets_tests": [
"web_company_context_highlight/static/tests/tours/**/*.js",
],
},
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * web_company_context_highlight
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 19.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_company_context_highlight
#: model_terms:ir.ui.view,arch_db:web_company_context_highlight.res_config_settings_view_form
msgid "Background Color"
msgstr ""

#. module: web_company_context_highlight
#: model:ir.model.fields,help:web_company_context_highlight.field_res_config_settings__web_company_context_highlight_color
msgid ""
"Background color used to highlight the company switcher when in multi-"
"company context."
msgstr ""

#. module: web_company_context_highlight
#: model:ir.model.fields,field_description:web_company_context_highlight.field_res_config_settings__web_company_context_highlight_color
msgid "Company Highlight Color"
msgstr ""

#. module: web_company_context_highlight
#: model:ir.model.fields,field_description:web_company_context_highlight.field_res_config_settings__web_company_context_highlight_text_color
msgid "Company Highlight Text Color"
msgstr ""

#. module: web_company_context_highlight
#: model_terms:ir.ui.view,arch_db:web_company_context_highlight.res_config_settings_view_form
msgid "Company Switcher Highlight"
msgstr ""

#. module: web_company_context_highlight
#: model:ir.model,name:web_company_context_highlight.model_res_config_settings
msgid "Config Settings"
msgstr ""

#. module: web_company_context_highlight
#: model_terms:ir.ui.view,arch_db:web_company_context_highlight.res_config_settings_view_form
msgid ""
"Configure background and text colors to highlight the company switcher when "
"multiple companies are selected."
msgstr ""

#. module: web_company_context_highlight
#: model:ir.model.fields,field_description:web_company_context_highlight.field_ir_http__display_name
#: model:ir.model.fields,field_description:web_company_context_highlight.field_res_config_settings__display_name
msgid "Display Name"
msgstr ""

#. module: web_company_context_highlight
#: model:ir.model,name:web_company_context_highlight.model_ir_http
msgid "HTTP Routing"
msgstr ""

#. module: web_company_context_highlight
#: model:ir.model.fields,field_description:web_company_context_highlight.field_ir_http__id
#: model:ir.model.fields,field_description:web_company_context_highlight.field_res_config_settings__id
msgid "ID"
msgstr ""

#. module: web_company_context_highlight
#. odoo-javascript
#: code:addons/web_company_context_highlight/static/src/xml/switch_company_menu.xml:0
msgid "Multi-company context active"
msgstr ""

#. module: web_company_context_highlight
#: model_terms:ir.ui.view,arch_db:web_company_context_highlight.res_config_settings_view_form
msgid "Text Color"
msgstr ""

#. module: web_company_context_highlight
#: model:ir.model.fields,help:web_company_context_highlight.field_res_config_settings__web_company_context_highlight_text_color
msgid ""
"Text color used to highlight the company switcher when in multi-company "
"context."
msgstr ""
4 changes: 4 additions & 0 deletions web_company_context_highlight/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).

from . import ir_http
from . import res_config_settings
25 changes: 25 additions & 0 deletions web_company_context_highlight/models/ir_http.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Copyright 2026 Acsone
# @author Pierre Verkest <pierre.verkest@apycod.fr>
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).

from odoo import models


class IrHttp(models.AbstractModel):
_inherit = "ir.http"

def session_info(self):
session = super().session_info()
highlight_color = (
self.env["ir.config_parameter"]
.sudo()
.get_param("web_company_context_highlight.color", "#ffc107")
)
text_color = (
self.env["ir.config_parameter"]
.sudo()
.get_param("web_company_context_highlight.text_color", "#212529")
)
session["web_company_context_highlight_color"] = highlight_color
session["web_company_context_highlight_text_color"] = text_color
return session
24 changes: 24 additions & 0 deletions web_company_context_highlight/models/res_config_settings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright 2026 Acsone
# @author Pierre Verkest <pierre.verkest@apycod.fr>
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).

from odoo import fields, models


class ResConfigSettings(models.TransientModel):
_inherit = "res.config.settings"

web_company_context_highlight_color = fields.Char(
string="Company Highlight Color",
default="#ffc107",
config_parameter="web_company_context_highlight.color",
help="Background color used to highlight the company switcher "
"when in multi-company context.",
)
web_company_context_highlight_text_color = fields.Char(
string="Company Highlight Text Color",
default="#212529",
config_parameter="web_company_context_highlight.text_color",
help="Text color used to highlight the company switcher "
"when in multi-company context.",
)
3 changes: 3 additions & 0 deletions web_company_context_highlight/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
13 changes: 13 additions & 0 deletions web_company_context_highlight/readme/CONFIGURE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
To configure the highlight colors:

1. Go to **Settings** > **General Settings**.
2. Scroll to the **Companies** section.
3. Under **Company Switcher Highlight**, set the desired **Background Color** and **Text Color** using the color pickers.
4. Click **Save**.

![color configuration](../static/img/web_company_context_highlight_config_color.png)

Alternatively, you can configure these values by modifying the following System Parameters (in debug mode, under **Settings** > **Technical** > **System Parameters**):

* `web_company_context_highlight.color`: The background color code (default: `#ffc107`).
* `web_company_context_highlight.text_color`: The text color code (default: `#212529`).
13 changes: 13 additions & 0 deletions web_company_context_highlight/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -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

![company switcher with multiple companies selected](../static/img/web_company_context_highlight_multiple_companies_selected.png)

* with one company selected

![company switcher with one company selected](../static/img/web_company_context_highlight_one_company_selected.png)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading