Se rendre au contenu
Menu
Cette question a été signalée
2 Réponses
372 Vues

I created a clean database, enabled developer mode, and import sample data.

 and received the following message:

Validation Error

The operation cannot be completed: Another model is using the record you are trying to delete.

The troublemaker is: Unknown

Thanks to the following constraint: quotation_document_sale_pdf_form_fie_quotation_document_id_fkey

Suggestion: How about archiving the record instead?

Steps to reproduce

  1. Go to SettingsGeneral Options
  2. Enable Developer Mode
  3. Load Demo Data

Version

Odoo SaaS 18.4+3 (Enterprise Edition)

Avatar
Ignorer
Auteur Meilleure réponse

Hi,

Thanks a lot for your explanation. In my case, the issue doesn’t seem to come from demo data, since I’m importing into an empty database. I’ve tested importing with only two products enabled (Sales and Accounting) and it works fine, but when I select more than one product, the error appears.

It looks like an Odoo issue rather than a problem with referential integrity from demo data.

Best regards,

David

Avatar
Ignorer
Meilleure réponse

Hi,

The error you encountered comes from Odoo’s database enforcing referential integrity. When you enabled Developer Mode and loaded demo data, some demo records were created and linked to each other. Odoo then attempted to remove one of those records, but since it was still referenced elsewhere, PostgreSQL blocked the deletion. That’s why you see the foreign key error mentioning quotation_document_id_fkey.

In practice, this means demo records shouldn’t be manually deleted, since they often have dependencies across modules. Instead, Odoo recommends archiving them, which hides the record without breaking relationships. If you don’t need demo data at all, the simplest and cleanest solution is to create a new database without loading demo data. This avoids hidden dependencies and lets you work only with your real product, customer, and vendor data.

If you prefer to keep demo data for testing, you can, but avoid deleting those records—just archive them. This ensures the system remains stable while still giving you examples to reference.


Hope it helps


Avatar
Ignorer
Publications associées Réponses Vues Activité
1
juin 25
1462
2
mars 22
13094
0
sept. 19
3416
2
janv. 18
9089
2
avr. 15
13203