Skip to main content
iVentureTeam

CopyClipboardURL

Share links, webhook endpoints, portal URLs: CopyClipboardURL renders a char field as a clickable link with a one-click copy button, and its name is one of the few in Odoo where capitalization matters.

Siddharth JambukiyaSiddharth JambukiyaOdoo Techno-Functional Consultant
August 18, 2026Updated August 18, 20266 min read
Odoo 19 form view with a webhook URL field rendered by the CopyClipboardURL widget, showing the link value beside its Copy button.
Technical nameCopyClipboardURL
Field typeschar
Viewsform, list
Also registered asSiblings in the same file: CopyClipboardChar and CopyClipboardButton
Moduleweb, present in every Odoo database
Used in core6 occurrences across base_automation, web_tour, calendar, website_sale_loyalty, hr_attendance, website_event_track_live
VersionsOdoo 20.0, Odoo 19.0, Odoo 18.0, Odoo 17.0, Odoo 16.0
No-code setupPartial: Studio's Text field offers a Copy to Clipboard widget; the URL-flavored variant is XML-only
AlternativesCopyClipboardChar, CopyClipboardButton, url

What the Copy URL field does

Some values exist to leave Odoo: meeting links, loyalty share URLs, webhook endpoints, kiosk addresses. For those, a text field that users triple-click and hope they selected fully is the wrong tool. CopyClipboardURL wraps the standard URL display, so the value reads as a clickable link when readonly, and adds a copy button that puts the value on the clipboard with visual confirmation.

It is one of three widgets defined in a single core file: CopyClipboardChar (plain text plus copy), CopyClipboardURL (link plus copy), and CopyClipboardButton (button only, no visible value). All three share the same base component; the URL variant differs by rendering through UrlField and using the fa-link icon on its button.

The names are registered in CamelCase, a rarity in the widget registry, and the registry lookup is exact: widget="CopyClipboardURL" works, any lowercased spelling does not.

What this means for your team

The copy button is a small piece of UX with an outsized error-prevention payoff. Every manually selected URL risks losing its last character or picking up a trailing space, and the failure mode is a support ticket that reads "the link you sent does not work". Attendance kiosks, event streaming pages and automation webhooks, the exact places core deploys this widget, are also the places where a broken URL blocks a room full of people.

One behavior to teach admins: the copy always reflects the stored value. The readonly link display will happily prefix a schemeless value so the click navigates somewhere, but the clipboard gets the raw text. If your users paste those values into other systems, enforce fully qualified URLs at the data level rather than trusting the display to clean things up.

Supported options in Odoo 19

Verified against copy_clipboard_field.js in the Odoo 19.0 web module. The URL variant declares no supportedOptions; its knobs are field attributes processed by a shared extractProps, and one of them turns out to be inert for this variant, which is exactly the kind of thing only the source reveals.

OptionTypeWhat it does
string (attribute)stringLabel of the copy button. Set it on the field element; the success feedback remains Copied.(default: Copy)
disabled (attribute)Python expressionParsed into a prop for every variant in the file, but only the CopyClipboardButton template consumes it. On CopyClipboardURL it has no effect, verified in the 19.0 template.

The disabled attribute is a dead knob here. The shared extractProps parses disabled (a Python expression) into a prop for all three widgets, but only the CopyClipboardButton template passes it to the copy button. The Char and URL templates ignore it, so a disabled expression on this widget parses, evaluates and changes nothing. The btn_class option in the same file belongs to the Button variant only.

Working examples

Share link with copy button

<field name="share_url"
       widget="CopyClipboardURL"
       readonly="1"/>

The standard pattern: readonly, so the value renders as a clickable link with the copy button beside it.

Relabeling the button

<field name="webhook_url"
       widget="CopyClipboardURL"
       string="Copy endpoint"/>

The string attribute doubles as the copy button's label; the success state still reads Copied.

Editable field with copy

<field name="stream_link" widget="CopyClipboardURL"/>

Not readonly: the value edits like a URL field, and the copy button copies whatever is currently stored on the record.

Raw values, secure contexts and the lost sibling

Three source-level details predict every quirk users report.

The clipboard gets the raw value. The template binds the copy content to record.data[name] directly. The URL display layer may prefix http:// to schemeless values for the link's href; that prefix never reaches the clipboard.

Copying needs a secure context. The button rides the browser Clipboard API, which browsers expose only on HTTPS or localhost. An Odoo served over plain http on the LAN renders the button, and clicking silently fails, an infrastructure problem that presents as a widget bug.

The trio diverged over versions. A fourth sibling, CopyClipboardText, existed through 17.0 and was removed in 18.0. The Char variant's icon changed from fa-clone to fa-clipboard in 19.0 while URL kept fa-link, and 19.0 added the Button variant's btn_class option. If you maintain views migrated from 17 or earlier, the Text name is gone and CamelCase remains mandatory throughout.

Version compatibility

