-
-
Notifications
You must be signed in to change notification settings - Fork 410
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] event_sale: failed payment on soldout events
When there's a quotation for events registrations and the seats are limited, if the customer pays the quoutation the payment will fail when the quoutation gets confirmed. With this change we prevent the customer from paying that event that is soldout. Steps to reproduce: - Limit the seats for a given event. - Set autoconfirmation on. - Create a quotation for a ticket in that event. - Use the customer preview link to go to the portal view. - Pay the quotation (i.e. with demo payment method) - The confirmation crashes as there aren't seats available. This is an issue as well as the payment is already fulfilled at bank level, but as the system crashes the callback isn't confirmed at Odoo.
- Loading branch information
1 parent
ebba5c2
commit 862ac93
Showing
3 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<odoo> | ||
<template id="sale_order_portal_template" inherit_id="sale.sale_order_portal_template" name="Event sale order portal"> | ||
<xpath expr="//div[@t-if='sale_order.is_expired']" position="before"> | ||
<div t-if="sale_order.has_soldout_event" class="alert alert-warning alert-dismissable d-print-none" role="alert"> | ||
<button type="button" class="close" data-dismiss="alert" aria-label="Close"></button> | ||
<strong>The event is sold out!</strong> <a role="button" href="#discussion"><i class="fa fa-comment"/> Contact us for more information.</a> | ||
</div> | ||
</xpath> | ||
</template> | ||
</odoo> |