We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 92d5c43 commit 7da1be9Copy full SHA for 7da1be9
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