diff --git a/addons/cx_web_refresh_from_backend/readme/DESCRIPTION.md b/addons/cx_web_refresh_from_backend/readme/DESCRIPTION.md new file mode 100644 index 0000000..896a4d6 --- /dev/null +++ b/addons/cx_web_refresh_from_backend/readme/DESCRIPTION.md @@ -0,0 +1,27 @@ +# 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. + +--- + +## 🔧 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**.