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.

21 lines
762 B

  1. # -*- coding: utf-8 -*-
  2. # Copyright 2016 manawi <https://github.com/manawi>
  3. # Copyright 2016 Ivan Yelizariev <https://it-projects.info/team/yelizariev>
  4. # Copyright 2019 Artem Rafailov <https://it-projects.info/team/Ommo73/>
  5. # License LGPL-3.0 (https://www.gnu.org/licenses/lgpl.html).
  6. from openerp.osv import osv, fields
  7. from openerp import api
  8. from openerp.http import request
  9. class MailComposeMessage(osv.TransientModel):
  10. _inherit = 'mail.compose.message'
  11. private = fields.boolean('Send Internal Message')
  12. @api.model
  13. def get_internal_users_ids(self, vals):
  14. cr, uid, context = request.cr, request.uid, request.context
  15. ids = self.pool['res.users'].search(cr, uid, [('share', '=', False)], context=context)
  16. return ids