[ADD] website_sale_disable_cart: extract cart restriction from website_sale_aplicoop
The "shop as a read-only catalog" behaviour lived inside website_sale_aplicoop, so every site that wanted the eskaera flow also lost the standard cart. It now ships as its own installable addon, with the redirect target configurable instead of hardcoded to /eskaera. - website_sale_disable_cart: hides the cart UI (12 header styles + the product card quick-add) and overrides the standard cart endpoints. Redirect URL is configurable in Website settings (default /shop); only site-internal paths are accepted, so a misconfigured value cannot turn the shop into an open redirect nor loop back into a disabled route. - Fixes carried over from the original code: /shop/cart/quantity is the Odoo 18 path (it was /shop/cart_quantity, which never matched), the boxed, sidebar and sales two/three/four headers were not covered (the cart link stayed visible on them), and the routes now override the standard methods instead of registering duplicate ones. - website_sale_aplicoop 18.0.1.12.0: drops the view file and the four redirect routes; installing it no longer touches the standard shop. Upgrade order matters: update website_sale_aplicoop first, then install website_sale_disable_cart in a second Odoo run — both use the same XPaths and obsolete records are only cleaned up at the end of a run. Tests: 8/8 in website_sale_disable_cart, aplicoop unaffected (its 2 failures predate this change). Verified live on a DB clone: /shop/cart returns 303 to the configured URL and no cart markup remains on /shop. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
73660ee226
commit
f2194c5367
28 changed files with 733 additions and 91 deletions
56
website_sale_disable_cart/LICENSE.txt
Normal file
56
website_sale_disable_cart/LICENSE.txt
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
Version 3, 19 November 2007
|
||||
|
||||
Website Sale - Aplicoop
|
||||
Copyright 2025 Criptomart SL
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation, either version 3 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
---
|
||||
|
||||
FULL LICENSE TEXT
|
||||
=================
|
||||
|
||||
For the complete AGPL-3 license text, see:
|
||||
https://www.gnu.org/licenses/agpl-3.0.html
|
||||
|
||||
---
|
||||
|
||||
SUMMARY OF RIGHTS
|
||||
=================
|
||||
|
||||
When you distribute a modified version under AGPL-3, you must:
|
||||
|
||||
1. Keep the same license (AGPL-3)
|
||||
2. Provide a copy of the license with your distribution
|
||||
3. State what changes you made
|
||||
4. Include the original copyright notices
|
||||
5. If distributed over a network, provide source code access
|
||||
|
||||
Detailed information: https://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
|
||||
---
|
||||
|
||||
ATTRIBUTION
|
||||
===========
|
||||
|
||||
This module was developed by: Criptomart SL
|
||||
Website: https://criptomart.net
|
||||
|
||||
Original inspiration: Aplicoop project
|
||||
https://sourceforge.net/projects/aplicoop/
|
||||
|
||||
---
|
||||
|
||||
This file is part of the Website Sale - Aplicoop module for Odoo.
|
||||
Loading…
Add table
Add a link
Reference in a new issue