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.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| connection | No | default | |
| model | Yes | ||
| res_id | Yes | ||
| field_name | Yes | ||
| snippet_xpath | Yes | Xpath to snippet root element in target (e.g. '//section[@data-snippet="s_text_block"][1]') | |
| substitutions | Yes | ||
| lang | No | en_US | |
| dry_run | No |