In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article shows you what the principle of Action in ODOO is. It is concise and easy to understand. It will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.
Principle: what is Action?
First,
Let's take a look. There are only a few known ways for clients to pass parameters to the server:
1. URL URL followed by parameters
2. Post request to pass parameters
3. Pass parameters in Header (for example, Cookie)
When the ODOO architecture is designed, it chooses the simplest and visible way to pass parameters, that is, to pass parameters directly in URL.
When we visit a URL, we follow the URL directly, keeping up with the parameters that ODOO can recognize, such as Action, Model, View_Type, Menu_id. Then, the ODOO system automatically parses according to the URL you visit, renders according to the parameters, and finally returns the appropriate view.
Actions
Actions can be stored in the database. It can also be returned directly as a dictionaries (such as the function that the button runs so that the front-end JavaScript knows what to do next).
All actions have two required properties:
The type category, which determines which fields will be used to parse this action.
Name description, which can be displayed on the client interface.
The client will receive four forms of action
False
If the current action dialog interface is open, close it.
A string
If it matches the tag of a client action, the action is parsed, otherwise it is processed digitally.
A number
As an id to get an action record from a database, the id may be a data record id or an external id.
A dictionary
Describe, parse and execute it as a client-side action.
In JavaScript:
Var AbstractAction = require ('web.AbstractAction')
Var ClientAction = AbstractAction.extend ({
...
})
Core.action_registry.add ('my-custom-action', ClientAction)
In xml:
Name
My-custom-action
The above is what is the principle of Action in ODOO. Have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.