[IMP] stock_picking_batch_custom: UX - zebra rows, mostrar categoría a la izquierda, company+uom ocultables, añadir CSS assets

This commit is contained in:
snt 2026-05-19 15:30:11 +02:00 committed by GitHub Copilot
parent 1d4971c803
commit 1b20b23fc0
2 changed files with 29 additions and 1 deletions

View file

@ -0,0 +1,18 @@
/* zebra striping for list views in this module */
/* Target Odoo list/tree view tables. Use a specific, but broad selector to
avoid interfering globally with other modules. */
.o_list_view .o_list_view_table tbody tr:nth-child(even) td {
background-color: rgba(0, 0, 0, 0.03);
}
/* Slight hover contrast to improve row focus */
.o_list_view .o_list_view_table tbody tr:hover td {
background-color: rgba(0, 0, 0, 0.045);
}
/* Ensure checkboxes / toggle columns maintain contrast */
.o_list_view .o_list_view_table tbody tr:nth-child(even) td .o_field_widget,
.o_list_view .o_list_view_table tbody tr:nth-child(even) td .o_field_widget * {
background: transparent;
}

View file

@ -5,8 +5,11 @@
<field name="model">stock.picking.batch.summary.line</field>
<field name="arch" type="xml">
<list create="0" delete="0" default_order="product_categ_id,product_id">
<!-- Mostrar categoría a la izquierda del producto para mejor legibilidad -->
<field name="product_categ_id" readonly="1"/>
<field name="product_id" readonly="1"/>
<field name="product_categ_id" readonly="1" optional="hide"/>
<!-- Permitir ocultar Compañía y Unidad de medida por defecto (opcional) -->
<field name="company_id" readonly="1" optional="hide"/>
<field name="product_uom_id" readonly="1" optional="hide"/>
<field name="qty_demanded" readonly="1"/>
<field name="qty_done" readonly="1"/>
@ -39,4 +42,11 @@
</xpath>
</field>
</record>
<!-- Incluir CSS específico del módulo para sombreado de filas pares -->
<template id="assets_backend_inherit" inherit_id="web.assets_backend" name="stock_picking_batch_custom assets">
<xpath expr="." position="inside">
<link rel="stylesheet" type="text/css" href="/stock_picking_batch_custom/static/src/css/stock_picking_batch.css"/>
</xpath>
</template>
</odoo>