[FIX] base: ir.model.fields, write, use tools.ustr instead of str so it handle if...
authorDenis Ledoux <dle@openerp.com>
Mon, 28 Apr 2014 11:00:42 +0000 (13:00 +0200)
committerDenis Ledoux <dle@openerp.com>
Mon, 28 Apr 2014 11:00:42 +0000 (13:00 +0200)
Writing special chars in the field label resulted in a traceback (write only, no problem with creation)

bzr revid: dle@openerp.com-20140428110042-qeaswuwsquy1612h

openerp/addons/base/ir/ir_model.py

index ec89fe8..d716227 100644 (file)
@@ -385,7 +385,7 @@ class ir_model_fields(osv.osv):
 
         # static table of properties
         model_props = [ # (our-name, fields.prop, set_fn)
-            ('field_description', 'string', str),
+            ('field_description', 'string', tools.ustr),
             ('required', 'required', bool),
             ('readonly', 'readonly', bool),
             ('domain', '_domain', eval),