Skip to main content
iVentureTeam

RecruitmentCopyClipboardChar

New in Odoo 19, RecruitmentCopyClipboardChar is a copy-to-clipboard field with a twist: instead of copying what is stored, it can call a server method at click time and copy whatever that returns, which is how recruitment source aliases are created on demand.

Siddharth JambukiyaSiddharth JambukiyaOdoo Techno-Functional Consultant
August 25, 2026Updated August 25, 20265 min read
Technical nameRecruitmentCopyClipboardChar
Field typeschar
Viewslist, form
Modulehr_recruitment, installed with Recruitment
Used in core2 occurrences across hr_recruitment and website_hr_recruitment, on recruitment source rows
VersionsOdoo 20.0, Odoo 19.0
No-code setupNo. Set in XML; not offered in Studio's widget list.
AlternativesCopyClipboardChar, CopyClipboardURL, CopyClipboardButton

What the Generate-and-copy field does

The standard copy-clipboard widgets copy whatever the field already holds. This recruitment variant generalizes the idea: its button component, GenerateContentAndCopyButton, accepts an optional content generation function, and when one is configured the click first calls that method on the server, then copies the returned string. The widget wires that up from an option naming a model method, called with the record's id.

Its second trick is display. When displayed_value is set, the template shows that static text instead of the field's value, so a list can render a tidy Email label per row while the actual address, possibly not even existing yet, stays behind the button. Without either option the widget degrades gracefully into the ordinary copy-char behavior.

What this means for your team

The core use case explains the design. Recruitment sources, LinkedIn, a job board, a campaign, can each have their own inbound email alias so applications are tracked per source. Creating every alias up front would litter the mail system with unused addresses, so Odoo creates them lazily: the alias comes into existence the first time a recruiter clicks copy, via create_and_get_alias, and the clipboard receives a ready-to-paste address either way.

The pattern, generate on demand, copy immediately, show a stable label, fits any share-a-link workflow: signed portal URLs, tracking links, API keys. If your team builds one of those, this widget is the reference implementation to copy rather than a new invention.

Supported options in Odoo 19

Verified against recruitment_copy_clipboard_char_field.js on the 19.0 branch. The descriptor spreads copyClipboardCharField and narrows the supported types to char only. Neither of its two options is declared in any metadata; both live only in extractProps.

OptionTypeWhat it does
content_generation_function_namestringUndocumented: names a method on the record's model, called with the record id at click time; the returned string is what lands in the clipboard. Enables the disabled-until-saved guard. Core passes create_and_get_alias.(since Odoo 19.0)
displayed_valuestringUndocumented: static text rendered in place of the field's value, useful when the copyable content is generated or too long for the column. Core displays the word Email.(since Odoo 19.0)

Generation mode changes the button's enablement. With content_generation_function_name set, the template passes disabled="props.record.isNew", so the copy button is grayed out until the record is saved, the server method needs a real id. Without the option, the button binds directly to the stored value and has no such guard.

Working examples

The core pattern: lazy alias on recruitment sources

<field name="email"
       widget="RecruitmentCopyClipboardChar"
       invisible="not has_domain"
       options="{'content_generation_function_name': 'create_and_get_alias', 'displayed_value': 'Email'}"/>

Each row shows Email plus a copy icon; the click creates the alias if needed and copies the address. The column hides entirely when no alias domain is configured.

Plain mode: copy what is stored

<field name="tracking_url" widget="RecruitmentCopyClipboardChar"/>

Without options this is nearly the base widget, with one visible difference: no value text is rendered, only the button, since the template's span shows displayed_value and that is empty.

What the generation callback actually does

The generation callback is three lines that matter: it calls orm.call(resModel, functionName, [resId]) and hands the result to the base CopyButton, which writes it to the clipboard and shows the success tooltip. Two consequences follow. First, the method name is evaluated on the record's own model, so the widget is portable to any model that implements a matching method returning a string. Second, the browser clipboard API requires a secure context, so like every CopyClipboard widget it needs HTTPS or localhost, the returned content never appears on screen otherwise.

One more subtlety: the template renders displayed_value unconditionally, not the field's value. In generation mode that is the point, the stored field may be empty until the first click. In plain mode it means this widget shows only a button, which distinguishes it from base CopyClipboardChar, whose readonly template prints the value and renders nothing at all when the field is empty.

Version compatibility

