Skip to Content
Menu
This question has been flagged
1 Reply
2006 Views

Hi, an email arrives in my Odoo helpdesk, this is sent to an agent either balanced or randomly. However, an email is only sent to one agent and my agents are not normally logged in to Odoo. How can I get Odoo to send the incoming ticket emails to ALL my agents, or a subset of them. Then I can select the manual method and the agent logs to Odoo and takes the ticket?

Avatar
Discard
Best Answer

Hello,



my assumption is to:

  1. Keep the required agents somewhere in company's settings (the field agent_ids as m2m to res.parner)

  2. Add message_post to thise agents in message_new function of crm.helpdesk



E.g. (odoo8):

def message_new(self, cr, uid, msg, custom_values=None, context=None):

     from openerp import tools # in order not to subscribe everybody

     for agent in self.pool.get('res.users).browse(cr, uid, uid, context=context).company_id.agent_ids:

          tools.email_send(email_from='mycompany@mycompany.com', email_to=[agent.email], subject=msg.get('subject') or _("No Subject"),  body='New ticket is registered!',)

         return super(crm_helpdesk, self).message_new(cr, uid, msg, custom_values=defaults, context=context)

Avatar
Discard