Revert "[IMP] fields: translated html fields must use xml_translate or a callable"

This reverts commit 75140d7ea1.
This commit is contained in:
Raphael Collet
2015-08-21 16:44:48 +02:00
parent 857156e33e
commit a0fb9d83c7
+1 -7
View File
@@ -15,7 +15,7 @@ import xmlrpclib
from openerp.tools import float_round, frozendict, html_sanitize, ustr, OrderedSet
from openerp.tools import DEFAULT_SERVER_DATE_FORMAT as DATE_FORMAT
from openerp.tools import DEFAULT_SERVER_DATETIME_FORMAT as DATETIME_FORMAT
from openerp.tools.translate import xml_translate
from openerp.exceptions import UserError
DATE_LENGTH = len(date.today().strftime(DATE_FORMAT))
DATETIME_LENGTH = len(datetime.now().strftime(DATETIME_FORMAT))
@@ -1227,12 +1227,6 @@ class Html(_String):
'strip_style': False, # whether to strip style attributes
}
def _setup_attrs(self, model, name):
super(Html, self)._setup_attrs(model, name)
# Translated html fields must use xml_translate or a callable.
if self.translate and not callable(self.translate):
self.translate = xml_translate
_column_sanitize = property(attrgetter('sanitize'))
_related_sanitize = property(attrgetter('sanitize'))
_description_sanitize = property(attrgetter('sanitize'))