Achraf (abz) 050a17de3f [FIX] hr_expense: Allow users to use optional_column
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
<xpath expr="//div[hasclass('o_list_renderer')]" position="attributes">
            <attribute name="t-att-class">'hr_expense h-auto o_forbidden_tooltip_parent'</attribute>
        </xpath>
```

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) <jbw@odoo.com>
Signed-off-by: Achraf Ben Azzouz (abz) <abz@odoo.com>
2024-04-16 07:02:56 +00:00
…
2024-04-15 09:10:09 +00:00
…
…
…
…
…
…

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%