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