Tower: upload cetmix_tower_server 16.0.3.0.1 (via marketplace)

This commit is contained in:
2026-04-27 08:18:12 +00:00
parent fcb747f2c9
commit 2eee80609f

View File

@@ -0,0 +1,33 @@
/** @odoo-module */
import {registry} from "@web/core/registry";
import {StateSelectionField} from "@web/views/fields/state_selection/state_selection_field";
import {STATUS_COLORS, STATUS_COLOR_PREFIX} from "../../utils/server_utils.esm";
export class ServerStatusField extends StateSelectionField {
/**
* @override
*/
setup() {
super.setup();
this.colorPrefix = STATUS_COLOR_PREFIX;
this.colors = STATUS_COLORS;
}
/**
* @override
*/
get options() {
return [[false, "Undefined"], ...super.options];
}
/**
* @override
*/
get showLabel() {
return !this.props.hideLabel;
}
}
registry.category("fields").add("server_status", ServerStatusField);