From b6974528f97f7e618c44e52e9a09777e412c2e28 Mon Sep 17 00:00:00 2001 From: Julien Banken Date: Fri, 30 Jul 2021 08:19:02 +0000 Subject: [PATCH] [FIX] survey: add support for 'disabled' attribute on buttons (in views) In the xml file of the list view, it is possible to define a button that will be placed in a new column. When the user clicks on a button from a list view, the script will execute the action linked to the corresponding button. Unfortunately, all the buttons of the list views are not necessary linked to an action: This is for example the case for the trophy icon of the survey module. An exception can hence be thrown if the user clicks on such button. To solve the issue, we will add the 'disabled' property support for the buttons and we will add that property to the buttons that do not have an action. With this property, the script will bind no listener to the button and it will hence not call the listener causing the error. task-2612033 closes odoo/odoo#75096 X-original-commit: c698d589e7dfa6fe3df8b4014fe30627693e9043 Signed-off-by: Thibault Delavallee (tde) --- addons/survey/views/survey_survey_views.xml | 4 +++- odoo/addons/base/rng/common.rng | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/addons/survey/views/survey_survey_views.xml b/addons/survey/views/survey_survey_views.xml index 7f84cc140d4..8e29aae2642 100644 --- a/addons/survey/views/survey_survey_views.xml +++ b/addons/survey/views/survey_survey_views.xml @@ -173,7 +173,9 @@ -