def generate_tracking_message_id(res_id):
 try:
  rnd = random.SystemRandom().random()
 except NotImplementedError:
  rnd = random.random()
 rndstr = ('%.15f' % rnd)[2:]
 return ('<%.15f.%s-openerp-%s@%s>' % (time.time(), rndstr, res_id, socket.gethostname()))

def generate_tracking_message_id ( res_id ) : try : rnd = random . SystemRandom ( ) . random ( ) except NotImplementedError : rnd = random . random ( ) rndstr = ( '%.15f' % rnd ) [ 2 : ] return ( '<%.15f.%s-openerp-%s@%s>' % ( time . time ( ) , rndstr , res_id , socket . gethostname ( ) ) )
returns a string that can be used in the message-id rfc822 header field used to track the replies related to a given object thanks to the "in-reply-to" or "references" fields that mail user agents will set .