-
- Downloads
[FW][FIX] event : Changing seats_max could desync seates_reserved
Issue: Sometimes, when changing the Maximum (seats_max) on one of the tickets of an event, it triggered a recompute for the other tickets Steps to reproduce : Install Events Settings > Event > Enable "Tickets" Create an event template (or use Sell Online default one) with Check "Ticketing" and set the line price to 0 Create an event : with that template and Autoconfirm checked Add a line for the Tickets: name: VIP price: 10 Save the event Create two attendees for the event, one for each Event Ticket (event_ticket_id) and confirm them (on the form, not Confirm Attendee) Change the Maximum (seats_max) of one ticket and save -> the Confirmed (seats_reserved) will be recomputed but the confirmed for the other ticket will increase as well Side-Note: I haven't been able to find a deterministic way to reproduce the bug but it seems that the bug appear the most when doing all the steps at once, and trying to not log out or refresh the page. Also it works best on a runbot or at least with runbot data. Without my modification, the new test passes on my local odoo server, but fails on a dump of a runbot on my computer, adding my modification makes it work on either case Why is that a bug: The recomputation seems to fail for some reason, we are setting all the event/ticket in self to 0, but only update the value of those by fetching a SQL query so there might be a desync there opw-2642555 closes odoo/odoo#77670 Forward-port-of: #76492 Signed-off-by:Xavier Dollé (xdo) <xdo@odoo.com> Signed-off-by:
Thibault Delavallee (tde) <tde@openerp.com>
Showing
- addons/event/models/event_event.py 1 addition, 1 deletionaddons/event/models/event_event.py
- addons/event/models/event_ticket.py 4 additions, 2 deletionsaddons/event/models/event_ticket.py
- addons/event_sale/tests/__init__.py 1 addition, 0 deletionsaddons/event_sale/tests/__init__.py
- addons/event_sale/tests/test_event_specific.py 53 additions, 0 deletionsaddons/event_sale/tests/test_event_specific.py
Loading
Please register or sign in to comment