Could anybody tell if it's possible to open wizard inside another wizard?
I tried to do that but when I'm trying to open the second wizard I'm getting warning message, 'cause the first wizard is tring to submit the form information.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Could anybody tell if it's possible to open wizard inside another wizard?
I tried to do that but when I'm trying to open the second wizard I'm getting warning message, 'cause the first wizard is tring to submit the form information.
Hi, you can write your code to open another wizard from a wizard like this:
In xml:
<record id="product_wizard" model="ir.ui.view">
<field name="name">first.wizard.form</field>
<field name="type">form</field>
<field name="model">sample.wizard</field>
<field name="arch" type="xml">
<form string="---------" version="7.0">
------------------------
-------------------------
<button name="second_wizard" colspan="1" string="Go to Second Wizard" type="object" context="{'default_id':active_id,---------}"/>
</form>
</field>
</record>
<record model="ir.actions.act_window" id="action_add_package_product_form">
<field name="name">First Wizard</field>
<field name="res_model">sample.wizard</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="view_id" ref="product_wizard" />
<field name="context">{........}</field>
<field name="target">new</field>
</record>
In py file:
def second_wizard(self, cr, uid, ids, context):
--------------------
--------------
return {
'name': "Second Wizard " ,
'view_type': 'form',
'view_mode': 'form',
'view_id': False,
'res_model': 'second.wizard',
'src_model': 'first.wizard',
'type': 'ir.actions.act_window',
'context': context,
'target': 'new',
}
( Note : Like the first.wizard, you should create the second.wizard in both py and xml )
Create an account today to enjoy exclusive features and engage with our awesome community!
Înscrie-te