Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
137 Weergaven

I am using Odoo 18 (note: Odoo 18 has a different JavaScript structure compared to older versions).

I want to achieve the following:

  1. Create a simple controller that renders a template showing employee data.
  2. The template should contain a simple table displaying about 4 employees.
  3. On the backend (Python side), when I create or update data in the hr.employee model…
  4. The webpage (template from step 2) should display a simple notification without refreshing the page, for example: “Your employee records are updated”.
Avatar
Annuleer
Beste antwoord

Hi,


You want to create a webpage in Odoo 18 that displays a table of employee data and shows a notification whenever employee records are created or updated. The recommended approach is to create a custom module that adds a controller to render the employee table template, extends the hr.employee model to send a notification using bus.bus whenever records are created or updated, and includes JavaScript on the frontend to listen for these notifications and display them dynamically without refreshing the page. This setup leverages Odoo’s real-time messaging system to notify users of changes while keeping the module modular and upgrade-safe.


* https://www.cybrosys.com/blog/how-to-create-and-configure-web-controllers-in-odoo-18

* https://www.cybrosys.com/blog/key-elements-of-controller-request-and-response-in-odoo-18


Hope it helps

Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
2
okt. 25
2235
0
nov. 24
3038
1
nov. 24
3303
1
nov. 24
2977
2
jun. 25
4884