Reference mail.activity x_reference char res_model,res_id for record in self: record['x_reference'] = "%s,%s" % (record.res_model, record.res_id)