Skip to content

Syncing from upstream OCA/e-commerce (19.0)#899

Merged
bt-admin merged 25 commits intobrain-tec:19.0from
OCA:19.0
Mar 20, 2026
Merged

Syncing from upstream OCA/e-commerce (19.0)#899
bt-admin merged 25 commits intobrain-tec:19.0from
OCA:19.0

Conversation

@bt-admin
Copy link

bt_gitbot

ivantodorovich and others added 25 commits March 12, 2026 17:24
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/
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
Currently translated at 100.0% (14 of 14 strings)

Translation: e-commerce-18.0/e-commerce-18.0-website_sale_cart_expire
Translate-URL: https://translation.odoo-community.org/projects/e-commerce-18-0/e-commerce-18-0-website_sale_cart_expire/it/
Currently translated at 100.0% (14 of 14 strings)

Translation: e-commerce-18.0/e-commerce-18.0-website_sale_cart_expire
Translate-URL: https://translation.odoo-community.org/projects/e-commerce-18-0/e-commerce-18-0-website_sale_cart_expire/it/
Currently translated at 100.0% (14 of 14 strings)

Translation: e-commerce-18.0/e-commerce-18.0-website_sale_cart_expire
Translate-URL: https://translation.odoo-community.org/projects/e-commerce-18-0/e-commerce-18-0-website_sale_cart_expire/it/
Currently translated at 78.5% (11 of 14 strings)

Translation: e-commerce-18.0/e-commerce-18.0-website_sale_cart_expire
Translate-URL: https://translation.odoo-community.org/projects/e-commerce-18-0/e-commerce-18-0-website_sale_cart_expire/es/
Signed-off-by ivantodorovich
@bt-admin bt-admin added the 19.0 label Mar 20, 2026
@bt-admin bt-admin merged commit d2176be into brain-tec:19.0 Mar 20, 2026
4 checks passed
@codecov
Copy link

codecov bot commented Mar 20, 2026

Codecov Report

❌ Patch coverage is 92.64706% with 10 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (19.0@2b0d048). Learn more about missing BASE report.

Files with missing lines Patch % Lines
website_sale_cart_expire/models/website.py 80.64% 4 Missing and 2 partials ⚠️
website_sale_cart_expire/models/sale_order.py 90.00% 1 Missing and 1 partial ⚠️
...cart_expire/tests/test_website_sale_cart_expire.py 97.36% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             19.0     #899   +/-   ##
=======================================
  Coverage        ?   92.64%           
=======================================
  Files           ?        7           
  Lines           ?      136           
  Branches        ?       11           
=======================================
  Hits            ?      126           
  Misses          ?        6           
  Partials        ?        4           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.