diff --git a/om_data_remove/README.rst b/om_data_remove/README.rst index 24fbdbd35..d6f5e132f 100644 --- a/om_data_remove/README.rst +++ b/om_data_remove/README.rst @@ -2,9 +2,10 @@ Odoo 20 Remove Data =================== -This module adds a Data Cleaning screen that clears every transaction of an Odoo 20 Community database -in one go, and reports what is left in each table of the database. It is meant for a test database or -for a fresh database before going live: the deletion cannot be undone. +This module adds a Data Cleaning screen that clears every transaction of an Odoo 20 database, Community +or Enterprise, in one go, and reports what is left in each table of the database. Set Odoo up and test it +in the database you go live with, clear the test transactions, keep the master data and the configuration, +and uninstall the module before the first real transaction: the deletion cannot be undone. Features ======== @@ -77,13 +78,16 @@ the report refuse anyone else. Usage ===== -Take a backup of the database first: nothing here can be undone, and the only way back is to restore -that backup. Do not install this module on a production database. +Nothing here can be undone. Use it before going live only, while the database holds test data, and +uninstall the module before the first real transaction, so that the live data cannot be cleared later. +The transactions of every company of the database are cleared. Go to Settings > Data Cleaning, check what will be deleted, click Clear All Transactions, type DELETE in the confirmation and click Clear All Transactions. The report of the database tables opens once the transactions are deleted. Database Tables shows the same report without deleting anything. Click Delete Rows on a table of the report to empty it as well. +The documents of custom, third-party and Enterprise-only apps are not in the standard list: the report +shows their tables with their row count, and Delete Rows empties them. Then uninstall Remove Data from Apps. Credits ======= diff --git a/om_data_remove/static/description/banner.gif b/om_data_remove/static/description/banner.gif index ae82ff6b2..d7a354d0d 100644 Binary files a/om_data_remove/static/description/banner.gif and b/om_data_remove/static/description/banner.gif differ diff --git a/om_data_remove/static/description/icon.png b/om_data_remove/static/description/icon.png index ab723bde0..3f814edd1 100644 Binary files a/om_data_remove/static/description/icon.png and b/om_data_remove/static/description/icon.png differ diff --git a/om_data_remove/static/description/index.html b/om_data_remove/static/description/index.html index 6aac0afd1..cfd393fd9 100644 --- a/om_data_remove/static/description/index.html +++ b/om_data_remove/static/description/index.html @@ -1,170 +1,325 @@ -
- - -
- Odoo 20 · Community Edition -

- Odoo 20 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.

-
One buttonAll standard Odoo 20 appsMaster data keptTable reportDelete RowsType DELETE to confirm
-
- - -
-
-

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. -
-
- - -
- What it clears -

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. -
-
-
- - -
- The screen -

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.

-
-
✓  Record counts across every company, archived and posted records included.
-
✓  Only the users of the Settings group see the menu or can run it.
-
-
- Data Cleaning screen
-

A demo database with 19 applications: 7,648 records, 5,158 of them messages and activities.

-
- - -
- The confirmation -

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.

-
- Confirmation
-

The last step before the transactions are deleted.

-
- - -
- The report -

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.

-
-
✓  The rows deleted and the sequences reset, at the top.
-
✓  A table the database refused to empty, because a kept record still points to it, is named with the reason.
-
✓  Search the Tables opens the full list, to filter by kind or find a table by name.
-
✓  Only the data is listed: the tables of the framework and the configuration (models, fields, views, menus, actions, access rights, attachments, parameters, scheduled actions, message subtypes...) and the relation tables are counted, not shown.
-
✓  Still rows you do not want? Delete Rows empties that table too, after the same DELETE confirmation.
-
-
- Database tables report
-

After the clearing: 9,721 rows deleted, 52 sequences reset, no transaction row left.

-
- All the tables
-

Every table with rows, the fullest first.

-
- - -
- Delete rows -

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.

-
-
✓  The tables of the framework (ir_*, users, groups, companies, languages, currencies, countries) are never offered.
-
✓  A relation table is emptied with the records it links, not on its own.
-
✓  A table that kept records still need is refused by the database, and the report says why.
-
-
- Delete rows
-

Emptying the contact tags left after the clearing.

-
- After deleting rows
-

The tags and their XML ids are gone, and the report is drawn again.

-
- - -
- How to use it -

Clearing a test database

-
-
1.Take a backup of the database.
-
2.Go to Settings > Data Cleaning and check what will be deleted.
-
3.Click Clear All Transactions, type DELETE and confirm.
-
4.Read the report of the database tables that opens next, and click Delete Rows on any table you want empty too.
-
-
- - -
-

Questions we get

-

- Can I undo it?
- No. Restore the backup you took before.

-

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

-
- -
- - - -
- Odoo Mates -

Keeping it simple

-

Email: - odoomates@gmail.com

-
- - - - - - -
-
- - -
- +
+
+
Odoo Mates · free and open source
+

Odoo 20 Remove Data

+

Set Odoo up and test it in the database you go live with, then clear every test transaction in one click. Master data and configuration stay.

+
+One button +All standard apps +Master data kept +Table report +Community and Enterprise +Free, LGPL-3 +
+
No more copying the configuration from a staging or test database.
+
+
+

Everything at a glance

+

Configure once, in the database you go live with: clear the test data, uninstall the module, go live.

