From 9edc9840b62e53227b35e1264e9a675caaf25ead Mon Sep 17 00:00:00 2001 From: dht-odoo Date: Mon, 13 Dec 2021 13:32:15 +0000 Subject: [PATCH] [IMP] survey: improve technical tooltips for few fields This commit properly formats the domain attribute of few fields so that the technical tooltips for them do not show '\n' within the domain. Below are the improved fields: - 'triggering_question_id' (for model 'survey.question') - 'partner_ids' (for model 'survey.invite') Taskid-2704057 closes odoo/odoo#81631 Signed-off-by: Thibault Delavallee (tde) --- addons/survey/models/survey_question.py | 10 +++++----- addons/survey/wizard/survey_invite.py | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/addons/survey/models/survey_question.py b/addons/survey/models/survey_question.py index e092c537ea7..bec8d641095 100644 --- a/addons/survey/models/survey_question.py +++ b/addons/survey/models/survey_question.py @@ -149,11 +149,11 @@ class SurveyQuestion(models.Model): triggering_question_id = fields.Many2one( 'survey.question', string="Triggering Question", copy=False, compute="_compute_triggering_question_id", store=True, readonly=False, help="Question containing the triggering answer to display the current question.", - domain="""[('survey_id', '=', survey_id), - '&', ('question_type', 'in', ['simple_choice', 'multiple_choice']), - '|', - ('sequence', '<', sequence), - '&', ('sequence', '=', sequence), ('id', '<', id)]""") + domain="[('survey_id', '=', survey_id), \ + '&', ('question_type', 'in', ['simple_choice', 'multiple_choice']), \ + '|', \ + ('sequence', '<', sequence), \ + '&', ('sequence', '=', sequence), ('id', '<', id)]") triggering_answer_id = fields.Many2one( 'survey.question.answer', string="Triggering Answer", copy=False, compute="_compute_triggering_answer_id", store=True, readonly=False, help="Answer that will trigger the display of the current question.", diff --git a/addons/survey/wizard/survey_invite.py b/addons/survey/wizard/survey_invite.py index ba48cb79c04..d2b34cf06dc 100644 --- a/addons/survey/wizard/survey_invite.py +++ b/addons/survey/wizard/survey_invite.py @@ -41,11 +41,11 @@ class SurveyInvite(models.TransientModel): # recipients partner_ids = fields.Many2many( 'res.partner', 'survey_invite_partner_ids', 'invite_id', 'partner_id', string='Recipients', - domain="""[ - '|', (survey_users_can_signup, '=', 1), - '|', (not survey_users_login_required, '=', 1), - ('user_ids', '!=', False), - ]""" + domain="[ \ + '|', (survey_users_can_signup, '=', 1), \ + '|', (not survey_users_login_required, '=', 1), \ + ('user_ids', '!=', False), \ + ]" ) existing_partner_ids = fields.Many2many( 'res.partner', compute='_compute_existing_partner_ids', readonly=True, store=False)