You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
892 B

  1. # -*- coding: utf-8 -*-
  2. # © 2016 ACSONE SA/NV <https://acsone.eu>
  3. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
  4. from odoo import models, api
  5. from odoo.tools.translate import _
  6. class MailNotification(models.Model):
  7. _inherit = 'res.partner'
  8. @api.model
  9. def _notify_send(self, body, subject, recipients, **mail_values):
  10. body += self.get_additional_footer(recipients)
  11. return super(MailNotification, self).\
  12. _notify_send(body, subject, recipients, **mail_values)
  13. @api.model
  14. def get_additional_footer(self, recipients):
  15. recipients_name = [
  16. recipient.name for recipient in recipients
  17. ]
  18. additional_footer = u'<br /><small>%s%s.</small><br />' % \
  19. (_('Also notified: '),
  20. ', '.join(recipients_name))
  21. return additional_footer