88c57750751b7e59ae8b53abbc04f8a164ca56ed
Reproduction: 1. Select an event, then set a certain maximum amount sold on a paid ticket, set as 2 for simplicity 2. Go to the Event webpage, then buy all paid tickets 3. Fill out information and attempt to confirm the order 4. The shopping cart is cleared Reason: We check the event ticket availability in function _cart_update(). In V14 and V15, we added a new step to update the pricelist when confirming an order, which will trigger _cart_update(). In V13 update_pricelist is False by default. In V14 and V15, it is always set to True. The change is to make sure the pricelist is not changed once the customer chooses the pricelist. As a result, for each SO, it checks the ticket availability twice. First at when click register or check out. Second at when submit the address information. When selling the last ticket, the second check fails and leads to an empty cart because the seats_reaserved is updated already at the first step Fix: add new checking conditions increased_quantity = new_qty > old_qty to function _cart_update. We only check the availability again when these new conditions are satisfied. Current issue: This fix will restore the normal workflow for the last ticket. But the workflow has its original issue, e.g. it doesn’t update seats_reserved when increasing the number of tickets. A solution in SaaS-15.3 is to forbid the customer to manually raise the event ticket amount For example: 1. Register 1 ticket, fill in the attendee form and click continue 2. Click review order, increase the number of tickets, then continue 3. The seats_reserved is not updated (can refresh the event page, seats_reserved is the column confirmed) If first register 2 tickets and then change to 1, seats_reserved will change from 2 to 1 This is because seats_reserved is computed from the number of registration. No new registration is needed when increase the ticket number, but the registration will decrease when decrease the ticket number. A solution for it is popping new registration form when the ticket registration increases. opw-2784720 closes odoo/odoo#90648 X-original-commit: 8e7867371c66fb7500f13157ada84aadad1d46d6 Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com> Signed-off-by: Liu Jinjiu (jili) <jili@odoo.com>
…
…
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%