when i perform any action in odoo then in backened which addons file is used and which method and which view code is execute.
when i click on new button on project module then in backened which controller is worked , which method is execute.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
when i perform any action in odoo then in backened which addons file is used and which method and which view code is execute.
when i click on new button on project module then in backened which controller is worked , which method is execute.
Hello,
When you perform an action in Odoo, like clicking the New button in the Project module, Odoo triggers a flow involving the frontend (views) and backend (methods).
When you click the button, Odoo checks the view (form or list) that you're interacting with. In this case, the New button usually opens a form view to create a new project. You can use Developer Mode to inspect the view and understand which action is being triggered.
Once the button is clicked, Odoo calls a method in the backend. For example, the New button typically triggers the create method in the project.project model. This method is responsible for creating a new record and can be found in the models file at addons/project/models/project.py.
If you're working with frontend-related features, a controller might be involved. Controllers handle web-based actions and are located in the controllers/ folder. However, for basic backend actions like creating a project, controllers are usually not involved.
----------------------------------------------------------------------------------------------------
It’s understandable that the role of controllers in Odoo's MVC (Model-View-Controller) structure can be confusing, as Odoo doesn't always follow the traditional MVC pattern, especially when it comes to backend operations. Let me clarify this for you.
Let me know, if it helps :)
Hi, Thank you for the reply. I got some inputs. When I studied online about how MVC working in Odoo, I am getting different answers and little bit confused. Specifically about controllers. For example,
In the back end, I am creating projects, adding tasks and deleting one or two tasks. In this case also controllers not involved ? Please clarify. For example, The models folder is not included any code related controller according to Odoo MVC ? for Project App
Hello, please refer to my answer again. I have added an explanation of how the MVC structure works with reference to your question after the separator.
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
1
Oct 15
|
4204 | ||
|
1
Jun 25
|
511 | ||
|
0
May 25
|
639 | ||
|
2
Apr 25
|
2661 | ||
|
1
Feb 25
|
996 |