[FIX] web: fix list view when grouping rows that start with numbers

Versions:
---------
- saas-16.3
- saas-16.4

Steps to reproduce:
-------------------
1. go to a list view which starts with a numerical value;
    - e.g. with developer mode enabled:
        Settings > Technical > Scheduled Actions
2. group by any element.

Issue:
------
The width of the `o_group_name` elements is around 40px, not enough for
the names to be displayed.

Cause:
------
`list_renderer.js` calculates the `colspan` of `o_group_name` elements
based on the first occurence of a value that can be aggregated, i.e.
any numerical value. If this happens to be the first column, the
`colspan` is set to 1, leading to their width being the same as the
first column containing checkboxes. An update in saas-16.3 had forcibly
set these to 40px by adding the `!important` rule:

```scss
.o_list_record_selector {
    width: 40px !important; // Force to 40px regardless by the font-size
}
```

Solution:
---------
After consulting the person who introduced the rule, we agreed that
removing it would be the easiest fix, unlikely to introduce any new issues.

opw-3459598

closes odoo/odoo#133521

X-original-commit: c89c94192685c989b65eb6b483b4120aa312252c
Signed-off-by: Levi Siuzdak (sile) <sile@odoo.com>
Signed-off-by: Romeo Fragomeli (rfr) <rfr@odoo.com>
Signed-off-by: Levi Siuzdak <sile@odoo.com>
This commit is contained in:
Levi Siuzdak (sile)
2023-08-31 14:15:01 +00:00
parent ce38e06801
commit b5c595e0aa
2 changed files with 3 additions and 3 deletions
@@ -145,7 +145,7 @@
}
.o_list_record_selector {
width: 40px !important; // Force to 40px regardless by the font-size
width: 40px; // Don't force to keep o_group_name width dynamic
}
.o_list_record_remove, .o_handle_cell, .o_list_record_open_form_view {
@@ -4599,7 +4599,7 @@ QUnit.module("Views", (hooks) => {
assert.strictEqual(
target.querySelector("thead .o_list_record_selector").offsetWidth,
40
41
);
const widthPage1 = target.querySelector(`th[data-name=foo]`).offsetWidth;
@@ -4607,7 +4607,7 @@ QUnit.module("Views", (hooks) => {
assert.strictEqual(
target.querySelector("thead .o_list_record_selector").offsetWidth,
40
41
);
const widthPage2 = target.querySelector(`th[data-name=foo]`).offsetWidth;
assert.ok(