diff --git a/addons/web/static/src/views/fields/font_selection/font_selection_field.js b/addons/web/static/src/views/fields/font_selection/font_selection_field.js index fb10e1a7401..6b2024f8677 100644 --- a/addons/web/static/src/views/fields/font_selection/font_selection_field.js +++ b/addons/web/static/src/views/fields/font_selection/font_selection_field.js @@ -9,7 +9,13 @@ const { Component } = owl; export class FontSelectionField extends Component { get options() { - return Array.from(this.props.record.fields[this.props.name].selection); + const options = this.props.record.fields[this.props.name].selection.filter( + (option) => option[0] !== false && option[1] !== "" + ); + if (!this.isRequired) { + options.unshift([false, this.props.placeholder || ""]); + } + return options; } get isRequired() { return this.props.record.isRequired(this.props.name); diff --git a/addons/web/static/src/views/fields/font_selection/font_selection_field.xml b/addons/web/static/src/views/fields/font_selection/font_selection_field.xml index 93ae586dbc1..b079da1164a 100644 --- a/addons/web/static/src/views/fields/font_selection/font_selection_field.xml +++ b/addons/web/static/src/views/fields/font_selection/font_selection_field.xml @@ -7,13 +7,6 @@ - -