set_translations
Translate Odoo PDF and email templates into multiple languages in one call, validating placeholders, merging or replacing cells, and filling empty entries from a glossary.
Instructions
Translate a template, many languages in one call.
translations = {lang: {source string: text}} (lang: de, de_DE,
fr_CH...; source strings exactly as get_translations lists them; null
deletes a cell). A translation must keep exactly the source's
{{ expressions }} and, in an email, its numbered tags <1>...</1>, <2/>
(any order, each tag closed after it opens), else nothing is saved
and the errors say which. replace=true replaces each language sent as a whole (PUT);
default merges (PATCH). fill_from_glossary fills empty cells of the
given languages from the built-in glossary. Returns the updated report
plus changed and warnings.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"template_id": "<template_id>"
},
"name": "set_translations"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | ||
| replace | No | ||
| languages | No | ||
| template_id | Yes | ||
| translations | No | ||
| add_languages | No | ||
| remove_unused | No | ||
| source_language | No | ||
| remove_languages | No | ||
| fill_from_glossary | No |