mirror of
https://github.com/OCA/report-print-send.git
synced 2025-02-16 07:11:31 +02:00
[12.0-issue-183-base] [12.0] base_report_to_printer: Do no print e-mail attachment
This commit is contained in:
1
base_report_to_printer_mail/models/__init__.py
Normal file
1
base_report_to_printer_mail/models/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from . import mail_template
|
||||
10
base_report_to_printer_mail/models/mail_template.py
Normal file
10
base_report_to_printer_mail/models/mail_template.py
Normal file
@@ -0,0 +1,10 @@
|
||||
from odoo import models
|
||||
|
||||
|
||||
class MailTemplate(models.Model):
|
||||
_inherit = "mail.template"
|
||||
|
||||
def generate_email(self, res_ids, fields=None):
|
||||
return super(MailTemplate, self.with_context(
|
||||
must_skip_send_to_printer=True
|
||||
)).generate_email(res_ids, fields=fields)
|
||||
Reference in New Issue
Block a user