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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ addon | version | maintainers | summary
[web_group_expand](web_group_expand/) | 18.0.1.0.1 | | Group Expand Buttons
[web_ir_actions_act_multi](web_ir_actions_act_multi/) | 18.0.1.0.0 | | Enables triggering of more than one action on ActionManager
[web_ir_actions_act_window_message](web_ir_actions_act_window_message/) | 18.0.1.0.1 | | Show a message box to users
[web_m2x_options](web_m2x_options/) | 18.0.1.0.2 | | web_m2x_options
[web_m2x_options](web_m2x_options/) | 18.0.1.0.3 | | web_m2x_options
[web_m2x_options_manager](web_m2x_options_manager/) | 18.0.1.0.0 | | Adds an interface to manage the "Create" and "Create and Edit" options for specific models and fields.
[web_no_bubble](web_no_bubble/) | 18.0.1.0.0 | | Remove the bubbles from the web interface
[web_notify](web_notify/) | 18.0.1.1.1 | | Send notification messages to user
Expand All @@ -57,7 +57,7 @@ addon | version | maintainers | summary
[web_session_auto_close](web_session_auto_close/) | 18.0.1.0.1 | | Automatically logs out inactive users based on a configurable timeout.
[web_sort_menu](web_sort_menu/) | 18.0.1.0.0 | | Sort Apps in DropDown/NavBar Menu alphabetically
[web_systray_button_init_action](web_systray_button_init_action/) | 18.0.1.0.2 | | Add a button to go to the user init action.
[web_theme_classic](web_theme_classic/) | 18.0.1.1.0 | <a href='https://github.com/legalsylvain'><img src='https://github.com/legalsylvain.png' width='32' height='32' style='border-radius:50%;' alt='legalsylvain'/></a> | Contrasted style on fields to improve the UI.
[web_theme_classic](web_theme_classic/) | 18.0.1.2.0 | <a href='https://github.com/legalsylvain'><img src='https://github.com/legalsylvain.png' width='32' height='32' style='border-radius:50%;' alt='legalsylvain'/></a> | Contrasted style on fields to improve the UI.
[web_time_range_menu_custom](web_time_range_menu_custom/) | 18.0.1.0.0 | | Web Time Range Menu Custom
[web_timeline](web_timeline/) | 18.0.1.0.3 | | Interactive visualization chart to show events in time
[web_toggle_chatter](web_toggle_chatter/) | 18.0.1.0.0 | | Toggle chatter in backend form views
Expand Down
2 changes: 1 addition & 1 deletion web_m2x_options/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ web_m2x_options
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:5dd01fb787f522fb1380ac914658c801fb7cdcd937fe81ac52fb8db24298ee60
!! source digest: sha256:72edae262a5750aa942302a30dfa960c912c99d637f4777222243f3e021f3924
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand Down
2 changes: 1 addition & 1 deletion web_m2x_options/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

{
"name": "web_m2x_options",
"version": "18.0.1.0.2",
"version": "18.0.1.0.3",
"category": "Web",
"author": "initOS GmbH,"
"ACSONE SA/NV, "
Expand Down
2 changes: 1 addition & 1 deletion web_m2x_options/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ <h1>web_m2x_options</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:5dd01fb787f522fb1380ac914658c801fb7cdcd937fe81ac52fb8db24298ee60
!! source digest: sha256:72edae262a5750aa942302a30dfa960c912c99d637f4777222243f3e021f3924
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/web/tree/18.0/web_m2x_options"><img alt="OCA/web" src="https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/web-18-0/web-18-0-web_m2x_options"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/web&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This modules modifies “many2one” and “many2manytags” form widgets so as
Expand Down
8 changes: 7 additions & 1 deletion web_m2x_options/static/src/components/form.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,13 @@ function evaluateHasCreatePermission(attrs) {
}

function evaluateFieldBooleanOption(option) {
return typeof option === "boolean" ? option : evaluateBooleanExpr(option);
if (typeof option === "boolean") {
return option;
}
if (typeof option === "string") {
return evaluateBooleanExpr(option);
}
return true;
}

patch(many2OneField, {
Expand Down
28 changes: 23 additions & 5 deletions web_theme_classic/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Web Theme Classic
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:27279023c56e7554295aea7c8e94ddad0c3cf9962ba5f11a6de4b8c1766e9e59
!! source digest: sha256:96a272ee896986cd77dc37d08d7df63ad97290bbe73d90c2ac25139644f4ae70
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand All @@ -32,15 +32,15 @@ Web Theme Classic

|badge1| |badge2| |badge3| |badge4| |badge5|

This module extend the Odoo Community Edition ``web`` module to improve
visibility of form view.
This module extends the Odoo Community Edition ``web`` module to improve
the visibility of input fields.

**Rational:** Since Odoo V17, the design is very pure. That's great, but
it generates some problem for users :

- Fields are not identifiable. (we can not know exactly where there are
- Fields are not identifiable. (we can not know exactly where they are
until you hover over them with the cursor)
- there is no indication for the required fields until trying to save
- There is no indication for the required fields until trying to save
(or exit the screen)

In a way, this module restores the form display of version 15, but
Expand All @@ -62,6 +62,24 @@ preserving the "save on the fly" new feature.
.. contents::
:local:

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

This module allows each user to choose whether they would like input
fields to be displayed the "classic" way or the new, standard way (as if
this module were not installed)

To do this you can either:

- Check "Classic Theme Persistent" in user preferences. This will enable
the classic theme for that user across all devices.
- Check the "Classic Theme" toggle in the popover menu triggered bu
clicking on the user icon in the navbar. This toggle is only visible
when "Classic Theme Persistent" is disabled.

Please note that when disabling "Classic Theme Persistent" the style
will not change until the page is reloaded.

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

Expand Down
1 change: 1 addition & 0 deletions web_theme_classic/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
9 changes: 8 additions & 1 deletion web_theme_classic/__manifest__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# Copyright (C) 2022 - Today: GRAP (http://www.grap.coop)
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
# © 2025 Liam Noonan - Pyxiris
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

{
"name": "Web Theme Classic",
"summary": "Contrasted style on fields to improve the UI.",
"version": "18.0.1.1.0",
"version": "18.0.1.2.0",
"author": "GRAP, Odoo Community Association (OCA)",
"maintainers": ["legalsylvain"],
"website": "https://github.com/OCA/web",
Expand All @@ -14,8 +15,14 @@
"depends": [
"web",
],
"data": [
"views/res_users_views.xml",
],
"assets": {
"web.assets_backend": [
"web_theme_classic/static/src/js/switch_theme.esm.js",
],
"web.assets_web": [
"/web_theme_classic/static/src/scss/web_theme_classic.scss",
],
"web.assets_web_dark": [
Expand Down
40 changes: 40 additions & 0 deletions web_theme_classic/i18n/it.po
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,43 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"

#. module: web_theme_classic
#. odoo-javascript
#: code:addons/web_theme_classic/static/src/js/switch_theme.esm.js:0
msgid "Classic Theme"
msgstr ""

#. module: web_theme_classic
#: model:ir.model.fields,field_description:web_theme_classic.field_res_users__persistent_classic_theme
msgid "Classic Theme Persistent"
msgstr ""

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

#. module: web_theme_classic
#: model:ir.model.fields,field_description:web_theme_classic.field_res_users_settings__persistent_classic_theme
msgid "Persistent Classic Theme"
msgstr ""

#. module: web_theme_classic
#: model:ir.model.fields,help:web_theme_classic.field_res_users__persistent_classic_theme
msgid ""
"This enables Classic Theme on this user's account across all devices. \n"
" Disabling it will will alow you to to use the toggle in the user burger "
"menu in the navbar to enable Classic Mode on a specific session/device \n"
"The toggle is not visible while Persistent Classic Theme is enabled"
msgstr ""

#. module: web_theme_classic
#: model:ir.model,name:web_theme_classic.model_res_users
msgid "User"
msgstr ""

#. module: web_theme_classic
#: model:ir.model,name:web_theme_classic.model_res_users_settings
msgid "User Settings"
msgstr ""
40 changes: 40 additions & 0 deletions web_theme_classic/i18n/tr.po
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,43 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"

#. module: web_theme_classic
#. odoo-javascript
#: code:addons/web_theme_classic/static/src/js/switch_theme.esm.js:0
msgid "Classic Theme"
msgstr ""

#. module: web_theme_classic
#: model:ir.model.fields,field_description:web_theme_classic.field_res_users__persistent_classic_theme
msgid "Classic Theme Persistent"
msgstr ""

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

#. module: web_theme_classic
#: model:ir.model.fields,field_description:web_theme_classic.field_res_users_settings__persistent_classic_theme
msgid "Persistent Classic Theme"
msgstr ""

#. module: web_theme_classic
#: model:ir.model.fields,help:web_theme_classic.field_res_users__persistent_classic_theme
msgid ""
"This enables Classic Theme on this user's account across all devices. \n"
" Disabling it will will alow you to to use the toggle in the user burger "
"menu in the navbar to enable Classic Mode on a specific session/device \n"
"The toggle is not visible while Persistent Classic Theme is enabled"
msgstr ""

#. module: web_theme_classic
#: model:ir.model,name:web_theme_classic.model_res_users
msgid "User"
msgstr ""

#. module: web_theme_classic
#: model:ir.model,name:web_theme_classic.model_res_users_settings
msgid "User Settings"
msgstr ""
40 changes: 40 additions & 0 deletions web_theme_classic/i18n/web_theme_classic.pot
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * web_theme_classic
#
msgid ""
msgstr ""
Expand All @@ -11,3 +12,42 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: web_theme_classic
#. odoo-javascript
#: code:addons/web_theme_classic/static/src/js/switch_theme.esm.js:0
msgid "Classic Theme"
msgstr ""

#. module: web_theme_classic
#: model:ir.model.fields,field_description:web_theme_classic.field_res_users__persistent_classic_theme
msgid "Classic Theme Persistent"
msgstr ""

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

#. module: web_theme_classic
#: model:ir.model.fields,field_description:web_theme_classic.field_res_users_settings__persistent_classic_theme
msgid "Persistent Classic Theme"
msgstr ""

#. module: web_theme_classic
#: model:ir.model.fields,help:web_theme_classic.field_res_users__persistent_classic_theme
msgid ""
"This enables Classic Theme on this user's account across all devices. \n"
" Disabling it will will alow you to to use the toggle in the user burger menu in the navbar to enable Classic Mode on a specific session/device \n"
"The toggle is not visible while Persistent Classic Theme is enabled"
msgstr ""

#. module: web_theme_classic
#: model:ir.model,name:web_theme_classic.model_res_users
msgid "User"
msgstr ""

#. module: web_theme_classic
#: model:ir.model,name:web_theme_classic.model_res_users_settings
msgid "User Settings"
msgstr ""
1 change: 1 addition & 0 deletions web_theme_classic/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import ir_http, res_users, res_users_settings
28 changes: 28 additions & 0 deletions web_theme_classic/models/ir_http.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# © 2022 Florian Kantelberg - initOS GmbH
# © 2025 Liam Noonan - Pyxiris
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import models
from odoo.http import request


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

@classmethod
def _set_classic_theme(cls, response):
user = request.env.user
if user and user._is_internal():
existing_transient_theme = request.httprequest.cookies.get(
"transient_classic_theme_cookie"
)
persistent_theme = getattr(user, "persistent_classic_theme", None)
# Delete the cookie so that when persistent gets turned off the user
# will not be left wondering why nothing changed
if persistent_theme and existing_transient_theme:
response.delete_cookie("transient_classic_theme_cookie")

@classmethod
def _post_dispatch(cls, response):
cls._set_classic_theme(response)
return super()._post_dispatch(response)
31 changes: 31 additions & 0 deletions web_theme_classic/models/res_users.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# © 2022 Florian Kantelberg - initOS GmbH
# © 2025 Liam Noonan - Pyxiris
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import fields, models


class ResUsers(models.Model):
_inherit = "res.users"

persistent_classic_theme = fields.Boolean(
related="res_users_settings_id.persistent_classic_theme",
readonly=False,
string="Classic Theme Persistent",
help="This enables Classic Theme on this user's account across all devices. \n "
"Disabling it will will alow you to to use the toggle in the user burger menu "
"in the navbar to enable Classic Mode on a specific session/device \n"
"The toggle is not visible while Persistent Classic Theme is enabled",
)

@property
def SELF_READABLE_FIELDS(self):
return super().SELF_READABLE_FIELDS + [
"persistent_classic_theme",
]

@property
def SELF_WRITEABLE_FIELDS(self):
return super().SELF_WRITEABLE_FIELDS + [
"persistent_classic_theme",
]
12 changes: 12 additions & 0 deletions web_theme_classic/models/res_users_settings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# © 2026 Liam Noonan - Pyxiris
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import fields, models


class ResUsersSettings(models.Model):
_inherit = "res.users.settings"

# These fields should be here in order to be accessible via in js
# as user.settings.persistent_classic_theme
persistent_classic_theme = fields.Boolean(default=True)
7 changes: 7 additions & 0 deletions web_theme_classic/readme/CONFIGURE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
This module allows each user to choose whether they would like input fields to be displayed the "classic" way or the new, standard way (as if this module were not installed)

To do this you can either:
+ Check "Classic Theme Persistent" in user preferences. This will enable the classic theme for that user across all devices.
+ Check the "Classic Theme" toggle in the popover menu triggered bu clicking on the user icon in the navbar. This toggle is only visible when "Classic Theme Persistent" is disabled.

Please note that when disabling "Classic Theme Persistent" the style will not change until the page is reloaded.
8 changes: 4 additions & 4 deletions web_theme_classic/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
This module extend the Odoo Community Edition `web` module to improve
visibility of form view.
This module extends the Odoo Community Edition `web` module to improve
the visibility of input fields.

**Rational:** Since Odoo V17, the design is very pure. That's great, but
it generates some problem for users :

- Fields are not identifiable. (we can not know exactly
where there are until you hover over them with the cursor)
- there is no indication for the required fields until trying to save
where they are until you hover over them with the cursor)
- There is no indication for the required fields until trying to save
(or exit the screen)

In a way, this module restores the form display of version 15, but
Expand Down
Loading
Loading