[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) <tde@openerp.com>
This commit is contained in:
dht-odoo
2022-01-03 11:43:38 +00:00
parent f68bbb9b73
commit 9edc9840b6
2 changed files with 10 additions and 10 deletions
+5 -5
View File
@@ -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.",
+5 -5
View File
@@ -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)