Hi
We have 3 different helpdesks. By Odoo default, the email "from" displayed to the customer is always the personal email of the employee. I want to change this to the helpdesk email because otherwise people copy out the personal email and tickets do not end up in the helpdesk.
I have done it like the script below, but it recognises some subjects and this does not work if the ticket is created already in Odoo.
How can I access the help desk team in the email record so that I can change it to the email address of the helpdesk team?
I am well aware, that the change of the email address is not really required since Odoo catches it automatically and appoints it to the right helpdesk but the problem is, that people do not use the respond button but instead copy out the personal address.
Code:
Applied on outgoing Mails:
if record.model == 'helpdesk.ticket':
if '[Newsletter]' in record.subject: # Newsletter
record['email_from'] = '"Newsletter" '
record['reply_to'] = '"Newsletter" '
# the following lines Illustrated the idea but do not work
# elif record.model.team_id == 3 : # Supplier R&D Helpdesk
# record['email_from'] = '"Supplier" '
# record['reply_to'] = '"Supplier" '
else: # General Helpdesk
record['email_from'] = '"Info" '
record['reply_to'] = '"Info" '