İçereği Atla
Menü
Bu soru işaretlendi
3 Cevaplar
282 Görünümler

Dear All,

I currently have several courses with certificates created for testing purposes, and I want to delete them. However, an error message appears saying, "People already took this quiz. To keep course progression, it should not be deleted."

Could you please advise how I can delete these courses?

Thank you.

Avatar
Vazgeç
Üretici

Hello Niyas! Thanks for your reply. It is working fine in Odoo 17 and 18. However, in Odoo 15, when I cleared the attendees list and deleted a course, a pop-up error message appeared like 'Validation Error

The operation cannot be completed: another model requires the record being deleted. If possible, archive it instead.

Model: Content Quiz Question (slide.question), Constraint: slide_question_slide_id_fkey'. 

En İyi Yanıt

In Odoo 15, the deletion fails because linked records like slides or quiz questions still reference the course. Even after clearing attendees, those foreign keys remain.

The safest way is to delete quizzes, slides, and certificates first, then the course.

If it’s just test data, you can also use Developer Mode to remove related records manually, otherwise, archiving is the better option.

Avatar
Vazgeç
En İyi Yanıt

Hi,


In Odoo 15, you may encounter an error when trying to delete a course because it’s linked to other records such as quizzes, attendees, or certificates. This happens due to Odoo’s data integrity rules, which prevent deletion of records that have dependencies. The simplest solution is to archive the course instead of deleting it. You can do this from the eLearning → Courses menu by selecting the course and choosing Action → Archive. This hides the course without breaking links.


If the course was created for testing and you want to remove it completely, you must first delete all related records — including quizzes, slides, attendees, and certificates. After clearing these dependencies, enable Developer Mode and manually delete any remaining linked data from the Technical → Database Structure → Models section. Once all linked records are removed, you can safely delete the course.


For advanced users working in a test environment, it’s also possible to delete courses and their dependencies directly through SQL commands. However, this approach should never be used in a live database, as it bypasses Odoo’s safety checks. Overall, archiving is the safest approach, while full deletion requires careful removal of all related records to avoid validation errors.


Hope it helps

Avatar
Vazgeç
En İyi Yanıt

Hi,
Clear the attendees list and then try to delete the course.
Thanks

Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
0
Eki 25
123
2
Ağu 25
3490
1
Tem 25
1619
1
Ağu 25
1153
0
May 25
1954