I have 2 instances of odoo with me. One is paid version and the other is free one.
I want to fetch roles which can be assigned to user in a specific application via APIs. I am using following API in Postman mentioned below:
curl --location 'domain/jsonrpc' \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"method": "call",
"params": {
"service": "object",
"method": "execute_kw",
"args": [
"domain",
adminid,
"api-key",
"res.groups",
"search_read",
[[["category_id.name", "=", "Sales"]]],
{
"fields": ["id", "name", "category_id", "comment"]
}
]
},
"id": 50
}'
When I was using this API on the paid instance of Odoo, I was able to fetch the roles according to the category correctly as was expected by me:
{
"jsonrpc": "2.0",
"id": 50,
"result": [
{
"id": 22,
"name": "User: Own Documents Only",
"category_id": [
19,
"Sales"
],
"comment": "the user will have access to his own data in the sales application."
},
{
"id": 23,
"name": "User: All Documents",
"category_id": [
19,
"Sales"
],
"comment": "the user will have access to all records of everyone in the sales application."
},
{
"id": 24,
"name": "Administrator",
"category_id": [
19,
"Sales"
],
"comment": "the user will have an access to the sales configuration as well as statistic reports."
}
]
}
But now I had to switch to the free instance and the API isn't working as expected.
Getting the following error:
"message": "Invalid field res.groups.category_id in condition ('category_id.name', '=', 'Sales')",
Is this because of a licensing issue?