[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
pull/808/head
Víctor Martínez 2024-12-17 10:58:11 +01:00 committed by Jordi Ballester Alomar
parent da1bf39426
commit ca4fe69b31
1 changed files with 2 additions and 11 deletions

View File

@ -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,
});