From 8f7eca45b8d2588627b23351d7a6141f4fdaa459 Mon Sep 17 00:00:00 2001 From: snt Date: Tue, 19 May 2026 17:10:29 +0200 Subject: [PATCH] =?UTF-8?q?[IMP]=20website=5Fsale=5Faplicoop:=20disable=20?= =?UTF-8?q?standard=20website=5Fsale=20cart=20=E2=80=94=20hide=20header=20?= =?UTF-8?q?cart,=20remove=20add-to-cart,=20redirect=20cart=20routes=20to?= =?UTF-8?q?=20/eskaera?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- website_sale_aplicoop/README.rst | 46 +++++++++++++++++++ .../views/website_sale_disable_cart.xml | 33 +++++++++++-- 2 files changed, 74 insertions(+), 5 deletions(-) diff --git a/website_sale_aplicoop/README.rst b/website_sale_aplicoop/README.rst index 40da165..bf621c1 100644 --- a/website_sale_aplicoop/README.rst +++ b/website_sale_aplicoop/README.rst @@ -141,3 +141,49 @@ This module was inspired by the original **Aplicoop** project: * Original creators: Ekaitz Mendiluze, Joseba Legarreta, and other contributors The original Aplicoop project served as a pioneering solution for collaborative consumption group orders, and this module brings its functionality to the modern Odoo platform. + +Notes - Shop behaves as a simple catalog +========================================= + +Starting with the recent update, this module converts the default Odoo +``/shop`` storefront into a simple product catalog (no standard ``website_sale`` +shopping cart). The change is intentional for sites that use the Aplicoop +"eskaera" flow as the single shopping experience. + +What the module does +--------------------- + +- Hides the standard header cart link and badge. +- Removes the "Add to cart" quick-add area from product listings. +- Redirects standard cart endpoints to the group-order flow (``/eskaera``): + ``/shop/cart``, ``/shop/cart/update``, ``/shop/cart/update_json``, ``/shop/cart_quantity``. + +Files involved +-------------- + +- ``views/website_sale_disable_cart.xml`` — templates that hide/remove cart UI +- ``controllers/website_sale.py`` — routes that redirect cart endpoints to ``/eskaera`` +- ``__manifest__.py`` — includes the new view file + +How to apply or revert +----------------------- + +To apply the change (already applied when the module is installed/updated): + +:: + + docker-compose run --rm odoo odoo -d odoo -u website_sale_aplicoop --stop-after-init + docker-compose up -d + +To revert back to the standard ``website_sale`` behaviour: + +1. Remove ``views/website_sale_disable_cart.xml`` from the ``data`` section in + ``__manifest__.py``. +2. Update the module: + +:: + + docker-compose run --rm odoo odoo -d odoo -u website_sale_aplicoop --stop-after-init + +Note: Reverting may expose standard cart UI and routes; ensure your site +content and workflows are adapted accordingly. diff --git a/website_sale_aplicoop/views/website_sale_disable_cart.xml b/website_sale_aplicoop/views/website_sale_disable_cart.xml index 1733dd8..842ec3f 100644 --- a/website_sale_aplicoop/views/website_sale_disable_cart.xml +++ b/website_sale_aplicoop/views/website_sale_disable_cart.xml @@ -6,11 +6,34 @@ Convert /shop to a simple product catalog ========================================== --> - -