Very small speed improvement at db creation
bzr revid: fp@tinyerp.com-20080818223422-yiuv0dgr23vrjhfe
This commit is contained in:
parent
7f9e392861
commit
0f12b770c5
|
@ -147,8 +147,8 @@ class ir_model_fields(osv.osv):
|
|||
|
||||
def create(self, cr, user, vals, context=None):
|
||||
if 'model_id' in vals:
|
||||
model_data=self.pool.get('ir.model').read(cr,user,vals['model_id'])
|
||||
vals['model']=model_data['model']
|
||||
model_data=self.pool.get('ir.model').browse(cr,user,vals['model_id'])
|
||||
vals['model']=model_data.model
|
||||
if context and context.get('manual',False):
|
||||
vals['state']='manual'
|
||||
res = super(ir_model_fields,self).create(cr, user, vals, context)
|
||||
|
|
Loading…
Reference in New Issue