diff --git a/.copier-answers.yml b/.copier-answers.yml index 2053f2ee6670..80cdbc8a5c2a 100644 --- a/.copier-answers.yml +++ b/.copier-answers.yml @@ -1,8 +1,7 @@ # Do NOT update manually; changes here will be overwritten by Copier -_commit: v1.36 +_commit: v1.42 _src_path: git+https://github.com/OCA/oca-addons-repo-template additional_ruff_rules: [] -ci: GitHub convert_readme_fragments_to_markdown: true enable_checklog_odoo: true generate_requirements_txt: true @@ -17,7 +16,8 @@ odoo_test_flavor: Both odoo_version: 18.0 org_name: Odoo Community Association (OCA) org_slug: OCA -rebel_module_groups: [] +rebel_module_groups: +- web_responsive repo_description: web repo_name: web repo_slug: web diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 852a07469b2e..72aac6e1e373 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -1,3 +1,4 @@ + name: pre-commit on: @@ -16,8 +17,9 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: "3.11" + python-version: "3.12" cache: 'pip' + cache-dependency-path: '.pre-commit-config.yaml' - name: Get python version run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV - uses: actions/cache@v4 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5df33daee45e..6ccdbc5f9922 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -36,18 +36,18 @@ jobs: matrix: include: - container: ghcr.io/oca/oca-ci/py3.10-odoo18.0:latest - exclude: "web_responsive" + include: "web_responsive" name: test with Odoo - container: ghcr.io/oca/oca-ci/py3.10-ocb18.0:latest - exclude: "web_responsive" + include: "web_responsive" name: test with OCB makepot: "true" - container: ghcr.io/oca/oca-ci/py3.10-odoo18.0:latest - include: "web_responsive" - name: test with Odoo (rebel modules) + exclude: "web_responsive" + name: test with Odoo - container: ghcr.io/oca/oca-ci/py3.10-ocb18.0:latest - include: "web_responsive" - name: test with OCB (rebel modules) + exclude: "web_responsive" + name: test with OCB makepot: "true" services: postgres: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3054c9f3f23e..749a12fee67f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -21,7 +21,7 @@ exclude: | # You don't usually want a bot to modify your legal texts (LICENSE.*|COPYING.*) default_language_version: - python: python3 + python: python3.12 node: "22.9.0" repos: - repo: local @@ -38,6 +38,11 @@ repos: entry: found a en.po file language: fail files: '[a-zA-Z0-9_]*/i18n/en\.po$' + - id: obsolete dotfiles + name: obsolete dotfiles + entry: found obsolete files; remove them + files: '^(\.travis\.yml|\.t2d\.yml|CONTRIBUTING\.md|\.prettierrc\.yml|\.eslintrc\.yml)$' + language: fail - repo: https://github.com/sbidoul/whool rev: v1.3 hooks: diff --git a/README.md b/README.md index 1641bc6c13d9..c9a1c7dbf40a 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ + [![Support the OCA](https://odoo-community.org/readme-banner-image)](https://odoo-community.org/get-involved?utm_source=repo-readme) # web @@ -22,8 +23,8 @@ Available addons addon | version | maintainers | summary --- | --- | --- | --- [web_calendar_slot_duration](web_calendar_slot_duration/) | 18.0.1.0.0 | Yajo | Customizable calendar slot durations -[web_chatter_position](web_chatter_position/) | 18.0.1.1.0 | trisdoan | Add an option to change the chatter position -[web_company_color](web_company_color/) | 18.0.1.0.7 | | Web Company Color +[web_chatter_position](web_chatter_position/) | 18.0.1.1.1 | trisdoan | Add an option to change the chatter position +[web_company_color](web_company_color/) | 18.0.1.1.0 | | Web Company Color [web_copy_confirm](web_copy_confirm/) | 18.0.1.0.0 | | Show confirmation dialogue before copying records [web_dark_mode](web_dark_mode/) | 18.0.1.0.0 | | Enabled Dark Mode for the Odoo Backend [web_datetime_picker_default_time](web_datetime_picker_default_time/) | 18.0.1.0.0 | grindtildeath | Allows to define a default time on datetime picker @@ -50,7 +51,7 @@ addon | version | maintainers | summary [web_portal_properties](web_portal_properties/) | 18.0.1.0.0 | | Add a new field on properties to show them on portal [web_pwa_customize](web_pwa_customize/) | 18.0.1.0.0 | victoralmau | Web Pwa Customize [web_quick_start_screen](web_quick_start_screen/) | 18.0.1.0.0 | | Configurable start screen for quick actions -[web_refresher](web_refresher/) | 18.0.1.0.0 | | Web Refresher +[web_refresher](web_refresher/) | 18.0.1.0.1 | | Web Refresher [web_remember_tree_column_width](web_remember_tree_column_width/) | 18.0.1.0.2 | frahikLV luisg123v cuongnmtm | Remember the tree columns' widths across sessions. [web_responsive](web_responsive/) | 18.0.1.0.6 | Tardo SplashS | Responsive web client, community-supported [web_save_discard_button](web_save_discard_button/) | 18.0.1.0.1 | synconics | Save & Discard Buttons @@ -59,7 +60,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.2.0 | legalsylvain | Contrasted style on fields to improve the UI. +[web_theme_classic](web_theme_classic/) | 18.0.1.2.1 | legalsylvain | 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 diff --git a/checklog-odoo.cfg b/checklog-odoo.cfg index ae8394eb9f1e..58d43aa6662b 100644 --- a/checklog-odoo.cfg +++ b/checklog-odoo.cfg @@ -2,4 +2,4 @@ ignore= WARNING.* 0 failed, 0 error\(s\).* WARNING .* Killing chrome descendants-or-self .* - Missing widget: res_partner_many2one for field of type many2one + WARNING.* Missing widget: res_partner_many2one for field of type many2one.* diff --git a/web_chatter_position/README.rst b/web_chatter_position/README.rst index 202015ee556d..19766e229be5 100644 --- a/web_chatter_position/README.rst +++ b/web_chatter_position/README.rst @@ -11,7 +11,7 @@ Chatter Position !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:f0de4c200329e3f762e62dc49f8c31ed4dba8baea0443ce1ed283adaeb478b32 + !! source digest: sha256:b77d8aba6d845ceae37d3cb56bb5dc938b4e42a2b8ab4b5c72afededd80246fb !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png @@ -91,6 +91,10 @@ Contributors - Joan Sisquella +- `Tecnativa `__: + + - Sergio Teruel + Maintainers ----------- diff --git a/web_chatter_position/__manifest__.py b/web_chatter_position/__manifest__.py index b9a2e8c6a537..653250b71976 100644 --- a/web_chatter_position/__manifest__.py +++ b/web_chatter_position/__manifest__.py @@ -6,7 +6,7 @@ { "name": "Chatter Position", "summary": "Add an option to change the chatter position", - "version": "18.0.1.1.0", + "version": "18.0.1.1.1", "author": "Hynsys Technologies, Camptocamp, Alitec Pte Ltd," " Odoo Community Association (OCA)", "maintainers": ["trisdoan"], diff --git a/web_chatter_position/i18n/sl.po b/web_chatter_position/i18n/sl.po new file mode 100644 index 000000000000..1ec6e10e07dd --- /dev/null +++ b/web_chatter_position/i18n/sl.po @@ -0,0 +1,49 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_chatter_position +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 18.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2026-06-06 11:55+0000\n" +"Last-Translator: Matjaz Mozetic \n" +"Language-Team: none\n" +"Language: sl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=4; plural=n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || " +"n%100==4 ? 2 : 3;\n" +"X-Generator: Weblate 5.15.2\n" + +#. module: web_chatter_position +#: model:ir.model.fields.selection,name:web_chatter_position.selection__res_users__chatter_position__auto +msgid "Automatic" +msgstr "Samodejno" + +#. module: web_chatter_position +#: model:ir.model.fields.selection,name:web_chatter_position.selection__res_users__chatter_position__bottom +msgid "Bottom" +msgstr "Na dnu" + +#. module: web_chatter_position +#: model:ir.model.fields,field_description:web_chatter_position.field_res_users__chatter_position +msgid "Chatter Position" +msgstr "Položaj klepeta" + +#. module: web_chatter_position +#: model:ir.model.fields.selection,name:web_chatter_position.selection__res_users__chatter_position__sided +msgid "Sided" +msgstr "Ob strani" + +#. module: web_chatter_position +#. odoo-javascript +#: code:addons/web_chatter_position/static/src/views/form/form_controller.xml:0 +msgid "Toggle chatter position" +msgstr "Preklopi položaj klepeta" + +#. module: web_chatter_position +#: model:ir.model,name:web_chatter_position.model_res_users +msgid "User" +msgstr "Uporabnik" diff --git a/web_chatter_position/readme/CONTRIBUTORS.md b/web_chatter_position/readme/CONTRIBUTORS.md index 3426efb884d4..5b25f40ed396 100644 --- a/web_chatter_position/readme/CONTRIBUTORS.md +++ b/web_chatter_position/readme/CONTRIBUTORS.md @@ -8,3 +8,5 @@ - Tris Doan \<\> - [ForgeFlow](https://www.forgeflow.com) - Joan Sisquella \<\> +- [Tecnativa](https://www.tecnativa.com/): + - Sergio Teruel diff --git a/web_chatter_position/static/description/index.html b/web_chatter_position/static/description/index.html index f7277204d623..12eeee28469c 100644 --- a/web_chatter_position/static/description/index.html +++ b/web_chatter_position/static/description/index.html @@ -372,7 +372,7 @@

