-3

I installed openerp and tested it with dummy records. Now, I need to delete all these dummy records so that i can start anew with real records. Do u guys know a way to delete these records. The database on the back is postgresql

Noor
  • 19,638
  • 38
  • 136
  • 254

3 Answers3

7

Risky idea aside, you can use the truncate command and cascade it over a few core tables to not lose configurations as well as dummy data.

TRUNCATE sale_order CASCADE;
TRUNCATE purchase_order CASCADE;
TRUNCATE mrp_production CASCADE;
TRUNCATE stock_picking CASCADE;
TRUNCATE stock_tracking CASCADE;
TRUNCATE account_invoice CASCADE;
TRUNCATE account_move CASCADE;
TRUNCATE account_voucher CASCADE;
TRUNCATE wkf_instance CASCADE;
TRUNCATE ir_attachment CASCADE;

This should keep intact your chart of accounts, user logins, products, contacts/partners, and so on. Also very important to truncate all workflow instances!

Note: This will delete minimum stock reorder points on OpenERP 6.1. Unsure about where other unintended side effects may be.

bsphil
  • 161
  • 2
  • 5
1

I think it's less risky to start a new database and fix its configuration than it is to try and clean out the dummy records you created.

Here's how I would proceed in your situation:

  1. Create a new database without test data.
  2. Go through the basic configuration wizard.
  3. Save a clean backup without any dummy records in it.
  4. Create a few sales orders, purchase orders, whatever, and see which configuration settings you forgot to change.
  5. Restore the latest clean backup.
  6. If you need to change some settings, do so and go back to step 3. Otherwise, you're done.

If you want to get really fancy, you can create a customization module that makes all the configuration changes for you. That way if you really screw up a database or lose your backups, you can start from scratch again.

Don Kirkby
  • 53,582
  • 27
  • 205
  • 286
0

i too think that creating a new dayabase is the best option for you to remove yor dummy records and install new records.Also there is an option to uninstall the modules you have installed in the following menu.

administration->modules->modules

select the module you want to uninstall-> hit the uninstall button ->apply sheduled upgrades. but the bad phase is most of the modules have dependencies to each other so they show rejection to uninstall.

dhana
  • 6,487
  • 4
  • 40
  • 63
Pravitha V
  • 3,308
  • 4
  • 33
  • 51