Browse Source

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

pull/1009/head
Jordi Ballester Alomar 8 years ago
committed by Holger Brunn
parent
commit
9be7b2839b
No known key found for this signature in database GPG Key ID: 1C9760FECA3AE18
  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)]): .search([('action', '!=', False)]):
if menu.action.type != 'ir.actions.act_window': if menu.action.type != 'ir.actions.act_window':
continue 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, { res.append((0, 0, {
'name': menu.complete_name, 'name': menu.complete_name,
'menu_id': menu.id, 'menu_id': menu.id,

Loading…
Cancel
Save