[FIX] ir.model: during creation of custom models, the _auto_init call should also take care of custom fields created on-the-fly
The _auto_init call in ir.model.fields creation will not do it because it happens before the insertion of the model in the registry. It will only work for later addition of fields. bzr revid: odo@openerp.com-20130730114645-185kbupcrbtnv1tf
This commit is contained in:
parent
6fcd169b52
commit
d2ce7b4120
|
@ -195,7 +195,8 @@ class ir_model(osv.osv):
|
|||
ctx = dict(context,
|
||||
field_name=vals['name'],
|
||||
field_state='manual',
|
||||
select=vals.get('select_level', '0'))
|
||||
select=vals.get('select_level', '0'),
|
||||
update_custom_fields=True)
|
||||
self.pool.get(vals['model'])._auto_init(cr, ctx)
|
||||
openerp.modules.registry.RegistryManager.signal_registry_change(cr.dbname)
|
||||
return res
|
||||
|
|
Loading…
Reference in New Issue