Created
August 7, 2020 21:33
-
-
Save ovnicraft/e784a4368d65efecd58524dba0e027c2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@api.multi | |
def send_document(self, attachments=None, tmpl=False): | |
self.ensure_one() | |
ctxt = dict(self._context) | |
# clean context send email crash with context | |
tmpl = self.env.ref("xmild_template_mail") | |
tmpl.with_context(ctxt).send_mail( # noqa | |
self.id, email_values={"attachment_ids": attachments} | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment