mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 23:45:44 +07:00
[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.
This commit is contained in:
parent
96808acb37
commit
465081e9f3
@ -20,7 +20,7 @@ function stringify(obj) {
|
||||
export class JsonField extends TextField {
|
||||
static template = xml`
|
||||
<t t-if="props.readonly">
|
||||
<span t-esc="value" />
|
||||
<span t-esc="value"/>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<div t-ref="div">
|
||||
@ -37,7 +37,6 @@ export class JsonField extends TextField {
|
||||
</t>
|
||||
`;
|
||||
setup() {
|
||||
this.props.value.toString = () => stringify(this.props.value);
|
||||
if (this.props.dynamicPlaceholder) {
|
||||
this.dynamicPlaceholder = useDynamicPlaceholder();
|
||||
}
|
||||
|
@ -106,7 +106,7 @@
|
||||
<field name="trigger_id"/>
|
||||
<field name="config_id"/>
|
||||
<field name="extra_params"/>
|
||||
<field name="config_data"/>
|
||||
<field name="config_data" widget="jsonb"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
Loading…
Reference in New Issue
Block a user