[FIX] ir.module.module: create module xml id also when auto-discovered

It was only being created during database initialization
This commit is contained in:
Olivier Dony
2014-07-23 14:42:04 +02:00
parent 8974e928fa
commit a23994e0ed
+13
View File
@@ -592,6 +592,19 @@ class module(osv.osv):
'summary': terp.get('summary', ''),
}
def create(self, cr, uid, vals, context=None):
new_id = super(module, self).create(cr, uid, vals, context=context)
module_metadata = {
'name': 'module_%s' % vals['name'],
'model': 'ir.module.module',
'module': 'base',
'res_id': new_id,
'noupdate': True,
}
self.pool['ir.model.data'].create(cr, uid, module_metadata)
return new_id
# update the list of available packages
def update_list(self, cr, uid, context=None):
res = [0, 0] # [update, add]