[FIX]Fixed the issue of html field import fails, because of no converter found for str to html.

bzr revid: msh@openerp.com-20140203120525-ui117od6lpksm1bq
This commit is contained in:
Mohammed Shekha (OpenERP)
2014-02-03 17:35:25 +05:30
+4
View File
@@ -12,6 +12,7 @@ from openerp.osv import orm
from openerp.tools.translate import _
from openerp.tools.misc import DEFAULT_SERVER_DATE_FORMAT,\
DEFAULT_SERVER_DATETIME_FORMAT
from openerp.tools import html_sanitize
REFERENCING_FIELDS = set([None, 'id', '.id'])
def only_ref_fields(record):
@@ -182,6 +183,9 @@ class ir_fields_converter(orm.Model):
_(u"'%s' does not seem to be a number for field '%%(field)s'")
% value)
def _str_to_html(self, cr, uid, model, column, value, context=None):
return html_sanitize(value), []
def _str_id(self, cr, uid, model, column, value, context=None):
return value, []
_str_to_reference = _str_to_char = _str_to_text = _str_to_binary = _str_id