summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/view_form.js
diff options
context:
space:
mode:
Diffstat (limited to 'addons/web/static/src/js/view_form.js')
-rw-r--r--addons/web/static/src/js/view_form.js6
1 files changed, 1 insertions, 5 deletions
diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js
index afb5e258c0b..97ad0f220e6 100644
--- a/addons/web/static/src/js/view_form.js
+++ b/addons/web/static/src/js/view_form.js
@@ -2087,11 +2087,7 @@ instance.web.form.AbstractField = instance.web.form.FormWidget.extend(instance.w
this.field = this.field_manager.get_field_desc(this.name);
this.widget = this.node.attrs.widget;
this.string = this.node.attrs.string || this.field.string || this.name;
- try {
- this.options = JSON.parse(this.node.attrs.options || '{}');
- } catch (e) {
- throw new Error(_.str.sprintf(_t("Widget options for field '%s' are not valid JSON."), this.name));
- }
+ this.options = instance.web.py_eval(this.node.attrs.options || '{}');
this.set({'value': false});
this.on("change:value", this, function() {