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.

19 lines
719 B

  1. # -*- coding: utf-8 -*-
  2. # Copyright 2016 ACSONE SA/NV (<http://acsone.eu>)
  3. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
  4. from openerp import models, api
  5. class MailNotification(models.Model):
  6. _inherit = 'mail.notification'
  7. @api.model
  8. def _notify(self, message_id, partners_to_notify=None,
  9. force_send=False, user_signature=True):
  10. if self.env.context.get('force_partners_to_notify'):
  11. partners_to_notify =\
  12. self.env.context.get('force_partners_to_notify')
  13. super(MailNotification, self)._notify(
  14. message_id, partners_to_notify=partners_to_notify,
  15. force_send=force_send, user_signature=user_signature)