Odoo Help


Multi step wizard with data from many2many relation?

on 11/4/13, 7:03 AM 2,195 views


Provide a GUI so that partner (table res_partner) can be registered to events (table res_event) via the many2many join table registration (table event_registration).

  1. user selects a single event from a list of events
  2. user selects one or more partners from a list of partner
  3. confirmation of registration triggers inserts into join table

Proposed Solution

Multi step wizard wizard where the first wizard page/step handles step 1 from above (event selection) and the second page/step handles step 2 (partner(s) selection). The confirmation may be included in page 2 or as separate page 3 of the wizard.


Is a wizard the right approach for this task?

How can I get the correct data on each page of the wizard. The partner list on the second page depends on the event selection of the first page as only partners that aren't already registered for this event should be displayed.

I was thinking about using a osv_memory wizard but find it difficult to imagine how and when to initialize the events and partners to be displayed for selection.

class wizard_with_step(osv.osv_memory):
    _name = 'wizard.with.step'
    _columns = { 
          'events_list': ???,
          'partners_list': ???,
          'event_selected': ???,
          'partners_selected': ???,
          'state': fields.selection([('step1', 'Event Selection'), ('step2', 'Parnter Selection'), ('step3', 'Confirmation')])  
    _defaults = {
        'state': 'step1',

    def action_next(self, cr, uid, ids, context=None):

    def action_previous(self, cr, uid, ids, context=None):

Would this be a reasonable approach for the task described? If so how should the event and partner data be initialized and where should the intermediate results (the selected event and partners) be stored?

Did you have a look there : https://www.odoo.com/forum/Help-1/question/How-to-create-a-wizard-with-steps--19828 ?

Mind & Go, Mind And Go
on 6/9/14, 2:28 AM

About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 11/4/13, 7:03 AM
Seen: 2195 times
Last updated: 3/16/15, 8:10 AM