Skip to content

Commit

Permalink
Code Review
Browse files Browse the repository at this point in the history
  • Loading branch information
majouda committed Apr 16, 2024
1 parent 17e5cff commit 43c027f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sale_order_type_email_template/models/sale.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ class SaleOrder(models.Model):

def _find_mail_template(self, force_confirmation_template=False):
self.ensure_one()
if self.type_id.mail_template and not force_confirmation_template:
if (self.type_id and self.type_id.mail_template
and not force_confirmation_template):
return self.type_id.mail_template.id
return super(SaleOrder, self)._find_mail_template(
force_confirmation_template=force_confirmation_template
Expand Down

0 comments on commit 43c027f

Please sign in to comment.