Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
3 Antwoorden
261 Weergaven

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
Annuleer
Auteur

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

Beste antwoord

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
Annuleer
Beste antwoord

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
Annuleer
Beste antwoord

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

Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
2
aug. 25
3450
1
jul. 25
1586
1
aug. 25
1153
0
mei 25
1921
2
apr. 25
4231