[FIX] Ir_model : Made an offensive check of context
bzr revid: ach@tinyerp.com-20100512115933-b3f3ti4g3epjrw8z
This commit is contained in:
parent
7700e4227b
commit
aed8e4e957
|
@ -82,6 +82,8 @@ class ir_model(osv.osv):
|
||||||
return super(ir_model,self).write(cr, user, ids, vals, context)
|
return super(ir_model,self).write(cr, user, ids, vals, context)
|
||||||
|
|
||||||
def create(self, cr, user, vals, context=None):
|
def create(self, cr, user, vals, context=None):
|
||||||
|
if context is None:
|
||||||
|
context = {}
|
||||||
if context and context.get('manual',False):
|
if context and context.get('manual',False):
|
||||||
vals['state']='manual'
|
vals['state']='manual'
|
||||||
res = super(ir_model,self).create(cr, user, vals, context)
|
res = super(ir_model,self).create(cr, user, vals, context)
|
||||||
|
|
Loading…
Reference in New Issue