Skip to content

Instantly share code, notes, and snippets.

@mao-odoo
Last active August 23, 2023 11:47
Show Gist options
  • Save mao-odoo/90fee82b738927cb2c7f4aa2f933f48d to your computer and use it in GitHub Desktop.
Save mao-odoo/90fee82b738927cb2c7f4aa2f933f48d to your computer and use it in GitHub Desktop.
odoo invalidate registry
# usefull when apps are in a weird state that requires changing the state in SQL
# or if there was an (un)install issue and the database is left in a weird state
# use this in the shell if you can't restart the odoo instance (because of mulitple tenants for example)
env.cr.commit()
env.registry.registry_invalidated = True
env.registry.signal_changes()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment