addons-cm/website_sale_aplicoop/tests
GitHub Copilot b01794c319 [FIX] website_sale_aplicoop: clear cart when group order cutoff has passed
Previously, when a user reopened a group order whose cutoff day had
already passed, the /eskaera/check-status response correctly triggered
the localStorage cart clear, but _autoLoadDraftOnInit immediately
re-fetched the previous cycle's draft sale.order from /eskaera/load-draft
(which only guarded on group_order.state, not cutoff_date) and the stale
items reappeared in the cart, confusing users.

Add a cutoff_date < today guard to load_draft_cart so the endpoint
returns the existing clear_cart unavailable response, and short-circuit
_autoLoadDraftOnInit on the frontend via a _skipDraftAutoLoad flag set
in _checkGroupOrderStatus to avoid the now-pointless XHR round trip.

Covered by a new regression test in tests/test_group_order_status_endpoint.py.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-28 13:51:37 +02:00
..
__init__.py [TEST] website_sale_aplicoop: add tests for home_delivery computed field 2026-05-20 17:49:50 +02:00
COBERTURA_TESTS_ANALISIS.md [FIX] website_sale_aplicoop: Remove redundant string= attributes and fix OCA linting warnings 2026-02-18 17:54:43 +01:00
PHASE3_TEST_SUMMARY.md [DOC] website_sale_aplicoop: Add lazy loading documentation and implement v18.0.1.3.0 feature 2026-02-16 18:39:39 +01:00
test_cron_picking_batch.py [IMP] website_sale_aplicoop: Validar disponibilidad de productos al cargar órdenes históricas 2026-05-20 16:05:14 +02:00
test_date_calculations.py [FIX] website_sale_aplicoop: harden group order cron 2026-03-31 19:36:20 +02:00
test_draft_persistence.py [REF] Code quality improvements and structure fixes 2026-02-21 13:51:25 +01:00
test_edge_cases.py [REF] Code quality improvements and structure fixes 2026-02-21 13:51:25 +01:00
test_endpoints.py [REF] Code quality improvements and structure fixes 2026-02-21 13:51:25 +01:00
test_eskaera_shop.py [FIX] website_sale_aplicoop: Remove redundant string= attributes and fix OCA linting warnings 2026-02-18 17:54:43 +01:00
test_group_order.py [REF] Code quality improvements and structure fixes 2026-02-21 13:51:25 +01:00
test_group_order_status_endpoint.py [FIX] website_sale_aplicoop: clear cart when group order cutoff has passed 2026-05-28 13:51:37 +02:00
test_helper_methods_phase1.py [REFACTOR] Phase 1: Add 3 helper methods and tests (pre-commit skipped for C901) 2026-02-16 15:41:03 +01:00
test_home_delivery.py [TEST] website_sale_aplicoop: add tests for home_delivery computed field 2026-05-20 17:49:50 +02:00
test_multi_company.py [FIX] website_sale_aplicoop: lint fixes (exception chaining, imports, remove unused vars) 2026-05-20 16:05:14 +02:00
test_phase2_eskaera_shop.py [IMP] website_sale_aplicoop: Phase 2 - Refactor eskaera_shop() and add_to_eskaera_cart() 2026-02-16 15:47:15 +01:00
test_phase3_confirm_eskaera.py [TEST] website_sale_aplicoop: add tests for home_delivery computed field 2026-05-20 17:49:50 +02:00
test_portal_access.py [REF] Code quality improvements and structure fixes 2026-02-21 13:51:25 +01:00
test_portal_get_routes.py [REF] Code quality improvements and structure fixes 2026-02-21 13:51:25 +01:00
test_portal_product_uom_access.py [REF] Code quality improvements and structure fixes 2026-02-21 13:51:25 +01:00
test_portal_sale_order_creation.py feat(website_sale_aplicoop): ordenar productos por website_sequence y nombre 2026-02-25 19:34:49 +01:00
test_price_with_taxes_included.py Revertir cambio: eliminar cálculo duplicado de impuestos 2026-02-11 19:54:28 +01:00
test_pricing_with_pricelist.py [FIX] website_sale_aplicoop: align pricing and drafts 2026-02-27 19:39:25 +01:00
test_product_discovery.py [ADD] website_sale_aplicoop: Category blacklist with recursive exclusion 2026-02-22 23:04:33 +01:00
test_product_extension.py [FIX] website_sale_aplicoop: Remove redundant string= attributes and fix OCA linting warnings 2026-02-18 17:54:43 +01:00
test_record_rules.py [FIX] website_sale_aplicoop: lint fixes (exception chaining, imports, remove unused vars) 2026-05-20 16:05:14 +02:00
test_res_partner.py [IMP] website_sale_aplicoop: propagate consumer_group_id directly from group_order 2026-03-06 13:49:13 +01:00
test_save_order_endpoints.py [TEST] website_sale_aplicoop: add tests for home_delivery computed field 2026-05-20 17:49:50 +02:00
test_templates_rendering.py [FIX] Resolver 3 fallos de tests en website_sale_aplicoop 2026-03-30 16:21:57 +02:00
test_validations.py [REF] Code quality improvements and structure fixes 2026-02-21 13:51:25 +01:00