summaryrefslogtreecommitdiff
path: root/addons/point_of_sale/models
diff options
context:
space:
mode:
authorAntoine Prieels <anp@odoo.com>2020-09-03 13:39:31 +0000
committerAntoine Prieels <anp@odoo.com>2020-09-03 15:23:42 +0000
commit1720d56a392b299625e40d202643aacd844d1870 (patch)
tree267f5cd2316505b7db700eb616b46c7f83f9de8e /addons/point_of_sale/models
parent586496abcf802794bb9eaa70cae3654644e01f86 (diff)
[FIX] point_of_sale: Send receipt by email permission
Since 69ccabb212d83bfee60c7dade36ca4b06f9f2f12, 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#57054 X-original-commit: a8ccd247aa1a6fcd3f26259d8393212114b65482 Signed-off-by: pimodoo <pimodoo@users.noreply.github.com> Signed-off-by: Antoine Prieƫls <aprieels@users.noreply.github.com>
Diffstat (limited to 'addons/point_of_sale/models')
-rw-r--r--addons/point_of_sale/models/pos_order.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/point_of_sale/models/pos_order.py b/addons/point_of_sale/models/pos_order.py
index 6a240bcc7fa..4317c16fced 100644
--- a/addons/point_of_sale/models/pos_order.py
+++ b/addons/point_of_sale/models/pos_order.py
@@ -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