[FIX] website_slides_survey: add context to survey_id

Before this commit when user quick create a certification,
then it will create record in survey but not with certification
equals to True. Due to which it will be excluded from domain and
we will not able to find it in survey_id in elearning.

With this commit we pass certification equals to true and scoring_type
equals to scoring_without_answers in context of survey_id. So now,
it will be not excluded in domain('certificate', '=', True) in elearning.

Task Id: 2621296

closes odoo/odoo#75375

X-original-commit: 47894929591c7f46451242c1d0368094e2b3c295
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit is contained in:
dht-odoo
2021-08-20 10:27:40 +00:00
parent 75584fb881
commit 32acd56002
@@ -8,7 +8,7 @@
<xpath expr="//field[@name='slide_type']" position="after">
<field name="survey_id"
attrs="{'invisible': [('slide_type', '!=', 'certification')], 'required': [('slide_type', '=', 'certification')]}"
domain="[('certification', '=', True)]"/>
domain="[('certification', '=', True)]" context="{'default_certification': True, 'default_scoring_type': 'scoring_without_answers'}"/>
</xpath>
</field>
</record>