[FIX] website_slides: modify error message

Modify user error message when answering an unpublished quiz.

Task-3255897

closes odoo/odoo#120414

X-original-commit: 8a0e5749ea166ce576d1ed4e95b53b6e37332576
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit is contained in:
Mayurrajsinh Rathod
2023-05-03 15:04:47 +02:00
parent 867f4265be
commit 3243a4f0d6
2 changed files with 5 additions and 4 deletions
@@ -5417,7 +5417,8 @@ msgstr ""
#: code:addons/website_slides/models/slide_slide.py:0
#, python-format
msgid ""
"You cannot mark a slide quiz as completed if you are not among its members."
"You cannot mark a slide quiz as completed if you are not among its "
"members or it is unpublished."
msgstr ""
#. module: website_slides
@@ -5426,7 +5427,7 @@ msgstr ""
#, python-format
msgid ""
"You cannot mark a slide quiz as not completed if you are not among its "
"members."
"members or it is unpublished."
msgstr ""
#. module: website_slides
+2 -2
View File
@@ -912,8 +912,8 @@ class Slide(models.Model):
"""
if any(not slide.channel_id.is_member or not slide.website_published for slide in self):
raise UserError(
_('You cannot mark a slide quiz as completed if you are not among its members.') if completed
else _('You cannot mark a slide quiz as not completed if you are not among its members.')
_('You cannot mark a slide quiz as completed if you are not among its members or it is unpublished.') if completed
else _('You cannot mark a slide quiz as not completed if you are not among its members or it is unpublished.')
)
points = 0