[FIX] Resolver 3 fallos de tests en website_sale_aplicoop
- 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)
This commit is contained in:
parent
5efe57dc19
commit
89c008441e
13 changed files with 1354 additions and 58 deletions
54
openspec/config.yaml
Normal file
54
openspec/config.yaml
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
schema: spec-driven
|
||||
|
||||
context: |
|
||||
Repo: addons-cm (Odoo 18.0 / OCB). Stack: Python 3.10+, Odoo ORM, XML/QWeb, JS.
|
||||
|
||||
Restricciones:
|
||||
- NO modificar el core de Odoo/OCB en `ocb/`.
|
||||
- NO modificar addons OCA originales (ver `.github/copilot-instructions.md`).
|
||||
- Los cambios deben hacerse en addons custom del repo.
|
||||
|
||||
Convenciones clave:
|
||||
- Seguir guías OCA (black/isort/flake8/pylint-odoo).
|
||||
- Tests: `docker-compose run odoo odoo -d odoo --test-enable --stop-after-init -u <addon>`.
|
||||
- Evitar `_()` en definiciones de campos; usar traducciones en `i18n/*.po`.
|
||||
- No meter lógica compleja en QWeb; preparar datos en Python (controller/model).
|
||||
|
||||
rules:
|
||||
proposal:
|
||||
- "Incluir siempre: Objetivo, Alcance, No-objetivos, Riesgos, Criterios de aceptación."
|
||||
- "Listar explícitamente los addons afectados (y los NO afectados)."
|
||||
- "Reafirmar restricciones: no tocar `ocb/` ni addons OCA originales; cambios solo en custom."
|
||||
- "Si afecta a UI/website/QWeb, indicar qué páginas/vistas se tocan y el impacto para usuario."
|
||||
design:
|
||||
- "Referenciar modelos/campos/vistas por nombre técnico (ej: `group.order`, `sale.order`)."
|
||||
- "Incluir consideraciones de seguridad (grupos/reglas) y multi-compañía si aplica."
|
||||
- "Evitar lógica compleja en QWeb: documentar qué datos se preparan en Python."
|
||||
- "Si hay impactos de datos (migración/recomputes), describir estrategia (cron, compute store, scripts)."
|
||||
tasks:
|
||||
- "Descomponer en tareas pequeñas (ideal: <= 2h cada una) y ordenadas."
|
||||
- "Cada tarea debe mencionar archivos/carpetas a tocar (rutas relativas) y el addon."
|
||||
- "Incluir al menos una tarea de verificación: tests con `docker-compose run ... --test-enable` (no `exec`)."
|
||||
- "Incluir notas de calidad cuando aplique: lint/format (black/isort) y evitar `_()` en fields."
|
||||
- "Prohibido proponer cambios en `ocb/` o addons OCA originales; si se necesita, crear un addon custom heredando."
|
||||
specs:
|
||||
- "Especificar comportamiento observable (inputs/outputs), edge cases y criterios de aceptación verificables."
|
||||
- "Evitar detalles de implementación; esos van en design.md."
|
||||
# Project context (optional)
|
||||
# This is shown to AI when creating artifacts.
|
||||
# Add your tech stack, conventions, style guides, domain knowledge, etc.
|
||||
# Example:
|
||||
# context: |
|
||||
# Tech stack: TypeScript, React, Node.js
|
||||
# We use conventional commits
|
||||
# Domain: e-commerce platform
|
||||
|
||||
# Per-artifact rules (optional)
|
||||
# Add custom rules for specific artifacts.
|
||||
# Example:
|
||||
# rules:
|
||||
# proposal:
|
||||
# - Keep proposals under 500 words
|
||||
# - Always include a "Non-goals" section
|
||||
# tasks:
|
||||
# - Break tasks into chunks of max 2 hours
|
||||
Loading…
Add table
Add a link
Reference in a new issue