Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

1

Wizard in wizard. Odoo8

By
Keywoker
on 3/9/15, 5:15 AM 346 views

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. 

3

Vasanth

--Vasanth--
3458
| 5 3 8
Pondicherry, India
--Vasanth--
Vasanth
On 3/9/15, 6:02 AM

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 )

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 3/9/15, 5:15 AM
Seen: 346 times
Last updated: 4/6/15, 6:08 AM