Sanitizing an OpenERP database

on

Connect to the database and run the following SQL statement.

This query will delete all data from your OpenERP database, take appropriate measures and have your backups ready!

 

TRUNCATE sale_order CASCADE;
TRUNCATE purchase_order CASCADE;
TRUNCATE mrp_production CASCADE;
TRUNCATE stock_picking CASCADE;
TRUNCATE stock_tracking CASCADE;
TRUNCATE account_invoice CASCADE;
TRUNCATE account_move CASCADE;
TRUNCATE account_voucher CASCADE;
TRUNCATE wkf_instance CASCADE;
TRUNCATE ir_attachment CASCADE;
TRUNCATE mail_message CASCADE;
TRUNCATE res_partner CASCADE;

You will also need to drop res_partner as it contains data from customers. Don’t truncate this table as it will lock you out by deleting res_users !

Leave a Reply

Your email address will not be published. Required fields are marked *