{# Attachment widget — drag-and-drop file uploads + chip list. Used for the `attachments` virtual field on any form. Reads the existing rows via /api/records?model=ir.attachment&domain=... and POSTs new files to /api/attachment/upload. Deletion hits /api/attachment/{id}. Expected variables: name field attribute name (form input name — also posted as one hidden input per attachment id so the parent form save preserves the linkage even before res_id is known). res_model owning model name (e.g. "crm.lead"). res_id owning record id, or 0 if the parent record hasn't been saved yet. The widget POSTs uploads with this id; for new records (res_id=0) the server creates orphan rows that the parent save re-links via a follow-up PATCH. initial list of {id, name, mimetype, size} for already- linked attachments. readonly bool — disables uploads + deletions. #}