When #114353 forward port of #112425 which adds an uninstall_hook was
merged, it was not updated with the API change of #108254, which
replaced the `(cr, registry)` parameters by a sole `(env)` as most if
not all uninstall hooks immediately created an environment anyway.
So this hook has been breaking uninstall on anything on which
`website_slides_survey` depends since it was merged.
Fix the hook to match the new API.
closesodoo/odoo#118296
X-original-commit: 201a4b369cf1652a2da763181f6837cfb7f44f3e
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
ValueError "Invalid field slide.slide.partner.survey_scoring_success in leaf
('survey_scoring_success', '=', True)" .
it occurs because the domain field in gamification.goal.definition is not updated
when we uninstall the model.
we add the uninstall_hook in website_slides_survey where we replace the domain.
sentry-3779856181
closesodoo/odoo#114353
X-original-commit: abc662e3b190c58794eaf62ed7850439f9ebfd50
Signed-off-by: Ivan Elizaryev (iel) <iel@odoo.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
For users viewing their own profile page on the website,
a new section 'Certifications' is added to the about tab.
Thoses certifications are the survey that activated certificate.
Task ID : 1922159
PR #31109
Task #1940360
Subtask of #1902304
Purpose
=======
Adds certification capabilities to the website_slides module.
Channel/courses can now include certifications as a new type of slide.
This new type of slide is available as a "Certification" button on the slide creation
frontend view (next to "Video", "Presentation", ...).
Users have to link the slide to an actual survey that has the 'certificate' field
set to true (that will populate the slide's survey_id field).
Slides of type certification are handled in frontend in a very simple way for now:
- A button "Begin certification" that redirects the user to the related survey frontend.
- A button "Download certification" when the user has succeeded the certification.
- When the survey is done, if it's linked to a slide, a button "Go back to course" allows
the user to go back to the slide frontend.
(There is a special use case for when the website_publisher designing the survey lands on a
certification slide: he is allowed to test the survey with a survey_input created as test_entry)
Survey creation as well as limited time, limited number of attempts, ... are still completely
handled in the survey module. That means that the user will have to first create a suitable survey
that is a certification and only then create a slide of type "certification" and link
the created survey to it.
Ideally, the taking of the survey should be transparently included in the slide frontend but
it requires a full refactoring of the way surveys are submitted. This will most likely come in
a later commit.
This commit is an advanced merge of full eLearning module (see task #1902304).