Skip to content

Commit

Permalink
[FIX] clean database menus was proposing good menus to purge (OCA#562)
Browse files Browse the repository at this point in the history
  • Loading branch information
JordiBForgeFlow authored and mart-e committed Oct 26, 2018
1 parent 6aef55a commit ca4614b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions database_cleanup/models/purge_menus.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ def find(self):
.search([('action', '!=', False)]):
if menu.action.type != 'ir.actions.act_window':
continue
if menu.action.res_model not in self.env or\
menu.action.src_model not in self.env:
if (menu.action.res_model and menu.action.res_model not in
self.env) or \
(menu.action.src_model and menu.action.src_model not in
self.env):
res.append((0, 0, {
'name': menu.complete_name,
'menu_id': menu.id,
Expand Down

0 comments on commit ca4614b

Please sign in to comment.