[IMP] order of main apps/modules
bzr revid: fp@tinyerp.com-20111218204731-50g37bd7un5igr84
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
'base_data.xml',
|
||||
'security/base_security.xml',
|
||||
'base_menu.xml',
|
||||
'base_module_meta.xml',
|
||||
'res/res_security.xml',
|
||||
'res/res_config.xml',
|
||||
'data/res.country.state.csv'
|
||||
|
||||
@@ -189,6 +189,7 @@ class module(osv.osv):
|
||||
'published_version': fields.char('Published Version', size=64, readonly=True),
|
||||
|
||||
'url': fields.char('URL', size=128, readonly=True),
|
||||
'sequence': fields.integer('Sequence'),
|
||||
'dependencies_id': fields.one2many('ir.module.module.dependency',
|
||||
'module_id', 'Dependencies', readonly=True),
|
||||
'state': fields.selection([
|
||||
@@ -222,11 +223,12 @@ class module(osv.osv):
|
||||
|
||||
_defaults = {
|
||||
'state': 'uninstalled',
|
||||
'sequence': 100,
|
||||
'demo': False,
|
||||
'license': 'AGPL-3',
|
||||
'complexity': 'normal',
|
||||
}
|
||||
_order = 'name'
|
||||
_order = 'sequence,name'
|
||||
|
||||
def _name_uniq_msg(self, cr, uid, ids, context=None):
|
||||
return _('The name of the module must be unique !')
|
||||
@@ -250,10 +252,10 @@ class module(osv.osv):
|
||||
_('You try to remove a module that is installed or will be installed'))
|
||||
mod_names.append(mod['name'])
|
||||
#Removing the entry from ir_model_data
|
||||
ids_meta = self.pool.get('ir.model.data').search(cr, uid, [('name', '=', 'module_meta_information'), ('module', 'in', mod_names)])
|
||||
#ids_meta = self.pool.get('ir.model.data').search(cr, uid, [('name', '=', 'module_meta_information'), ('module', 'in', mod_names)])
|
||||
|
||||
if ids_meta:
|
||||
self.pool.get('ir.model.data').unlink(cr, uid, ids_meta, context)
|
||||
#if ids_meta:
|
||||
# self.pool.get('ir.model.data').unlink(cr, uid, ids_meta, context)
|
||||
|
||||
return super(module, self).unlink(cr, uid, ids, context=context)
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ def initialize(cr):
|
||||
id = cr.fetchone()[0]
|
||||
cr.execute('INSERT INTO ir_model_data \
|
||||
(name,model,module, res_id, noupdate) VALUES (%s,%s,%s,%s,%s)', (
|
||||
'module_meta_information', 'ir.module.module', i, id, True))
|
||||
'module_'+i, 'ir.module.module', 'base', id, True))
|
||||
dependencies = info['depends']
|
||||
for d in dependencies:
|
||||
cr.execute('INSERT INTO ir_module_module_dependency \
|
||||
|
||||
Reference in New Issue
Block a user