Browse Source

[FIX] add sudo to by pass access right restriction on send mail

pull/9/head
houssine 6 years ago
parent
commit
0e42d8f1d2
  1. 3
      easy_my_coop/models/coop.py

3
easy_my_coop/models/coop.py

@ -404,7 +404,8 @@ class SubscriptionRequest(models.Model):
invoice_email_template = self.env['mail.template'].search([('name', '=', 'Request to Release Capital - Send by Email')])[0] invoice_email_template = self.env['mail.template'].search([('name', '=', 'Request to Release Capital - Send by Email')])[0]
# we send the email with the capital release request in attachment # we send the email with the capital release request in attachment
invoice_email_template.send_mail(invoice.id, True)
# TODO remove sudo() and give necessary access right
invoice_email_template.sudo().send_mail(invoice.id, True)
invoice.sent = True invoice.sent = True
def get_journal(self): def get_journal(self):

Loading…
Cancel
Save