[FIX] generate_tracking_message_id: use more randomness to avoid duplicates
authorOlivier Dony <odo@openerp.com>
Mon, 22 Oct 2012 16:24:21 +0000 (18:24 +0200)
committerOlivier Dony <odo@openerp.com>
Mon, 22 Oct 2012 16:24:21 +0000 (18:24 +0200)
commitb5b19a7a01402b9e344ffd6cee023231ce2f14fd
tree91b9bd4858729ac7493d852ce33d62208b674eba
parent6280e223be743674b85cb1bc8c1e4dbdcf1a7e75
[FIX] generate_tracking_message_id: use more randomness to avoid duplicates

When several message IDs had to be generated for the same
record at the same time, there was a high chance to
get non-unique results. This possibly lead to data loss because
some mail implementations might ignore multiple mails with the
same ID (including OpenERP itself). On most operating systems
the available time resolution precision is better than what
we used (due to the float rounding of `%s`).
Adding a bit of randomness doesn't hurt, as OpenERP will
be used in increasingly distributed environments, so
we now add an extra random part as well.

bzr revid: odo@openerp.com-20121022162421-qr7nq8idihp5781u
openerp/tools/misc.py