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.

18 lines
659 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 ResPartner(models.Model):
  6. _inherit = 'res.partner'
  7. @api.multi
  8. def _notify(self, message, force_send=False, user_signature=True):
  9. if self.env.context.get('force_partners_to_notify'):
  10. partners_to_notify =\
  11. self.env.context.get('force_partners_to_notify')
  12. self = self.filtered(lambda p: p.id in partners_to_notify)
  13. super(ResPartner, self)._notify(
  14. message, force_send=False, user_signature=True)