[FIX] event_sale: update registrations as sudo.
Consequence of19878d011fBackport offb17edd0b0
This commit is contained in:
@@ -56,7 +56,7 @@ class sale_order_line(osv.osv):
|
||||
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)])
|
||||
for so_line in [l for l in self if l.event_id]:
|
||||
existing_registrations = registrations.filtered(lambda self: self.sale_order_line_id.id == so_line.id)
|
||||
|
||||
Reference in New Issue
Block a user