[ADD] web_list_striped: zebra striping for all backend list views
The zebra rows and the softer hover used to be shipped by
stock_picking_batch_custom, but its selector (`table.o_list_table`) carried no
module scope, so a warehouse addon was quietly restyling every list view in the
database. The scope was lost in 07bd632, while porting the selectors from Odoo
16 to 18.
The effect itself is wanted, so keep it and make it explicit: an asset-only
addon whose documented purpose is the global reach. Nothing depends on it, so
the striping can be turned off by uninstalling a single module.
An Odoo theme would not work here: `theme_*` addons only govern the website
frontend, and these rules live in `web.assets_backend`.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
2e7549f857
commit
704f0def1b
10 changed files with 150 additions and 0 deletions
18
web_list_striped/static/src/css/web_list_striped.css
Normal file
18
web_list_striped/static/src/css/web_list_striped.css
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
/* Zebra striping for every backend list view.
|
||||
*
|
||||
* The reach is global on purpose: that is what this addon is for. Uninstall it
|
||||
* to get the stock Odoo look back.
|
||||
*
|
||||
* Note: `:nth-child(even)` counts every `tr` in the `tbody`, not only the data
|
||||
* rows, so parity can desync in grouped lists or lists carrying an "Add a line"
|
||||
* row. `:nth-child(even of .o_data_row)` fixes that but needs Chrome 111+ /
|
||||
* Firefox 113+, which is not a safe assumption for the warehouse tablets.
|
||||
*/
|
||||
|
||||
table.o_list_table tbody tr.o_data_row:nth-child(even) td {
|
||||
background-color: rgba(0, 0, 0, 0.03);
|
||||
}
|
||||
|
||||
table.o_list_table tbody tr.o_data_row:hover td {
|
||||
background-color: rgba(0, 0, 0, 0.045);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue