[FIX] mail.thread: avoid wrongly matching model,id from a foreign OpenERP system
authorOlivier Dony <odo@openerp.com>
Fri, 11 Apr 2014 10:13:49 +0000 (12:13 +0200)
committerOlivier Dony <odo@openerp.com>
Fri, 11 Apr 2014 10:13:49 +0000 (12:13 +0200)
commit4ed8413dc744a34784906b0560315934c121d70f
treecc8cdfb7f0a9e5201887230079e2a3ccc0038ec3
parent63e9150cff2f414713b8d88265758e203f336cb2
[FIX] mail.thread: avoid wrongly matching model,id from a foreign OpenERP system

When emails transit from an OpenERP system to another
there is a chance of wrongly considering the foreign
model,id pair as local, possibly attaching a reply
to a wrong parent message.
This naive heuristic ignore the foreign identifiers
unless the hostname of the message-id mentioned in
the In-Reply-To header matches the local one.
This may fail after a change of local hostname but
is still better than the alternative.
In OpenERP v8 we should stop including the model,res_id
in outgoing Message-Id headers and only rely on the
stored, opaque, unique Message-Ids, preventing
any future mismatch.

bzr revid: odo@openerp.com-20140411101349-h3jmkdzvbr7lut26
addons/mail/mail_thread.py