Skip ke Konten

Fetch Multi Company Data in Odoo using Standard RESTful JSON

Configure Standard RESTful JSON in Odoo


Configure API With Standard RESTful JSON Protocol, and Publish it. 

 

Fetch Multi Company Data


For fetching multi-company data, we have to provide allowed_company_ids in context of kwargs which is the ids of companies record, you will get more detail in below request body.

Request URL:

http://localhost:8018/user-restjson-apikey/sale.order/search_read

Request Body For Multi Company Data

{
    "args": [[]],
    "kwargs": {
        "fields": [
            "name",
            "company_id"
        ],
        "context": {
            "allowed_company_ids": [
                2,1
            ]
        }
    }
}