Skip to Content
Menu
This question has been flagged
1 Reply
961 Views

Here this i get user id. But I want to show user name in this report. 
team_ids = fields.Many2many('crm.team', string="Segment", required=True)
data = {
'start_date': self.date_from,
'end_date': self.date_to,
'team_id': self.team_ids.ids
\\\\ \\\\ \\\\ \\\\ \\\\ \\\\ \\\\ \\\\ \\\\}
here\\\\ I\\\\ pass\\\\ the\\\\ data\\\\ In\\\\ xml:


I\\\ get\\\ id\\\ for\\\ this\\\ but\\\ how\\\ can\\\ I\\\ get\\\ name\\\ instead\\\ of\\\ i
d


Please help.

Avatar
Discard
Best Answer

Hi,

You can get the names into list as below:

 'team_id' : [team.name for team in self.team_ids]
Avatar
Discard