[FIX] point_of_sale: Send receipt by email permission

Since 69ccabb212, the permissions for
users to create emails has been removed. We need to make sure that
even non admins can send the receipt by email.

closes odoo/odoo#57057

X-original-commit: a8ccd247aa1a6fcd3f26259d8393212114b65482
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Signed-off-by: Antoine Prieëls <aprieels@users.noreply.github.com>
This commit is contained in:
Antoine Prieels
2020-09-03 15:48:38 +00:00
parent e8f81ae39c
commit a655ce3024
+1 -1
View File
@@ -574,7 +574,7 @@ class PosOrder(models.Model):
})
mail_values['attachment_ids'] += [(4, attachment.id)]
mail = self.env['mail.mail'].create(mail_values)
mail = self.env['mail.mail'].sudo().create(mail_values)
mail.send()
@api.model