From 465081e9f392d058ef66cee64d4442156c000372 Mon Sep 17 00:00:00 2001 From: Xavier-Do Date: Mon, 26 Jun 2023 13:36:20 +0200 Subject: [PATCH] [FIX] runbot: fix jsonb in list view In view list widget are not always instanciated and a formater is used instead. This means that the t-esc will try to output a jsonb field without nowing how to render it, making the page crash. This is quickly fixed by forcing the widget on the field in tree view. --- runbot/static/src/js/fields/fields.js | 3 +-- runbot/views/bundle_views.xml | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/runbot/static/src/js/fields/fields.js b/runbot/static/src/js/fields/fields.js index b4361d35..3aaa1795 100644 --- a/runbot/static/src/js/fields/fields.js +++ b/runbot/static/src/js/fields/fields.js @@ -20,7 +20,7 @@ function stringify(obj) { export class JsonField extends TextField { static template = xml` - +
@@ -37,7 +37,6 @@ export class JsonField extends TextField { `; setup() { - this.props.value.toString = () => stringify(this.props.value); if (this.props.dynamicPlaceholder) { this.dynamicPlaceholder = useDynamicPlaceholder(); } diff --git a/runbot/views/bundle_views.xml b/runbot/views/bundle_views.xml index 04952c79..dd60ca96 100644 --- a/runbot/views/bundle_views.xml +++ b/runbot/views/bundle_views.xml @@ -106,7 +106,7 @@ - +