[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
8
web_list_striped/readme/CONFIGURE.rst
Normal file
8
web_list_striped/readme/CONFIGURE.rst
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
Configuración
|
||||
=============
|
||||
|
||||
No requiere configuración. El efecto se aplica al instalar el módulo y
|
||||
desaparece al desinstalarlo.
|
||||
|
||||
Para cambiar la intensidad de las bandas, edita los valores ``rgba()`` de
|
||||
``static/src/css/web_list_striped.css``.
|
||||
4
web_list_striped/readme/CONTRIBUTORS.rst
Normal file
4
web_list_striped/readme/CONTRIBUTORS.rst
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
Contribuidores
|
||||
==============
|
||||
|
||||
* Criptomart
|
||||
7
web_list_striped/readme/CREDITS.rst
Normal file
7
web_list_striped/readme/CREDITS.rst
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
Créditos
|
||||
========
|
||||
|
||||
Autor
|
||||
-----
|
||||
|
||||
* Criptomart
|
||||
15
web_list_striped/readme/DESCRIPTION.rst
Normal file
15
web_list_striped/readme/DESCRIPTION.rst
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
Aplica un efecto cebra (filas alternas sombreadas) y un resaltado de hover más
|
||||
suave a **todas** las vistas de lista del backend de Odoo.
|
||||
|
||||
El alcance global es intencionado: es justamente lo que hace este módulo. Sirve
|
||||
para listas largas de almacén, contabilidad o inventario, donde seguir una fila
|
||||
con la vista es más fácil si las filas alternan de color.
|
||||
|
||||
Es un módulo de sólo CSS: no define modelos, campos ni vistas. Para volver al
|
||||
aspecto estándar de Odoo basta con desinstalarlo.
|
||||
|
||||
Nota técnica: el selector usa ``:nth-child(even)``, que cuenta todas las ``tr``
|
||||
del ``tbody`` y no sólo las filas de datos. En listas agrupadas o con fila de
|
||||
*"Añadir línea"* la paridad de las bandas puede desajustarse.
|
||||
``:nth-child(even of .o_data_row)`` lo resolvería, pero exige Chrome 111+ o
|
||||
Firefox 113+, lo que no es una suposición segura en tablets de almacén.
|
||||
11
web_list_striped/readme/INSTALL.rst
Normal file
11
web_list_striped/readme/INSTALL.rst
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
Instalación
|
||||
===========
|
||||
|
||||
Instalar el módulo:
|
||||
|
||||
::
|
||||
|
||||
docker-compose run --rm odoo odoo -d odoo --stop-after-init -i web_list_striped
|
||||
|
||||
No tiene más dependencias que ``web``, así que se puede instalar y desinstalar
|
||||
en cualquier momento sin afectar a datos.
|
||||
6
web_list_striped/readme/USAGE.rst
Normal file
6
web_list_striped/readme/USAGE.rst
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
Uso
|
||||
===
|
||||
|
||||
No hay nada que usar: una vez instalado, cualquier vista de lista del backend
|
||||
(Contactos, Facturas, Albaranes, Operaciones detalladas de un lote...) muestra
|
||||
las filas alternas sombreadas y un hover más suave.
|
||||
Loading…
Add table
Add a link
Reference in a new issue