Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2 Risposte
3662 Visualizzazioni

Hello everybody;

I have a python function that i need to call from a js file.

But need your help to know how it works with jqwery.

Thanks a lot in advance.

Best regards.

Avatar
Abbandona

Do you mean to call a controller function from the JS file?

Risposta migliore

Yes, you can do it using controller in javascript.

Make an rpc call as below inside controller:

self._rpc({
model: <your_model_name>,
method: '<your_method_name>',
args: [data[key]],
context: session.user_context,
}).done(function() {}).fail(function() {})
Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
2
set 24
14368
0
apr 18
2462
1
lug 19
6393
2
lug 24
2412
1
giu 24
4917