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
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project
- MRP
This question has been flagged
1
Reply
8297
Views
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');
});
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
0
Mar 25
|
377 | ||
|
0
Jan 25
|
447 | ||
|
2
Jan 25
|
891 | ||
|
0
Jan 25
|
380 | ||
|
2
Dec 24
|
931 |