Skip to Content
Menu
Dette spørgsmål er blevet anmeldt
2 Besvarelser
186 Visninger

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
Kassér
Forfatter

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'. 

Bedste svar

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
Kassér
Bedste svar

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

Avatar
Kassér
Related Posts Besvarelser Visninger Aktivitet
2
aug. 25
3428
1
jul. 25
1576
1
aug. 25
1152
0
maj 25
1912
2
apr. 25
4219