Skip to main content
iVentureTeam

notification_alert

The banner warning that push notifications are blocked is the notification_alert view widget: twelve lines of code, one browser API check, and exactly one state in which it renders anything at all.

Siddharth JambukiyaSiddharth JambukiyaOdoo Techno-Functional Consultant
August 26, 2026Updated August 26, 20265 min read
Technical namenotification_alert
Viewsform (view widget, element)
Moduleweb since 17.0 (16.0: mail), present in every Odoo database
Used in corePlaced on the base user Preferences form; repositioned onto the HR profile form by mail_bot_hr
VersionsOdoo 20.0, Odoo 19.0, Odoo 18.0, Odoo 17.0, Odoo 16.0
No-code setupNo. Placement is view XML; the banner itself is automatic once the widget is in the form
Alternativesactionable_errors, web_ribbon, documentation_link

What the notification alert widget does

Odoo's Discuss can push native browser notifications for new messages, but a browser permission the user once denied silently kills them. notification_alert exists for exactly that failure mode: a view widget that checks the browser's Notification permission and, when the answer is denied, renders a centered alert telling the user notifications are blocked and where to fix it.

That is the entire widget. No options, no attributes, no fields read: the render condition is a getter over browser.Notification and the message text lives in the template. In any other permission state, granted, never asked, or a browser without the API, it renders nothing and takes no space.

What this means for your team

Missed chat pings are a classic silent productivity leak: the user blocked notifications months ago, forgot, and now blames Odoo for messages they see hours late. A banner in the user's own preferences is the cheapest possible fix, no support ticket, no admin involvement, just a prompt at the one place users go when notification behavior puzzles them.

The placement history shows the intended pattern. Base puts it on the Preferences dialog; once HR's richer profile form takes over that screen, mail_bot_hr removes the original and pins the banner to the very top of the profile, first thing visible. If you build custom user-facing forms, the same two-line widget drop gives you the same early warning.

Working examples

Dropping the banner into any form

<widget name="notification_alert"/>

Nothing else is needed; the widget decides for itself whether to render.

How mail_bot_hr repositions it

<!-- remove it from the simplified preferences -->
<widget name="notification_alert" position="replace"/>

<!-- pin it above the profile sheet -->
<sheet position="before">
    <widget name="notification_alert"/>
</sheet>

A textbook example of moving a view widget between inherited views without touching its code.

Render-time, per-device, and deliberately quiet

The widget's simplicity hides two things worth knowing. First, the permission check goes through Odoo's browser wrapper rather than the global directly, which keeps it testable, and it evaluates at render time: if the user fixes the browser setting, the banner disappears the next time the form renders, no reload of the session required, but also not live while the form is open.

Second, the check is inherently local. Notification permission belongs to the browser profile on that device, so the banner can correctly show for a user at their desk and correctly stay hidden for the same user at home. Administrators sometimes read that as flakiness; it is the browser model working as designed. The widget also renders nothing when the Notification API is absent entirely, private modes and some embedded webviews, so it never false-alarms where push cannot work anyway.

Version compatibility

VersionStatusNotes
Odoo 20.0VerifiedNot released. New copy, alert-info styling and a help dialog button; see below.
Odoo 19.0VerifiedVerified against the shipped source.
Odoo 18.0VerifiedByte-identical to 19. No changes needed.
Odoo 17.0VerifiedFirst standalone version in web; behavior identical to 19.
Odoo 16.0Partial / changedSame widget name, but implemented as a mail messaging component container with different internals.

Upgrade note. From 16 to 17 the widget moved from mail's messaging component stack to a standalone file in web. Views kept working because the registered name never changed; only JavaScript patches against the 16 container class needed rewriting.

What is changing in Odoo 20

Odoo 20 is expected at Odoo Experience in Brussels, 24 to 26 September 2026. We read the widget's file on the public development branch at the time of writing; the branch is unstable and this page will be re-verified after release.

The component finally changes: the alert softens from alert-primary to alert-info, the copy is rewritten to explain the benefit of enabling notifications, and a small (?) button opens NotificationAlertDialog, a new core dialog added under web/static/src/core, presumably walking the user through re-enabling permission. The render condition itself, denied only, is unchanged.

Common problems and fixes

SymptomCause and fix
The banner never shows even though notifications do not arrivePermission is in the default never-asked state, which the widget deliberately ignores. Trigger the browser's permission prompt from Discuss, or grant it in browser settings.
Banner shows on one computer but not anotherNotification permission is per browser profile and device. Fix the setting on the machine showing the banner; the difference is expected.
Banner still visible after allowing notificationsThe check runs at render time, not live. Reopen or refresh the form; the getter re-evaluates on the next render.
Banner appears twice on a customized profile formA custom inherit re-added the widget without removing the mail_bot_hr placement. Keep one placement; replace the other with position="replace".
Nothing renders in an embedded webviewThe Notification API is absent, so the widget stays silent by design. No action; push notifications cannot work in that context anyway.

Notification alert widget vs the alternatives

WidgetBest forKey difference
notification_alertWarning a user that this browser has blocked Odoo's push notificationsRenders only on denied permission; no options, no fields, no server data
actionable_errorsRecord-driven warning banners with action buttonsFed by a JSON field from the server, not a browser API check
web_ribbonUnmissable record state like Archived or PaidA corner ribbon over the form, gated by field conditions
documentation_linkPointing users at help content from a formA static link element, always rendered where placed

This widget covers exactly one message. For arbitrary record-driven warnings, the JSON-driven alert widgets or a ribbon are the right tools; for chat availability itself, the presence widgets tell the story.

Frequently asked questions

When exactly does notification_alert appear?+
Only when the browser both supports the Notification API and reports permission === "denied". Granted permission, the never-asked state, and browsers without the API all render nothing.
Why do users who never enabled notifications see no banner?+
By design. The widget targets the silent failure case, someone actively blocked notifications and forgot, and leaves first-time prompting to Discuss itself.
Where does the banner live in a standard database?+
Base places it on the user Preferences form. With HR installed, mail_bot_hr removes that placement and pins the banner to the top of the employee profile form instead.
Can I change the banner text or styling?+
Only by inheriting the QWeb template web.NotificationAlert; the widget has no options. The copy and the alert class are hardcoded in the template.
Does it work in list or kanban views?+
It is registered as a view widget and core only places it in forms. Nothing in it reads records, so form placement above the sheet is the pattern to follow.
What changes in Odoo 20?+
The banner becomes friendlier: alert-info styling, rewritten copy, and a (?) button that opens a new core NotificationAlertDialog to help the user re-enable permission. The trigger condition is unchanged.

Do your users actually see what Odoo tells them?

Blocked notifications, missed activities and ignored banners add up to slow responses and stalled workflows. We audit and tune Odoo's notification stack, from browser push to email routing to custom in-app alerts, so the right people hear about the right things.

Fix your notification flow

How this page was produced

The render condition and template were read from notification_alert.js and notification_alert.xml in the Odoo 19.0 web module, the 16.0 mail-based predecessor was checked in the 16.0 tree, placements were verified in the base and mail_bot_hr view XML, and the Odoo 20 statement comes from the development branch diff. Spotted an error? Tell us and we will correct the page.