[FIX] Ir_model : Made an offensive check of context

bzr revid: ach@tinyerp.com-20100512115933-b3f3ti4g3epjrw8z
This commit is contained in:
Anup (OpenERP) 2010-05-12 17:29:33 +05:30
parent 7700e4227b
commit aed8e4e957
1 changed files with 2 additions and 0 deletions

View File

@ -82,6 +82,8 @@ class ir_model(osv.osv):
return super(ir_model,self).write(cr, user, ids, vals, context)
def create(self, cr, user, vals, context=None):
if context is None:
context = {}
if context and context.get('manual',False):
vals['state']='manual'
res = super(ir_model,self).create(cr, user, vals, context)