solve partially problem of menu items (migration)[cls]

module reference: add header in rml

bzr revid: nel@tinyerp.com-20081230130829-y35p0e90k39m6y12
This commit is contained in:
Najlaâ EL KHAYAT 2008-12-30 14:08:29 +01:00
parent 356bd16a14
commit 870fc3bab5
5 changed files with 18 additions and 6424 deletions

1
.bzrignore Normal file
View File

@ -0,0 +1 @@
st

View File

@ -595,10 +595,10 @@ def load_modules(db, force_demo=False, status=None, update_module=False):
cr.commit() cr.commit()
if update_module: if update_module:
cr.execute("select id,name from ir_module_module where state in ('to remove')") cr.execute("select id,name from ir_module_module where state=%s", ('to remove',))
for mod_id, mod_name in cr.fetchall(): for mod_id, mod_name in cr.fetchall():
pool = pooler.get_pool(cr.dbname) pool = pooler.get_pool(cr.dbname)
cr.execute('select model,res_id from ir_model_data where not noupdate and module=%s order by id desc', (mod_name,)) cr.execute('select model,res_id from ir_model_data where noupdate=%s and module=%s order by id desc', (False, mod_name,))
for rmod,rid in cr.fetchall(): for rmod,rid in cr.fetchall():
uid = 1 uid = 1
pool.get(rmod).unlink(cr, uid, [rid]) pool.get(rmod).unlink(cr, uid, [rid])
@ -615,6 +615,7 @@ def load_modules(db, force_demo=False, status=None, update_module=False):
(id not in (select res_id from ir_values where model='ir.ui.menu')) (id not in (select res_id from ir_values where model='ir.ui.menu'))
and and
(id not in (select res_id from ir_model_data where model='ir.ui.menu'))''') (id not in (select res_id from ir_model_data where model='ir.ui.menu'))''')
cr.commit()
if not cr.rowcount: if not cr.rowcount:
break break
else: else:

File diff suppressed because it is too large Load Diff

View File

@ -545,8 +545,9 @@ class ir_model_data(osv.osv):
def _process_end(self, cr, uid, modules): def _process_end(self, cr, uid, modules):
if not modules: if not modules:
return True return True
module_str = ["'%s'" % m for m in modules] modules = list(modules)
cr.execute('select id,name,model,res_id,module from ir_model_data where module in ('+','.join(module_str)+') and not noupdate') module_in = "%s" * len(modules)
cr.execute('select id,name,model,res_id,module from ir_model_data where module in (' + module_in + ') and noupdate=%s', modules + [False])
wkf_todo = [] wkf_todo = []
for (id, name, model, res_id,module) in cr.fetchall(): for (id, name, model, res_id,module) in cr.fetchall():
if (module,name) not in self.loads: if (module,name) not in self.loads:

View File

@ -13,6 +13,7 @@
<lines>1cm 28cm 20cm 28cm</lines> <lines>1cm 28cm 20cm 28cm</lines>
</pageGraphics> </pageGraphics>
</header> </header>
</pageTemplate> </pageTemplate>
</template> </template>
<stylesheet> <stylesheet>