Test Data Cleanup: Remove Demo and Test Transactions Before Go-Live
by Viyug Infotech https://viyuginfotech.com
Remove test data before go-live, keep what is real
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.
Dry run firstScopedProduction lockRun log
Three steps, no surprises
Nothing is removed until a preview exists and still matches the data.
Pick and scope
Tick the areas of the installed apps. Limit them to companies, a date range, journals or warehouses, and add keep or only filters per document type.
Dry run
The preview lists every document type in removal order with exact counts, the lines and records removed with them, chatter, attachments, and the records that stay but point to them.
Confirm and log
Type the database name, confirm your backup and run. The run keeps who, when, what, how many, what was left and how long it took, and prints as a PDF.
What you get
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.
Moving real data in after the cleanup?
Once the test data is gone, bring your real masters and opening balances over from Tally.
Import Tally XML masters and Trial Balance files: ledgers, groups and opening balances, with file detection, staging and review before anything is created.
Areas
Each area appears only when its app is installed.
| Area | What is removed | Needs |
|---|---|---|
| Point of Sale | Orders, payments, sessions (a session only when all its orders go) | Point of Sale |
| Website orders and visitors | Orders placed on a website, website visitors | Website |
| Sales | Quotations and sales orders with their lines | Sales |
| Purchases | Requests for quotation, purchase orders, purchase agreements | Purchase |
| Repairs | Repair orders with their parts moves | Repairs |
| Manufacturing | Manufacturing orders, work orders, time logs, unbuild orders, their stock moves | Manufacturing |
| Inventory | Transfers, moves, move lines, scraps, batches, landed costs | Inventory |
| Invoices, payments and journal entries | Invoices, bills, payments, entries, bank statements, reconciliations, analytic lines | Invoicing |
| Expenses | Employee expenses | Expenses |
| Project tasks and timesheets | Tasks, project updates, timesheets (projects stay) | Project |
| CRM | Leads and opportunities | CRM |
| Time off, attendances, recruitment | Time off and allocations, check-ins, applicants | HR apps |
| Maintenance and fleet | Maintenance requests; vehicle services, contracts, odometer, driver history | Maintenance, Fleet |
| Events and surveys | Registrations; participations and answers | Events, Surveys |
| Mailing traces and SMS | Delivery traces of email marketing, queued text messages | Email Marketing |
| Lunch, loyalty, calendar | Lunch orders and cash moves; coupons, loyalty and gift cards; meetings | Lunch, Loyalty, Calendar |
| Unused master data | Products, product attributes, contacts, lots and serial numbers, packages, bills of materials, accounts, taxes | as installed |
See it working
A rehearsal on a demo database before go-live.
Cleanup runs
Every run stays as a log: areas, companies, dates, records planned, removed and left, who ran it and when.

Areas 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.

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

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

References 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.

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

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

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

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

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

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

Second administrator
A run that removes accounting data waits for another administrator.

Profiles
Reusable cleanups, with JSON export and import to replay a rehearsal on the go-live database.

Settings
Production lock, unlock duration and approval, with shortcuts to areas and profiles.

Areas
Installed apps only; rename, reorder or restrict an area to some groups.

Printable summary
The run as a PDF for the go-live file.

Configuration reference
| Setting | Where | Effect |
|---|---|---|
| This is a production database | Settings โบ Test Data Cleanup | Every run is refused until it is unlocked for one run with the database name and a reason. |
| Unlock lasts (minutes) | Settings โบ Test Data Cleanup | How long a production unlock stays valid (30 by default). |
| Second administrator approves accounting cleanups | Settings โบ Test Data Cleanup | Runs with invoices, payments, entries, accounts or taxes wait for another administrator. |
| Allowed groups | Data Cleanup โบ Configuration โบ Areas | Restrict an area to some groups. |
| If an area fails | Run โบ Options | All or nothing, or keep going per area. |
| Allow entries inside lock dates | Run โบ Options | Off by default: entries before a lock date or in a secured sequence stop the run. |
| Offer numbering reset | Run โบ Options | Lists the numbering of cleaned documents with a proposed next number. |
| Refresh category and location names | Run โบ Options | Recomputes the full names of product categories and stock locations after the run. |
| Clear chatter on kept documents | Run โบ Options | Also removes messages and activities of the documents that stay, in the same companies and dates. |
Access and data
Who can use it
Settings administrators who are also in the Data Cleanup Manager group. Both are checked on the server for every action, not only in the menu.
What is never removed
Users, groups, companies, currencies, countries, languages and technical records, records installed by apps, and the contacts of companies and users.
How records are removed
Through the ORM, child records first, so the rules of every installed module apply and nothing points to a removed record afterwards.
What is checked before a run
The scope must not have changed since the preview and the data must still match it; otherwise the run asks for a new preview.
Questions
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.
Go further with paid Viyug apps
This app stays free. These paid apps from the same team work next to it:
Need help or a change?
An app you would like covered as an area, or a question about your go-live? Use the Contact Vendor button on this page. Viyug Infotech will get back to you.
Email support: support@viyuginfotech.com
Website: viyuginfotech.com
Scan with your phone to chat on WhatsApp or write us an email:

+91 83207 42187

Send us an email
Release notes
Initial release
- Areas for 22 kinds of transactions, shown only when their app is installed
- Scope by company, date range, journal and warehouse, keep and only filters
- Dry run with counts in removal order, references from kept records, numbering reset
- Unused master data removal with protected records
- Typed confirmation, production lock, second administrator approval, run log and PDF
- Profiles with JSON export and import
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
Discuss (mail)
|
| Lines of code | 2748 |
| Technical Name |
test_data_cleanup |
| License | LGPL-3 |
| Website | https://viyuginfotech.com |
Please log in to comment on this module