Skip to Content
Menu
This question has been flagged
1 Reply
8292 Views
good morning
I have problems to use the js method that says the documentation and that encapsulates in an object the result and it becomes empty what I am bringing is a text string,
what I'm looking for is to bring the value and show it on my ticket but I can not get it. I leave the code
Model js
rpc.query ({
model: 'pos.order',
method: 'sendDataInvoice',
Args: [],
}). then (function (text) {
console.error (text);
//document.cookie = text;
// return document.cookie;
});

piton
@ api.model
def sendDataInvoice (self):
text = str (request.session ['FirmaElectronica'])
return text


Avatar
Discard
Best Answer

 Hi,

   Please check whether the method named '' sendDataInvoice" is working properly. ie whether data is there in text.

  return rpc.query({
model: 'model_name',
method: 'method_name',
args: args,
kwargs: {},
})
.then(function (test) {
console.log(server_ids)
}).fail(function (){
console.error('Failed');
});

    

          

Avatar
Discard
Related Posts Replies Views Activity
0
Mar 25
371
0
Jan 25
443
2
Jan 25
888
0
Jan 25
373
2
Dec 24
927