[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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user