diff --git a/web_theme_classic/README.rst b/web_theme_classic/README.rst new file mode 100644 index 000000000000..10fdbe530a59 --- /dev/null +++ b/web_theme_classic/README.rst @@ -0,0 +1,107 @@ +================= +Web Theme Classic +================= + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:3a9b09ec4b88d6d85c67686c9aa3706a97485522667a05990840fc0d35797f81 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github + :target: https://github.com/OCA/web/tree/18.0/web_theme_classic + :alt: OCA/web +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/web-18-0/web-18-0-web_theme_classic + :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=18.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module extend the Odoo Community Edition ``web`` module to improve +visibility of form view. + +**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 + (or exit the screen) + +In a way, this module restores the form display of version 15, but +preserving the "save on the fly" new feature. + +**Without this module** + +|image1| + +**With this module** + +|image2| + +.. |image1| image:: https://raw.githubusercontent.com/OCA/web/18.0/web_theme_classic/static/description/product_template_form_without_module.png +.. |image2| image:: https://raw.githubusercontent.com/OCA/web/18.0/web_theme_classic/static/description/product_template_form_with_module.png + +**Table of contents** + +.. contents:: + :local: + +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 +------- + +* GRAP + +Contributors +------------ + +- Sylvain LE GAL (https://www.twitter.com/legalsylvain) + +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-legalsylvain| image:: https://github.com/legalsylvain.png?size=40px + :target: https://github.com/legalsylvain + :alt: legalsylvain + +Current `maintainer `__: + +|maintainer-legalsylvain| + +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_theme_classic/__init__.py b/web_theme_classic/__init__.py new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/web_theme_classic/__manifest__.py b/web_theme_classic/__manifest__.py new file mode 100644 index 000000000000..b5c33105c2f5 --- /dev/null +++ b/web_theme_classic/__manifest__.py @@ -0,0 +1,24 @@ +# Copyright (C) 2022 - Today: GRAP (http://www.grap.coop) +# @author: Sylvain LE GAL (https://twitter.com/legalsylvain) +# 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.0.0", + "author": "GRAP, Odoo Community Association (OCA)", + "maintainers": ["legalsylvain"], + "website": "https://github.com/OCA/web", + "license": "AGPL-3", + "category": "Extra Tools", + "depends": [ + "web", + ], + "assets": { + "web.assets_backend": [ + "/web_theme_classic/static/src/scss/web_theme_classic.scss", + ], + }, + "installable": True, + "application": True, +} diff --git a/web_theme_classic/i18n/it.po b/web_theme_classic/i18n/it.po new file mode 100644 index 000000000000..8af45f7b8781 --- /dev/null +++ b/web_theme_classic/i18n/it.po @@ -0,0 +1,14 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 17.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: it\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" diff --git a/web_theme_classic/i18n/web_theme_classic.pot b/web_theme_classic/i18n/web_theme_classic.pot new file mode 100644 index 000000000000..716a0702d88a --- /dev/null +++ b/web_theme_classic/i18n/web_theme_classic.pot @@ -0,0 +1,13 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 17.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" diff --git a/web_theme_classic/pyproject.toml b/web_theme_classic/pyproject.toml new file mode 100644 index 000000000000..4231d0cccb3d --- /dev/null +++ b/web_theme_classic/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/web_theme_classic/readme/CONTRIBUTORS.md b/web_theme_classic/readme/CONTRIBUTORS.md new file mode 100644 index 000000000000..4a6b63400c13 --- /dev/null +++ b/web_theme_classic/readme/CONTRIBUTORS.md @@ -0,0 +1 @@ +- Sylvain LE GAL () diff --git a/web_theme_classic/readme/DESCRIPTION.md b/web_theme_classic/readme/DESCRIPTION.md new file mode 100644 index 000000000000..afc3f096e0c9 --- /dev/null +++ b/web_theme_classic/readme/DESCRIPTION.md @@ -0,0 +1,21 @@ +This module extend the Odoo Community Edition `web` module to improve +visibility of form view. + +**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 + (or exit the screen) + +In a way, this module restores the form display of version 15, but +preserving the "save on the fly" new feature. + +**Without this module** + +![](../static/description/product_template_form_without_module.png) + +**With this module** + +![](../static/description/product_template_form_with_module.png) diff --git a/web_theme_classic/static/description/icon.png b/web_theme_classic/static/description/icon.png new file mode 100644 index 000000000000..3a0328b516c4 Binary files /dev/null and b/web_theme_classic/static/description/icon.png differ diff --git a/web_theme_classic/static/description/index.html b/web_theme_classic/static/description/index.html new file mode 100644 index 000000000000..d90b7b86f980 --- /dev/null +++ b/web_theme_classic/static/description/index.html @@ -0,0 +1,440 @@ + + + + + +Web Theme Classic + + + +
+

