odoo_translate_field
Write translations for simple Odoo fields with translate=True. Supports multiple languages, clearing translations, and dry-run validation.
Instructions
Write translations for a simple translate=True field (Char/Text/Selection). Use for: blog.post.name/subtitle/teaser, product.template.name, res.partner.name, account.account.tag.name — any short/plain field. Format: translations = {lang_code: value, ...}. Pass value=null/'' to remove a language's translation (falls back to source_lang). Errors if field.translate is not True (use odoo_translate_html for HTML). Auto-detects Odoo version: v16+ uses update_field_translations() native API, older falls back to ir.translation.
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": {
"model": "<model>",
"res_id": "<res_id>",
"field_name": "<field_name>",
"translations": "<translations>"
},
"name": "odoo_translate_field"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | ||
| res_id | Yes | ||
| dry_run | No | If true, only validates and reports what would change without writing | |
| connection | No | default | |
| field_name | Yes | ||
| source_lang | No | Source language for fallback (default 'en_US') | en_US |
| translations | Yes | Map of language code to new value: {'en_US': 'Name', 'bg_BG': 'Име', 'de_DE': 'Name'}. Supports null/empty to clear. | |
| mark_identical_as_translated | No | When True (default), a value that equals the source gets a U+200B (zero-width-space) prefix so Odoo keeps it as an explicit 'translated, kept identical' entry (avoids the 'untranslated' flag in the website editor). |