Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
177 Zobrazení

I'm trying to delete and recreate a warehouse, but when I go to the Inventory > Warehouses menu to delete it, I can't see the 'Stock Rule'.


Validation Error

The operation cannot be completed: Another model is using the record you are trying to delete. The troublemaker is: 'Stock Rule' (stock.rule) Thanks to the following constraint: 'Operation Type' (picking_type_id) How about archiving the record instead?

 

Avatar
Zrušit
Nejlepší odpověď

Hi,


You cannot delete a warehouse in Odoo if other records reference it. In your case, Stock Rules (stock.rule) are linked to the warehouse through their Operation Type (picking_type_id), and deleting the warehouse would break these relationships, causing a validation error.

The safest approach is to archive the warehouse instead of deleting it. Archiving preserves all historical links and prevents further use without affecting data integrity.

If deletion is necessary, you must first reassign or delete all dependent Stock Rules associated with the warehouse. Once these dependencies are cleared, the warehouse can be safely deleted. Often, the easiest solution is to archive the old warehouse and create a new one rather than attempting to delete it.



Hope it helps

Avatar
Zrušit