Skip to content
Health
55/100
fair
  • Security25/25
    No findings
  • Activity20/25
    Last human commit 8 months ago
  • Required by5/25
    0 modules depend on it
  • Maturity5/25
    In 1 Odoo series since 16.0

Heuristic over the facts below, not an audit · How it's computed

Security findings
Grave / minor (static analysis)
Required by
0
Modules depending on it
External deps
0 pip · 0 bin
Python packages / system binaries
License
LGPL-3
No conflicts with its dependencies
Folder size
0.06 MB
Module directory on disk
Code analysis 0 migration notes 1 model 0 views 0 HTTP endpoints

Description

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

ArgumentTypeDescription
modelCharModel name, e.g. 'res.partner'
view_typesList of Char (optional)View types to reload, e.g. ["form", "kanban"]. Leave blank to reload all views.
rec_idsList 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.

Dependencies

Odoo dependencies
odoo/odoo:
- web
- bus
Python dependencies
None
System dependencies
None
Required by
None

Code analysis

Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.

Views touched 0

No views found for this module.

HTTP endpoints 0

No HTTP endpoints found for this module.

Models touched 1

New fields (0)

No new fields.

Public methods (1)
  • reload_views(self, model, view_types=None, rec_ids=None)
    Trigger UI reload for selected users and record IDs. This method allows to reload specific views from the backend. Be aware that when reloading form views, if a user is currently doing some updates, those updates may be lost. :param model: str, Model name (e.g., 'res.partner') :param view_types: list of str, optional, View types to reload (e.g., ['form', 'kanban']). Leave blank to reload all views. :param rec_ids: list of int, optional, View will be reloaded only if a record with id from the list is present in the view. Example usage: # 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] )