Skip to Content
Menu
This question has been flagged
3 Replies
15268 Zobrazenia

hi,

i want to make one controller in that i want to access querystring from that url

so how can i do that

Avatar
Zrušiť
Best Answer

Hi


FROM CONTROLLER

if you déclare thé controller with:


def my_route(self, named_param, **kw)

     print named_param

     print kw.get('another_param')


And browse it with:

my_website/my_route?named_param=foo&another_param=bar


will output:

    foo

    bar


FROM QWEB


<t t-esc="request.params.get('another_param')" />




You can find more détails un the documentation: 

https://www.odoo.com/documentation/10.0/reference/http.html

Avatar
Zrušiť
Autor

thanks it works for me

Best Answer

I have a problem if the foo is an object, how do I write in the url to call?
my_website/my_route?named_param=foo&another_param=bar​

Avatar
Zrušiť
Related Posts Replies Zobrazenia Aktivita
2
jan 20
7553
0
nov 23
1917
2
sep 20
11863
1
nov 19
8587
0
máj 19
5030