Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
6628 Vues

Hello,

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

Avatar
Ignorer
Meilleure réponse

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
Ignorer
Auteur

Thank You Mohammed

Publications associées Réponses Vues Activité
7
sept. 21
28277
3
sept. 22
30645
2
déc. 24
2103
1
févr. 22
3923
1
févr. 22
6803