Se rendre au contenu
Menu
Cette question a été signalée
2 Réponses
3370 Vues

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
Ignorer

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

Meilleure réponse

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
Ignorer
Publications associées Réponses Vues Activité
2
sept. 24
13831
0
avr. 18
2315
1
juil. 19
6042
2
juil. 24
1710
1
juin 24
4283