Last active
January 2, 2026 11:46
-
-
Save GabbasovDinar/95d9b7d76ef0708d27ec7047ed856020 to your computer and use it in GitHub Desktop.
Neutralize Database Odoo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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