跳至内容
菜单
此问题已终结
8499 查看

i want to pass from a normal form data to the report action

hr_holidays.action_report_holidayssummary ..

more then 1 employee

f
@api.multi
def print_report(self):
self.ensure_one()
[data] = self.read()
data['emp'] = self.env.context.get('active_ids', [])
employees = self.env['hr.employee'].browse(data['emp'])
datas = {
'ids': [],
'model': 'hr.employee',
'form': data
}

return self.env.ref('hr_holidays.action_report_holidayssummary').report_action(employees, data=datas)


it's just take one employee

形象
丢弃
相关帖文 回复 查看 活动
3
12月 24
4541
2
6月 23
4385
0
3月 22
2375
0
8月 21
5022
1
12月 17
7941