Hi All,
Please am stuck with this, may be because i 'm not realy good in js
in the pos module i need to add a var to a model domain
but with an rpc query the response is "asynchrounously retrieved" i searched for days now and am not able to found the right way to get the variable and use it.
rpc.query({
model: 'product.product',
method: 'custom_funct_for_js',
}).then(function(result){
everybody saing //do_something or console.log(result) but please guys i need the result out of here please
});
in the source code and in plugins i found this kind of exemple
return afunctionname : function(){
var myvar = 0;
return rpc.query({
model: 'product.product',
method: 'custom_funct_for_js',
}).then(function(result){
myvar = result
but no way it's still async
});
return myvar;
});
Any clue or solution for this, may be a tutorial
Thx in advance