From b75ff67d10eb640747c3240630462f2c1a3f465c Mon Sep 17 00:00:00 2001 From: "Michael (mcm)" Date: Wed, 11 Oct 2023 10:46:13 +0200 Subject: [PATCH] [FIX] web: fix field selector props validation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before this commit, it crashes when giving the number 0 or 1 as path to the ModelFieldSelector in debug mode. This commit fixes the ModelFieldSelector's props validation. closes odoo/odoo#138399 X-original-commit: bcba6e6e8041e325963fca21f70d58f715bf1f2f Signed-off-by: Mathieu Duckerts-Antoine (dam) Signed-off-by: Michaƫl Mattiello (mcm) --- .../core/model_field_selector/model_field_selector_popover.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web/static/src/core/model_field_selector/model_field_selector_popover.js b/addons/web/static/src/core/model_field_selector/model_field_selector_popover.js index c869613ffe0..74cff3c6fde 100644 --- a/addons/web/static/src/core/model_field_selector/model_field_selector_popover.js +++ b/addons/web/static/src/core/model_field_selector/model_field_selector_popover.js @@ -95,7 +95,7 @@ export class ModelFieldSelectorPopover extends Component { filter: { type: Function, optional: true }, followRelations: { type: Boolean, optional: true }, isDebugMode: { type: Boolean, optional: true }, - path: String, + path: [String, { value: 0 }, { value: 1 }], resModel: String, showSearchInput: { type: Boolean, optional: true }, update: Function,