Skip to Content
Menú
This question has been flagged
1 Respondre
3974 Vistes

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
Descartar
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
Descartar
Related Posts Respostes Vistes Activitat
0
de gen. 24
1631
1
de set. 23
2202
0
de març 23
2106
0
de març 24
1037
0
de març 24
953