Skip to content

Commit

Permalink
[FW][FIX] sale: method call over self instead of precise record
Browse files Browse the repository at this point in the history
Each order does necessarily have the same confirmation template.
And `_get_confirmation_template` is `ensure_one` so it raises when self holds multiple records.

closes odoo#128743

Forward-port-of: odoo#128551
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
  • Loading branch information
hote-odoo committed Jul 17, 2023
1 parent b43f8c8 commit 4c484a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/sale/models/sale_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -928,7 +928,7 @@ def _send_order_confirmation_mail(self):
:return: None
"""
for order in self:
mail_template = self._get_confirmation_template()
mail_template = order._get_confirmation_template()
order._send_order_notification_mail(mail_template)

def _send_payment_succeeded_for_order_mail(self):
Expand Down

0 comments on commit 4c484a9

Please sign in to comment.