page_url
The address bar for a website page. It hides the leading slash while you type, puts it back when saving, and nudges the server to show you what a rename would break before you commit.
| Technical name | page_url |
|---|---|
| Field types | char |
| Views | form |
| Module | website, the Website builder |
| Used in core | 1 occurrence, the page list and form in website |
| Versions | Odoo 20.0, Odoo 19.0, Odoo 18.0, Odoo 17.0, Odoo 16.0 |
| No-code setup | No. It depends on website-specific dependency and redirect handling |
| Alternatives | url, char, website_publish_button, image_radio |
What the page URL field does
What this means for your team
Supported options in Odoo 19
| Option | Type | What it does |
|---|---|---|
website_path | boolean | Inherited from the link field, but defaulted to true by this widget. Renders the address as a site-relative path with the site prefix beside it rather than as a full external link.(default: true here) |
placeholder | string (attribute) | Inherited from the link field. Hint text shown while the field is empty. |
The website path behavior is on by default here. The link field can render either a full external link or a site-relative path, and this widget defaults to the path form, which is what makes the site prefix appear beside the input rather than being typed.
Working examples
A getter that writes, and a synthetic change event
Version compatibility
| Version | Status | Notes |
|---|---|---|
| Odoo 20.0 | Partial / changed | Not released. Adds a translation button; the slash handling and typing nudge are unchanged. |
| Odoo 19.0 | Verified | Verified against the shipped source. |
| Odoo 18.0 | Verified | Same behavior. |
| Odoo 17.0 | Verified | Same behavior with older component conventions. |
| Odoo 16.0 | Verified | Same behavior with older component conventions. |
Upgrade note. The widget has been present with this shape since Odoo 16 and needs no view change. What has moved around it is the surrounding page management, so a customization of the dependency panel is more likely to need attention than the field itself.
What is changing in Odoo 20
Common problems and fixes
| Symptom | Cause and fix |
|---|---|
| The dependency panel does not update while typing | The synthetic change event only fires when the changed state flips, and it is debounced. Pause briefly after typing; the recompute follows shortly. |
| The saved address has a double slash | A leading slash was typed as well as the one the widget adds. Type the path without a leading slash; the widget supplies it. |
| The field will not accept an empty value | The underlying field is required, which is exactly why the widget re-adds a slash. Expected. A page needs an address. |
| No redirect is offered on rename | The server decides that from the recomputed state, which needs the change event to have fired. Wait for the panel to update before saving. |
| The site prefix is missing | The website path behavior was turned off in an inherited view. Leave the inherited option at its default for this widget. |
| Missing widget error | The website module is not installed in that database. Install Website, or use the plain link field. |
Page URL field vs the alternatives
| Widget | Best for | Key difference |
|---|---|---|
page_url | Editing a website page address with its consequences visible | Hides and restores the leading slash, and nudges the server to recompute dependencies while you type |
| url | Any link, including site-relative paths | No dependency panel and no typing nudge |
char | A plain text value | No link rendering at all |
| website_publish_button | Publishing state on a website record | A toggle rather than an address |
image_radio | Choosing a page layout visually | A picture picker, unrelated to addresses |
Frequently asked questions
Why does the field not show a leading slash?+
Why do dependencies appear while I type?+
Is writing to the record from a getter normal?+
Does it support the link field's options?+
What changes in Odoo 20?+
Renaming pages without losing the traffic
URLs, redirects and internal links are the part of a website migration that decides whether your rankings survive it. We plan and execute Odoo website structure changes, on versions 16 through 19.
Book a free consultation