Skip to Content
Menu
This question has been flagged
2 Replies
184 Views

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
Discard
Author

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

Best Answer

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
Discard
Best Answer

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

Avatar
Discard
Related Posts Replies Views Activity
2
Aug 25
3427
1
Jul 25
1576
1
Aug 25
1152
0
May 25
1911
2
Apr 25
4218