[FIX] event_sale: canceled registrations
- Open an event registration page - Fill form for 2 persons => redirection to /shop/checkout - Click Review Order => open /shop/cart - Change quantity from 2 to 1 - Finish checkout process - Login to backend, confirm SO Two tickets are confirmed instead of one. opw-783945
This commit is contained in:
committed by
Nicolas Martinelli
parent
5548b2ff7a
commit
ac31252d54
@@ -41,7 +41,7 @@ class SaleOrderLine(models.Model):
|
||||
registrations linked to this line. This method update existing registrations
|
||||
and create new one for missing one. """
|
||||
Registration = self.env['event.registration']
|
||||
registrations = Registration.search([('sale_order_line_id', 'in', self.ids)])
|
||||
registrations = Registration.search([('sale_order_line_id', 'in', self.ids), ('state', '!=', 'cancel')])
|
||||
for so_line in self.filtered('event_id'):
|
||||
existing_registrations = registrations.filtered(lambda self: self.sale_order_line_id.id == so_line.id)
|
||||
if confirm:
|
||||
|
||||
Reference in New Issue
Block a user