Skip to Content
Menu
This question has been flagged
1 Odpoveď
3981 Zobrazenia

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
Zrušiť
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
Zrušiť
Related Posts Replies Zobrazenia Aktivita
0
jan 24
1635
1
sep 23
2207
0
mar 23
2117
0
mar 24
1039
0
mar 24
958