From 3a9c29d327d875802ab2b7b330810e0348c06e21 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Wed, 12 Sep 2012 16:46:26 +0200 Subject: [PATCH] [FIX] empty html area, developer should be able to force a widget bzr revid: fp@tinyerp.com-20120912144626-pl3ze0mltqt42uky --- addons/web/static/src/js/view_form.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index ff9e0020946..0e66ab6bfc3 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -2404,10 +2404,6 @@ instance.web.form.FieldTextHtml = instance.web.form.AbstractField.extend(instanc template: 'FieldTextHtml', init: function() { this._super.apply(this, arguments); - if (this.field.type !== 'html' && ! this.options.safe) { - throw new Error(_.str.sprintf( - _t("Error with field %s, it is not allowed to use the widget 'html' with any other field type than 'html'"), this.string)); - } }, initialize_content: function() { var self = this; @@ -2441,7 +2437,7 @@ instance.web.form.FieldTextHtml = instance.web.form.AbstractField.extend(instanc }, render_value: function() { if (! this.get("effective_readonly")) { - this.$textarea.val(this.get('value')); + this.$textarea.val(this.get('value') || ''); this._updating_editor = true; this.$cleditor.updateFrame(); this._updating_editor = false;