From 4628c5afddff8c6f23e30cf3a0946fe227baf0b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Mart=C3=ADnez?= Date: Tue, 17 Dec 2024 10:58:11 +0100 Subject: [PATCH] [FIX] account_reconcile_oca: Fix selection_badge_uncheck to correctly apply the corresponding domain Previously the widget selection_badge_uncheck (wrongly migrated to v17) was not defined correctly, which caused the domain not to be applied, causing that the reconciliation models of any type (instead of those defined as buttons) were shown as buttons. TT52238 --- .../src/js/widgets/selection_badge_uncheck.esm.js | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/account_reconcile_oca/static/src/js/widgets/selection_badge_uncheck.esm.js b/account_reconcile_oca/static/src/js/widgets/selection_badge_uncheck.esm.js index 4f27409b1e..906d7e39be 100644 --- a/account_reconcile_oca/static/src/js/widgets/selection_badge_uncheck.esm.js +++ b/account_reconcile_oca/static/src/js/widgets/selection_badge_uncheck.esm.js @@ -1,10 +1,9 @@ /** @odoo-module **/ import { BadgeSelectionField, - preloadSelection, + badgeSelectionField, } from "@web/views/fields/badge_selection/badge_selection_field"; import {registry} from "@web/core/registry"; -import {standardFieldProps} from "@web/views/fields/standard_field_props"; export class FieldSelectionBadgeUncheck extends BadgeSelectionField { async onChange(value) { @@ -20,19 +19,11 @@ export class FieldSelectionBadgeUncheck extends BadgeSelectionField { } } -FieldSelectionBadgeUncheck.props = {...standardFieldProps}; -FieldSelectionBadgeUncheck.supportedTypes = ["many2one", "selection"]; -FieldSelectionBadgeUncheck.additionalClasses = ["o_field_selection_badge"]; - export const FieldSelectionBadgeUncheckField = { + ...badgeSelectionField, component: FieldSelectionBadgeUncheck, supportedTypes: ["many2one"], }; registry .category("fields") .add("selection_badge_uncheck", FieldSelectionBadgeUncheckField); - -registry.category("preloadedData").add("selection_badge_uncheck", { - loadOnTypes: ["many2one"], - preload: preloadSelection, -});