Hi,
If in wizard1 I have defined a method, which returns wizard2, how can I pass values from wizard1 to wizard2?
For example:
from osv import osv, fields
class SelectUser(osv.TransientModel):
_name = 'select.user.wizard'
_columns = {
'user_id' = fields.many2one('res.users', 'User')
}
def call_another(self, cr, uid, ids, context=None):
selection = self.read(cr, uid, ids, [], context=context)
selection = selection[0]
user_id = selection['user_id'][0]
return {
'type': 'ir.actions.act_window',
'res_model': 'another.wizard',
'view_mode': 'form',
'view_type': 'form',
'views': [(False, 'form')],
'target': 'new',
}
class AnotherWizard(osv.TransientModel):
_name = 'another.wizard'
_columns = {
'user_id': fields.integer('User ID'),
'something': fields.char('Something about him', size=60'),
}
There in wizard 'select.user.wizard' method 'call_another' a user id is selected, and another wizard is called. How could I pass a user_id variable from one wizard to another?