CopyClipboardChar
One of the only CamelCase widget names in Odoo core: CopyClipboardChar puts a one-click copy button next to a text value. Small widget, several sharp edges.
August 12, 2026Updated August 12, 20267 min read
| Studio name | Copy to Clipboard |
|---|---|
| Technical name | CopyClipboardChar |
| Field types | char |
| Views | form, list |
| Also registered as | CopyClipboardURL and CopyClipboardButton, defined in the same file |
| Module | web, present in every Odoo database |
| Used in core | 15 occurrences across 10 modules, including survey, website_slides, calendar, auth_totp, im_livechat, portal |
| Versions | Odoo 20.0, Odoo 19.0, Odoo 18.0 |
| No-code setup | Yes, via Odoo Studio (Enterprise) |
| Alternatives | CopyClipboardURL, CopyClipboardButton, url, email |
What the Copy to Clipboard field does
What this means for your team
Setting it up in Odoo Studio (no code)
What Studio cannot do here
Working examples
One file, three widgets
Version compatibility
| Version | Status | Notes |
|---|---|---|
| Odoo 20.0 | In development | Not released. Inline link styling and new icon set on the development branch, functionally unchanged. Details below. |
| Odoo 19.0 | Verified | Verified against the shipped source. btn_class appears on the Button variant. |
| Odoo 18.0 | Verified | Same attributes and behavior for the Char and URL variants. The Button variant had no btn_class option. |
Upgrade note for 18 to 19. Nothing to change in your views. The string and disabled attributes behave the same, and the only addition is btn_class on the Button variant. Internal plumbing of the label pass through changed, which only matters if you patched the component.
What is changing in Odoo 20
Common problems and fixes
| Symptom | Cause and fix |
|---|---|
| The widget renders as a plain text field | The registry name is case sensitive and was written in snake_case or lowercase. Use widget="CopyClipboardChar" exactly, capitals included. |
| The copy button does nothing on some records | The disabled attribute expression evaluates truthy on those records. Check the expression against the record's current field values, including unsaved edits. |
| Button renders but copying fails silently | The browser clipboard API requires a secure context, and the instance is served over plain HTTP. Serve Odoo over HTTPS, or on localhost for development. |
| The value shows but you wanted only a button | CopyClipboardChar always renders the value alongside the button. Switch to CopyClipboardButton, which hides the value entirely. |
| Button label reads Copy instead of your label | The custom label was placed in options rather than the string attribute. Set string="..." on the field node. This widget reads no options. |
| Copied value differs from what is displayed | The URL variant displays a clickable link but always copies the raw stored value. Expected. Store exactly what users should paste. |
Copy to Clipboard field vs the alternatives
| Widget | Best for | Key difference |
|---|---|---|
CopyClipboardChar | Values users paste elsewhere: tokens, references, links | Shows the value plus a one-click copy button |
CopyClipboardURL | Links that should be clickable and copyable | Renders the value as a hyperlink, link icon on the button |
CopyClipboardButton | Secrets that move but should not be displayed | Button only, value hidden, styled via btn_class |
| url | Links that only need clicking | Clickable link, no copy affordance |
| Address values | mailto link, no copy button |
Frequently asked questions
How do I add a copy to clipboard button in Odoo without code?+
Why is the widget name CamelCase?+
How do I change the text on the copy button?+
Can I disable the copy button for certain records?+
What is the difference between CopyClipboardChar and CopyClipboardURL?+
How do I show only a copy button without the value?+
Does the copy button work in list views?+
Will CopyClipboardChar change in Odoo 20?+
Building portals and integrations people can actually use?
Copy buttons, share links, tokens and embed snippets are the last mile of a portal or API rollout, and the place where sloppy UX turns into support tickets. We design Odoo portals, share flows and integration touchpoints where values move cleanly between systems and humans.
Book a free consultation