Hello there,
So as the question states.
I am interested in Odoo's architecture and have been reading the docs. However I cannot fully grasp how the action manager works. How does it listen to the actions and respond?
For example. When a new module is created and the menu item is added. How does the action of clicking on the menuitem work. How does odoo know that the menuitem has been clicked and that it needs to respond with a certain view.
Where in the source code is the action manager coded?
Kind regards,
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Contabilità
- Magazzino
- PoS
- Project
- MRP
La domanda è stata contrassegnata
Hi Nomad,
Odoo's backend is a one-page application and everything starts with the JavaScript method.
In Odoo 16, when a user clicks on any menu, the "onClick" method of the "DropdownItem" component is called, which is located in "/web/static/src/core/dropdown/dropdown_item.js". After that, it redirects to Python controllers, and the "/web/action/load" route is the first one that gets called.
If you are wondering why it's called "onClick" method on menu click. it's because "onClick" method is mapped with the "DropdownItem" component's view, which is located in "/web/static/src/core/dropdown/dropdown_item.xml".
I am attaching a screenshot for your better understanding.
Let me know If that helps you.
Regards,
Kalkivi
Thank you very much Kalkivi, this is a very clear explanation about my question regarding menuitem eventhandler. Now about the action manager, how does it trigger actions such as: server action, client action, url actions, etc? Where in the source code is this defined?
Ti stai godendo la conversazione? Non leggere soltanto, partecipa anche tu!
Crea un account oggi per scoprire funzionalità esclusive ed entrare a far parte della nostra fantastica community!
RegistratiPost correlati | Risposte | Visualizzazioni | Attività | |
---|---|---|---|---|
Server actions in menuItem
Risolto
|
|
2
set 23
|
5831 | |
|
3
mar 22
|
9486 | ||
|
2
nov 22
|
3374 | ||
|
1
gen 21
|
4398 | ||
|
1
lug 16
|
5640 |