Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
6620 Prikazi

Hello,

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

Avatar
Opusti
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
Opusti
Avtor

Thank You Mohammed

Related Posts Odgovori Prikazi Aktivnost
7
sep. 21
28276
3
sep. 22
30634
2
dec. 24
2103
1
feb. 22
3923
1
feb. 22
6798