[FIX] small potential encoding issue in custom models
This commit is contained in:
parent
42bd6e5240
commit
19c7380951
|
@ -200,6 +200,8 @@ class ir_model(osv.osv):
|
||||||
def instanciate(self, cr, user, model, context=None):
|
def instanciate(self, cr, user, model, context=None):
|
||||||
class x_custom_model(osv.osv):
|
class x_custom_model(osv.osv):
|
||||||
_custom = True
|
_custom = True
|
||||||
|
if isinstance(model, unicode):
|
||||||
|
model = model.encode('utf-8')
|
||||||
x_custom_model._name = model
|
x_custom_model._name = model
|
||||||
x_custom_model._module = False
|
x_custom_model._module = False
|
||||||
a = x_custom_model._build_model(self.pool, cr)
|
a = x_custom_model._build_model(self.pool, cr)
|
||||||
|
|
Loading…
Reference in New Issue