diff --git a/README.md b/README.md index 71e3e930ac44..f67f64918b99 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ 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.0.1 | trisdoan | Add an option to change the chatter position +[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_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 @@ -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.1 | | web_m2x_options +[web_m2x_options](web_m2x_options/) | 18.0.1.0.2 | | 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 @@ -50,7 +50,7 @@ addon | version | maintainers | summary [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_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.4 | Tardo SplashS | Responsive web client, community-supported +[web_responsive](web_responsive/) | 18.0.1.0.5 | Tardo SplashS | Responsive web client, community-supported [web_save_discard_button](web_save_discard_button/) | 18.0.1.0.1 | synconics | Save & Discard Buttons [web_search_with_and](web_search_with_and/) | 18.0.1.0.1 | | Use AND conditions on omnibar search [web_send_message_popup](web_send_message_popup/) | 18.0.1.0.0 | | Web Send Message as Popup diff --git a/web_chatter_position/README.rst b/web_chatter_position/README.rst index 4e0ff416faf2..202015ee556d 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:ccac0e3a4242c9fd1a94fa26f6bfce9a021115c4743c66a450bce993bc76f515 + !! source digest: sha256:f0de4c200329e3f762e62dc49f8c31ed4dba8baea0443ce1ed283adaeb478b32 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png @@ -87,6 +87,10 @@ Contributors - Tris Doan +- `ForgeFlow `__ + + - Joan Sisquella + Maintainers ----------- diff --git a/web_chatter_position/__manifest__.py b/web_chatter_position/__manifest__.py index 2cb6b8166c82..b9a2e8c6a537 100644 --- a/web_chatter_position/__manifest__.py +++ b/web_chatter_position/__manifest__.py @@ -1,11 +1,12 @@ # Copyright 2022 Hynsys Technologies # Copyright 2024 Alitec Pte Ltd +# Copyright 2026 ForgeFlow S.L. (https://www.forgeflow.com) # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). { "name": "Chatter Position", "summary": "Add an option to change the chatter position", - "version": "18.0.1.0.1", + "version": "18.0.1.1.0", "author": "Hynsys Technologies, Camptocamp, Alitec Pte Ltd," " Odoo Community Association (OCA)", "maintainers": ["trisdoan"], @@ -18,6 +19,11 @@ "web.assets_backend": [ "/web_chatter_position/static/src/**/*.js", "/web_chatter_position/static/src/**/*.scss", + ( + "after", + "/web/static/src/views/form/form_controller.xml", + "/web_chatter_position/static/src/views/form/form_controller.xml", + ), ], }, } diff --git a/web_chatter_position/i18n/ca.po b/web_chatter_position/i18n/ca.po index 42e05ea598ad..ff3f6e46ffbf 100644 --- a/web_chatter_position/i18n/ca.po +++ b/web_chatter_position/i18n/ca.po @@ -36,6 +36,12 @@ msgstr "Posició del chatter" msgid "Sided" msgstr "Al costat" +#. module: web_chatter_position +#. odoo-javascript +#: code:addons/web_chatter_position/static/src/views/form/form_controller.xml:0 +msgid "Toggle chatter position" +msgstr "" + #. module: web_chatter_position #: model:ir.model,name:web_chatter_position.model_res_users msgid "User" diff --git a/web_chatter_position/i18n/de.po b/web_chatter_position/i18n/de.po index d69e0da20a8f..42604b927741 100644 --- a/web_chatter_position/i18n/de.po +++ b/web_chatter_position/i18n/de.po @@ -36,6 +36,12 @@ msgstr "Chatter-Position" msgid "Sided" msgstr "Seitlich" +#. module: web_chatter_position +#. odoo-javascript +#: code:addons/web_chatter_position/static/src/views/form/form_controller.xml:0 +msgid "Toggle chatter position" +msgstr "" + #. module: web_chatter_position #: model:ir.model,name:web_chatter_position.model_res_users msgid "User" diff --git a/web_chatter_position/i18n/es.po b/web_chatter_position/i18n/es.po index 882aabf2c113..b79c9e28b8f0 100644 --- a/web_chatter_position/i18n/es.po +++ b/web_chatter_position/i18n/es.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 16.0\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2026-04-13 08:14+0000\n" +"PO-Revision-Date: 2026-04-19 09:41+0000\n" "Last-Translator: Ed-Spain \n" "Language-Team: none\n" "Language: es\n" @@ -36,6 +36,12 @@ msgstr "Posición del historial de comunicación" msgid "Sided" msgstr "Lateral" +#. module: web_chatter_position +#. odoo-javascript +#: code:addons/web_chatter_position/static/src/views/form/form_controller.xml:0 +msgid "Toggle chatter position" +msgstr "Alternar la posición del Chatter (conversación)" + #. module: web_chatter_position #: model:ir.model,name:web_chatter_position.model_res_users msgid "User" diff --git a/web_chatter_position/i18n/fr.po b/web_chatter_position/i18n/fr.po index a6a31dca3bdd..372dbdc7d28f 100644 --- a/web_chatter_position/i18n/fr.po +++ b/web_chatter_position/i18n/fr.po @@ -36,6 +36,12 @@ msgstr "Position du Chatter" msgid "Sided" msgstr "A droite" +#. module: web_chatter_position +#. odoo-javascript +#: code:addons/web_chatter_position/static/src/views/form/form_controller.xml:0 +msgid "Toggle chatter position" +msgstr "" + #. module: web_chatter_position #: model:ir.model,name:web_chatter_position.model_res_users msgid "User" diff --git a/web_chatter_position/i18n/fr_BE.po b/web_chatter_position/i18n/fr_BE.po index a8834e44c912..71ea298bce3b 100644 --- a/web_chatter_position/i18n/fr_BE.po +++ b/web_chatter_position/i18n/fr_BE.po @@ -36,6 +36,12 @@ msgstr "Position du Chatter" msgid "Sided" msgstr "Sur le côté" +#. module: web_chatter_position +#. odoo-javascript +#: code:addons/web_chatter_position/static/src/views/form/form_controller.xml:0 +msgid "Toggle chatter position" +msgstr "" + #. module: web_chatter_position #: model:ir.model,name:web_chatter_position.model_res_users msgid "User" diff --git a/web_chatter_position/i18n/hr.po b/web_chatter_position/i18n/hr.po index 378cfe389539..5eb6c533178f 100644 --- a/web_chatter_position/i18n/hr.po +++ b/web_chatter_position/i18n/hr.po @@ -37,6 +37,12 @@ msgstr "Pozicija razgovora" msgid "Sided" msgstr "Sa strane" +#. module: web_chatter_position +#. odoo-javascript +#: code:addons/web_chatter_position/static/src/views/form/form_controller.xml:0 +msgid "Toggle chatter position" +msgstr "" + #. module: web_chatter_position #: model:ir.model,name:web_chatter_position.model_res_users msgid "User" diff --git a/web_chatter_position/i18n/it.po b/web_chatter_position/i18n/it.po index bc1ceb5e906b..9c16b159d5f7 100644 --- a/web_chatter_position/i18n/it.po +++ b/web_chatter_position/i18n/it.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 16.0\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2025-11-17 09:42+0000\n" +"PO-Revision-Date: 2026-04-20 16:45+0000\n" "Last-Translator: mymage \n" "Language-Team: none\n" "Language: it\n" @@ -14,7 +14,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 5.10.4\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 @@ -36,6 +36,12 @@ msgstr "Posizione conversazione" msgid "Sided" msgstr "Laterale" +#. module: web_chatter_position +#. odoo-javascript +#: code:addons/web_chatter_position/static/src/views/form/form_controller.xml:0 +msgid "Toggle chatter position" +msgstr "Inverti posizione discussioni" + #. module: web_chatter_position #: model:ir.model,name:web_chatter_position.model_res_users msgid "User" diff --git a/web_chatter_position/i18n/nl.po b/web_chatter_position/i18n/nl.po index 15b7c9ec0ab4..57f793b0b3ff 100644 --- a/web_chatter_position/i18n/nl.po +++ b/web_chatter_position/i18n/nl.po @@ -36,6 +36,12 @@ msgstr "Chatter-positie" msgid "Sided" msgstr "Zijdelings" +#. module: web_chatter_position +#. odoo-javascript +#: code:addons/web_chatter_position/static/src/views/form/form_controller.xml:0 +msgid "Toggle chatter position" +msgstr "" + #. module: web_chatter_position #: model:ir.model,name:web_chatter_position.model_res_users msgid "User" diff --git a/web_chatter_position/i18n/pt_BR.po b/web_chatter_position/i18n/pt_BR.po index bdd436bba322..3fa5b1bcc32d 100644 --- a/web_chatter_position/i18n/pt_BR.po +++ b/web_chatter_position/i18n/pt_BR.po @@ -36,6 +36,12 @@ msgstr "Posição da Conversa" msgid "Sided" msgstr "Lateral" +#. module: web_chatter_position +#. odoo-javascript +#: code:addons/web_chatter_position/static/src/views/form/form_controller.xml:0 +msgid "Toggle chatter position" +msgstr "" + #. module: web_chatter_position #: model:ir.model,name:web_chatter_position.model_res_users msgid "User" diff --git a/web_chatter_position/i18n/tr.po b/web_chatter_position/i18n/tr.po index 88f30cdf87aa..6e118ee334e9 100644 --- a/web_chatter_position/i18n/tr.po +++ b/web_chatter_position/i18n/tr.po @@ -36,6 +36,12 @@ msgstr "Sohbet Pozisyonu" msgid "Sided" msgstr "" +#. module: web_chatter_position +#. odoo-javascript +#: code:addons/web_chatter_position/static/src/views/form/form_controller.xml:0 +msgid "Toggle chatter position" +msgstr "" + #. module: web_chatter_position #: model:ir.model,name:web_chatter_position.model_res_users msgid "User" diff --git a/web_chatter_position/i18n/web_chatter_position.pot b/web_chatter_position/i18n/web_chatter_position.pot index 9df93c8884a2..6186b2f86c73 100644 --- a/web_chatter_position/i18n/web_chatter_position.pot +++ b/web_chatter_position/i18n/web_chatter_position.pot @@ -33,6 +33,12 @@ msgstr "" msgid "Sided" msgstr "" +#. module: web_chatter_position +#. odoo-javascript +#: code:addons/web_chatter_position/static/src/views/form/form_controller.xml:0 +msgid "Toggle chatter position" +msgstr "" + #. module: web_chatter_position #: model:ir.model,name:web_chatter_position.model_res_users msgid "User" diff --git a/web_chatter_position/readme/CONTRIBUTORS.md b/web_chatter_position/readme/CONTRIBUTORS.md index 4909dbc2af1b..3426efb884d4 100644 --- a/web_chatter_position/readme/CONTRIBUTORS.md +++ b/web_chatter_position/readme/CONTRIBUTORS.md @@ -6,3 +6,5 @@ - Jay Patel \<\> - Trobz - Tris Doan \<\> +- [ForgeFlow](https://www.forgeflow.com) + - Joan Sisquella \<\> diff --git a/web_chatter_position/static/description/index.html b/web_chatter_position/static/description/index.html index 5af050b04fbe..f7277204d623 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:ccac0e3a4242c9fd1a94fa26f6bfce9a021115c4743c66a450bce993bc76f515 +!! source digest: sha256:f0de4c200329e3f762e62dc49f8c31ed4dba8baea0443ce1ed283adaeb478b32 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

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

Configurable chatter position from the user preferences.

@@ -432,6 +432,10 @@

Contributors

  • Tris Doan <tridm@trobz.com>
  • +
  • ForgeFlow +
  • diff --git a/web_chatter_position/static/src/scss/form_controller.scss b/web_chatter_position/static/src/scss/form_controller.scss index d61773f02a73..bbdc5d3a08f2 100644 --- a/web_chatter_position/static/src/scss/form_controller.scss +++ b/web_chatter_position/static/src/scss/form_controller.scss @@ -10,3 +10,7 @@ width: auto !important; } } + +.o_chatter_position_button { + order: -1; +} 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 new file mode 100644 index 000000000000..394295fd308c --- /dev/null +++ b/web_chatter_position/static/src/views/form/form_controller.esm.js @@ -0,0 +1,110 @@ +/* + Copyright 2026 ForgeFlow S.L. (https://www.forgeflow.com). + License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). +*/ +import {onMounted, onPatched, useExternalListener, useState} from "@odoo/owl"; + +import {browser} from "@web/core/browser/browser"; +import {SIZES} from "@web/core/ui/ui_service"; +import {patch} from "@web/core/utils/patch"; +import {FormController} from "@web/views/form/form_controller"; + +patch(FormController.prototype, { + setup() { + super.setup(...arguments); + this.chatterPositionState = useState({ + currentPosition: odoo.web_chatter_position || "auto", + }); + + onMounted(() => { + this.moveChatter(); + }); + + useExternalListener(browser, "resize", () => { + if (this.chatterPositionState.currentPosition === "bottom") { + const formSheetBg = this.rootRef?.el?.querySelector(".o_form_sheet_bg"); + if (formSheetBg) { + this._moveChatter(formSheetBg); + this.rootRef.el.style.overflow = "auto"; + } + } + }); + + onPatched(() => { + this.moveChatter(); + }); + }, + + onClickChangePosition() { + const newPosition = + this.chatterPositionState.currentPosition === "bottom" ? "sided" : "bottom"; + this.chatterPositionState.currentPosition = newPosition; + this.moveChatter(); + }, + + get isChatterToggleVisible() { + if (this.env.inDialog || this.env.isSmall) { + return false; + } + if (this.ui.size < SIZES.XXL) { + return false; + } + const xmlDoc = this.archInfo?.xmlDoc; + if (!xmlDoc) { + return false; + } + return Boolean(xmlDoc.querySelector("chatter")); + }, + + moveChatter() { + if ( + this.ui.size < SIZES.XXL || + this.chatterPositionState.currentPosition === "auto" + ) { + return; + } + const rootEl = this.rootRef?.el; + if (!rootEl) { + return; + } + const formSheetBg = rootEl.querySelector(".o_form_sheet_bg"); + if (!formSheetBg) return; + const formRenderer = formSheetBg.parentElement; + if (!formRenderer) return; + + if (this.chatterPositionState.currentPosition === "bottom") { + this._moveChatter(formSheetBg); + } else if (this.chatterPositionState.currentPosition === "sided") { + this._moveChatter(formRenderer); + } + }, + + _moveChatter(target) { + if (!target || !this.rootRef?.el) { + return; + } + const currentChatter = this.rootRef.el.querySelector(".o-mail-Form-chatter"); + if (!currentChatter) { + return; + } + target.appendChild(currentChatter); + + if (this.chatterPositionState.currentPosition === "bottom") { + currentChatter.classList.remove("o-aside", "w-print-100"); + currentChatter.classList.add("o-isInFormSheetBg", "mt-4", "mt-md-0"); + const formSheetBg = this.rootRef.el.querySelector(".o_form_sheet_bg"); + if (formSheetBg) { + formSheetBg.classList.add("o_fullwidth"); + } + this.rootRef.el.style.overflow = "auto"; + } else { + currentChatter.classList.remove("o-isInFormSheetBg", "mt-4", "mt-md-0"); + 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 = ""; + } + }, +}); diff --git a/web_chatter_position/static/src/views/form/form_controller.xml b/web_chatter_position/static/src/views/form/form_controller.xml new file mode 100644 index 000000000000..d590620f87c0 --- /dev/null +++ b/web_chatter_position/static/src/views/form/form_controller.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + diff --git a/web_m2x_options/README.rst b/web_m2x_options/README.rst index 25df0b27c4e0..cd1a461efec5 100644 --- a/web_m2x_options/README.rst +++ b/web_m2x_options/README.rst @@ -11,7 +11,7 @@ web_m2x_options !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:881a75e6602b8037ae91fff6ff77e99caff9cba4b1ccda3dff174f64f4e42824 + !! source digest: sha256:5dd01fb787f522fb1380ac914658c801fb7cdcd937fe81ac52fb8db24298ee60 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png diff --git a/web_m2x_options/__manifest__.py b/web_m2x_options/__manifest__.py index 47ddd26e925d..3306e78e6fc4 100644 --- a/web_m2x_options/__manifest__.py +++ b/web_m2x_options/__manifest__.py @@ -6,7 +6,7 @@ { "name": "web_m2x_options", - "version": "18.0.1.0.1", + "version": "18.0.1.0.2", "category": "Web", "author": "initOS GmbH," "ACSONE SA/NV, " diff --git a/web_m2x_options/static/description/index.html b/web_m2x_options/static/description/index.html index 3330f388300e..eada26a29d1a 100644 --- a/web_m2x_options/static/description/index.html +++ b/web_m2x_options/static/description/index.html @@ -372,7 +372,7 @@

    web_m2x_options

    !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:881a75e6602b8037ae91fff6ff77e99caff9cba4b1ccda3dff174f64f4e42824 +!! source digest: sha256:5dd01fb787f522fb1380ac914658c801fb7cdcd937fe81ac52fb8db24298ee60 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

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

    This modules modifies “many2one” and “many2manytags” form widgets so as diff --git a/web_m2x_options/static/src/components/form.esm.js b/web_m2x_options/static/src/components/form.esm.js index 48110462dd7d..e2fbe9ca7bb0 100644 --- a/web_m2x_options/static/src/components/form.esm.js +++ b/web_m2x_options/static/src/components/form.esm.js @@ -27,41 +27,51 @@ function evaluateSystemParameterDefaultTrue(option) { return isOptionSet ? evaluateBooleanExpr(isOptionSet) : true; } +function evaluateHasCreatePermission(attrs) { + return attrs.can_create ? evaluateBooleanExpr(attrs.can_create) : true; +} + +function evaluateFieldBooleanOption(option) { + return typeof option === "boolean" ? option : evaluateBooleanExpr(option); +} + patch(many2OneField, { m2o_options_props_create(props, attrs, options) { const canQuickCreate = evaluateSystemParameterDefaultTrue("create"); + const hasCreatePermission = evaluateHasCreatePermission(attrs); if (options.no_quick_create) { props.canQuickCreate = false; } else if ("no_quick_create" in options) { - props.canQuickCreate = attrs.can_create - ? evaluateBooleanExpr(attrs.can_create) - : true; + props.canQuickCreate = hasCreatePermission; + } else if ("create" in options) { + // Field option set, but must respect can_create security attribute + props.canQuickCreate = + hasCreatePermission && evaluateFieldBooleanOption(options.create); } else if (!canQuickCreate && props.canQuickCreate) { props.canQuickCreate = false; } else if (canQuickCreate && !props.canQuickCreate) { - props.canQuickCreate = attrs.can_create - ? evaluateBooleanExpr(attrs.can_create) - : true; + props.canQuickCreate = hasCreatePermission; } return props; }, m2o_options_props_create_edit(props, attrs, options) { const canCreateEdit = evaluateSystemParameterDefaultTrue("create_edit"); + const hasCreatePermission = evaluateHasCreatePermission(attrs); if (options.no_create_edit) { props.canCreateEdit = false; } else if ("no_create_edit" in options) { // Same condition set in web/views/fields/many2one/many2one_field - props.canCreateEdit = attrs.can_create - ? evaluateBooleanExpr(attrs.can_create) - : true; + props.canCreateEdit = hasCreatePermission; + } else if ("create_edit" in options) { + // Field option set, but must respect can_create security attribute + props.canCreateEdit = + hasCreatePermission && evaluateFieldBooleanOption(options.create_edit); } else if (!canCreateEdit && props.canCreateEdit) { props.canCreateEdit = false; } else if (canCreateEdit && !props.canCreateEdit) { // Same condition set in web/views/fields/many2one/many2one_field - props.canCreateEdit = attrs.can_create - ? evaluateBooleanExpr(attrs.can_create) - : true; + props.canCreateEdit = hasCreatePermission; } return props; }, @@ -152,14 +162,17 @@ patch(Many2OneField.prototype, { patch(many2ManyTagsField, { m2m_options_props_create(props, attrs, options) { const canQuickCreate = evaluateSystemParameterDefaultTrue("create"); + const hasCreatePermission = evaluateHasCreatePermission(attrs); // Create option already available for m2m fields if (!options.no_quick_create) { - if (!canQuickCreate && props.canQuickCreate) { + if ("create" in options) { + // Field option set, but must respect can_create security attribute + props.canQuickCreate = + hasCreatePermission && evaluateFieldBooleanOption(options.create); + } else if (!canQuickCreate && props.canQuickCreate) { props.canQuickCreate = false; } else if (canQuickCreate && !props.canQuickCreate) { - props.canQuickCreate = attrs.can_create - ? evaluateBooleanExpr(attrs.can_create) - : true; + props.canQuickCreate = hasCreatePermission; } } return props; @@ -167,20 +180,20 @@ patch(many2ManyTagsField, { m2m_options_props_create_edit(props, attrs, options) { const canCreateEdit = evaluateSystemParameterDefaultTrue("create_edit"); + const hasCreatePermission = evaluateHasCreatePermission(attrs); if (options.no_create_edit) { props.canCreateEdit = false; } else if ("no_create_edit" in options) { // Same condition set in web/views/fields/many2one/many2one_field - props.canCreateEdit = attrs.can_create - ? evaluateBooleanExpr(attrs.can_create) - : true; + props.canCreateEdit = hasCreatePermission; + } else if ("create_edit" in options) { + props.canCreateEdit = + hasCreatePermission && evaluateFieldBooleanOption(options.create_edit); } else if (!canCreateEdit && props.canCreateEdit) { props.canCreateEdit = false; } else if (canCreateEdit && !props.canCreateEdit) { // Same condition set in web/views/fields/many2one/many2one_field - props.canCreateEdit = attrs.can_create - ? evaluateBooleanExpr(attrs.can_create) - : true; + props.canCreateEdit = hasCreatePermission; } return props; }, diff --git a/web_pivot_computed_measure/i18n/es.po b/web_pivot_computed_measure/i18n/es.po index 77e1ca74e877..ce35e37d4e30 100644 --- a/web_pivot_computed_measure/i18n/es.po +++ b/web_pivot_computed_measure/i18n/es.po @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: Odoo Server 12.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2022-11-22 12:42+0000\n" -"PO-Revision-Date: 2026-04-13 08:14+0000\n" +"PO-Revision-Date: 2026-04-19 09:41+0000\n" "Last-Translator: Ed-Spain \n" "Language-Team: none\n" "Language: es\n" @@ -116,7 +116,7 @@ msgstr "Tabla de socios" #. odoo-javascript #: code:addons/web_pivot_computed_measure/static/src/dropdown_item_custom_measure/dropdown_item_custom_measure.xml:0 msgid "Perc (m1 * 100 / m2)" -msgstr "Perc (m1 * 100 / m2)" +msgstr "Porc (m1 * 100 / m2)" #. module: web_pivot_computed_measure #. odoo-javascript @@ -128,7 +128,7 @@ msgstr "Porcentaje" #. odoo-javascript #: code:addons/web_pivot_computed_measure/static/src/dropdown_item_custom_measure/dropdown_item_custom_measure.xml:0 msgid "Sub (m1 - m2)" -msgstr "Sub (m1 - m2)" +msgstr "Resta (m1 - m2)" #. module: web_pivot_computed_measure #. odoo-javascript diff --git a/web_responsive/README.rst b/web_responsive/README.rst index c8ed4a053318..6ab45f8a2ded 100644 --- a/web_responsive/README.rst +++ b/web_responsive/README.rst @@ -11,7 +11,7 @@ Web Responsive !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:7c1f9b7598d98d74b9c4611ac248b18279c68ef2cbcd20661173827416219e17 + !! source digest: sha256:0f299826d3f0e96c2411e8477bbe19a86dfd325491b0ae39463d8548d9556cb3 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png diff --git a/web_responsive/__manifest__.py b/web_responsive/__manifest__.py index c7761639ec30..0aa205144dc9 100644 --- a/web_responsive/__manifest__.py +++ b/web_responsive/__manifest__.py @@ -9,7 +9,7 @@ { "name": "Web Responsive", "summary": "Responsive web client, community-supported", - "version": "18.0.1.0.4", + "version": "18.0.1.0.5", "category": "Website", "website": "https://github.com/OCA/web", "author": "LasLabs, Tecnativa, ITerra, Onestein, " diff --git a/web_responsive/static/description/index.html b/web_responsive/static/description/index.html index e01f688b4bb9..cfdffb206c6d 100644 --- a/web_responsive/static/description/index.html +++ b/web_responsive/static/description/index.html @@ -372,7 +372,7 @@

    Web Responsive

    !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:7c1f9b7598d98d74b9c4611ac248b18279c68ef2cbcd20661173827416219e17 +!! source digest: sha256:0f299826d3f0e96c2411e8477bbe19a86dfd325491b0ae39463d8548d9556cb3 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

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

    This module adds responsiveness to web backend.

    diff --git a/web_responsive/static/src/components/menu_canonical_searchbar/searchbar.esm.js b/web_responsive/static/src/components/menu_canonical_searchbar/searchbar.esm.js index e1f373342a7e..ba669b1a68b7 100644 --- a/web_responsive/static/src/components/menu_canonical_searchbar/searchbar.esm.js +++ b/web_responsive/static/src/components/menu_canonical_searchbar/searchbar.esm.js @@ -199,6 +199,15 @@ export class AppsMenuCanonicalSearchBar extends Component { } } + /** + * @param {MouseEvent} ev + * @param {Object} menu + */ + _onSearchItemClick(ev, menu) { + ev.preventDefault(); + this.menuService.selectMenu(menu); + } + _splitName(name) { if (!name) { return []; diff --git a/web_responsive/static/src/components/menu_canonical_searchbar/searchbar.xml b/web_responsive/static/src/components/menu_canonical_searchbar/searchbar.xml index 0af1a768b9a1..2272b9e4534d 100644 --- a/web_responsive/static/src/components/menu_canonical_searchbar/searchbar.xml +++ b/web_responsive/static/src/components/menu_canonical_searchbar/searchbar.xml @@ -32,6 +32,7 @@ t-att-href="menu.path" t-att-data-menu-id="menu.id" t-att-data-action-id="menu.actionID" + t-on-click="(ev) => this._onSearchItemClick(ev, menu)" draggable="false" tabindex="-1" > @@ -66,6 +67,7 @@ t-att-href="menu.path" t-att-data-menu-id="menu.id" t-att-data-action-id="menu.actionID" + t-on-click="(ev) => this._onSearchItemClick(ev, menu)" draggable="false" tabindex="-1" >