VersionStatusNotes
Odoo 20.0In developmentNot released. Only props and template syntax migrations visible on the development branch; see below.
Odoo 19.0VerifiedVerified against the shipped source. First release with the widget.
Odoo 18.0Not availableWidget does not exist; sources used the plain CopyClipboardChar.
Odoo 17.0Not availableWidget does not exist.
Odoo 16.0Not availableWidget does not exist.

Upgrade note. New in 19.0; recruitment sources on earlier versions computed their alias eagerly and used the plain CopyClipboardChar. Nothing migrates except expectations: on 19 the alias does not exist until someone copies it.

What is changing in Odoo 20

Odoo 20 is expected at Odoo Experience in Brussels, 24 to 26 September 2026, and the development branch is unstable until feature freeze; this section is provisional and re-verified after release.

The changes visible for this widget are purely mechanical: props migrate to the new Owl typing API on a shared copyClipboardFieldProps object, and the template updates its expressions to the new explicit this. style with t-esc becoming t-out. Options, behavior, the CamelCase name, and both core usages are unchanged at the time of writing.

Common problems and fixes

SymptomCause and fix
Copy button grayed outGeneration mode disables the button on unsaved records, since the server method needs an id. Save the record first; the button enables immediately after.
Nothing copies and no tooltip appearsThe clipboard API requires a secure context. Serve Odoo over HTTPS; on plain HTTP every CopyClipboard widget fails silently.
Widget not found error in the consoleThe registered name is case-sensitive CamelCase and ships with hr_recruitment. Spell RecruitmentCopyClipboardChar exactly and confirm Recruitment is installed.
Column shows Email instead of the addressdisplayed_value is doing its job; the address is what gets copied, not shown. Remove displayed_value if the value itself should be visible.
Server error on copyThe named generation method raised, for example no alias domain is configured. Check the method server-side; the widget surfaces whatever it throws.

Generate-and-copy field vs the alternatives

WidgetBest forKey difference
RecruitmentCopyClipboardCharCopying content a server method produces on demandRuns an ORM call at click time and copies its result
CopyClipboardCharCopying a stored text valueShows the value and copies it as-is, no server call
CopyClipboardURLCopying stored URLsRenders a link but copies the raw stored value
CopyClipboardButtonCopying a fixed string from the viewButton-only, content comes from the XML, not the record

The cousins differ on what gets copied and what gets shown: raw value with the Char and URL variants, a fixed string with the Button variant, server-generated content only here. Pick by that axis and the choice makes itself.

Frequently asked questions

What is the RecruitmentCopyClipboardChar widget?+
An Odoo 19 recruitment widget extending the standard copy-to-clipboard char field. Its button can call a server method first, via content_generation_function_name, and copy the returned string, and it can show a static label instead of the value via displayed_value.
How does Odoo create recruitment source aliases on demand?+
The sources list puts this widget on the email column with create_and_get_alias as the generation method. The first copy click calls that method, which creates the mail alias and returns the address, so aliases only exist for sources someone actually shared.
Why is the copy button disabled on a new row?+
In generation mode the widget passes the record's unsaved state to the button as its disabled condition, because the server method is called with the record's id. Saving the row enables the button.
Can I use RecruitmentCopyClipboardChar on my own model?+
Yes. The generation method is resolved on the record's own model, so any model implementing a method that returns a string works, on any char field. The widget ships with hr_recruitment, so that module must be installed, or copy the component out.
Are displayed_value and content_generation_function_name documented?+
No. Both are read in extractProps without appearing in any supportedOptions metadata, so no properties panel lists them. This page documents them from the source.
Does the widget work without any options?+
It falls back to copying the stored field value, like its base widget, with one visible difference: the value itself is not rendered, because the template's text slot shows only displayed_value. For a value-plus-button display, use plain CopyClipboardChar.
Is RecruitmentCopyClipboardChar available before Odoo 19, and does 20 change it?+
It is new in 19.0. The development branch shows only internal props and template syntax migrations, with options and behavior unchanged, provisional until the September 2026 release, which this page will be re-verified against.

Recruiting workflows worth copying

Per-source aliases, lazy generation, and one-click sharing are the kind of glue that makes an ATS pleasant. We tailor Odoo Recruitment, sources, stages, portals, and the custom widgets between them, for hiring teams on Odoo 16 through 19.

Book a free consultation

How this page was produced

This page was verified by reading recruitment_copy_clipboard_char_field.js, its template, and the GenerateContentAndCopyButton component on the Odoo 19.0 branch, confirming absence from 16.0 through 18.0, diffing the development branch, and checking the core usages in the recruitment source views. The screenshot was captured on a clean Odoo 19 database. Corrections are welcome via our contact page.