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