Skip to content
Snippets Groups Projects
Commit c2b15b7c authored by thcl-odoo's avatar thcl-odoo
Browse files

[FIX] website_slides: prevent error when no completed_template selected

Current behavior :
If no completed template (`completed_template_id`) is selected in the options of an elearning course, an error occurs when a user completes this course.

Steps :
- Install elearning
- (*with demo data*) Go to a course (e.g. Basics of Gardening)
- Remove the selected "Completion Email" then save
- Complete the course

Reason :
We are trying to access a `record_email_values` value here [1] but no value is assigned to `record_email_values` unless we have a completed_template [2].

[1] : https://github.com/odoo/odoo/blob/f4d83f31c12cb13d626bcaaa619c0f3be680cdbc/addons/website_slides/models/slide_channel.py#L110
[2] : https://github.com/odoo/odoo/blob/f4d83f31c12cb13d626bcaaa619c0f3be680cdbc/addons/website_slides/models/slide_channel.py#L105-L106



OPW-2753078

closes odoo/odoo#86771

X-original-commit: 444132f446c4dc8914f1238f96c4af98550e27a9
Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: default avatarClaude Thibault (thcl) <thcl@odoo.com>
parent 6889f3b0
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment