diff --git a/addons/event_sale/models/sale_order.py b/addons/event_sale/models/sale_order.py index 6902d8e4743..2ac4deaed5f 100644 --- a/addons/event_sale/models/sale_order.py +++ b/addons/event_sale/models/sale_order.py @@ -8,12 +8,13 @@ class SaleOrder(models.Model): @api.multi def action_confirm(self): - self.ensure_one() res = super(SaleOrder, self).action_confirm() - # confirm registration if it was free (otherwise it will be confirmed once invoice fully paid) - self.order_line._update_registrations(confirm=self.amount_total == 0, cancel_to_draft=False) - if any(self.order_line.filtered(lambda line: line.event_id)): - return self.env['ir.actions.act_window'].with_context(default_sale_order_id=self.id).for_xml_id('event_sale', 'action_sale_order_event_registration') + for order in self: + # confirm registration if it was free (otherwise it will be confirmed once invoice fully paid) + order.order_line._update_registrations(confirm=order.amount_total == 0, cancel_to_draft=False) + if any(order.order_line.filtered(lambda line: line.event_id)): + return self.env['ir.actions.act_window'].with_context(default_sale_order_id=order.id).for_xml_id( + 'event_sale', 'action_sale_order_event_registration') return res diff --git a/addons/mail/views/mail_template_views.xml b/addons/mail/views/mail_template_views.xml index d54cb59c957..9b24457450e 100644 --- a/addons/mail/views/mail_template_views.xml +++ b/addons/mail/views/mail_template_views.xml @@ -9,8 +9,9 @@
- -