diff --git a/web_field_tooltip/README.rst b/web_field_tooltip/README.rst index 4b8d7108e..7bc78982b 100644 --- a/web_field_tooltip/README.rst +++ b/web_field_tooltip/README.rst @@ -80,6 +80,12 @@ Contributors - Benoit Aimont (https://www.acsone.eu/) +- `Sygel `__: + + - Manuel Regidor + - Harald Panten + - Valentín Vinagre + Maintainers ----------- diff --git a/web_field_tooltip/__manifest__.py b/web_field_tooltip/__manifest__.py index f017b1a9b..20cdcdaef 100644 --- a/web_field_tooltip/__manifest__.py +++ b/web_field_tooltip/__manifest__.py @@ -6,7 +6,7 @@ "name": "Web Field Tooltip", "summary": """ Displays customizable tooltips for fields""", - "version": "16.0.1.1.0", + "version": "17.0.1.0.0", "license": "AGPL-3", "author": "ACSONE SA/NV,Odoo Community Association (OCA)", "website": "https://github.com/OCA/web", diff --git a/web_field_tooltip/readme/CONTRIBUTORS.md b/web_field_tooltip/readme/CONTRIBUTORS.md index 25a69ac16..63f95fd76 100644 --- a/web_field_tooltip/readme/CONTRIBUTORS.md +++ b/web_field_tooltip/readme/CONTRIBUTORS.md @@ -1 +1,6 @@ - Benoit Aimont \<\> () + +- [Sygel](https://sygel.es): + - Manuel Regidor \<\> + - Harald Panten \<\> + - Valentín Vinagre \<\> diff --git a/web_field_tooltip/static/description/index.html b/web_field_tooltip/static/description/index.html index e5e97392f..cdc28f5f1 100644 --- a/web_field_tooltip/static/description/index.html +++ b/web_field_tooltip/static/description/index.html @@ -427,6 +427,12 @@ If you spotted it first, help us to smash it by providing a detailed and welcome

Contributors

diff --git a/web_field_tooltip/static/src/components/field_tooltip/field_tooltip.esm.js b/web_field_tooltip/static/src/components/field_tooltip/field_tooltip.esm.js index f6eb184bc..cfb9b25a6 100644 --- a/web_field_tooltip/static/src/components/field_tooltip/field_tooltip.esm.js +++ b/web_field_tooltip/static/src/components/field_tooltip/field_tooltip.esm.js @@ -4,7 +4,6 @@ import {Component, markup} from "@odoo/owl"; import {FormViewDialog} from "@web/views/view_dialogs/form_view_dialog"; import {session} from "@web/session"; -import {usePopover} from "@web/core/popover/popover_hook"; import {useService} from "@web/core/utils/hooks"; export class FieldTooltipPopover extends Component {} @@ -12,7 +11,7 @@ FieldTooltipPopover.template = "web_field_tooltip.FieldTooltipPopover"; export class FieldTooltip extends Component { setup() { - this.popover = usePopover(); + this.popover = useService("popover"); this.tooltipPopover = null; this.hasFieldTooltip = this.props.hasFieldTooltip; this.canManageTooltip = session.can_manage_tooltips; diff --git a/web_field_tooltip/static/src/components/field_tooltip/field_tooltip.scss b/web_field_tooltip/static/src/components/field_tooltip/field_tooltip.scss index 0eb4788d2..26da3aaca 100644 --- a/web_field_tooltip/static/src/components/field_tooltip/field_tooltip.scss +++ b/web_field_tooltip/static/src/components/field_tooltip/field_tooltip.scss @@ -1,4 +1,5 @@ sup.field-tooltip { + padding-top: 6px; .tooltip-icon { background: none; border: none; diff --git a/web_field_tooltip/static/src/views/form/form_controller.esm.js b/web_field_tooltip/static/src/views/form/form_controller.esm.js index 2afb6165d..d10f9a7b1 100644 --- a/web_field_tooltip/static/src/views/form/form_controller.esm.js +++ b/web_field_tooltip/static/src/views/form/form_controller.esm.js @@ -1,18 +1,18 @@ /** @odoo-module **/ import {FormController} from "@web/views/form/form_controller"; +import {_t} from "@web/core/l10n/translation"; import {patch} from "@web/core/utils/patch"; - import {session} from "@web/session"; -patch(FormController.prototype, "web_field_tooltip", { - getActionMenuItems() { - const menuItems = this._super(...arguments); - const otherMenuItems = menuItems.other; +const web_field_tooltip = { + get actionMenuItems() { + const menuItems = super.actionMenuItems; + const otherMenuItems = menuItems.action; if (session.can_manage_tooltips) { otherMenuItems.push({ key: "manage_tooltips", - description: this.env._t("Manage tooltips"), + description: _t("Manage tooltips"), callback: () => this.manageTooltips(), }); } @@ -31,4 +31,6 @@ patch(FormController.prototype, "web_field_tooltip", { } ); }, -}); +}; + +patch(FormController.prototype, web_field_tooltip); diff --git a/web_field_tooltip/static/src/views/form/form_label.esm.js b/web_field_tooltip/static/src/views/form/form_label.esm.js index ed81dcec7..c0b634b0e 100644 --- a/web_field_tooltip/static/src/views/form/form_label.esm.js +++ b/web_field_tooltip/static/src/views/form/form_label.esm.js @@ -7,7 +7,7 @@ import {patch} from "@web/core/utils/patch"; import {session} from "@web/session"; -patch(FormLabel.prototype, "web_field_tooltip", { +const web_field_tooltip = { get showTooltipAddHelper() { return session.tooltip_show_add_helper; }, @@ -27,7 +27,9 @@ patch(FormLabel.prototype, "web_field_tooltip", { fieldName: props.fieldName, }; }, -}); +}; + +patch(FormLabel.prototype, web_field_tooltip); FormLabel.components = Object.assign({}, FormLabel.components, { FieldTooltip, diff --git a/web_field_tooltip/static/src/views/list/list_renderer.esm.js b/web_field_tooltip/static/src/views/list/list_renderer.esm.js index d652028ea..c48baeaf1 100644 --- a/web_field_tooltip/static/src/views/list/list_renderer.esm.js +++ b/web_field_tooltip/static/src/views/list/list_renderer.esm.js @@ -7,7 +7,7 @@ import {patch} from "@web/core/utils/patch"; import {session} from "@web/session"; -patch(ListRenderer.prototype, "web_field_tooltip", { +const web_field_tooltip = { showTooltipAddHelper() { return session.tooltip_show_add_helper; }, @@ -29,7 +29,9 @@ patch(ListRenderer.prototype, "web_field_tooltip", { fieldName: fieldName, }; }, -}); +}; + +patch(ListRenderer.prototype, web_field_tooltip); ListRenderer.components = Object.assign({}, ListRenderer.components, { FieldTooltip, diff --git a/web_field_tooltip/views/ir_model_fields_tooltip.xml b/web_field_tooltip/views/ir_model_fields_tooltip.xml index 892d98391..a7ee60bbd 100644 --- a/web_field_tooltip/views/ir_model_fields_tooltip.xml +++ b/web_field_tooltip/views/ir_model_fields_tooltip.xml @@ -13,7 +13,7 @@ name="web_ribbon" title="Archived" bg_color="bg-danger" - attrs="{'invisible': [('active', '=', True)]}" + invisible="active" /> diff --git a/web_field_tooltip/views/res_users.xml b/web_field_tooltip/views/res_users.xml index eb001bd29..19572f8fa 100644 --- a/web_field_tooltip/views/res_users.xml +++ b/web_field_tooltip/views/res_users.xml @@ -13,7 +13,7 @@ name="tooltip_show_add_helper" widget="boolean_toggle" readonly="0" - attrs="{'invisible': [('tooltip_show_add_helper_allowed', '=', False)]}" + invisible="not tooltip_show_add_helper_allowed" /> diff --git a/web_field_tooltip/views/template.xml b/web_field_tooltip/views/template.xml deleted file mode 100644 index e884a3411..000000000 --- a/web_field_tooltip/views/template.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - -