Odoo 15 Remove Data
One button clears every transaction of a test database — invoices, orders, stock moves, time off, leads, tasks and the rest — and keeps the master data. Then a report shows what is left in each data table, the fullest first, and empties any of them you choose.
For test and training databases only
The transactions are deleted from the database tables directly, for every company, whatever their state — posted and locked journal entries included. There is no undo and no archive: the only way back is a backup. Take one first, and never use it on a database that holds real data.The transactions of every standard application
Only the applications installed on the database are touched. Their documents go with the followers, attachments and XML ids attached to them, every message and activity of the database goes, and the numbering of the documents starts again from 1.
Accounting and Payments
Journal entries and items, reconciliations, payments, bank statements and their lines, analytic lines and timesheets, lock date exceptions, EDI documents, payment transactions.Sales, Point of Sale, Purchases
Sales orders; point of sale orders, payments and sessions; purchase orders and requisitions.Inventory and Manufacturing
Transfers, stock moves, quants, packages, lots and serial numbers, batches, stock references, landed costs; manufacturing orders, work orders, time logs and unbuild orders.Employees
Expenses, time off and allocations, attendances and job applicants.Everything else
CRM leads, project tasks and updates, repairs, maintenance requests, fleet logs, event registrations, survey answers, mailing traces and SMS, website visitors, lunch orders, loyalty cards and calendar events.Discuss and chatter
Every message and activity of the database, on the kept records too: the chatter starts empty.What stays
Partners, products, the chart of accounts, journals, taxes, employees, bills of materials, projects, warehouses and locations, and the whole configuration.See what goes before it goes
Settings > Data Cleaning lists, application by application, the documents that would be deleted and how many records each holds. One button clears them all.

A demo database with 18 applications: 3,496 records, 1,974 of them messages and activities.
Nothing is deleted until you type DELETE
The confirmation repeats how many records will go and names every kind of document, and does nothing until the word DELETE has been typed.

The last step before the transactions are deleted.
What is left, table by table
Once the transactions are deleted, a report lists the data tables of the database with their exact number of rows, the fullest first, and says for each whether it held transactions, records attached to documents, kept records or relation data. Database Tables shows the same report at any time, without deleting anything.

After the clearing: 4,692 rows deleted, 48 sequences reset, no transaction row left.

Every table with rows, the fullest first.
Empty the tables that are left, one by one
After the clearing, the report may show a table you want empty as well: demo products, tags, contacts. Delete Rows on its line — or on several tables selected in the full list — asks for DELETE, empties them with their followers, attachments and XML ids, and shows the report again.

Emptying the contact tags left after the clearing.

The tags and their XML ids are gone, and the report is drawn again.
Clearing a test database
Questions we get
Can I undo it?
No. Restore the backup you took before.
I used the earlier release, with a button for each application. Where did they go?
The Remove Data menu is now Settings > Data Cleaning. Clear All Transactions replaces the buttons of the
applications, and Delete Rows in the report empties the rest: products, bills of materials, contacts or any
other table you want empty. Upgrade the module and the menu opens the new screen.
Is it done in one go?
Yes, in a single transaction: if anything fails, nothing is deleted. A table the database refuses to empty is skipped and reported, and the rest is cleared.
Does it respect the rules of the models?
No. It deletes with SQL, bypassing the ORM on purpose, so no delete rule, constraint or override applies. That is what lets it empty a database, and why it belongs on a test database only.
What about apps I do not use?
Their documents are not there, so nothing happens for them.
Please log in to comment on this module
Is it working for v14 ?
Re: Is it working for v14 ?
yes it has to work
Perfect for me!
This application is very useful for testing a database, configuring a company and then deleting the data to transfer the database to production.
I use it to switch from my development environment to my production environment when launching a project.
is it works with big data clear ?