The Action Not Found Error
You click a menu item, button, or link in Odoo and get an error: the action does not exist. This can happen after a module update, when switching between databases, or when custom modules have incorrect XML references. The error breaks navigation and makes features inaccessible.
Common Error Messages
# In the browser:
"The action ... does not exist or has been deleted."
"Action not found"
"Missing action"
# In Odoo logs:
ValueError: External ID not found in the system: module_name.action_id
MissingError: Record does not exist or has been deleted.
(Record: ir.actions.act_window(XXX,), User: 2)
# In the URL:
/web#action=12345 → shows error because action 12345 doesn't existCause 1: Module Not Installed or Partially Installed
# The action belongs to a module that isn't fully installed
# Fix:
# Settings → Apps → search for the module
# If status is "Not Installed" → Install it
# If status is "To Upgrade" → Upgrade it
# If status is "Installed" but action is missing → Upgrade the module
# Command line:
./odoo-bin -d mydb -u module_name --stop-after-initCause 2: XML ID Changed or Removed
# A menu references an action by XML ID, but the ID was renamed or removed
# Example broken menu:
<menuitem id="menu_my_feature"
name="My Feature"
action="action_that_was_renamed"
parent="base.menu_management"/>
# Fix: Find the correct action ID
# In Odoo shell:
env.ref('module_name.action_that_was_renamed', raise_if_not_found=False)
# If None → the action doesn't exist
# Search for similar actions:
env['ir.actions.act_window'].search([('name', 'ilike', 'my feature')])
# Update the menu to reference the correct actionCause 3: Bookmarked or Cached Action ID
# Users bookmark Odoo URLs like /web#action=123&model=res.partner
# After a database restore or module upgrade, the action ID (123) changes
# Fix:
# 1. Clear browser bookmarks for Odoo
# 2. Navigate via the menu instead of bookmarks
# 3. Use named actions in URLs instead of numeric IDs:
# /web#action=module_name.action_xml_id
# For shared links, use the menu path instead of action IDCause 4: Action Deleted by Module Uninstall
# Uninstalling a module removes its actions, but menus from
# other modules that reference those actions may remain
# Fix: Find orphaned menu items
SELECT m.id, m.name, m.action
FROM ir_ui_menu m
LEFT JOIN ir_act_window a ON m.action = CONCAT('ir.actions.act_window,', a.id)
WHERE m.action IS NOT NULL
AND m.action LIKE 'ir.actions.act_window,%'
AND a.id IS NULL;
# Delete orphaned menus:
# Or update them to point to valid actionsCause 5: Broken Smart Button
# Smart buttons on form views reference actions that may not exist
# Error when clicking a smart button:
# "The action ... does not exist"
# Check the button definition:
<button name="action_view_related" type="object" class="oe_stat_button">
# If name references a method, the method must return a valid action dict:
def action_view_related(self):
return {
'type': 'ir.actions.act_window',
'name': 'Related Records',
'res_model': 'related.model',
'view_mode': 'tree,form',
'domain': [('parent_id', '=', self.id)],
}
# Common issues:
# - Method returns None (forgot to return)
# - res_model doesn't exist (module not installed)
# - type='action' instead of type='object' with wrong name valueCause 6: ir.actions Record Manually Deleted
# Someone deleted the action record from Technical menu
# Fix: Recreate or restore the action:
# Option 1: Upgrade the module that defines it
./odoo-bin -d mydb -u module_name --stop-after-init
# Option 2: Recreate manually
# Settings → Technical → Actions → Window Actions → Create
# Name, Model, View Mode, Domain, etc.
# Option 3: Restore from backup
# If you have a recent backup, extract just the ir_act_window recordCause 7: Multi-Company Action Filtering
# Some actions are company-specific and won't show if the user
# is in a different company
# Fix: Check the action's company restriction
# Settings → Technical → Actions → find the action
# Check if it has a company_id set
# Remove the company restriction or ensure the user is in the right companyCause 8: Homepage Action Invalid
# User's homepage action is set to a deleted action
# Result: blank screen or error after every login
# Fix: Reset user's homepage action
# Settings → Users → select user → Preferences tab
# Home Action → clear or set to a valid action
# Via database:
UPDATE res_users SET action_id = NULL WHERE login = '[email protected]';
# Set default home action for all users:
UPDATE res_users SET action_id = (
SELECT id FROM ir_act_window WHERE name = 'Discuss' LIMIT 1
);Debugging Action Issues
# 1. Find action by XML ID:
./odoo-bin shell -d mydb
action = env.ref('module.action_id', raise_if_not_found=False)
if action:
print(f'Action found: {action.name} (ID: {action.id})')
else:
print('Action NOT FOUND')
# 2. Find action by numeric ID from URL:
action = env['ir.actions.act_window'].browse(12345)
if action.exists():
print(f'Action: {action.name}, Model: {action.res_model}')
# 3. Find all actions for a model:
actions = env['ir.actions.act_window'].search([('res_model', '=', 'sale.order')])
for a in actions:
print(f'{a.id}: {a.name}')
# 4. Check menu → action mapping:
for menu in env['ir.ui.menu'].search([('name', 'ilike', 'my feature')]):
print(f'Menu: {menu.name}, Action: {menu.action}')