PaymentWizardCopyClipboardButtonField
The Copy button on a payment link, with one addition: it waits for the record to finish updating before it copies. Without that, a fast click copies the previous link.
| Technical name | PaymentWizardCopyClipboardButtonField |
|---|---|
| Field types | char, text |
| Views | form |
| Module | payment, installed with any payment provider |
| Used in core | 1 occurrence, the payment link wizard in payment |
| Versions | Odoo 20.0, Odoo 19.0, Odoo 18.0, Odoo 17.0 |
| No-code setup | No. It is set in view XML and only matters where the value is recomputed asynchronously |
| Alternatives | CopyClipboardButton, CopyClipboardChar, CopyClipboardURL, url |
What the payment link copy button does
What this means for your team
Supported options in Odoo 19
| Option | Type | What it does |
|---|---|---|
string | string (attribute) | Inherited from the copy button field. The label shown on the button. In Odoo 18 this widget forwarded it explicitly; Odoo 19 leaves it to the parent. |
disabled_tooltip | string | Inherited from the copy button field. Text shown when copying is not available. |
The wait is not configurable. It is written into the button's click handler with no option to skip it, which is correct: a copy that does not wait is the bug the widget exists to fix. The full width styling is likewise hardcoded into the button's class name.
Working examples
Awaiting the model's own lock
Version compatibility
| Version | Status | Notes |
|---|---|---|
| Odoo 20.0 | In development | Not released. Byte-identical to Odoo 19 on the development branch. |
| Odoo 19.0 | Verified | Verified against the shipped source. An extractor forwarding the label was removed. |
| Odoo 18.0 | Verified | Same wait and same styling, plus an extractor passing the field label through. |
| Odoo 17.0 | Verified | First version. |
| Odoo 16.0 | Not available | Widget does not exist. |
Upgrade note. No view change is needed between Odoo 17 and Odoo 19. Odoo 19 removed an extractor that passed the field's label through, which affects only custom code that relied on that prop. The widget does not exist in Odoo 16.
What is changing in Odoo 20
Common problems and fixes
| Symptom | Cause and fix |
|---|---|
| The copied link is the previous one | The field is not using this widget, so the copy did not wait for the pending recomputation. Set widget="PaymentWizardCopyClipboardButtonField" on the field, spelled exactly. |
| Nothing happens when I click Copy | The click is waiting for a pending record operation to finish. Wait a moment. If it never resolves, check the browser console for a failed request. |
| Missing widget warning in the console | The name was written in snake case; widget lookup is an exact string match. Use the CamelCase spelling exactly as registered. |
| The button is not full width | A custom style is overriding the class the widget adds. Check for competing CSS on the wizard form. |
| The button label is empty | The field has no string attribute and no label to fall back on. Set the string attribute on the field. |
| Missing widget error | The payment module is not installed in that database. Install a payment provider module, or use the plain copy button. |
Payment link copy button vs the alternatives
| Widget | Best for | Key difference |
|---|---|---|
PaymentWizardCopyClipboardButtonField | Copying a value the server regenerates while the user is editing | Awaits the record model's pending operations before copying, so the clipboard never gets a stale value |
| CopyClipboardButton | Copying a stable stored value | Copies immediately, with no wait for pending updates |
| CopyClipboardChar | Showing the value with a copy affordance beside it | Renders the text as well as the copy control |
| CopyClipboardURL | Links that should also be clickable | Renders the value as a link |
| url | A plain clickable link | No copy control at all |
Frequently asked questions
What does this widget add to the copy button?+
Why does a payment link need that?+
Why is the widget name in CamelCase?+
Can I use it outside the payment wizard?+
Which versions have it?+
Getting paid should be the easy part
Payment providers, payment links and the reconciliation behind them touch your website, your invoices and your bank feed at once. We set up and test Odoo payments end to end on versions 16 through 19.
Book a free consultation