Chatter Position

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:f0de4c200329e3f762e62dc49f8c31ed4dba8baea0443ce1ed283adaeb478b32 +!! source digest: sha256:b77d8aba6d845ceae37d3cb56bb5dc938b4e42a2b8ab4b5c72afededd80246fb !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

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

Configurable chatter position from the user preferences.

@@ -436,6 +436,10 @@

Contributors

  • Joan Sisquella <joan.sisquella@forgeflow.com>
  • +
  • Tecnativa:
      +
    • Sergio Teruel
    • +
    +
  • diff --git a/web_chatter_position/static/src/js/web_chatter_position.esm.js b/web_chatter_position/static/src/js/web_chatter_position.esm.js index 7dc3a8d5450b..9aeafab349e8 100644 --- a/web_chatter_position/static/src/js/web_chatter_position.esm.js +++ b/web_chatter_position/static/src/js/web_chatter_position.esm.js @@ -67,7 +67,10 @@ patch(FormCompiler.prototype, { } else { const sheetBgChatterContainerHookXml = chatterContainerHookXml.cloneNode(true); - sheetBgChatterContainerHookXml.classList.add("o-isInFormSheetBg"); + sheetBgChatterContainerHookXml.classList.add( + "o-isInFormSheetBg", + "w-auto" + ); setAttributes(sheetBgChatterContainerHookXml, { "t-if": "true", "t-attf-class": `{{ (__comp__.uiService.size >= ${SIZES.XXL} && ${ diff --git a/web_chatter_position/static/src/scss/form_controller.scss b/web_chatter_position/static/src/scss/form_controller.scss index bbdc5d3a08f2..a907877ed6ec 100644 --- a/web_chatter_position/static/src/scss/form_controller.scss +++ b/web_chatter_position/static/src/scss/form_controller.scss @@ -1,13 +1,46 @@ /* Copyright 2024 Alitec Pte Ltd (https://www.alitec.sg). + Copyright 2026 Tecnativa - Sergio Teruel. License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). */ // Set sheet to full width when chatter is forced to bottom .o_form_view_container { + .o_form_renderer:has(> .o_form_sheet_bg.o_fullwidth) { + max-width: 100% !important; + min-width: 0; + overflow-x: hidden; + width: 100%; + } + .o_form_sheet_bg.o_fullwidth, .o_form_sheet_bg.o_fullwidth .o_form_sheet { - max-width: none !important; - width: auto !important; + max-width: 100% !important; + min-width: 0; + width: 100% !important; + } + + .o_form_sheet_bg.o_fullwidth { + overflow-x: hidden; + } + + .o_form_sheet_bg.o_fullwidth .o_form_sheet { + overflow-x: auto; + } + + .o_form_sheet_bg.o_fullwidth + > .o-mail-Form-chatter.o-isInFormSheetBg:not(.o-aside) { + background-color: $o-webclient-background-color !important; + flex: 0 0 auto !important; + margin-left: 0 !important; + margin-right: 0 !important; + max-width: 100% !important; + min-width: 0; + width: 100% !important; + + .o-mail-Chatter { + max-width: none !important; + width: 100%; + } } } diff --git a/web_chatter_position/static/src/views/form/form_controller.esm.js b/web_chatter_position/static/src/views/form/form_controller.esm.js index 394295fd308c..04a3c4105a38 100644 --- a/web_chatter_position/static/src/views/form/form_controller.esm.js +++ b/web_chatter_position/static/src/views/form/form_controller.esm.js @@ -25,7 +25,8 @@ patch(FormController.prototype, { const formSheetBg = this.rootRef?.el?.querySelector(".o_form_sheet_bg"); if (formSheetBg) { this._moveChatter(formSheetBg); - this.rootRef.el.style.overflow = "auto"; + this.rootRef.el.style.overflowX = "hidden"; + this.rootRef.el.style.overflowY = "auto"; } } }); @@ -91,20 +92,32 @@ patch(FormController.prototype, { if (this.chatterPositionState.currentPosition === "bottom") { currentChatter.classList.remove("o-aside", "w-print-100"); - currentChatter.classList.add("o-isInFormSheetBg", "mt-4", "mt-md-0"); + currentChatter.classList.add( + "o-isInFormSheetBg", + "mt-4", + "mt-md-0", + "w-auto" + ); const formSheetBg = this.rootRef.el.querySelector(".o_form_sheet_bg"); if (formSheetBg) { formSheetBg.classList.add("o_fullwidth"); } - this.rootRef.el.style.overflow = "auto"; + this.rootRef.el.style.overflowX = "hidden"; + this.rootRef.el.style.overflowY = "auto"; } else { - currentChatter.classList.remove("o-isInFormSheetBg", "mt-4", "mt-md-0"); + currentChatter.classList.remove( + "o-isInFormSheetBg", + "mt-4", + "mt-md-0", + "w-auto" + ); currentChatter.classList.add("o-aside", "w-print-100"); const formSheetBg = this.rootRef.el.querySelector(".o_form_sheet_bg"); if (formSheetBg) { formSheetBg.classList.remove("o_fullwidth"); } - this.rootRef.el.style.overflow = ""; + this.rootRef.el.style.overflowX = ""; + this.rootRef.el.style.overflowY = ""; } }, }); diff --git a/web_company_color/README.rst b/web_company_color/README.rst index 60a91b70e7fb..e3f14499b0b8 100644 --- a/web_company_color/README.rst +++ b/web_company_color/README.rst @@ -11,7 +11,7 @@ Web Company Color !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:dae72dca32daa1de5666e39a00359088595ea0c6330b4b4300670e4e3a0b6680 + !! source digest: sha256:3e5f3c3f38a73bd62888ddabe88246540e60d039a5ae554d85784cb1ce1623d3 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png @@ -90,6 +90,8 @@ Contributors - Simone Rubino +- Marwan Behillil + Maintainers ----------- diff --git a/web_company_color/__manifest__.py b/web_company_color/__manifest__.py index f5329cfa86d0..1f30c4e8af32 100644 --- a/web_company_color/__manifest__.py +++ b/web_company_color/__manifest__.py @@ -5,7 +5,7 @@ { "name": "Web Company Color", "category": "web", - "version": "18.0.1.0.7", + "version": "18.0.1.1.0", "author": "Alexandre Díaz, Odoo Community Association (OCA)", "website": "https://github.com/OCA/web", "depends": ["web", "base_sparse_field"], diff --git a/web_company_color/i18n/ca.po b/web_company_color/i18n/ca.po index c36461d45121..4daea5ba65da 100644 --- a/web_company_color/i18n/ca.po +++ b/web_company_color/i18n/ca.po @@ -25,6 +25,13 @@ msgid "" " the page." msgstr "" +#. module: web_company_color +#: model_terms:ir.ui.view,arch_db:web_company_color.view_company_form +msgid "Are you sure you want to reset all colors to Odoo defaults?" +msgstr "" +"Esteu segur que voleu restablir tots els colors als valors predeterminats " +"d'Odoo?" + #. module: web_company_color #: model:ir.model.fields,field_description:web_company_color.field_res_company__color_button_bg msgid "Button Background Color" @@ -100,6 +107,11 @@ msgstr "" msgid "Qweb" msgstr "" +#. module: web_company_color +#: model_terms:ir.ui.view,arch_db:web_company_color.view_company_form +msgid "Reset colors" +msgstr "Restableix els colors" + #. module: web_company_color #: model:ir.model.fields,field_description:web_company_color.field_res_company__scss_modif_timestamp msgid "SCSS Modif. Timestamp" diff --git a/web_company_color/i18n/de.po b/web_company_color/i18n/de.po index 2dd74304a23b..cdfbb81d3c16 100644 --- a/web_company_color/i18n/de.po +++ b/web_company_color/i18n/de.po @@ -29,6 +29,13 @@ msgstr "" "Sie bitte\n" " die Seite." +#. module: web_company_color +#: model_terms:ir.ui.view,arch_db:web_company_color.view_company_form +msgid "Are you sure you want to reset all colors to Odoo defaults?" +msgstr "" +"Sind Sie sicher, dass Sie alle Farben auf die Odoo-Standardwerte " +"zurücksetzen möchten?" + #. module: web_company_color #: model:ir.model.fields,field_description:web_company_color.field_res_company__color_button_bg msgid "Button Background Color" @@ -104,6 +111,11 @@ msgstr "Navbar Textfarbe" msgid "Qweb" msgstr "Qweb" +#. module: web_company_color +#: model_terms:ir.ui.view,arch_db:web_company_color.view_company_form +msgid "Reset colors" +msgstr "Farben zurücksetzen" + #. module: web_company_color #: model:ir.model.fields,field_description:web_company_color.field_res_company__scss_modif_timestamp msgid "SCSS Modif. Timestamp" diff --git a/web_company_color/i18n/es.po b/web_company_color/i18n/es.po index 9acc5c3987c6..963554551317 100644 --- a/web_company_color/i18n/es.po +++ b/web_company_color/i18n/es.po @@ -29,6 +29,13 @@ msgstr "" " Para que los cambios surtan efecto, actualice\n" " la página." +#. module: web_company_color +#: model_terms:ir.ui.view,arch_db:web_company_color.view_company_form +msgid "Are you sure you want to reset all colors to Odoo defaults?" +msgstr "" +"¿Está seguro de que desea restablecer todos los colores a los valores " +"predeterminados de Odoo?" + #. module: web_company_color #: model:ir.model.fields,field_description:web_company_color.field_res_company__color_button_bg msgid "Button Background Color" @@ -104,6 +111,11 @@ msgstr "Color de texto de la barra de navegación" msgid "Qweb" msgstr "Qweb" +#. module: web_company_color +#: model_terms:ir.ui.view,arch_db:web_company_color.view_company_form +msgid "Reset colors" +msgstr "Restablecer colores" + #. module: web_company_color #: model:ir.model.fields,field_description:web_company_color.field_res_company__scss_modif_timestamp msgid "SCSS Modif. Timestamp" diff --git a/web_company_color/i18n/fr.po b/web_company_color/i18n/fr.po index b2d9c4880af1..90f2426c40c8 100644 --- a/web_company_color/i18n/fr.po +++ b/web_company_color/i18n/fr.po @@ -29,6 +29,13 @@ msgstr "" "d'actualiser\n" " la page." +#. module: web_company_color +#: model_terms:ir.ui.view,arch_db:web_company_color.view_company_form +msgid "Are you sure you want to reset all colors to Odoo defaults?" +msgstr "" +"Êtes-vous sûr de vouloir réinitialiser toutes les couleurs aux valeurs par " +"défaut d'Odoo ?" + #. module: web_company_color #: model:ir.model.fields,field_description:web_company_color.field_res_company__color_button_bg msgid "Button Background Color" @@ -104,6 +111,11 @@ msgstr "Couleur du texte de la barre de navigation" msgid "Qweb" msgstr "Qweb" +#. module: web_company_color +#: model_terms:ir.ui.view,arch_db:web_company_color.view_company_form +msgid "Reset colors" +msgstr "Réinitialiser les couleurs" + #. module: web_company_color #: model:ir.model.fields,field_description:web_company_color.field_res_company__scss_modif_timestamp msgid "SCSS Modif. Timestamp" diff --git a/web_company_color/i18n/hr.po b/web_company_color/i18n/hr.po index 216b13e7d62f..232f6315db95 100644 --- a/web_company_color/i18n/hr.po +++ b/web_company_color/i18n/hr.po @@ -26,6 +26,12 @@ msgid "" " the page." msgstr "" +#. module: web_company_color +#: model_terms:ir.ui.view,arch_db:web_company_color.view_company_form +msgid "Are you sure you want to reset all colors to Odoo defaults?" +msgstr "" +"Jeste li sigurni da želite poništiti sve boje na Odoo zadane vrijednosti?" + #. module: web_company_color #: model:ir.model.fields,field_description:web_company_color.field_res_company__color_button_bg msgid "Button Background Color" @@ -101,6 +107,11 @@ msgstr "Boja teksta navigacijske trake" msgid "Qweb" msgstr "" +#. module: web_company_color +#: model_terms:ir.ui.view,arch_db:web_company_color.view_company_form +msgid "Reset colors" +msgstr "Poništi boje" + #. module: web_company_color #: model:ir.model.fields,field_description:web_company_color.field_res_company__scss_modif_timestamp msgid "SCSS Modif. Timestamp" diff --git a/web_company_color/i18n/it.po b/web_company_color/i18n/it.po index 1b69efd1e106..0e047ce3b0e0 100644 --- a/web_company_color/i18n/it.po +++ b/web_company_color/i18n/it.po @@ -28,6 +28,13 @@ msgstr "" " Affinché la modifica abbia effetto, ricaricare\n" " la pagina." +#. module: web_company_color +#: model_terms:ir.ui.view,arch_db:web_company_color.view_company_form +msgid "Are you sure you want to reset all colors to Odoo defaults?" +msgstr "" +"Si è sicuri di voler reimpostare tutti i colori ai valori predefiniti di " +"Odoo?" + #. module: web_company_color #: model:ir.model.fields,field_description:web_company_color.field_res_company__color_button_bg msgid "Button Background Color" @@ -103,6 +110,11 @@ msgstr "Colori Testo Barra Navigazione" msgid "Qweb" msgstr "Qweb" +#. module: web_company_color +#: model_terms:ir.ui.view,arch_db:web_company_color.view_company_form +msgid "Reset colors" +msgstr "Reimposta colori" + #. module: web_company_color #: model:ir.model.fields,field_description:web_company_color.field_res_company__scss_modif_timestamp msgid "SCSS Modif. Timestamp" diff --git a/web_company_color/i18n/nl.po b/web_company_color/i18n/nl.po index dd38b466dd76..989f8d045255 100644 --- a/web_company_color/i18n/nl.po +++ b/web_company_color/i18n/nl.po @@ -29,6 +29,13 @@ msgstr "" "alstublieft\n" " de pagina." +#. module: web_company_color +#: model_terms:ir.ui.view,arch_db:web_company_color.view_company_form +msgid "Are you sure you want to reset all colors to Odoo defaults?" +msgstr "" +"Weet u zeker dat u alle kleuren wilt terugzetten naar de Odoo-" +"standaardwaarden?" + #. module: web_company_color #: model:ir.model.fields,field_description:web_company_color.field_res_company__color_button_bg msgid "Button Background Color" @@ -104,6 +111,11 @@ msgstr "Navigatiebalk Tekstkleuren" msgid "Qweb" msgstr "Qweb" +#. module: web_company_color +#: model_terms:ir.ui.view,arch_db:web_company_color.view_company_form +msgid "Reset colors" +msgstr "Kleuren herstellen" + #. module: web_company_color #: model:ir.model.fields,field_description:web_company_color.field_res_company__scss_modif_timestamp msgid "SCSS Modif. Timestamp" diff --git a/web_company_color/i18n/pt.po b/web_company_color/i18n/pt.po index 02fb6798848a..f14bef7d3299 100644 --- a/web_company_color/i18n/pt.po +++ b/web_company_color/i18n/pt.po @@ -28,6 +28,13 @@ msgstr "" " Para que as alterações entrem em vigor, atualize\n" " a página." +#. module: web_company_color +#: model_terms:ir.ui.view,arch_db:web_company_color.view_company_form +msgid "Are you sure you want to reset all colors to Odoo defaults?" +msgstr "" +"Tem a certeza de que pretende repor todas as cores para os valores " +"predefinidos do Odoo?" + #. module: web_company_color #: model:ir.model.fields,field_description:web_company_color.field_res_company__color_button_bg msgid "Button Background Color" @@ -103,6 +110,11 @@ msgstr "Cor do Texto da Barra de Navegação" msgid "Qweb" msgstr "QWeb" +#. module: web_company_color +#: model_terms:ir.ui.view,arch_db:web_company_color.view_company_form +msgid "Reset colors" +msgstr "Repor cores" + #. module: web_company_color #: model:ir.model.fields,field_description:web_company_color.field_res_company__scss_modif_timestamp msgid "SCSS Modif. Timestamp" diff --git a/web_company_color/i18n/sl.po b/web_company_color/i18n/sl.po new file mode 100644 index 000000000000..9741e5b12a69 --- /dev/null +++ b/web_company_color/i18n/sl.po @@ -0,0 +1,125 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_company_color +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 18.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2026-06-06 11:59+0000\n" +"Last-Translator: Matjaz Mozetic \n" +"Language-Team: none\n" +"Language: sl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=4; plural=n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || " +"n%100==4 ? 2 : 3;\n" +"X-Generator: Weblate 5.15.2\n" + +#. module: web_company_color +#: model_terms:ir.ui.view,arch_db:web_company_color.view_company_form +msgid "" +"\n" +" In order for the changes to take effect, please " +"refresh\n" +" the page." +msgstr "" +"\n" +" Da bi spremembe stopile v veljavo, osvežite\n" +" stran." + +#. module: web_company_color +#: model_terms:ir.ui.view,arch_db:web_company_color.view_company_form +msgid "Are you sure you want to reset all colors to Odoo defaults?" +msgstr "" + +#. module: web_company_color +#: model:ir.model.fields,field_description:web_company_color.field_res_company__color_button_bg +msgid "Button Background Color" +msgstr "Barva ozadja gumba" + +#. module: web_company_color +#: model:ir.model.fields,field_description:web_company_color.field_res_company__color_button_bg_hover +msgid "Button Background Color Hover" +msgstr "Barva ozadja gumba ob prehodu z miško" + +#. module: web_company_color +#: model:ir.model.fields,field_description:web_company_color.field_res_company__color_button_text +msgid "Button Text Color" +msgstr "Barva besedila na gumbu" + +#. module: web_company_color +#: model_terms:ir.ui.view,arch_db:web_company_color.view_company_form +msgid "Colors" +msgstr "Barve" + +#. module: web_company_color +#: model:ir.model,name:web_company_color.model_res_company +msgid "Companies" +msgstr "Družbe" + +#. module: web_company_color +#: model:ir.model.fields,field_description:web_company_color.field_res_company__company_colors +msgid "Company Colors" +msgstr "Barve družbe" + +#. module: web_company_color +#: model_terms:ir.ui.view,arch_db:web_company_color.view_company_form +msgid "Company Styles" +msgstr "Slogi družbe" + +#. module: web_company_color +#: model_terms:ir.ui.view,arch_db:web_company_color.view_company_form +msgid "Compute colors from logo" +msgstr "Obdelaj barve iz logotipa" + +#. module: web_company_color +#: model:ir.model.fields,field_description:web_company_color.field_res_company__color_link_text +msgid "Link Text Color" +msgstr "Barva besedila povezave" + +#. module: web_company_color +#: model:ir.model.fields,field_description:web_company_color.field_res_company__color_link_text_hover +msgid "Link Text Color Hover" +msgstr "Barva besedila povezave ob preletu miške" + +#. module: web_company_color +#: model:ir.model.fields,field_description:web_company_color.field_res_company__color_navbar_bg +msgid "Navbar Background Color" +msgstr "Barva ozadja navigacijske vrstice" + +#. module: web_company_color +#: model:ir.model.fields,field_description:web_company_color.field_res_company__color_navbar_bg_hover +msgid "Navbar Background Color Hover" +msgstr "Barva ozadja navigacijske vrstice ob preletu z miško" + +#. module: web_company_color +#: model:ir.model.fields,field_description:web_company_color.field_res_company__color_navbar_border_bottom +msgid "Navbar Bottom Border Color" +msgstr "Barva spodnjega roba navigacijske vrstice" + +#. module: web_company_color +#: model:ir.model.fields,field_description:web_company_color.field_res_company__color_navbar_text +msgid "Navbar Text Color" +msgstr "Barva besedila v navigacijski vrstici" + +#. module: web_company_color +#: model:ir.model,name:web_company_color.model_ir_qweb +msgid "Qweb" +msgstr "QWeb" + +#. module: web_company_color +#: model_terms:ir.ui.view,arch_db:web_company_color.view_company_form +msgid "Reset colors" +msgstr "" + +#. module: web_company_color +#: model:ir.model.fields,field_description:web_company_color.field_res_company__scss_modif_timestamp +msgid "SCSS Modif. Timestamp" +msgstr "SCSS: Prilagojena časovna oznaka" + +#. module: web_company_color +#: model:ir.model.fields,field_description:web_company_color.field_res_company__color_submenu_text +msgid "Submenu Text Color" +msgstr "Barva besedila v podmeniju" diff --git a/web_company_color/i18n/web_company_color.pot b/web_company_color/i18n/web_company_color.pot index f6430b4dffc1..edbc07ea3e95 100644 --- a/web_company_color/i18n/web_company_color.pot +++ b/web_company_color/i18n/web_company_color.pot @@ -21,6 +21,11 @@ msgid "" " the page." msgstr "" +#. module: web_company_color +#: model_terms:ir.ui.view,arch_db:web_company_color.view_company_form +msgid "Are you sure you want to reset all colors to Odoo defaults?" +msgstr "" + #. module: web_company_color #: model:ir.model.fields,field_description:web_company_color.field_res_company__color_button_bg msgid "Button Background Color" @@ -96,6 +101,11 @@ msgstr "" msgid "Qweb" msgstr "" +#. module: web_company_color +#: model_terms:ir.ui.view,arch_db:web_company_color.view_company_form +msgid "Reset colors" +msgstr "" + #. module: web_company_color #: model:ir.model.fields,field_description:web_company_color.field_res_company__scss_modif_timestamp msgid "SCSS Modif. Timestamp" diff --git a/web_company_color/i18n/zh_CN.po b/web_company_color/i18n/zh_CN.po index 586cdf9d68f1..32bee94257ff 100644 --- a/web_company_color/i18n/zh_CN.po +++ b/web_company_color/i18n/zh_CN.po @@ -25,6 +25,11 @@ msgid "" " the page." msgstr "" +#. module: web_company_color +#: model_terms:ir.ui.view,arch_db:web_company_color.view_company_form +msgid "Are you sure you want to reset all colors to Odoo defaults?" +msgstr "您确定要将所有颜色重置为Odoo默认值吗?" + #. module: web_company_color #: model:ir.model.fields,field_description:web_company_color.field_res_company__color_button_bg msgid "Button Background Color" @@ -100,6 +105,11 @@ msgstr "导航栏文字颜色" msgid "Qweb" msgstr "Qweb" +#. module: web_company_color +#: model_terms:ir.ui.view,arch_db:web_company_color.view_company_form +msgid "Reset colors" +msgstr "重置颜色" + #. module: web_company_color #: model:ir.model.fields,field_description:web_company_color.field_res_company__scss_modif_timestamp msgid "SCSS Modif. Timestamp" diff --git a/web_company_color/models/res_company.py b/web_company_color/models/res_company.py index 1e98afa97a5d..3d40723bc5e4 100644 --- a/web_company_color/models/res_company.py +++ b/web_company_color/models/res_company.py @@ -182,6 +182,9 @@ def write(self, values): self.scss_create_or_update_attachment() return result + def button_reset_colors(self): + self.write({"company_colors": {}}) + def button_compute_color(self): self.ensure_one() values = self.default_get( diff --git a/web_company_color/readme/CONTRIBUTORS.md b/web_company_color/readme/CONTRIBUTORS.md index e074b858bf02..d6e92913ce18 100644 --- a/web_company_color/readme/CONTRIBUTORS.md +++ b/web_company_color/readme/CONTRIBUTORS.md @@ -10,3 +10,4 @@ - Carlos Roca - [PyTech](https://www.pytech.it): - Simone Rubino \<\> +- Marwan Behillil \<> diff --git a/web_company_color/static/description/index.html b/web_company_color/static/description/index.html index dd2882acf635..f0150e75f03e 100644 --- a/web_company_color/static/description/index.html +++ b/web_company_color/static/description/index.html @@ -372,7 +372,7 @@

    Web Company Color

    !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:dae72dca32daa1de5666e39a00359088595ea0c6330b4b4300670e4e3a0b6680 +!! source digest: sha256:3e5f3c3f38a73bd62888ddabe88246540e60d039a5ae554d85784cb1ce1623d3 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

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

    This module change navbar colors based in the company logo colors.

    @@ -436,6 +436,7 @@

    Contributors

  • Simone Rubino <simone.rubino@pytech.it>
  • +
  • Marwan Behillil <marwan.behillil@gmail.com>
  • diff --git a/web_company_color/tests/test_res_company.py b/web_company_color/tests/test_res_company.py index ea300cb38cb0..3963ba8f9646 100644 --- a/web_company_color/tests/test_res_company.py +++ b/web_company_color/tests/test_res_company.py @@ -79,6 +79,44 @@ def test_change_color(self): "Invalid Navbar Background Color", ) + def test_reset_colors(self): + company = self.env["res.company"].search([], limit=1) + company.sudo().write( + { + "color_navbar_bg": "#111111", + "color_navbar_bg_hover": "#222222", + "color_navbar_text": "#333333", + "color_button_bg": "#444444", + "color_button_bg_hover": "#555555", + "color_button_text": "#666666", + "color_link_text": "#777777", + "color_link_text_hover": "#888888", + "color_submenu_text": "#999999", + } + ) + company.button_reset_colors() + company.invalidate_recordset() + self.assertFalse(company.color_navbar_bg, "color_navbar_bg should be reset") + self.assertFalse( + company.color_navbar_bg_hover, "color_navbar_bg_hover should be reset" + ) + self.assertFalse(company.color_navbar_text, "color_navbar_text should be reset") + self.assertFalse(company.color_button_bg, "color_button_bg should be reset") + self.assertFalse( + company.color_button_bg_hover, "color_button_bg_hover should be reset" + ) + self.assertFalse(company.color_button_text, "color_button_text should be reset") + self.assertFalse(company.color_link_text, "color_link_text should be reset") + self.assertFalse( + company.color_link_text_hover, "color_link_text_hover should be reset" + ) + self.assertFalse( + company.color_submenu_text, "color_submenu_text should be reset" + ) + self.assertFalse( + company.company_colors, "company_colors should be empty after reset" + ) + def test_compiled_scss(self): """The SCSS is compiled before being sent to the client.""" # Arrange diff --git a/web_company_color/utils.py b/web_company_color/utils.py index 2028a4c4b892..78f1ab6cc7d8 100644 --- a/web_company_color/utils.py +++ b/web_company_color/utils.py @@ -4,7 +4,10 @@ import math from io import BytesIO -from PIL import Image +from PIL import ( + Image, + WebPImagePlugin, # noqa: F401 - force WebP opener registration +) def n_rgb_to_hex(_r, _g, _b): diff --git a/web_company_color/view/res_company.xml b/web_company_color/view/res_company.xml index 55969037919a..26ffea8dd234 100644 --- a/web_company_color/view/res_company.xml +++ b/web_company_color/view/res_company.xml @@ -32,6 +32,13 @@ type="object" string="Compute colors from logo" /> +