Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2434 Widoki

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!'))"

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
3
gru 24
4701
2
cze 23
4526
0
sie 21
5097
0
kwi 18
8585
1
gru 17
8012