url
The url widget turns a char field into a link that opens in a new tab, quietly prefixes http:// when the scheme is missing, and hides one of Odoo's least known tricks: a text attribute that replaces the visible URL with friendly link text.
| Studio name | URL |
|---|---|
| Technical name | url |
| Field types | char |
| Views | form (form.url variant), list, kanban |
| Form variant | form.url, which keeps the input and adds the globe icon link |
| Module | web, present in every Odoo database |
| Used in core | 18 occurrences across 12 modules, including website_slides, mail, crm, website, product, account |
| Versions | Odoo 20.0, Odoo 19.0, Odoo 18.0 |
| No-code setup | Yes, via Odoo Studio (Enterprise) |
| Alternatives | email, phone, CopyClipboardChar |
What the URL widget does
What this means for your team
Setting it up in Odoo Studio (no code)
What Studio cannot do here
Supported options in Odoo 19
| Option | Type | What it does |
|---|---|---|
website_path | boolean | Uses the value exactly as stored in the href, disabling the automatic http:// prefixing. Meant for app-internal paths and other values that must not be rewritten.(default: false) |
placeholder_field | field name | Reads the input's placeholder text from another char field on the record instead of a static placeholder attribute.(since Odoo 19.0) |
text | string (attribute) | Element attribute, not an option: replaces the displayed URL with fixed link text while the href keeps following the field value. Set it directly on the field element. |
The prefix rule can surprise you. Values already carrying http, https, ftp or ftps schemes, and values starting with /, are linked unchanged; everything else gets http:// in front. A value like www.example.com:8080 therefore links fine, but example dot com becomes a dead link. The widget never validates.
Working examples
The regex that decides your link
Version compatibility
| Version | Status | Notes |
|---|---|---|
| Odoo 20.0 | In development | Not released. No changes on the development branch beyond the framework port; see below. |
| Odoo 19.0 | Verified | Verified against the shipped source, including the extractProps text attribute. |
| Odoo 18.0 | Verified | Identical except placeholder_field, which arrived in 19.0. Verified against the 18.0 source. |
Upgrading from Odoo 18? One addition: placeholder_field did not exist in 18.0. The prefix regex, website_path, the text attribute and both registrations are identical between 18.0 and 19.0.
What is changing in Odoo 20
Common problems and fixes
| Symptom | Cause and fix |
|---|---|
| Link opens http://https//example.com or similar garbage | The stored value contains a malformed scheme (https:/ with one slash, or a scheme the regex does not know), so the prefix was added on top. Fix the stored value to a proper https:// URL; the widget never repairs values. |
| Link text shows but clicking goes nowhere useful | The value is not a URL at all; the widget linkified free text. Add validation on the model if the field must always contain working links. |
| Custom label ignored | text was put inside options instead of on the element. It is an attribute: <field ... widget="url" text="My label"/>. |
| Internal path opens with http:// prefixed | The value lacks the leading slash, so the regex did not recognize it as a path. Store paths with a leading slash or set options="{'website_path': True}". |
| Clicking a list cell opens the record instead of the link | The field is rendered without the widget, as plain char. Set widget="url"; its anchor stops the row click from firing. |
URL widget vs the alternatives
| Widget | Best for | Key difference |
|---|---|---|
url | Web links stored on records | New-tab anchor with scheme prefixing, path mode and a hidden custom-text attribute |
| Email addresses | mailto link plus envelope action on forms | |
| phone | Phone numbers | tel link with whitespace-stripped href and SMS action |
CopyClipboardChar | Values users copy rather than open | Adds a copy button, no linking |
Frequently asked questions
How do I make a field a clickable link in Odoo?+
How do I show custom text instead of the URL?+
Why do my links start with http:// and not https://?+
Can the link open in the same tab?+
Does Odoo validate that the value is a real URL?+
What is website_path for?+
Building a portal your customers actually use?
Link fields are the small end of web-connected Odoo. The big end is customer portals, document downloads, tracking pages and website integrations that pull live data from your database. We design and build those on Odoo's website framework and Next.js frontends alike.
Book a free consultation