Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
1211 Представления

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.

Аватар
Отменить
Лучший ответ

Hi,

You can get the names into list as below:

 'team_id' : [team.name for team in self.team_ids]
Аватар
Отменить