Wizards are very useful for creating a good user experience. In all businesses, interactive sessions are most beneficial. To improve the user experience, wizards in Odoo provide an interactive session.
For creating wizards, we can use transient models or abstract models. This gives features of a mo...
Wizards are very useful for creating a good user experience. In all businesses, interactive sessions are most beneficial. To improve the user experience, wizards in Odoo provide an interactive session.
For creating wizards, we can use transient models or abstract models. This gives features of a model class except the data storing. Transient and abstract models have permanent database persistence. For them, database tables are made, and the records in such tables are kept until they are specifically erased.
Size: 873.1 KB
Language: en
Added: May 07, 2024
Slides: 15 pages
Slide Content
Wizards - Defining and Launching in Odoo 17 Enterprise
Introduction Enterprise Wizards are very useful for creating a good user experience. In all businesses, interactive sessions are most beneficial. To improve the user experience, wizards in Odoo provide an interactive session. For creating wizards, we can use transient models or abstract models. This gives features of a model class except the data storing. Transient and abstract models have permanent database persistence. For them, database tables are made, and the records in such tables are kept until they are specifically erased.
Steps Enterprise First of all we have to create a transient model class for creating the wizard. And also, create a directory named wizard on your module. Also, don't forget to include the model in the security file and provide the necessary rights.
Enterprise
Steps Enterprise Next, we must create a view for that wizard to open. Wizards should always be opened as ir.actions—act_window data. A menu item or button action defined in Python or XML code can initiate the wizard action. We can make a button action to open a wizard. We may use the code in the next slide to do so .
Enterprise
Steps Enterprise This XML code extends the res.partner form view in Odoo by adding a button for sending messages. The button is inserted into the existing button_box section of the form view. name= name of the function. type="object": Indicates that the button triggers an Odoo object action.
Enterprise
Steps Enterprise After that, we can add a function to the button by inheriting the res.partner model and adding the function as shown in the following slide .
Enterprise
Enterprise Here , are the definition of the various parameters of the action as shown in the xml view of the previous slide:- type: Specifies the type of action, which is opening a window. name: Sets the name (title) of the window. res_model: Specifies the model associated with the window. target: Indicates that the window should be opened in a new tab or window. view_mode: Specifies the view mode for the window. view_type: Specifies the type of view. context: Passes a context to the new window.
Steps Enterprise Next, we need to create a view to display the wizard. We can create a new view for the wizard as shown in the following slide.
Enterprise
Enterprise Here is the final result of the wizard view
For More Info. Check our company website for related blogs and Odoo book. Check our YouTube channel for functional and technical videos in Odoo. Enterprise www.cybrosys.com