addons-cm/website_sale_aplicoop/views
GitHub Copilot e625b0c2f3 [IMP] website_sale_aplicoop: pay on the checkout page, not a step later
The separate /eskaera/<slug>/payment step is gone. Members review the
summary, choose home delivery and pick a payment method on the checkout,
in one screen; the old URL redirects there so bookmarks and sessions that
were mid-flow do not hit a 404.

The checkout now renders the member's draft sale.order instead of the
localStorage cart. That is what fixes the products appearing "out of
nowhere" between the two pages: the summary was a snapshot of localStorage
taken at page load, and `_autoLoadDraftOnInit` then pulled the draft back
into localStorage without re-rendering. Deleting a product in the shop
removed it from the cart but left the line on the draft, so the autoload
resurrected it, the confirm button sent it back, and it only became
visible one page later. The checkout no longer auto-loads the draft — it
renders it, and what it shows is what the payment form charges.

"Proceed to Checkout" pushes the cart to that draft before navigating.
Saving is idempotent: `_merge_or_replace_draft` reuses the cycle's draft
and, through the new `_draft_matches_lines`, rewrites `order_line` only
when the lines actually differ — replacing them unlinks and recreates
every one of them, which is pure churn when nothing changed.

The home delivery checkbox goes through the new /eskaera/set-home-delivery
so the delivery line moves on the order itself. Writing only to
localStorage would have changed the summary and left the amount alone,
which with online payment on is the amount being charged.

Also fixes the confirmation notice nobody ever saw: saving answered with
the payment step URL and the frontend followed it immediately, destroying
the toast in the same tick. Saving no longer navigates; the caller decides
whether it is staying or moving on.

Along the way: checkout_labels.js and the eskaera_checkout_summary /
eskaera_payment templates are removed, superseded by the server-rendered
summary and checkout, and the stale sessionStorage delivery preference no
longer overrides the checkbox the order just rendered.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 19:14:49 +02:00
..
group_order_views.xml [ADD] website_sale_aplicoop: online payment per group order 2026-08-16 21:59:35 +02:00
load_from_history_templates.xml [IMP] website_sale_aplicoop: accessibility and responsive polish — phase 8 2026-08-16 11:34:38 +02:00
portal_templates.xml [IMP] website_sale_aplicoop: accessibility and responsive polish — phase 8 2026-08-16 11:34:38 +02:00
product_category_views.xml [IMP] website_sale_aplicoop: add sequence field to product.category for web ordering 2026-05-20 16:05:14 +02:00
product_template_views.xml Aplicoop desde el repo de kidekoop 2026-02-11 15:32:11 +01:00
res_config_settings_views.xml [IMP] website_sale_aplicoop: surface the tax display setting on the Eskaera page 2026-08-17 19:13:57 +02:00
res_partner_views.xml [IMP] website_sale_aplicoop: propagate consumer_group_id directly from group_order 2026-03-06 13:49:13 +01:00
sale_order_views.xml mover campos de compra colectiva a su página propia dentro del notebook 2026-08-16 12:00:29 +02:00
stock_picking_views.xml [DOC] website_sale_aplicoop: Add lazy loading documentation and implement v18.0.1.3.0 feature 2026-02-16 18:39:39 +01:00
website_templates.xml [IMP] website_sale_aplicoop: pay on the checkout page, not a step later 2026-08-17 19:14:49 +02:00