Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Artificial Intelligence
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Property Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries ⟶
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    • Affiliate Program
    Get Services
    • Find a Partner
    • Find an Accountant
      • Get a Tailored Demo
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +32 2 290 34 90
    • Get a Tailored Demo
  • Pricing
  • Help
  1. APPS
  2. Extra Tools
  3. Odoo 18 Remove Data v 18.0
  4. Sales Conditions FAQ

Odoo 18 Remove Data

by Odoo Mates
Odoo 10
v 18.0 Third Party 9046
Download for v 18.0 Deploy on Odoo.sh
Apps purchases are linked to your Odoo account, please sign in or sign up first.
Versions 10.0 11.0 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0 20.0
You bought this module and need support? Click here!
Versions 10.0 11.0 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0 20.0
  • Description
  • Manifest
Odoo 18 · Community Edition

Odoo 18 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 18 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 18 applications: 3,496 records, 1,974 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: 4,692 rows deleted, 48 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.

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.


Odoo Mates

Keeping it simple

Email: odoomates@gmail.com


Availability
Odoo Online
Odoo.sh
On Premise
Lines of code 610
Technical Name om_data_remove
LicenseLGPL-3

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author, please use the developer contact information. They can usually be found in the description.
  • Ratings
  • Discuss
Landed Cost
by
acamodoc@nexfinitsolutions.com
on 11/27/26, 3:03 AM

Landed cost is not included here.

Landed Cost
by
Odoo Mates
on 11/27/26, 5:14 AM Author
Hello,

Thank you for your feedback.

Landed costs are included. Clear All Transactions removes the landed costs, their cost lines and the valuation adjustments, together with the transfers, stock moves and their journal entries. The landed cost numbering also starts again from 1. The landed costs are listed under Inventory on the Data Cleaning screen. We tested this on Odoo 15 to 20 with validated landed costs, and they were all removed without errors.

To remove only the landed costs, open Database Tables, select stock_landed_cost, stock_landed_cost_lines and stock_valuation_adjustment_lines, and click Delete Rows.

Landed costs only appear when the Landed Costs app (stock_landed_costs) is installed on the database.

If some landed costs remain on your database after clearing, please email us at odoomates@gmail.com. Tell us your Odoo version and what you see, and we will look into it right away.

Best regards,
Odoo Mates

Works well!
by
Andrew Rogers
on 3/29/25, 6:56 AM

I have found your many free apps really good. Thank you for making them available.


Doesn't work - error on install
by
Cameron Marie Needham
on 2/25/25, 7:10 PM

Here is the error you get when attempting to install:


Invalid Operation

Error while importing module 'om_data_remove'. while parsing /tmp/tmpv3ctgh9c/om_data_remove/views/view.xml:4 Error while validating view near: <div class="col-12 col-lg-12 mb4"> <span class="col-3 col-lg-2 text-start">Remove All</span> <button string="Delete All Transactions Except Master Data" type="object" name="remove_all" confirm="Please confirm to delete the data?" class="oe_highlight"/> </div> <div class="col-12 col-lg-12 mb4"> remove_all is not a valid action on res.config.settings View error context: {'file': '/tmp/tmpv3ctgh9c/om_data_remove/views/view.xml', 'line': 12, 'name': 'Remove Data', 'view': ir.ui.view(4611,), 'view.model': 'res.config.settings', 'view.parent': ir.ui.view(), 'xmlid': 'view_remove_data'}


Not working! Fails to install
by
naresh punia
on 11/18/24, 8:05 AM


Errors during installation


Re: Not working! Fails to install
by
Odoo Mates
on 11/18/24, 12:44 PM Author

Working fine with us, if you have some issues, give us more details


error on v18 install
by
Tobias Gurtzick
on 1/1/25, 3:04 PM

while parsing /tmp/tmpr12v9zpk/om_data_remove/views/view.xml:4 Error while validating view near: <div class="col-12 col-lg-12 mb4"> <span class="col-3 col-lg-2 text-start">Remove All</span> <button string="Delete All Transactions Except Master Data" type="object" name="remove_all" confirm="Please confirm to delete the data?" class="oe_highlight"/> </div> <div class="col-12 col-lg-12 mb4"> remove_all is not a valid action on res.config.settings View error context: {'file': '/tmp/tmpr12v9zpk/om_data_remove/views/view.xml', 'line': 12, 'name': 'Remove Data', 'view': ir.ui.view(6666,), 'view.model': 'res.config.settings', 'view.parent': ir.ui.view(), 'xmlid': 'view_remove_data'}

Re: error on v18 install
by
Odoo Mates
on 1/13/25, 12:13 PM Author

As per the email you are using Import Module option in the user interface, which is not the way to install the applications containing python files.

Steps:

* download and extract the app

* add it to your addons path

* restart the service

* update app list and install the app


If we will have custom modules installed then does this module also delete data for it ?
by
Sakib
on 11/21/24, 4:24 AM


Re: If we will have custom modules installed then does this module also delete data for it ?
by
Odoo Mates
on 11/21/24, 5:21 AM Author

No it will delete only default transactions model


Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with