Skip to content

Instantly share code, notes, and snippets.

@GabbasovDinar
Last active January 2, 2026 11:46
Show Gist options
  • Select an option

  • Save GabbasovDinar/95d9b7d76ef0708d27ec7047ed856020 to your computer and use it in GitHub Desktop.

Select an option

Save GabbasovDinar/95d9b7d76ef0708d27ec7047ed856020 to your computer and use it in GitHub Desktop.
Neutralize Database Odoo
# By API
import odoo
from odoo.sql_db import db_connect
# Connect to the database
db = db_connect('database_name')
with db.cursor() as cr:
# Call Odoo's neutralization function
odoo.modules.neutralize.neutralize_database(cr)
cr.commit()
# By command
# odoo-bin neutralize --config /path/to/odoo.conf -d database_name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment