Override _order on stock.move.line with stored Char fields so the server
returns records in the correct order on initial load (default_order in the
view only applies to interactive client-side sorting, not the initial fetch).
Add product_name and partner_name stored related fields to avoid SQL JOINs
in ORDER BY. Use the same fields in the view's default_order for consistency.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Store picking_partner_id on stock.move.line and set default_order to
product_categ_complete_name, product_id, picking_partner_id in the
detailed operations view so sorting uses the full category path
(e.g. 'SECO ENVASADO / Aperitivos') instead of only the leaf name.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Store picking_partner_id on stock.move.line and set default_order to
product_categ_id, product_id, picking_partner_id in the detailed operations view.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add product_default_code related field to stock.move.line and
stock.picking.batch.summary.line. Show it as a hidden-by-default column
to the right of product_id in both detailed operations and product summary
views. Hide the code prefix from the product name via display_default_code
context so sorting is alphabetical.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Convertir 4 tests de decorador @patch a context manager 'with patch(...)' para evitar RuntimeError en LocalProxy de Werkzeug
- Corregir patrón env(user=..., context=dict(...)) en Odoo 18 (sin .with_context())
- Agregar website real al mock para integración con helpers de pricing (_get_pricing_info)
- Añadir pickup_date en fixture de existing_order para que _find_recent_draft_order localice correctamente
- BUGFIX: Agregar (5,) a order_line para limpiar líneas previas al actualizar pedido existente
Resultado: 0 failed, 0 errors de 4 tests en Docker para TestConfirmEskaera_Integration
BREAKING: _create_or_update_sale_order ahora limpia las líneas anteriores con (5,) antes de asignar las nuevas cuando se actualiza un pedido existente. Comportamiento previo (duplicación de líneas) era un bug.