From 050a17de3f39da987a0d7fe34a48c07f424aed6e Mon Sep 17 00:00:00 2001 From: "Achraf (abz)" Date: Fri, 12 Apr 2024 09:38:32 +0200 Subject: [PATCH] [FIX] hr_expense: Allow users to use optional_column MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since https://github.com/odoo/odoo/pull/120915 Steps: - Install `web_studio` and `hr_expense` - Open Expense/list view - click on optional column - Traceback The error occurs because the dropdown needs the id of the view list in order to "hook" onto it. This unique id is added via a `t-att-class` here https://github.com/odoo/odoo/blob/saas-16.3/addons/web/static/src/views/list/list_renderer.xml#L7 and is used by the dropdown here https://github.com/odoo/odoo/blob/saas-16.3/addons/web/static/src/views/list/list_renderer.xml#L50 The problem here is that the hr_expense module inherits from `web.ListRenderer` to add some classes to `o_list_renderer` with this ``xml 'hr_expense h-auto o_forbidden_tooltip_parent' ``` but by doing so, the t-att-class of `hr_expense.ListRenderer` overwrites that of `web.ListRenderer`. One solution was to do as the documents application does https://github.com/odoo/enterprise/blob/saas-16.3/documents/static/src/views/list/documents_list_renderer.xml#L5 This does not override the `t-att-class` opw-3858726 closes odoo/odoo#161846 X-original-commit: e4f222f0f05565301515ca020de3ae19c35bef06 Signed-off-by: de Wouters de Bouchout Jean-BenoƮt (jbw) Signed-off-by: Achraf Ben Azzouz (abz) --- addons/hr_expense/static/src/views/list.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/hr_expense/static/src/views/list.xml b/addons/hr_expense/static/src/views/list.xml index 0fe429320b4..674419e79e8 100644 --- a/addons/hr_expense/static/src/views/list.xml +++ b/addons/hr_expense/static/src/views/list.xml @@ -34,7 +34,7 @@ - 'hr_expense h-auto o_forbidden_tooltip_parent' + o_list_renderer hr_expense h-auto o_forbidden_tooltip_parent