I want to share a code that has proved very useful for us. When one begin to fiddle with Compiere and enter sample test data, he or she may often find in position when things go messy and start over is needed. But in Compiere it is not easy to delete data: especially transactions and accounting data.
So here I present you with the current version of our ClearData process, that erases all the transactional data (orders, financial and material storage data) from Compiere's current client, and let you start over. You do not lose any static data - like business partners, products, etc. With this process you can easily start over testing. But it is highly recommended not to use this process on production environment!
Here you are:
Some installation hints: inside the archive you'll find 2 java classes. To run it you'll probably need to change their package names (we use custom build schema, as we have a lot of addons which we keep outside compiere source). The easiest way is to put them into Compiere's "base" project. Then you shall rebuild Compiere. After that start up compiere, log-in as System and add (from "Report & Process") a new process using ClearData class. Then add a Menu item and restart the Compiere client.
Use it at your own risk! I do not guarantee that it will always work, as we have come to it in an empiric way, and from time to time we use to add some more tables for deletion. Nevertheless it works for us. Hope some of you may find it useful.