Skip to Content
Menú
This question has been flagged
1 Respondre
6642 Vistes

Hello,

     I need to know that how to call function through URL?

Avatar
Descartar
Best Answer

You can call a funtion from url using http.route

for example call a function from url www.domain.com/web/my/home

@http.route(['/my/home'], type='http', auth="public", website=True)
def your_function(self, **kw):
     # your code

or if you want to call a function defined inside a model use this inside your function

request.env['your.model'].function_name()


Avatar
Descartar
Autor

Thank You Mohammed

Related Posts Respostes Vistes Activitat
7
de set. 21
28286
3
de set. 22
30670
2
de des. 24
2111
1
de febr. 22
3929
1
de febr. 22
6812