+
+
+
+
+ + + + +
+
Every standard app
+
All their transactions in one click, for every company of the database.
+
+
+
+
+
+ + + + +
+
Numbering from 1
+
Sales, purchases, transfers, payments, MOs, POS start again from 1.
+
+
+
+
+
+ + + + +
+
Empty chatter
+
Every message and activity goes, on the kept records too.
+
+
+
+
+
+ + + + +
+
Settings group only
+
Only administrators see the menu and can run the clearing.
+
+
+
+
+
+ + + + +
+
Master data kept
+
Partners, products, accounts, taxes, employees, BoMs and the configuration.
+
+
+
+
+
+ + + + +
+
Custom models too
+
Custom, third-party or Enterprise apps: Delete Rows on their tables.
+
+
+
+
+
+ + + + +
+
Table report
+
Every data table with its exact row count, the fullest first.
+
+
+
+
+
+ + + + +
+
Type DELETE
+
Nothing goes until DELETE is typed; one transaction, all or nothing.
+
+
+
+
+
+
What it clears
+

The transactions of every standard app

+

Only the apps installed on the database are touched. Their documents go with their followers, attachments and XML ids, and their numbering starts again from 1.

+
+
+
+
+
Accounting and Payments
+
Journal entries and items, reconciliations, payments, bank statements, 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, landed costs; manufacturing orders, work orders, time logs, unbuild orders.
+
+
+
+
+
Employees
+
Expenses, time off and allocations, attendances and job applicants.
+
+
+
+
+
Everything else
+
CRM leads, tasks and updates, repairs, maintenance, fleet logs, event registrations, survey answers, mailings and SMS, website visitors, lunch, loyalty cards, calendar events.
+
+
+
+
+
Discuss and chatter
+
Every message and activity, on the kept records too: the chatter starts empty.
+
+
+
+
+
Features
+

A closer look

+

See what goes before it goes, confirm it, and check what is left.

+
+
+
+
+
The screen
+

See what goes before it goes

+

Settings > Data Cleaning lists, app by app, the documents that would be deleted and how many records each holds.

+See what goes before it goes +
+✓  Record counts across every company, archived and posted records included.
+
+✓  Only the users of the Settings group see the menu or can run it.
+
+
+
+
+
The confirmation
+

Nothing is deleted until you type DELETE

+Nothing is deleted until you type DELETE +
+✓  Repeats how many records will go and names every kind of document.
+
+✓  One database transaction: if anything fails, nothing is deleted.
+
+✓  Rows are deleted with SQL, so no override of a model can block the clearing.
+
+
+
+
+
The report
+

What is left, table by table

+What is left, table by table +
+✓  Rows deleted and sequences reset, at the top.
+
+✓  A table a kept record still points to is named with the reason.
+
+✓  Database Tables shows the same report at any time, without deleting anything.
+
+
+
+
+
Search the tables
+

Every table, filtered and grouped

+Every table, filtered and grouped +
+✓  Filter by kind: transactions, attached records, kept records.
+
+✓  Framework and relation tables are counted, not shown, unless you ask.
+
+✓  Select several tables and delete their rows at once.
+
+
+
+
+
Custom transaction models
+

Empty the tables the standard list does not know

+

Your own, third-party and Enterprise-only apps have their own documents. After the clearing they are still in the report with their row count: Delete Rows empties them, with their followers, attachments and XML ids.

+Empty the tables the standard list does not know +
+✓  Framework tables (ir_*, users, groups, companies, currencies, countries) are never offered.
+
+✓  A relation table is emptied with the records it links.
+
+
+
+
+
After Delete Rows
+

The report, drawn again

+The report, drawn again +
+✓  The emptied tables and their XML ids are gone.
+
+✓  Anything the database refused is listed with its reason.
+
+
+
+
+
How it works
+

From setup to go-live

+
+
+
1
Configure and test in live
Install this module in the database you will go live with, set Odoo up and test every flow there.
+
2
Clear the transactions
Settings > Data Cleaning → Clear All Transactions, type DELETE. Then Delete Rows on the tables of your custom models, if any.
+
3
Uninstall it, go live
Uninstall Remove Data from Apps before the first real transaction, so nobody can clear the live data later.
+
+
+
Install
+

Get started

+
+
+
+
+

How to install it

+
+1Copy the module to a folder of your own modules, e.g. /opt/odoo/custom-addons, and add that folder to addons_path in odoo.conf.
+
+2Restart Odoo.
+
+3Activate the developer mode, then Apps → Update Apps List.
+
+4Clear the Apps filter, search om_data_remove and install it.
+
+Do not use Apps → Import Module. It is meant for data modules without Python, and leaves this module half loaded.
+
+
+
+
+

Free, for good

+

Remove Data is free and open source under LGPL-3, for Odoo 20.

+
+
+
+
+

Questions we get

+
+
+
+
+
What happens to my custom modules?
+
Clear All Transactions covers every standard Odoo app. The documents of custom, third-party and Enterprise-only apps stay, and the table report shows them: Delete Rows on their tables empties them too.
+
+
+
+
+
Why uninstall it before going live?
+
Once real transactions exist, clearing them cannot be undone. Without the module there is no button left to press by mistake.
+
+
+
+
+
Can I clear one company only?
+
No. The transactions of every company of the database are cleared. Use it before any company goes live, not when one is live and another is still being set up.
+
+
+
+
+
Can I undo a clearing?
+
No. If you want a way back, keep a copy of the database from before the clearing.
+
+
+
+
+
Do I need Odoo Enterprise?
+
No. It works on the Community Edition and on Enterprise.
+
+
+
+
+

How is the app working for you?

+

Your rating helps others find it; your requests and pull requests decide what comes next.

+★  Rate us on Odoo Apps +💡  Request a feature +🐛  Report an issue +★  Star us on GitHub +
+
+Odoo Mates +
Email: odoomates@gmail.com
+