[FIX] FieldTextHtml: allow using widget=html on regular char/text fields

This is required when we want to easily preview arbitrary
HTML content, such as the body of the email templates
used in marketing_campaign modules

bzr revid: odo@openerp.com-20120901003712-m1h9s5tlbn2kyvnn
This commit is contained in:
Olivier Dony 2012-09-01 02:37:12 +02:00
parent 8ba3942676
commit 77e92aeaad
1 changed files with 0 additions and 7 deletions

View File

@ -2385,13 +2385,6 @@ instance.web.form.FieldText = instance.web.form.AbstractField.extend(instance.we
*/
instance.web.form.FieldTextHtml = instance.web.form.AbstractField.extend(instance.web.form.ReinitializeFieldMixin, {
template: 'FieldTextHtml',
init: function() {
this._super.apply(this, arguments);
if (this.field.type !== 'html') {
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;
if (! this.get("effective_readonly")) {