OdooWiki OCA HUB

Web Refresh From Backend

web_refresh_from_backend folder_open OCA/web open_in_new
Web License: LGPL-3

Backend UI Reload Module

This is a technical module that allows triggering a UI reload from the backend. It enables triggering the reload action for selected users and record IDs.

NB: this module refreshes views using direct actions instead of calling action_reload. This is done to avoid possible glitches and is aligned with the same approach used in the web_refreshed module.

---

🔧 Helper Function: reload_views

A special helper function reload_views is added to the res.users model.

Arguments

| Argument | Type | Description | |-----------|------|-------------| | model | Char | Model name, e.g. 'res.partner' | | view_types | List of Char (optional) | View types to reload, e.g. ["form", "kanban"]. Leave blank to reload all views. | | rec_ids | List of Integer (optional) | The view will be reloaded only if a record with an ID from this list is present in the view. |

---

⚠️ Important Notes

Use this function wisely.

When reloading form views, be aware that if a user is currently editing a record, their unsaved updates may be lost.

auto_awesome What this module does

AI-generated from the code · Odoo 16.0

This module lets you force open Odoo screens (forms, lists, kanban) to reload from the server for chosen users, so they immediately see the latest data without refreshing the browser.

This is a technical tool for administrators and developers. It adds a helper on users (res.users) called reload_views that sends a live notification to selected users' browsers. You choose the model (for example res.partner), optionally which screen types to reload (form, list/tree, kanban), and optionally specific record IDs. If record IDs are given, only screens showing one of those records reload.

When a notification arrives, the open form, list or kanban view reloads its data from the server. Business rules built in: - A form with unsaved changes asks the user to confirm before reloading, warning that unsaved changes will be lost. - A list with an edited row asks whether to save before refreshing. - Forms opened as dialogs or wizards are skipped to avoid stuck pop-ups. - A form is not reloaded within one second after the user saved it, to avoid disturbing their own work. - If reloading fails, a red error notification is shown.

There are no new menus or screens; the feature is triggered from code or server actions. It touches res.users and uses the live bus (bus.bus) to reach users' sessions.

Depends on

mail
Models and fields (1)
  • res.users · extends an existing model

Text generated by AI (DeepSeek) from reading the Odoo 16.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub

Availability by version

Reviewed: 2026-11-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 1 confirmed, 8 with no information of 9 versions.

terminal Installation and usage

OCA documentation · Odoo 16.0

🧩 Example Usage

Below is a code snippet showing how to use the reload_views helper function.

# Reload the kanban and form views for all salespeople when an opportunity is won
# Will reload views only if the current opportunity is being displayed

group_id = self.env.ref("sales_team.group_sale_salesman").id
users_to_reload = self.env["res.users"].search([("groups_id", "in", [group_id])])
users_to_reload.reload_views(
    model="crm.lead",
    view_types=["kanban", "form"],
    rec_ids=[self.id],
)

No verified information in OCA: Installation, Configuration.

info

Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.