From 3bbfad3a477bf4a77907ac74bd2129f339a08912 Mon Sep 17 00:00:00 2001 From: Damien Bouvy Date: Mon, 22 May 2023 15:36:11 +0000 Subject: [PATCH] [FIX] web: fix an issue where an empty button box is displayed as 'null' If the button box exists but contains nothing (or nothing visible), it will be displayed as the string 'null' in the control panel This commit changes this behaviour to show nothing and remove the culprit view (an invisible button should simply not be there) X-original-commit: 0089b302bf30efb324c80f74f058d6d64f686e4c Part-of: odoo/odoo#122111 --- .../views/hr_leave_allocation_views.xml | 16 ---------------- .../web/static/src/views/form/form_compiler.js | 2 +- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/addons/hr_holidays/views/hr_leave_allocation_views.xml b/addons/hr_holidays/views/hr_leave_allocation_views.xml index f2b0a96bee7..2ce8440115b 100644 --- a/addons/hr_holidays/views/hr_leave_allocation_views.xml +++ b/addons/hr_holidays/views/hr_leave_allocation_views.xml @@ -73,22 +73,6 @@
-

diff --git a/addons/web/static/src/views/form/form_compiler.js b/addons/web/static/src/views/form/form_compiler.js index bd1fd9b72e5..4fdf9e3236c 100644 --- a/addons/web/static/src/views/form/form_compiler.js +++ b/addons/web/static/src/views/form/form_compiler.js @@ -166,7 +166,7 @@ export class FormCompiler extends ViewCompiler { append(buttonBox, mainSlot); } - return hasContent ? buttonBox : null; + return hasContent ? buttonBox : ''; } compileButton(el, params) {