Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
1199 Zobrazení

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
Zrušit
Nejlepší odpověď

Hi,

You can get the names into list as below:

 'team_id' : [team.name for team in self.team_ids]
Avatar
Zrušit