website_redirect_button
The website redirect button turns the is_published flag into a header button that reads Published or Unpublished and jumps straight to the record's public page.
August 16, 2026Updated August 16, 20265 min read
| Technical name | website_redirect_button |
|---|---|
| Field types | boolean |
| Views | form |
| Module | website |
| Used in core | 11 occurrences across 10 modules, including website_slides, website_sale, website_partner, website_event_track, test_website, website_event |
| Versions | Odoo 20.0, Odoo 19.0, Odoo 18.0, Odoo 17.0, Odoo 16.0 |
| No-code setup | No. The widget depends on a server method, so it is set in XML by a developer. |
| Alternatives | boolean_toggle, url, Default boolean checkbox |
What the website redirect button does
What this means for your team
Working examples
A field that behaves like a smart button
Version compatibility
| Version | Status | Notes |
|---|---|---|
| Odoo 20.0 | In development | Not released. The development branch adds a Scheduled label driven by publish_on; details below. |
| Odoo 19.0 | Verified | Verified against the shipped source. |
| Odoo 18.0 | Verified | Byte-identical component apart from the removed module pragma. |
| Odoo 17.0 | Verified | Same two-label behavior and open_website_url delegation. |
| Odoo 16.0 | Verified | Same behavior; the widget has been stable across versions. |
Upgrade note. The component is byte-identical between Odoo 18 and 19 apart from the removed module pragma, so views migrate with no changes. Anything you customized on open_website_url server side carries the behavior, not the widget.
What is changing in Odoo 20
Common problems and fixes
| Symptom | Cause and fix |
|---|---|
| Clicking the button throws a missing method error | The model does not implement open_website_url, usually because it does not inherit website.published.mixin. Inherit website.published.mixin on the model, or implement open_website_url returning an act_url action. |
| The button renders as a plain checkbox | The widget attribute is missing or misspelled, so the default boolean widget is used. Set widget="website_redirect_button" on the field. The name is all lowercase with underscores. |
| Button says Unpublished but the page is live | The button reads is_published on the current record only. Multi-website setups publish per website. Check the record's website-specific publish state and which website you are previewing. |
| Clicking does not toggle publication | By design. The click opens the website page and never writes the field. Toggle publication from the frontend edit bar or expose the boolean separately in the backend. |
| The button looks unstyled in the middle of the form | The widget is designed for the form header button area. Place the field inside the header, as core views do, for correct button styling. |
Website redirect button vs the alternatives
| Widget | Best for | Key difference |
|---|---|---|
website_redirect_button | Jumping from a backend record to its public page while seeing the publish state | Read-only caption; the click navigates, it never toggles |
| boolean_toggle | Actually flipping a publish flag from list or form views | Writes the field immediately and navigates nowhere |
| url | Showing a stored URL as a clickable link | Renders a char field as a plain hyperlink with no state caption |
Default boolean checkbox | Simple on-off flags inside the form body | Editable checkbox with no navigation |
Frequently asked questions
What does the website_redirect_button widget do in Odoo?+
Does clicking the button publish or unpublish the record?+
Can I use website_redirect_button on my custom model?+
Does the widget have any options?+
What changes for this widget in Odoo 20?+
Publishing workflow not quite fitting?
Scheduled go-lives, per-website publication rules, approval steps before a page goes public: the built-in publish button is only the surface. We build website-enabled Odoo models and publishing workflows that match how your content team actually works.
Talk to an Odoo website expert