diff --git a/bin/addons/base/module/module.py b/bin/addons/base/module/module.py index 01ea8cc0745..0a427427515 100644 --- a/bin/addons/base/module/module.py +++ b/bin/addons/base/module/module.py @@ -107,7 +107,11 @@ class module(osv.osv): elif key=='ir.actions.report.xml': res[mnames[data_id.module]]['reports_by_module'] += report_obj.browse(cr,uid,data_id.res_id).name + '\n' elif key=='ir.ui.menu': - res[mnames[data_id.module]]['menus_by_module'] += menu_obj.browse(cr,uid,data_id.res_id).complete_name + '\n' + try: + m = menu_obj.browse(cr,uid,data_id.res_id) + res[mnames[data_id.module]]['menus_by_module'] += m.complete_name + '\n' + except: + pass except KeyError, e: pass return res diff --git a/bin/osv/orm.py b/bin/osv/orm.py index a76b9a5fc81..8fd1810455c 100644 --- a/bin/osv/orm.py +++ b/bin/osv/orm.py @@ -2034,7 +2034,8 @@ class orm(orm_template): days = calendar.monthrange(dt.year, dt.month)[1] d[groupby] = datetime.datetime.strptime(d[groupby][:10],'%Y-%m-%d').strftime('%B %Y') - d['__domain'] = [(groupby,'>=',alldata[d['id']][groupby] and datetime.datetime.strptime(alldata[d['id']][groupby][:7] + '-01','%Y-%m-%d').strftime('%Y-%m-%d') or False),\ + if not context.get('group_by_no_leaf', False): + d['__domain'] = [(groupby,'>=',alldata[d['id']][groupby] and datetime.datetime.strptime(alldata[d['id']][groupby][:7] + '-01','%Y-%m-%d').strftime('%Y-%m-%d') or False),\ (groupby,'<=',alldata[d['id']][groupby] and datetime.datetime.strptime(alldata[d['id']][groupby][:7] + '-' + str(days),'%Y-%m-%d').strftime('%Y-%m-%d') or False)] + domain elif fget[groupby]['type'] == 'many2one': d[groupby] = d[groupby] and ((type(d[groupby])==type(1)) and d[groupby] or d[groupby][1]) or ''