Odoo Help


[SOLVED] How to pass current values to wizard in odoo?

on 11/17/16, 6:04 AM 262 views

I have some wizard opens when I click a button, this wizard insert some values in child model of the main model so I need to send some data from main model to the wizard
data includes current id

On 11/17/16, 6:56 AM


Use context for this


return {
    'type': 'ir.actions.act_window',
    'name': 'Name ',
    'view_mode': 'form',
    'target': 'new',
    'res_model': 'Your.Model',
'context': {'parent_obj': self.id}

Inside the function of wizard object

def your_function(self):
     print self._context['parent_obj']


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 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/17/16, 6:04 AM
Seen: 262 times
Last updated: 11/17/16, 10:59 PM