Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
3378 Prikazi

Hi I need to add menu item in print menu of sale order and while clicking that menu I need to open a wizard 

Avatar
Opusti
Best Answer

To open a wizard from the print menu item in Odoo 16, you can follow these steps:

First, create a new wizard that you want to open from the print menu. This can be done by creating a new Python class that inherits from the "TransientModel" class.
Define the necessary fields in the wizard and implement the required logic in the "do_print" method of the wizard.
Next, create a new menu item that will be added to the "Print" menu of the sale order. This can be done by creating a new action in the Odoo interface and setting the appropriate parameters.
In the "Action" definition of the menu item, set the "Type" parameter to "ir.actions.act_window" and set the "View Mode" parameter to "form".
Set the "Target" parameter to "new", which will open the wizard in a popup window.
Finally, specify the name of the wizard's action in the "Action" parameter of the menu item.

Once you have completed these steps, you should be able to see the new menu item in the "Print" menu of the sale order. When you click on the menu item, it will open the wizard in a popup window where you can perform the necessary actions.

You can create a menu item and use the code below https://www.cybrosys.com/blog/how-to-create-and-manage-wizard-in-the-odoo-16

Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
0
jan. 24
1041
1
sep. 23
1595
0
mar. 23
1496
0
mar. 24
641
0
mar. 24
583