command line server management with -i and -u options

bzr revid: rvo@tinyerp.co.in-20100316064812-5uurt3vhids9o57u
This commit is contained in:
Rvo (Open ERP)
2010-03-16 12:18:12 +05:30
parent c0935c2513
commit bf77cfe005
2 changed files with 4 additions and 1 deletions
+2
View File
@@ -237,6 +237,8 @@ class module(osv.osv):
def button_upgrade(self, cr, uid, ids, context=None):
depobj = self.pool.get('ir.module.module.dependency')
todo = self.browse(cr, uid, ids, context=context)
self.update_list(cr, uid)
i = 0
while i<len(todo):
mod = todo[i]
+2 -1
View File
@@ -383,7 +383,7 @@ class orm_template(object):
model_id = cr.fetchone()[0]
if 'module' in context:
name_id = 'model_'+self._name.replace('.','_')
cr.execute('select * from ir_model_data where name=%s and res_id=%s', (name_id,model_id))
cr.execute('select * from ir_model_data where name=%s and res_id=%s and module=%s', (name_id,model_id,context['module']))
if not cr.rowcount:
cr.execute("INSERT INTO ir_model_data (name,date_init,date_update,module,model,res_id) VALUES (%s, now(), now(), %s, %s, %s)", \
(name_id, context['module'], 'ir.model', model_id)
@@ -711,6 +711,7 @@ class orm_template(object):
else:
module, xml_id = current_module, line[i]
id = ir_model_data_obj._get_id(cr, uid, module, xml_id)
res_res_id = ir_model_data_obj.read(cr, uid, [id],
['res_id'])
if res_res_id: