Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2426 Lượt xem

Hello,

I passed SQL query result to qweb report but the result is not rendered. I used the Postgres function to get the result,  I used function to use SQL function rank based on passed parameters. Views return all the results so the ranking based on some parameters didn't work.


"

self.env.cr.execute("""SELECT id,region,city,year,kpi,result,level,rank_no from kpi_rank('2', 2)""")
results = self.env.cr.fetchall()

if results is not None:
return self.env.ref('kpi.action_kpi_rank_status_report').report_action(results)
else:
raise UserError(_('No result found!'))"

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
3
thg 12 24
4693
2
thg 6 23
4522
0
thg 8 21
5092
0
thg 4 18
8579
1
thg 12 17
8008