Browse Source

[FIX] clean database menus was proposing good menus to purge (#562)

pull/1408/head
Jordi Ballester Alomar 8 years ago
committed by Pedro M. Baeza
parent
commit
d2b77e9b17
  1. 6
      database_cleanup/models/purge_menus.py

6
database_cleanup/models/purge_menus.py

@ -34,8 +34,10 @@ class CleanupPurgeWizardMenu(models.TransientModel):
.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,

Loading…
Cancel
Save