İçereği Atla
Menü
Bu soru işaretlendi
2 Cevaplar
3637 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?

En İyi Yanıt

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ç
İlgili Gönderiler Cevaplar Görünümler Aktivite
2
Eyl 24
14318
0
Nis 18
2447
1
Tem 19
6326
2
Tem 24
2340
1
Haz 24
4860