Browse Source

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

pull/566/head
Jordi Ballester Alomar 8 years ago
committed by Moises Lopez - https://www.vauxoo.com/
parent
commit
7da1be9776
  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