VersionStatusNotes
Odoo 20.0Partial / changedNot released. Buttons restyle to inline links and the link icon becomes a shared symbol. See below.
Odoo 19.0VerifiedVerified against the shipped source; Char sibling's icon changed while URL kept fa-link.
Odoo 18.0VerifiedSame behavior; the CopyClipboardText sibling disappears in this version.
Odoo 17.0VerifiedWidget present, alongside the now-removed CopyClipboardText.
Odoo 16.0VerifiedWidget present with the same CamelCase registration.

Upgrade note. Views using CopyClipboardText break at 18.0; switch them to CopyClipboardChar. Everything else carries over: the URL variant's name, attributes and behavior are stable from 16.0 through 19.0.

What is changing in Odoo 20

Odoo 20 is expected at Odoo Experience in Brussels, 24 to 26 September 2026. The development branch is unstable until release, and we re-verify this page against the shipped version.

Two visible changes so far, both cosmetic but noticeable. The copy buttons restyle from small solid buttons to inline link-style buttons (btn-link btn-link-inline replaces btn-sm). And the icon system migration reaches this file: both the Char and URL variants' icons become the same assignment symbol, so the URL variant loses its distinctive link icon. Registrations, attributes and the copy behavior are unchanged, and the dead disabled knob is dead on master too.

Common problems and fixes

SymptomCause and fix
widget="copyclipboardurl" renders a plain fieldThe registry name is case-sensitive CamelCase. Write widget="CopyClipboardURL" exactly.
The copy button does nothing on an internal serverThe browser Clipboard API requires a secure context; plain http disables it. Serve Odoo over HTTPS (or test via localhost); the widget cannot work around this.
Pasted value lacks the http:// the link hadThe clipboard receives the raw stored value; the display prefix is cosmetic. Store fully qualified URLs, or accept the raw copy.
disabled expression on the field is ignoredOnly the CopyClipboardButton variant's template honors the disabled prop. Use CopyClipboardButton if conditional disabling of the copy action matters.
CopyClipboardText unknown after upgradingThat sibling widget was removed in 18.0. Switch those views to CopyClipboardChar.
Copy works but no confirmation appearsThe success state swaps the button briefly; custom CSS or very fast interactions can mask it. Check for CSS overrides on the button classes before suspecting the copy itself.

Copy URL field vs the alternatives

WidgetBest forKey difference
CopyClipboardURLURLs users both open and copyLink rendering plus a raw-value copy button
CopyClipboardCharTokens, references and other plain text to copyRenders as text, clipboard icon, same copy mechanics
CopyClipboardButtonCopying without displaying the valueButton only, honors the disabled attribute and a btn_class option
urlLinks that only need to be clickedClickable display without any copy affordance

The practical test: pick by what the user needs to do. Follow the link and occasionally copy it: this widget. Copy an opaque token: the Char variant. Copy without displaying, for secrets or very long values: the Button variant.

Frequently asked questions

How do I add a copy button to a URL field in Odoo?+
Set widget="CopyClipboardURL" on the char field holding the link, spelled exactly in CamelCase. The value renders as a clickable link when readonly, with a copy button that puts the stored value on the clipboard. In Studio, Text fields offer a Copy to Clipboard widget for the plain-text equivalent; the URL flavor is XML-only.
Why is the copy button not working on our Odoo?+
Almost always the missing secure context: browsers only expose the Clipboard API on HTTPS or localhost. Deployments on plain http render the button but the copy silently fails. Moving the instance behind HTTPS fixes it.
Does the button copy the displayed link or the stored value?+
The stored value, verbatim. The template binds the clipboard content to the record's raw field value, so any http:// prefix the display adds to schemeless values never reaches the clipboard. We verified this binding in the 19.0 template.
What is the difference between CopyClipboardChar, CopyClipboardURL and CopyClipboardButton?+
All three live in one core file and share the copy mechanics. Char renders the value as plain text, URL renders it as a clickable link, Button renders only a copy button with no visible value, and Button alone honors the disabled attribute and the btn_class option.
Can I disable the copy button conditionally?+
Not on this variant. The disabled attribute is parsed for all three widgets but only the Button variant's template uses it, so on CopyClipboardURL it does nothing. Use CopyClipboardButton where conditional disabling matters.
Is the widget name really case-sensitive?+
Yes. The registry stores CopyClipboardURL in CamelCase, unusual among Odoo widgets, and lookup is exact, so lowercase spellings fall back to the field's default widget without an error.
What changes for this widget in Odoo 20?+
The development branch restyles the copy buttons to inline link buttons and replaces the per-variant FontAwesome icons with a single shared symbol, so the URL variant loses its distinctive link icon. Behavior and names are unchanged. Not final until the September 2026 release.

Sharing links out of Odoo more than clicking them?

Portal URLs, kiosk links, webhook endpoints: the moments Odoo hands values to other systems deserve deliberate UX and clean data. We polish these integration touchpoints and build the automations behind them, from webhooks to portal flows.

Book a free consultation

How this page was produced

This page was verified by reading copy_clipboard_field.js and its templates in the Odoo 19.0 web module, including the shared extractProps and the per-variant templates that reveal the inert disabled attribute, then diffing the file across 16.0 through master to date the CopyClipboardText removal and the icon changes. The Odoo 20 section reads the unreleased development branch and is marked as such. Corrections welcome via our contact page.