Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions content/developer/reference/external_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -302,29 +302,29 @@ The following examples showcase how to execute two of the :ref:`common ORM metho
const reqSearch = {
method: "POST",
headers: headers,
body: {
body: JSON.stringify({
context: {lang: "en_US"},
domain: [
["name", "ilike", "%deco%"],
["is_company", "=", true],
],
},
}),
};
const resSearch = await fetch(BASE_URL + "/res.partner/search_read", reqSearch);
if (!response.ok) throw new Error(resSearch.json());
if (!resSearch.ok) throw new Error(resSearch.json());
const ids = await resSearch.json();

const reqRead = {
method: "POST",
headers: headers,
body: {
body: JSON.stringify({
ids: ids,
context: {lang: "en_US"},
fields: ["name"],
},
}),
};
const resRead = await fetch(BASE_URL + "/res.partner/search_read", reqRead);
if (!response.ok) throw new Error(resRead.json());
if (!resRead.ok) throw new Error(resRead.json());
const names = await resRead.json();
console.log(names);
})();
Expand Down Expand Up @@ -391,7 +391,7 @@ db (database) and object. All three services are deprecated.
Common service
--------------

The common service defines 3 fonctions:
The common service defines 3 functions:

1. ``version()``
2. ``login(db, login, password)``
Expand Down