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

hi,

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

so how can i do that

Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć
Autor

thanks it works for me

Najlepsza odpowiedź

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​

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
2
sty 20
7276
0
lis 23
1547
2
wrz 20
11399
1
lis 19
8173
0
maj 19
4683