[FIX] empty html area, developer should be able to force a widget

bzr revid: fp@tinyerp.com-20120912144626-pl3ze0mltqt42uky
This commit is contained in:
Fabien Pinckaers 2012-09-12 16:46:26 +02:00
parent 63ad47104f
commit 3a9c29d327
1 changed files with 1 additions and 5 deletions

View File

@ -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;