Odoo Help

Hilar AK
On 6/12/18, 8:15 AM

var rpc = require('web.rpc')


     model: //your model,

     method: //your method,

      args: [{

          'arg1': value1,


 }).then(function (result) { 

            // your code 


on model.py

def your_method(self):

Thanks Hilar Ak,

I already tried like that but I got server application error.:'(

on 6/19/18, 6:04 AM

check your code, this is a correct format.

Hilar AK
on 6/21/18, 4:55 AM
Aktiv software
On 6/12/18, 6:30 AM

Hello Merida,

You can use "this._rpc()" method to call python function from javascript.

You can find plenty of references in base addons for the same.


Alf Olsen
On 6/26/18, 9:15 AM

@Merida: I don't know if you managed to get it working, but I had a simular problem that magically fixed itself when I restarted Odoo (or the docker container I'm running it in)

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)


Asked: 6/12/18, 1:11 AM
Seen: 1584 times
Last updated: 7/21/18, 4:36 AM