Web Theme Classic

+ + +

Beta License: AGPL-3 OCA/web Translate me on Weblate Try me on Runboat

+

This module extend the Odoo Community Edition web module to improve +visibility of form view.

+

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 +(or exit the screen)
  • +
+

In a way, this module restores the form display of version 15, but +preserving the “save on the fly” new feature.

+

Without this module

+

image1

+

With this module

+

image2

+

Table of contents

+ +
+

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

+
    +
  • GRAP
  • +
+
+ +
+

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:

+

legalsylvain

+

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_theme_classic/static/description/product_template_form_with_module.png b/web_theme_classic/static/description/product_template_form_with_module.png new file mode 100644 index 000000000000..65302450a355 Binary files /dev/null and b/web_theme_classic/static/description/product_template_form_with_module.png differ diff --git a/web_theme_classic/static/description/product_template_form_without_module.png b/web_theme_classic/static/description/product_template_form_without_module.png new file mode 100644 index 000000000000..5e89d608e1d3 Binary files /dev/null and b/web_theme_classic/static/description/product_template_form_without_module.png differ diff --git a/web_theme_classic/static/src/scss/web_theme_classic.scss b/web_theme_classic/static/src/scss/web_theme_classic.scss new file mode 100644 index 000000000000..426906e37ad6 --- /dev/null +++ b/web_theme_classic/static/src/scss/web_theme_classic.scss @@ -0,0 +1,106 @@ +/*********************************************************** + Variables +************************************************************/ + +$input-border-color: #cccccc; +$input-border-color-focus: #71639e; +$input-background-color-required: #d2d2ff; +$input-color-placeholder-required: #6c757d; + +$button-border-color: #dee2e6; + +/*********************************************************** + Form View : Handle Fields Borders +************************************************************/ + +.o_form_view { + .o_input, + .o_field_html > .note-editable { + /* Add border for all editable fields */ + border: 1px solid $input-border-color !important; + border-radius: 3px; + + /* add darker border on focus */ + &:focus { + border-color: $input-border-color-focus !important; + } + } + + .o_field_many2many_selection { + .o_input { + /* Prevent to have double border for many2many tags input fields */ + border: 0px solid !important; + } + } + + .o_field_monetary { + /* Prevent to have double border for monetary fields */ + .o_input { + border: 0px solid !important; + } + + #list_price_0 { + border: 1px solid $input-border-color !important; + border-radius: 3px; + + &:focus { + border-color: $input-border-color-focus !important; + } + } + } +} + +/*********************************************************** + Form View : Handle Button Borders +************************************************************/ + +.o_form_view { + .btn-light { + border-color: $button-border-color; + } + + .btn-light { + &:hover { + border-color: $button-border-color; + } + } + + .o_input { + padding-left: 4px; + padding-right: 2px; + } +} + +/*********************************************************** + Form View : Handle Background for required fields +************************************************************/ + +.o_form_view { + .o_required_modifier:not(.o_readonly_modifier) { + .o_input { + /* Add background for all editable and required fields */ + background-color: $input-background-color-required !important; + + /* darker placeholder as the background is darker */ + &::placeholder { + color: $input-color-placeholder-required; + } + } + } + + .o_required_modifier.o_field_selection:not(.o_readonly_modifier) { + /* Specific case for field selection */ + background-color: $input-background-color-required !important; + } +} + +/*********************************************************** + Tree View : Handle style for required fields +************************************************************/ + +.o_list_renderer + .o_data_row.o_selected_row + > .o_data_cell.o_required_modifier:not(.o_readonly_modifier) { + /* Disable border bottom as the field has now a background */ + border-bottom: 0px solid; +}