Odoo Help


delete all products

hajar el hamdani
on 9/1/14, 5:56 AM 3,811 views

Hello everybody,

i want to delete all the list of products to have a clear database and create new ones this error message is always shown

Integrity Error

The operation cannot be completed, probably due to the following:
- deletion: you may be trying to delete a record while other records still reference it
- creation/update: a mandatory field is not correctly set

[object with reference: Stock Move - stock.move]

i tried to cancel all operations that have a relationship with those products,  but without success 

if you have an other suggestion please share it with me

On 9/1/14, 6:04 AM

If u Donot need the stock_picking Records then

First u Delete all Records in stock_move and stock_picking in the backend

by Query "delete from stock_picking"


try "Truncate Cascaded" For the product_product


What do you mean by "Truncate Cascaded"? Where it is?

Pascal Tremblay
on 10/6/14, 4:42 PM

SQL Query : TRUNCATE product_product CASCADE

Pascal Tremblay
on 10/6/14, 4:52 PM
Anand Patel
On 10/7/14, 3:02 AM

If you want to delete all the products then you have to unlik that products form the associted records with that prodict.

Like stock move,sale order, purchase order, invoive etc...So first you need to check that where this prodict is associated and then you need to unlik that product and then you can delete that product or you can delete all those entries which are associated with that product


Pascal Tremblay

--Pascal Tremblay--
| 5 3 7
Alma, Canada
--Pascal Tremblay--

Pascal Tremblay
On 10/6/14, 5:43 PM

Here is my SQL query :

DELETE FROM stock_picking;

DELETE FROM stock_move;

DELETE FROM stock_move;

DELETE FROM mrp_production; 

DELETE FROM sale_order;

DELETE FROM procurement_order;

TRUNCATE product_product CASCADE

It seems to still have integrity problem in my products... Should I add something to my SQL query to delete ALL TRACES of products?



About This Community

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


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 9/1/14, 5:56 AM
Seen: 3811 times
Last updated: 2/28/17, 6:55 AM