El operador | en expresiones t-if de QWeb es el OR bitwise de Python,
no un filtro Jinja2. Como 'length' no existe en el contexto QWeb, evaluaba
recordset | None y lanzaba TypeError. Simplificado a solo pickup_slot_ids
(recordset vacío ya es falsy en Python).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Añadir reglas de acceso para group.order.slot en ir.model.access.csv
- Añadir pestaña "Pickup Slots" en el formulario de group.order con lista
editable (handle de secuencia, día, etiqueta, hora inicio/fin, activo)
- Corregir valores del campo weekday: de dígitos numéricos a nombres de día
(Monday...Sunday) para mejor usabilidad
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- product-img-cover: max-height → height fija para que placeholder y imagen
real ocupen exactamente el mismo bloque (120px/90px/60px según breakpoint)
- product-img-placeholder: reemplaza SVG inline por flex centrado, más limpio
- Reducir padding/márgenes generales en card-body, title, supplier, tags y precio
- Dos breakpoints responsivos: ≤768px (tablet, imagen 90px) y ≤480px (móvil,
imagen 60px, fuentes y márgenes mínimos)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- README.md: reescrito con tabla completa de los 14 addons (6 OCA + 8 custom),
versiones actuales, árbol de dependencias y comandos de desarrollo
- docs/README.md: simplificado a índice limpio, eliminadas referencias rotas
- website_sale_aplicoop/CHANGELOG.md: añadidas versiones 1.7.0, 1.8.0 y 1.9.0
con los cambios agrupados por temática desde el último registro (1.6.0)
- website_sale_aplicoop/README_DEV.md: reescrito para reflejar v1.9.0 —
modelos actuales (group.order.slot), controladores /eskaera, catálogo
whitelist/blacklist, lazy loading, crons y árbol de dependencias
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add sequence field (default 10) to product.category with _order = "sequence, name"
- Inherit product.category tree view to add drag-handle widget
- Sort category hierarchy and available categories by sequence in controller
- Migration 18.0.1.9.0: add sequence column to product_category table
- Bump version to 18.0.1.9.0
- Backend: Agregar método _validate_items_for_group_order() para validar que los productos históricos sigan siendo disponibles en la orden de grupo actual
- Backend: Modificar load_order_from_history() para filtrar solo items disponibles antes de pasar al template
- Backend: Generar mensaje de aviso traducido cuando hay productos no disponibles
- Template: Pasar información de productos no disponibles y warnings al JavaScript
- Frontend: Mostrar notificación de advertencia si hubo productos excluidos durante la carga histórica
- Notas: Esto evita cargar productos que ya no existen en la orden actual debido a cambios en categorías, proveedores o listas negras
Evita conflicto de tipo de ruta con el método clear_cart() del padre
WebsiteSale de Odoo 18 (type=json). Misma URL /eskaera/clear-cart,
solo cambia el nombre del método Python.
También añade noqa C901 en save_eskaera_draft (complejidad preexistente).
- 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.
Añade botón 'Clear Cart' (fa-trash) en el header y footer del sidebar
del carrito en la página de lista de productos.
Cambios:
- views/website_templates.xml: botón clear-cart-btn en card-header y
clear-cart-btn-footer en card-footer del sidebar
- controllers/website_sale.py: nuevo endpoint POST /eskaera/clear-cart
que cancela el sale.order borrador del usuario si existe
- static/src/js/website_sale.js: método _clearCart(), listeners para
ambos botones (header + footer)
- models/js_translations.py: nuevas cadenas clear_cart, clear_cart_confirm,
cart_cleared, draft_cancelled
- i18n/es.po, i18n/eu.po: traducciones ES y EU de los nuevos labels
Use forecasted quantity (virtual_available) instead of on-hand quantity
(qty_available) for out-of-stock and low-stock calculations, so pending
incoming/outgoing moves are taken into account.
Three guards before confirming sale orders:
1. Skip if no cutoff_date (no cutoff_day configured): avoids blindly confirming
all draft orders for group orders without a weekly cycle defined
2. Skip if cutoff_date >= today: cycle still open
3. Skip if cutoff_date >= 7 days ago: stale date from a previous cycle
(protects against cron gaps and confirms only within 1-6 days after cutoff)
The cutoff day itself is still open for orders; confirmation should only
happen when the cutoff date is strictly in the past (>= today = skip).
The real bug was only the order of operations in _cron_update_dates.
- _cron_update_dates: call _confirm_linked_sale_orders() BEFORE recomputing
dates so cutoff_date still points to the current cycle when the check runs
- _confirm_linked_sale_orders: change >= to > so orders are confirmed both
on the cutoff day itself and after it has passed
- Ajusta _get_delivery_product_display_price para calcular envío con list_price + impuestos
- Evita aplicar reglas de pricelist al envío (recargos/descuentos no deseados)
- Mantiene fallback seguro a list_price ante errores
Resultado esperado: para PVP 5.74 con IVA 21% => 6.95
- Fix: delivery product price now includes VAT (homepage/checkout)
* Added _get_delivery_product_display_price() helper to use same pricing pipeline as regular products
* Uses pricelist + tax calculations instead of bare list_price
* Fallback chain: pricelist → bare list_price → default 5.74
* Updated context in eskaera_shop() and eskaera_checkout()
- Test: test_constraint_cutoff_before_pickup_invalid
* Constraint removed: now allows any combination of cutoff_day and pickup_day
* Updated test to reflect this change (no ValidationError expected)
- Test: test_day_names_not_using_inline_underscore
* Fixed to check sub-template eskaera_order_card_meta where day_names is actually used
* eskaera_page calls this sub-template so day_names context is inherited
Results: 128 tests - 0 failed, 0 errors (100% pass rate)
- Add stock_picking_batch dependency to manifest
- Add cutoff date validation in _confirm_linked_sale_orders()
- Create _create_picking_batches_for_sale_orders() method
- Group pickings by consumer_group_id into separate batches
- Set batch scheduled_date from group order pickup_date
- Add test_cron_picking_batch.py with 7 tests covering:
- Skip orders before cutoff
- Confirm orders after cutoff
- Separate batches per consumer group
- Same group orders in same batch
- Batch has scheduled_date
- No duplicate batches on re-run
- Closed group orders not processed
- Create eskaera_order_card_meta template for cleaner code
- Simplify layout: horizontal meta-grid instead of table
- Fix t-if conditions on container elements
- Show only relevant fields: cutoff, pickup, delivery
- Add meta-grid CSS styles for compact horizontal display
- Home delivery badge only shown when enabled
- Add consumer_group_id to sale.order for tracking the consumer group
- Fix stock.picking consumer_group_id to use sale_id.consumer_group_id
- Add group_ids inverse relation in res.partner for bidirectional access
- Remove auto-calculation of consumer_group_id, data comes directly from group_order.group_ids[0]
- Add debug logging for consumer_group propagation
- commitment_date propagates directly from group_order (no recalculation)
Added website_sale_stock dependency and modified _compute_stock_ribbons
to respect the allow_out_of_stock_order field:
- If allow_out_of_stock_order=True: product can always be added to cart
- If allow_out_of_stock_order=False and qty<=0: add-to-cart is blocked
The JS logic already checks data-out-of-stock attribute from template,
so no frontend changes were needed.
Version bump: 18.0.1.7.0 -> 18.0.1.8.0
After infinite scroll loads new products, the event listeners were
never re-attached because the code was looking for window.aplicoopShop
but the actual object is window.groupOrderShop.