Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
3 Відповіді
15217 Переглядів

hi,

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

so how can i do that

Аватар
Відмінити
Найкраща відповідь

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

Аватар
Відмінити
Автор

thanks it works for me

Найкраща відповідь

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​

Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
2
січ. 20
7528
0
лист. 23
1888
2
вер. 20
11824
1
лист. 19
8561
0
трав. 19
5003