Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
2 Відповіді
377 Переглядів

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)

Аватар
Відмінити
Автор Найкраща відповідь

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

Аватар
Відмінити
Найкраща відповідь

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


Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
1
черв. 25
1471
2
бер. 22
13110
0
вер. 19
3420
2
січ. 18
9097
2
квіт. 15
13211