diff --git a/addons/website_event/i18n/website_event.pot b/addons/website_event/i18n/website_event.pot index d92d7de387e..fec161f8474 100644 --- a/addons/website_event/i18n/website_event.pot +++ b/addons/website_event/i18n/website_event.pot @@ -1034,6 +1034,13 @@ msgstr "" msgid "Question Type" msgstr "" +#. module: website_event +#. odoo-python +#: code:addons/website_event/models/event_question.py:0 +#, python-format +msgid "Question cannot be linked to both an Event and an Event Type." +msgstr "" + #. module: website_event #. odoo-python #: code:addons/website_event/models/event_question.py:0 diff --git a/addons/website_event/models/event_question.py b/addons/website_event/models/event_question.py index 6b7d1f87264..f7437d82b2c 100644 --- a/addons/website_event/models/event_question.py +++ b/addons/website_event/models/event_question.py @@ -32,7 +32,7 @@ class EventQuestion(models.Model): @api.constrains('event_type_id', 'event_id') def _constrains_event(self): if any(question.event_type_id and question.event_id for question in self): - raise UserError(_('Question cannot belong to both the event category and itself.')) + raise UserError(_("Question cannot be linked to both an Event and an Event Type.")) def write(self, vals): """ We add a check to prevent changing the question_type of a question that already has answers.