Skip to content
Snippets Groups Projects
Commit 5a943390 authored by Christophe Simonis's avatar Christophe Simonis
Browse files

[MERGE] forward port branch saas-15 up to fb17edd0

parents df3b75a1 fb17edd0
Branches
Tags
No related merge requests found
......@@ -41,7 +41,7 @@ class SaleOrderLine(models.Model):
order line has a product_uom_qty attribute that will be the number of
registrations linked to this line. This method update existing registrations
and create new one for missing one. """
Registration = self.env['event.registration']
Registration = self.env['event.registration'].sudo()
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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment