{# Many2many chip editor — multi-select sibling of the m2o combobox. Expected variables: name field attribute name (form input name) comodel comodel model name (e.g. "res.tag") search_url "/api/m2o/search?model=res.tag" initial list of {"id": int, "label": str} for currently linked records (one per record in the M2m) readonly bool #}
{# Empty hidden input ensures the form always submits a value for this field even when nothing is selected — that's how the server distinguishes "user cleared everything" from "field not present in this form". Concrete selections are emitted below. #}
{# Selected chips. #} {# Inline search input. Click → focus → /api/m2o/search dropdown. #}
{# Dropdown of search hits. Filters out already-selected ids. #}