8000 [FW][FIX] website_event_sale: don't remind people of unavailable tickets by fw-bot · Pull Request #210500 · odoo/odoo · GitHub
[go: up one dir, main page]

Skip to content

[FW][FIX] website_event_sale: don't remind people of unavailable tickets #210500

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fw-bot
Copy link
Contributor
@fw-bot fw-bot commented May 17, 2025

Versions

  • 16.0+

Steps

  1. Enable abandoned cart reminder emails;
  2. have an event with a limited number of seats;
  3. open a cart for a ticket to the event;
  4. abandon the cart;
  5. have available seats fill up.

Issue

You still get an email reminding you to buy the ticket, even though it's no longer available. As a consequence, you can still pay the sales order, but it won't get confirmed.

Cause

There is no custom logic in place for website_event_sale to filter out abandoned carts with tickets that are no longer eligible.

Additionally, the is_sold_out field of tickets can be False while the event's event_registrations_sold_out field is True.

Solution

  • Add the event's event_registrations_sold_out field as a dependency to event.event.ticket's _comute_is_sold_out method.
  • Add an override for _filter_can_send_abandoned_cart_mail which filters out carts with tickets that are sold out, or events with no free places remaining.

opw-4453539

Forward-Port-Of: #210236
Forward-Port-Of: #199877

Versions
--------
- 16.0+

Steps
-----
1. Enable abandoned cart reminder emails;
2. have an event with a limited number of seats;
3. open a cart for a ticket to the event;
4. abandon the cart;
5. have available seats fill up.

Issue
-----
You still get an email reminding you to buy the ticket, even though it's
no longer avaialble. As a consequence, you can still pay the sales
order, but it won't get confirmed.

Cause
-----
There is no custom logic in place for `website_event_sale` to filter out
abandoned carts with tickets that are no longer eligible.

Additionally, the `is_sold_out` field of tickets can be `False` while the
event's `event_registrations_sold_out` field is `True`.

Solution
--------
- Add the event's `event_registrations_sold_out` field as a dependency to
  `event.event.ticket`'s `_comute_is_sold_out` method.
- Add an override for `_filter_can_send_abandoned_cart_mail` which
  filters out carts with tickets that are sold out, or events with no
  free places remaining.

opw-4453539

X-original-commit: 33c7146
@robodoo
Copy link
Contributor
robodoo commented May 17, 2025

Pull request status dashboard

@fw-bot
Copy link
Contributor Author
fw-bot commented May 17, 2025

@lvsz @jeh-odoo this PR targets master and is the last of the forward-port chain.

To merge the full chain, use

@robodoo r+

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

@robodoo robodoo added the forwardport This PR was created by @fw-bot label May 17, 2025
@C3POdoo C3POdoo added the OE the report is linked to a support ticket (opw-...) label May 17, 2025
@fw-bot
Copy link
Contributor Author
fw-bot commented May 17, 2025

@lvsz @jeh-odoo ci/runbot failed on this forward-port PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
forwardport This PR was created by @fw-bot OE the report is linked to a support ticket (opw-...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0