-
-
Notifications
You must be signed in to change notification settings - Fork 534
[18.0][MIG] website_sale_cart_expire: Migration to version 18.0 #1130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[18.0][MIG] website_sale_cart_expire: Migration to version 18.0 #1130
Conversation
Module that allows to automatically cancel carts without activity after a configurable time.
In a typical website flow, quotations are moved to sent state when a payment by Wire transfer is chosen. In this scenario, the quotation shouldn't be automatically cancelled. It's up to the salesman to determine when a sent quotation is expired, as technically speaking this isn't just a cart anymore.
[Fix] Use new payment.payment_provider_demo for test cases [Fix] Change acquirer_id to provider_id for test cases
Currently translated at 100.0% (14 of 14 strings) Translation: e-commerce-16.0/e-commerce-16.0-website_sale_cart_expire Translate-URL: https://translation.odoo-community.org/projects/e-commerce-16-0/e-commerce-16-0-website_sale_cart_expire/es/
Before this commit, there are an issue the method raise an error if transaction_ids.last_state_change was false. It's possible for last_state_change to be false as a result of migrating data from a past Odoo DB version.
Currently translated at 100.0% (14 of 14 strings) Translation: e-commerce-16.0/e-commerce-16.0-website_sale_cart_expire Translate-URL: https://translation.odoo-community.org/projects/e-commerce-16-0/e-commerce-16-0-website_sale_cart_expire/it/
|
/ocabot migration website_sale_cart_expire |
18b5c8c to
1e0678c
Compare
website_sale_cart_expire/static/src/js/website_sale_cart_expire.esm.js
Outdated
Show resolved
Hide resolved
05225bd to
5a33069
Compare
carlos-lopez-tecnativa
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just a minor non-blocking comment.
I think it would be great to add an option to notify the user when the cart has expired or is about to expire, because I waited for the time to run out but, as a user, I didn’t receive any notification. Also, while the cron hasn’t been executed yet, my cart remains unchanged, but once the cron runs, I only see my cart empty.
website_sale_cart_expire/static/src/js/website_sale_cart_expire.esm.js
Outdated
Show resolved
Hide resolved
This migration only ports the cart expiration logic to v18 and deliberately omits the frontend countdown timer in the cart. The countdown timer has not been migrated because there is no underlying reservation mechanism implemented in this module. Without a functional reservation of seats, resources, or stock at quotation time, displaying a timer in the cart would provide no real effect beyond visual urgency. A countdown would only make sense in scenarios where the draft order actually holds a temporary reservation (e.g., event seat allocation, booking/rental slots, or other custom reservation flows). Since none of those use cases are part of the current module and cannot be properly validated here, the timer has been intentionally left out of the v18 migration. The functional value of the module in standard deployments comes from the automatic cancellation of stale carts through the cron job, which remains fully supported and migrated. This keeps the module lean, predictable, and focused on its core purpose. The structure of the module remains open for future contributions, so anyone needing a countdown UI in combination with a reservation mechanism can reintroduce or adapt that part as required for their specific use case. TT58474
5a33069 to
acc7822
Compare
|
@eduezerouali-tecnativa please review |
eduezerouali-tecnativa
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code review + runboat
|
/ocabot merge nobump |
|
This PR looks fantastic, let's merge it! |
|
Congratulations, your PR was merged at e4bdf36. Thanks a lot for contributing to OCA. ❤️ |
This migration only ports the cart expiration logic to v18 and deliberately
omits the frontend countdown timer in the cart.
The countdown timer has not been migrated because there is no underlying
reservation mechanism implemented in this module. Without a functional
reservation of seats, resources, or stock at quotation time, displaying a
timer in the cart would provide no real effect beyond visual urgency.
A countdown would only make sense in scenarios where the draft order
actually holds a temporary reservation (e.g., event seat allocation,
booking/rental slots, or other custom reservation flows). Since none of
those use cases are part of the current module and cannot be properly
validated here, the timer has been intentionally left out of the v18
migration.
The functional value of the module in standard deployments comes from the
automatic cancellation of stale carts through the cron job, which remains
fully supported and migrated. This keeps the module lean, predictable, and
focused on its core purpose.
The structure of the module remains open for future contributions, so
anyone needing a countdown UI in combination with a reservation mechanism
can reintroduce or adapt that part as required for their specific use case.
@Tecnativa TT58474
@carlos-lopez-tecnativa @CarlosRoca13 please review