addons-cm/website_sale_aplicoop/__manifest__.py
GitHub Copilot 9484f8c349 [FIX] website_sale_aplicoop: split cart and cycle stamp in localStorage
965c5c2 stored the cart as {cutoff_date, items: {...}} in
eskaera_<id>_cart. That broke every other reader of the same key:

- checkout_labels.js iterates Object.keys() expecting product IDs and
  rendered "cutoff_date" / "items" as ghost rows → users on the
  checkout page saw their cart as empty.
- home_delivery.js read/wrote the cart in place; the in-place mutation
  destroyed the wrapper.
- _saveOrderDraft serialised the same object straight to the server,
  POSTing "cutoff_date" and "items" as productIds.

Split the schema: eskaera_<id>_cart keeps the plain {productId: {...}}
shape every other JS file already relies on; the cycle marker moves to
eskaera_<id>_cart_cycle. _loadCart migrates browsers still holding the
v18.0.1.10.0 wrapped value on the next read.

Also make eviction strictly opt-in: drop the cart only when we know
the current cycle AND the stored cycle disagrees. Missing data on
either side (check-status didn't run, XHR failed) → preserve. This
restores the checkout page where check-status isn't called.

Version bump triggers the in-tab auto-reload added in 6e6d1e5 for
clients already on that build.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-06 15:37:55 +02:00

93 lines
3.3 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.10.2",
"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",
"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/website_sale_disable_cart.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",
],
"i18n": [
"i18n/es.po",
"i18n/eu_ES.po",
],
"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/checkout_labels.js",
"website_sale_aplicoop/static/src/js/home_delivery.js",
"website_sale_aplicoop/static/src/js/checkout_summary.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,
}