odoo_website_update_snippet
Update an existing website snippet by locating it with an xpath and applying text or attribute substitutions to its descendants.
Instructions
Update an existing snippet on a target HTML field. Locates the snippet via snippet_xpath (absolute in target), applies substitutions to its descendants via relative xpaths, and writes back. Common use cases: swap background image, change H1/H2 text, update CTA button text+href, change card content. Substitution syntax identical to odoo_website_add_snippet.
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>",
"snippet_xpath": "<snippet_xpath>",
"substitutions": "<substitutions>"
},
"name": "odoo_website_update_snippet"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lang | No | en_US | |
| model | Yes | ||
| res_id | Yes | ||
| dry_run | No | ||
| connection | No | default | |
| field_name | Yes | ||
| snippet_xpath | Yes | Xpath to snippet root element in target (e.g. '//section[@data-snippet="s_text_block"][1]') | |
| substitutions | Yes |