Hi ,
I am new in Odoo . I have created a button and I need to know how to call a wizard from button click.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hi ,
I am new in Odoo . I have created a button and I need to know how to call a wizard from button click.
Hi,
Refer this link Open a wizard
How to set default value through context context="{'default_field_name': value}"
Thanks @Deerom Technologies
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.
Hi,
already many answers can see in forum.Anyway You can refer this link Open A wizard
https://supportuae.wordpress.com/2018/12/31/how-to-open-wizard-from-a-button-odoo/
Can you please suggest how to do it via Xml?
you can define a button with type action
<button name="%(action_view_account_move_reversal)d" states="posted" title="Reverse" icon="fa-refresh" type="action" groups="account.group_account_invoice"/>
I am getting error id not found .Can u help please?
did you configured the button correctly.if you given correctly it will work fine
in the name field give your window action id of the wizard
for ex:
<record id="action_view_account_move_reversal" model="ir.actions.act_window">
give this record <button name="%(action_view_account_move_reversal)d"
Oh that has worked.Thank you
Ok..if you have any queries please free to contact
I have one more doubt that is I need to get default value in wizard on this button click.Can you suggest a solution?
You can pass the value through context to any fields in the button itself
context="{'default_field value':value}"
Try this: https://learnopenerp.blogspot.com/2020/01/open-wizard-on-button-click-in-odoo.html
I have a model allocation.request and I want to pass this id to wizard in a field name subject .This is my button definition. <button string="Cancel" name="%(allocation_equipment.allocation_cancel_action)d" type="action" states="new,approve"/>
Add like this <button string="Cancel" name="%(allocation_equipment.allocation_cancel_action)d" type="action" states="new,approve" context="{'default_subject': 'active_id'}"/>
Thank u so much for your quick help.
as you are new to odoo, hope this will be helpful for you, see: https://www.youtube.com/watch?v=BDepk0LhVuI&list=PLqRRLx0cl0hoJhjFWkFYowveq2Zn55dhM