Skip to main content
iVentureTeam

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.

Siddharth JambukiyaSiddharth JambukiyaOdoo Techno-Functional Consultant
August 27, 2026Updated September 1, 20265 min read
Technical namePaymentWizardCopyClipboardButtonField
Field typeschar, text
Viewsform
Modulepayment, installed with any payment provider
Used in core1 occurrence, the payment link wizard in payment
VersionsOdoo 20.0, Odoo 19.0, Odoo 18.0, Odoo 17.0
No-code setupNo. It is set in view XML and only matters where the value is recomputed asynchronously
AlternativesCopyClipboardButton, CopyClipboardChar, CopyClipboardURL, url

What the payment link copy button does

Odoo's payment link wizard generates a URL a customer can pay through. The URL depends on the amount, the partner and a signature, so every time one of those changes the server regenerates it. That regeneration is a round trip, and while it is in flight the field still holds the old link.

The wizard's whole purpose is that you copy that link and send it, so copying the wrong one is not a cosmetic bug. A user who adjusts the amount and immediately clicks Copy would, with the standard copy button, put the previous link on the clipboard and never know.

This widget prevents that. It is the standard copy button with one change: before copying, it waits for the record model to finish whatever operation is pending. If nothing is pending it copies immediately; if a regeneration is in flight it waits for it, then copies the current value.

What this means for your team

The failure this prevents is expensive precisely because it is invisible. A customer receives a link for the wrong amount, or a link that no longer validates, and the first symptom is a failed payment and a support conversation. Nobody suspects the Copy button.

The pattern generalizes to any field whose value is generated server side and copied by the user: signed URLs, tokens, generated references, invitation links. Wherever the value can change under the user's hand, a copy button should wait for the model rather than reading whatever is on screen.

It is also a good reminder that asynchronous recomputation is invisible in the interface. There is no spinner on a field being recalculated, so the only defense is code that knows to wait.

Supported options in Odoo 19

The widget declares no options of its own. It spreads the copy button descriptor unchanged, so the options below are inherited. Read from payment_wizard_copy_clipboard_field.js and the copy clipboard field, Odoo 19.0.

OptionTypeWhat it does
stringstring (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_tooltipstringInherited 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

The core usage

<field name="link"
       widget="PaymentWizardCopyClipboardButtonField"/>

Note the CamelCase name, which is unusual in Odoo and has to be written exactly as shown.

Reusing it on a generated value

<field name="share_url"
       widget="PaymentWizardCopyClipboardButtonField"/>

Nothing in it is payment-specific. Any field recomputed by the server on change benefits from the wait.

The plain copy button

<field name="reference" widget="CopyClipboardButton"/>

Correct for a stored value that does not change while the user is looking at it.

Awaiting the model's own lock

There are two small classes. The first extends the shared copy button and overrides its click handler to await the model's operation lock before delegating to the parent. That lock is the same mechanism the record model uses to serialize its own operations, so awaiting it means waiting for exactly the pending work and no longer.

The second extends the copy clipboard field to use that button, and adds a full width class to whatever class name the parent computed. That is presentation only, and it is what makes the button span the wizard's column rather than sitting at its natural width.

The registered name is worth a note of its own. Odoo widget names are conventionally snake case; this one is CamelCase, matching the shared copy widgets it builds on, which are also registered in CamelCase. It has to be written exactly, because widget lookup is a plain string match, and a snake case guess will silently fall back to the field's type.

Between Odoo 18 and Odoo 19 the widget lost a small extractor that forwarded the field's label into the props. The button now takes its label from the parent's own handling, which is one less thing to keep in step.

Version compatibility

VersionStatusNotes
Odoo 20.0In developmentNot released. Byte-identical to Odoo 19 on the development branch.
Odoo 19.0VerifiedVerified against the shipped source. An extractor forwarding the label was removed.
Odoo 18.0VerifiedSame wait and same styling, plus an extractor passing the field label through.
Odoo 17.0VerifiedFirst version.
Odoo 16.0Not availableWidget 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

Odoo 20 is expected at Odoo Experience in Brussels, 24 to 26 September 2026. The development branch is unstable and this may still change; we re-verify the page after release.

Byte-identical. The file on the development branch matches Odoo 19 exactly, including the wait on the model lock and the full width class. Nothing about this widget changes in Odoo 20.

Common problems and fixes

SymptomCause and fix
The copied link is the previous oneThe 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 CopyThe 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 consoleThe 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 widthA custom style is overriding the class the widget adds. Check for competing CSS on the wizard form.
The button label is emptyThe field has no string attribute and no label to fall back on. Set the string attribute on the field.
Missing widget errorThe 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

WidgetBest forKey difference
PaymentWizardCopyClipboardButtonFieldCopying a value the server regenerates while the user is editingAwaits the record model's pending operations before copying, so the clipboard never gets a stale value
CopyClipboardButtonCopying a stable stored valueCopies immediately, with no wait for pending updates
CopyClipboardCharShowing the value with a copy affordance beside itRenders the text as well as the copy control
CopyClipboardURLLinks that should also be clickableRenders the value as a link
urlA plain clickable linkNo copy control at all

Use the plain copy button for values that are already stored and stable. Use this one wherever the value is regenerated by the server as the user edits other fields. And if what you want is a clickable link rather than a copy action, the URL copy variant renders the value as a link with its own copy affordance.

Frequently asked questions

What does this widget add to the copy button?+
A wait. Before copying it awaits the record model's operation lock, so any pending server-side recomputation of the value finishes first. It also stretches the button to full width.
Why does a payment link need that?+
Because the link is regenerated whenever the amount or partner changes, asynchronously. Clicking Copy straight after a change would otherwise put the previous link on the clipboard.
Why is the widget name in CamelCase?+
It follows the shared copy widgets it extends, which are also registered in CamelCase. Widget lookup is an exact string match, so a snake case spelling silently falls back to the field's type.
Can I use it outside the payment wizard?+
Yes, as long as the payment module is installed. Nothing in it is payment-specific, and any server-regenerated value benefits from the same wait.
Which versions have it?+
Odoo 17 onwards. Odoo 19 dropped a small extractor that forwarded the field label, and the file is byte-identical on the Odoo 20 development branch.

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

How this page was produced

The awaited model lock, the full width class and the CamelCase registration were read from payment_wizard_copy_clipboard_field.js on the Odoo 19.0 branch, with the inherited behavior read from the copy clipboard field and the shared copy button in web. The usage comes from payment/wizards/payment_link_wizard_views.xml. Version differences come from the same file on the 17.0 and 18.0 branches, and the Odoo 20 statement from a byte comparison against the public development branch. Spotted an error? Tell us and we will correct the page.