We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c16497c commit e69c1a5Copy full SHA for e69c1a5
database_cleanup/models/purge_menus.py
@@ -34,8 +34,10 @@ def find(self):
34
.search([('action', '!=', False)]):
35
if menu.action.type != 'ir.actions.act_window':
36
continue
37
- if menu.action.res_model not in self.env or\
38
- menu.action.src_model not in self.env:
+ if (menu.action.res_model and menu.action.res_model not in
+ self.env) or \
39
+ (menu.action.src_model and menu.action.src_model not in
40
+ self.env):
41
res.append((0, 0, {
42
'name': menu.complete_name,
43
'menu_id': menu.id,
0 commit comments