Test Data Cleanup for Odoo

Remove test data before go-live, keep what is real

What Test Data Cleanup does

Choose the apps, the companies, the dates, the journals and the warehouses. See exactly what goes in a dry run, decide what happens to the records that stay, then confirm with the database name. Every run is logged.

Delete test data and demo transactions safely before go-live: sales, purchases, invoices, payments, journal entries, stock moves, manufacturing, POS, CRM and more. Scope by company, date, journal and warehouse, dry-run preview with exact counts, typed confirmation, logs.

  • Dry run first
  • Scoped
  • Production lock
  • Run log

Features

  • Only the apps you have

    Areas appear only when their app is installed: sales, purchases, invoices and payments, inventory, manufacturing, point of sale, CRM, projects and timesheets, website orders, expenses, time off, attendances, recruitment, repairs, maintenance, fleet, events, surveys, mailing traces, lunch, loyalty cards and calendar. One click ticks them all.

  • Scoped, never global

    Clean one company of a multi-company database, documents up to the go-live date, one journal or one warehouse. Document types that cannot be narrowed by a limit are skipped and listed, so nothing outside the scope is touched.

  • Keep and only filters

    Per document type, keep what matches a filter (for example orders with a Keep tag) or remove only what matches it. "Only unconfirmed documents" keeps every confirmed, posted or done document.

  • Exact dry run

    Counts per model in the order they will be removed, with the lines, moves and reconciliations that go with them, messages, followers, activities, attachments with their size, and a button to open the records. Dry runs are logged too.

  • References from records that stay

    Every installed model is scanned, custom and third-party ones included. Links the database clears are listed; links that would block are shown in red and you decide: block the run, clear the link or remove those records too.

  • Master data stays

    Products, contacts, accounts and the rest stay by default. Tick a kind to remove only records nothing else uses after the cleanup. Records installed by apps and the contacts of companies and users are always kept.

  • Posted, done and locked documents

    Posted entries, done transfers and done manufacturing orders are removed through the ORM without cancelling anything else. Entries inside a lock date or a secured sequence need an explicit option.

  • Stock that adds up

    When stock moves go, stock on hand and reservations are recalculated from the moves that stay, for the products and locations concerned.

  • Numbering reset

    Only the numbering of the cleaned documents is listed, per company and per period, with the current number, the documents left and the number to restart at.

  • Production lock

    Mark a database as production in Settings and every run is refused. One run can be unlocked with the database name and a reason, for a limited time, and it locks again after the run.

  • Second administrator

    Optionally, runs that remove accounting data wait for another administrator. Areas can be restricted to some groups.

  • All or nothing

    Any error rolls the whole run back, or choose to keep going per area: a failing area is rolled back and reported while the others are cleaned.

  • Run log and PDF

    Who prepared, previewed, approved and ran it, the scope and options, planned, removed and left per model with links to what is left, numbering reset, duration and errors.

  • Reusable profiles

    Save a scope as a profile, export it as JSON, rehearse on a staging copy, import it on the go-live database and run the same cleanup.

  • No orphans left behind

    Messages, followers, activities, attachments and XML ids of removed records go with them; an optional switch also clears chatter on the documents that stay.

How it works, step by step

  1. 01Cleanup runs

    Every run stays as a log: areas, companies, dates, records planned, removed and left, who ran it and when.

    Test Data Cleanup: Cleanup runs
  2. 02Areas and scope

    After the dry run the run shows how many records go, in how many document types, the attachment size and the blocking references.

    Test Data Cleanup: Areas and scope
  3. 03Limits and filters

    Limit to journals or warehouses and add keep or only filters with the standard domain editor.

    Test Data Cleanup: Limits and filters
  4. 04Dry run in removal order

    Lines before orders, moves before transfers: the order the records will be removed in, with their messages and attachments.

  5. 05References from records that stay

    A sales order line that stays still uses a gift card in the cleanup: the run is blocked until you decide.

  6. 06Decide and preview again

    Here the line is removed too. The other links are cleared by the database and listed for information.

  7. 07Numbering

    Current number, documents left and the number to restart at, per sequence. A reset is proposed only when nothing of that numbering is left.

  8. 08Typed confirmation

    The database name and a backup check are required, and the dialog repeats what will go.

  9. 09Result of a run

    Removed and left per document type, duration, and the run written to the chatter.

  10. 10Production lock

    On a database marked as production, every run is refused until it is unlocked.

  11. 11One-run unlock

    The unlock needs the database name and a reason, is logged and expires.

  12. 12Second administrator

    A run that removes accounting data waits for another administrator.

Questions about Test Data Cleanup

Can I undo a cleanup?

No. Take a backup first; the run reminds you and asks you to confirm it. A dry run never changes anything, so preview as often as you like.

Does it work with several companies?

Yes. Pick the companies to clean; the others are not touched. Document types without a company (for example calendar meetings) are only cleaned when every company is selected.

What about posted invoices and done transfers?

They are removed with their lines, reconciliations and moves. Reconciliations with entries that stay are undone and those entries become open again; the preview warns you. Entries before a lock date need the matching option.

Is stock on hand still right afterwards?

Yes. For every product and location touched by removed moves, stock on hand and reservations are rebuilt from the moves that stay.

Will invoice numbers restart?

Journal entries and payments restart from the last entry left in each journal by themselves. Other numbering (orders, transfers, manufacturing orders) can be reset from the Numbering tab.

Does it handle custom modules?

Records of custom and third-party models that point to removed records are found by the reference scan and shown with a decision. Records they own are removed with them.

Why is a demo product not removed?

Records installed by an app, demo data included, are kept. Archive them, or remove them by hand once the cleanup is done.

Can a large database time out?

A run is one database transaction: if the web worker times out, nothing is removed. Narrow the scope (dates, companies, areas) and run in steps, or raise the server time limit for the rehearsal.

All Odoo apps

Related Odoo apps

Tell us which systems disagree. We will fix that.

Thirty minutes with an engineer, not a salesperson. You leave with a map of what you run, what to connect first and a price range, whether or not you hire us.