Odoo Help


This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


How Can I delete anything from Database (odoo) for start again

Daniel Sanchez de Leon
on 6/3/14, 3:44 AM 11,398 views

I am making testings creating clients and invoices but i can delete invoices. I wish to delete anything for start again. It is possible?





| 5 6 8
Cornwall, Canada

Analysing, designing, coding and mentoring since 1975. Kilobytes to terabytes. Punch cards to punchy sites. My OpenERP video series: http://www.youtube.com/playlist?list=PLq7op4J183lX44ZlXPiHxUpRvmmRDtxye My Google Speadsheets --> OpenERP Data Pump project: http://martinhbramwell.github.io/GData_OpenERP_Data_Pump My email (with spaces removed) : mhb . warehouseman @ gmail . com

On 6/3/14, 7:29 AM

I have been concerned about this difficulty for a long time.  If you are learning Odoo on your own it can be really horrible to paint yourself into a corner and have to recreate the whole project by hand to get yourself back to the point just before the misstep.

I published on GitHub a toolkit for managing the process of recreating a database from data in spreadsheets.  It's a Python program that you can run in your laptop or whatever.  It pulls data records from Google speadsheets and injects them into the right places in Odoo using XML-RPC.

The main point is that, using settings in a control spreadsheet, you can have complete automated control over the process of installing modules and inserting data, without programming.

I made a video series that introduces the whole environment I use so I can run it from a Chromebook or mobile phone:   http://blog.warehouseman.com/2014/02/step-00-handbook-for-devops-for-openerp.html.

The last video, http://blog.warehouseman.com/2014/02/demonstrate-data-pump.html gives a really fast (<5 mins) demo of how you can use the data pump to install extra languages and provinces for a country.

The project page is GData OpenERP Data Pump

I'd love to have some collaborators to help me move it forward more quickly.


Note! -- Google has changed the interface to its spreadsheets.  For the time being, the pump will work only with "old-style" spreadsheets.


that seems like a great project. Is there a way to do that without google spreadsheets? I think I would have a hard time justifying that I have uploaded confidential data to a google (or any other) cloud service where no one can ever say where the data goes and who has access to look at it or copy it to wherever.

on 6/3/14, 7:51 AM

That's a sensible observation. There are certainly inappropriate use cases. Keeping separate development and production servers is always a good idea, and this tool is definitely for the development side, for the moment. All spreadsheets have size limitations too, which you'd run into quite soon with production data. Meanwhile, Daniel Sanchez de León (the OP), describes exactly the use case for I which I developed the pump. Other use cases I had in mind include: preparing demos to customers, training users, testing 3rd party modules before installing in production, debugging the install/de-install cycles of one's own modules, and pre-production setup of production servers (charts of accounts, categories, parameters, products, locations). You have given me the idea to include (some day) an encryption filter for obfuscating sensitive columns. It'd decrypt fields just before pumping them into Odoo. You're welcome to contribute that if you feel the inclination. I did use the really cool site http://www.fakenamegenerator.com/. I ordered 100,000 free fictional persons in a csv file, loaded it into Google Spreadsheets and then used formulas to create data for the pump.

on 6/3/14, 10:09 AM

hi Martin, I'd love to help but total illiterate in programming whatsoever, so would there be anything apart from that?

on 6/4/14, 12:17 AM


| 6 7 8


On 6/3/14, 6:56 AM

I had a similar question and so far it looks like ... you can't really. The problem is that all installed modules are inside the database, so if you make a new empty one ... also all installed modules are gone. The workaround for your scenario seems to be:

  1. make a new empty database
  2. install all modules you want to use
  3. make a dupliacte of that still empty database and use that for testing.
  4. Once you go 'live' ... use the still ampty database with all modules installed

I know it is probably the wrong moment for you now (because it's too late) bit it seems that this is the way it works. I think what would be cool would be a Duplicate of the curren database without the data. I guess Oddo is constructed in a way somehow that sees the modules in the same way as your actual data.

If you don't have many entries yet you can try to either delete them handish or unckeck "active" checkbox in the objects you want to remove. When something is not "activ" anymore it still fullfils its dependenies with other parts of your database, but you don't see it anymore. Not 100% sure how "clean" that solution is

Deleting things by hand can be a lengthy process because in many cases an entry might be used somewhere else, so you need to delete these entries in the right order. For example the invoice you are referring to is used by any other part in your database which prevents the invoice from being deleted. So you need to get rid of this object first... depending on how many entries you have already this can be a tyring task, especially when you don't have really a clue where exactly your dependencies are.

Candra Rusly
On 7/3/14, 10:55 PM

As for me, for testing softwares i usually use VM, mostly i used virtualbox, there are features like snapshot and export the virtual machine where you can use to create "save points" as your testing or development goes, i know it's like using a cannon to shoot an apple, but so far it's the most foolproof way that i always use.

and do take notes, use online notes like evernote or such to keep track of your progress, it hurts when we miss certain steps to prepare the whole system.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

3 follower(s)


Asked: 6/3/14, 3:44 AM
Seen: 11398 times
Last updated: 9/23/16, 9:59 AM