İçereği Atla
Menü
This question has been flagged
2 Cevaplar
3367 Görünümler

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
Vazgeç

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

Best Answer

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
Vazgeç
Related Posts Cevaplar Görünümler Aktivite
2
Eyl 24
13828
0
Nis 18
2314
1
Tem 19
6040
2
Tem 24
1691
1
Haz 24
4248