Skip to Content
Menu
This question has been flagged
2 Replies
4012 Views

Hello, I am currently working on the Stock, Buy and Sell modules of Odoo13. After finishing my tests on the Staging branch with test products. I now want to delete all the test products and replace them with real products. 

1- I selected all the products then I clicked on Action and finally Delete. 

2- Here is the error I had:  Something went wrong! The operation cannot be completed: another model requires the deletion of the recording. If possible, archive it instead. Model: Stock Move (stock.move), Constraint: stock_move_product_id_fkey 

Can someone help  please. 

Thank you in advance

Avatar
Discard

Seems that you have inventory movements for that product.  You can archive the product rather than deleting it.

Best Answer

Deleting core data from ERP systems is almost impossible, tedious and cumbersome and needs detailed know-how of the data model because of the numerous interdependencies. You can either archive the test data as suggested by Chris, or restore a backup from before the tests. You should seriously reconsider your setup and staging policy to avoid such mistakes in the future.

Avatar
Discard