I am calling JSONRPC from an application using this code:
const res = await axios.post(server + '/jsonrpc',
{
"jsonrpc": "2.0",
"method": "call",
"params": {
"service": "object",
"method": "execute",
"args": [database, uid, password, model, "search_read", [domain], fields, 0, 0, orderBy],
"id": 1,
}
}
);
When I want to get data from 1 model, it works fine. However, when I want to get data related to this model, I currently have to do this call again to the destination model with the domain according to the related origin data. For example, I know the Sale Order id and I want to get Stock Pickings that belong to that specific Sale Order, I need to call this 3 times. Not to mention that I need many more other related fields, which requires the application to send multiple requests to the server.
I think there must be a way to put the models and domains together to send the request only once so that it is most efficient like any other query languages and tools can do.
The question is how to do it?