I have a method in an Odoo 11 model that takes a single parameter and I am trying to call it using an RPC, but I am not able to send a value for that parameter. I have verified that my javascript changes (using Google Chrome's DevTools), but no matter what I do, I seem to get this same error:
process_feed_list() missing 1 required positional argument: 'instance_id'
So, it looks like the PRC is working, but for some reason it is not passing my 'arg' to the method. My assumption is that the 'args' of the RPC are passed to the method as parameters, but that doesn't seem to be the case.
Here are a couple of my attempts.
Based on https://www.odoo.com/documentation/11.0/reference/javascript_reference.html I tried:
refresh_feed1: function() {var ret = this._rpc({model: 'amazon.feed',method: 'process_feed_list',args: [ '1' ],});this.trigger_up('reload');return ret;}
And, using https://stackoverflow.com/questions/47194770/how-to-call-python-function-in-jquery-in-odoo-11 as a template I tried:
refresh_feed1: function( ) {rpc.query({model: 'amazon.feed',method: 'process_feed_list',args: [ { 'instance_id': '1' } ]} ).then(function( returned_value ){this.trigger_up( 'reload' )return returned_value})}
Is instance_id a string?
Yes, instance_id is a string.
I have the same issue. Have you solved it somehow?