old blog,

Tracking email conversation in OpenERP Issue tracker.

Izhar Firdaus Izhar Firdaus Follow Support Sep 25, 2011 · 1 min read
Tracking email conversation in OpenERP Issue tracker.
Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.
So in Inigo we're trying to see whether we can use OpenERP for our support system. However, the email integration sucks, to the point that I had to hack it.

Hooking up email fetching to the issue module

This one is easy but not easily noticeable how to configure it. Take note that you need to use the extended UI.
  1. open : Sales > Configuration > Email > Email Servers
  2. Create an account to fetch from the support email account and hook the Model field to project.issue


Hooking up email sending for 'from' email

You'll to setup this before email sending from OpenERP will work.
  1. open: Tools > Configuration > Email Templates > Email Account
  2. Configure one smtp account with the support email address


Notifying a user when an issue is created

  1. open: Sales > Configuration > Automated Actions
  2. Create an automated action
  3. Set trigger date to creation date
  4. In actions tab, set responsible to the user who will receive the notification email
  5. In email action tab, set source address to the support email address, and tick "Send to responsible"


Patching so that tracking email works nicely

Open addons/project_issue/project_issue.py and patch message_update function by adding this before return res line.


for record in self.browse(cr, uid, ids, context=context):
obj = record
to_addr = record.email_from
if obj.user_id:
user_email = obj.user_id.address_id and obj.user_id.address_id.email or ''
if to_addr == msg['from']:
to_addr = user_email
if to_addr:
email_cc = (obj.email_cc or '').split(',')
email_cc = filter(None, email_cc)
if msg['from'] in email_cc:
email_cc.append(to_addr)
to_addr = user_email
email_cc = filter(lambda x: x != msg['from'], email_cc)
body = 'By %s: \n%s' % (msg['from'], msg['body'])
tools.email_send('support@inigo-tech.com',
[to_addr],
'Re: [%d] %s' % (obj.id, tools.ustr(obj.name)),
tools.ustr(body),
openobject_id=str(obj.id),
email_cc=email_cc)


Now your support team and client can converse directly in email and it'll be tracked in the support system. Not a neat implementation, but good enough for my use i think.

That also should get around the frustration with the totally-not-nice-bug-thread-UI which OpenERP uses.
Written by Izhar Firdaus Follow Support
I'm a system architect, data engineer and developer advocate with passion in Free / Open Source software, entrepreneurship, community building, education and martial art. I take enjoyment in bridging and bringing together different FOSS technologies to help businesses and organizations utilize IT infrastructure to aid and optimize their business and organizational process.

Fedora Activity Day KL 2011 is happening on 10th September 2011!! : Registration opens now!

Just how long since I last post here? .. anyway I'm back!!!Event DetailsLocation : UCTI/APIITDate: 10th September 2011Time: 0900-1800...

In old blog, Aug 15, 2011

« Previous Post

Introducing collective.trajectory : URL Routing, in Plone!!

When I was working with Martijn Faassen, I was introduced to traject, which is a library written by Martijn for URL routing. It is av...

In old blog, Sep 26, 2011

Next Post »