Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
6631 Visualizzazioni

Hello,

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

Avatar
Abbandona
Risposta migliore

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
Abbandona
Autore

Thank You Mohammed

Post correlati Risposte Visualizzazioni Attività
7
set 21
28277
3
set 22
30647
2
dic 24
2103
1
feb 22
3924
1
feb 22
6804