Skip to content

Commit

Permalink
Merge PR #767 into 17.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Dec 18, 2024
2 parents 9f176bb + 4628c5a commit 8068b8f
Showing 1 changed file with 2 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -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) {
Expand All @@ -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,
});

0 comments on commit 8068b8f

Please sign in to comment.