Odoo Help


Moving data trough Wizzards using the context

on 4/13/15, 11:06 AM 391 views

since I am trying to play a little with the context to pass data from wizzard to sub wizzard I came up with a few idea. The following description is related to the res.partner "Create new".

In the view i can define a context attribute like 'some_variable_name': some_variable_name.

This will crash and burn, if the context i am calling that wizzard from does not have some_variable_name.

Now the idea is to hook into the execution at some point (like default_get() ), read the current context, check in the current context has a key 'some_variable_name' and if not set some_variable_name in the current context to False. The tricky part seems to write to the current context from default_get(). Is this maybe, because the context is not created at that time? Is there maybe a better time to hook into?

This way I could pass 'some_variable_name': True from let's say leads and on the other hand all other modules opening the res.partner form will have  'some_variable_name' set to False, so it won't burn due to an undefined context variable.

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: 4/13/15, 11:06 AM
Seen: 391 times
Last updated: 4/13/15, 11:06 AM