From a4ab4fa76c227c2db52b79a5e9ad34267d3bab64 Mon Sep 17 00:00:00 2001 From: Aman Patel Date: Wed, 5 Apr 2023 07:15:44 +0000 Subject: [PATCH] [FIX] survey: send email toggle button fix Currently when user tries to share the survey and the access mode is public (Anyone with the link) , the 'Send by email' button is flickering and not working properly. As we have used the widget 'boolean_toggle' it saves everything on Change, and as a result compute function '_compute_send_email' was called every time which is not required and caused toggle button to deactivate itself automatically. This commit fixes the issue and 'Send by Email' button does not flicker and works properly by using autosave='False' used from (https://github.com/odoo/odoo/pull/117103). Recipients (partner_ids) field is set to required in XML. Hence we stopped the widget from saving on Change and hence a result every time compute method is not called and toggle button maintains its state. Task-3240813 closes odoo/odoo#120236 X-original-commit: 7962a7b751e18cea55b6f72208583931beec6b08 Signed-off-by: Thibault Delavallee (tde) --- addons/survey/wizard/survey_invite_views.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/survey/wizard/survey_invite_views.xml b/addons/survey/wizard/survey_invite_views.xml index 69b96c0614b..7c6f111051e 100644 --- a/addons/survey/wizard/survey_invite_views.xml +++ b/addons/survey/wizard/survey_invite_views.xml @@ -20,9 +20,10 @@ attrs="{'invisible':[('survey_access_mode', '!=', 'public')]}"/> -