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.
| Technical name | RecruitmentCopyClipboardChar |
|---|---|
| Field types | char |
| Views | list, form |
| Module | hr_recruitment, installed with Recruitment |
| Used in core | 2 occurrences across hr_recruitment and website_hr_recruitment, on recruitment source rows |
| Versions | Odoo 20.0, Odoo 19.0 |
| No-code setup | No. Set in XML; not offered in Studio's widget list. |
| Alternatives | CopyClipboardChar, CopyClipboardURL, CopyClipboardButton |
What the Generate-and-copy field does
What this means for your team
Supported options in Odoo 19
| Option | Type | What it does |
|---|---|---|
content_generation_function_name | string | Undocumented: 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_value | string | Undocumented: 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
What the generation callback actually does
Version compatibility
| Version | Status | Notes |
|---|---|---|
| Odoo 20.0 | In development | Not released. Only props and template syntax migrations visible on the development branch; see below. |
| Odoo 19.0 | Verified | Verified against the shipped source. First release with the widget. |
| Odoo 18.0 | Not available | Widget does not exist; sources used the plain CopyClipboardChar. |
| Odoo 17.0 | Not available | Widget does not exist. |
| Odoo 16.0 | Not available | Widget 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
Common problems and fixes
| Symptom | Cause and fix |
|---|---|
| Copy button grayed out | Generation 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 appears | The clipboard API requires a secure context. Serve Odoo over HTTPS; on plain HTTP every CopyClipboard widget fails silently. |
| Widget not found error in the console | The 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 address | displayed_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 copy | The 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
| Widget | Best for | Key difference |
|---|---|---|
RecruitmentCopyClipboardChar | Copying content a server method produces on demand | Runs an ORM call at click time and copies its result |
| CopyClipboardChar | Copying a stored text value | Shows the value and copies it as-is, no server call |
| CopyClipboardURL | Copying stored URLs | Renders a link but copies the raw stored value |
| CopyClipboardButton | Copying a fixed string from the view | Button-only, content comes from the XML, not the record |
Frequently asked questions
What is the RecruitmentCopyClipboardChar widget?+
How does Odoo create recruitment source aliases on demand?+
Why is the copy button disabled on a new row?+
Can I use RecruitmentCopyClipboardChar on my own model?+
Are displayed_value and content_generation_function_name documented?+
Does the widget work without any options?+
Is RecruitmentCopyClipboardChar available before Odoo 19, and does 20 change it?+
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