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>
88 lines
3.1 KiB
Python
88 lines
3.1 KiB
Python
# Copyright 2025 - Today Criptomart
|
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl)
|
|
|
|
{ # noqa: B018
|
|
"name": "Website Sale - Aplicoop",
|
|
"version": "18.0.1.16.0",
|
|
"category": "Website/Sale",
|
|
"summary": "Modern replacement of legacy Aplicoop - Collaborative consumption group orders",
|
|
"author": "Odoo Community Association (OCA), Criptomart",
|
|
"maintainers": ["Criptomart"],
|
|
"website": "https://git.criptomart.net/criptomart/addons-cm",
|
|
"license": "AGPL-3",
|
|
"depends": [
|
|
"website_sale",
|
|
"website_sale_stock",
|
|
"payment",
|
|
"product",
|
|
"sale",
|
|
"stock",
|
|
"stock_picking_batch",
|
|
"account",
|
|
"product_get_price_helper",
|
|
"l10n_es_partner",
|
|
],
|
|
"data": [
|
|
# Datos: Grupos propios
|
|
"data/groups.xml",
|
|
# Datos: Menús del website
|
|
"data/website_menus.xml",
|
|
# Datos: Cron jobs
|
|
"data/cron.xml",
|
|
# Datos: Product ribbons for stock levels
|
|
"data/product_ribbon_data.xml",
|
|
# Vistas de seguridad
|
|
"security/ir.model.access.csv",
|
|
"security/record_rules.xml",
|
|
# Vistas
|
|
"views/group_order_views.xml",
|
|
"views/product_category_views.xml",
|
|
"views/res_partner_views.xml",
|
|
"views/res_config_settings_views.xml",
|
|
"views/website_templates.xml",
|
|
"views/product_template_views.xml",
|
|
"views/sale_order_views.xml",
|
|
"views/stock_picking_views.xml",
|
|
"views/portal_templates.xml",
|
|
"views/load_from_history_templates.xml",
|
|
],
|
|
"demo": [
|
|
# Demo: Account Taxes (must be loaded first)
|
|
"demo/account_tax_demo.xml",
|
|
# Demo: Partners (Groups and Members)
|
|
"demo/res_partner_demo.xml",
|
|
# Demo: Suppliers
|
|
"demo/res_partner_suppliers_demo.xml",
|
|
# Demo: Products and Categories
|
|
"demo/product_demo.xml",
|
|
# Demo: Group Orders
|
|
"demo/group_order_demo.xml",
|
|
# Demo: Sale Orders
|
|
"demo/sale_order_demo.xml",
|
|
],
|
|
"external_dependencies": {
|
|
"python": [],
|
|
},
|
|
"assets": {
|
|
"web.assets_frontend": [
|
|
"website_sale_aplicoop/static/src/css/website_sale.css",
|
|
# i18n and helpers must load first
|
|
"website_sale_aplicoop/static/src/js/i18n_manager.js",
|
|
"website_sale_aplicoop/static/src/js/i18n_helpers.js",
|
|
# Core shop functionality
|
|
"website_sale_aplicoop/static/src/js/website_sale.js",
|
|
"website_sale_aplicoop/static/src/js/home_delivery.js",
|
|
"website_sale_aplicoop/static/src/js/eskaera_payment.js",
|
|
# Search and pagination
|
|
"website_sale_aplicoop/static/src/js/infinite_scroll.js",
|
|
"website_sale_aplicoop/static/src/js/realtime_search.js",
|
|
],
|
|
"web.assets_tests": [
|
|
"website_sale_aplicoop/static/tests/test_suite.js",
|
|
"website_sale_aplicoop/static/tests/test_cart_functions.js",
|
|
"website_sale_aplicoop/static/tests/test_tooltips_labels.js",
|
|
"website_sale_aplicoop/static/tests/test_realtime_search.js",
|
|
],
|
|
},
|
|
"application": True,
|
|
}
|