CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
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.
About This Community
Odoo Training Center
|Asked: 4/13/15, 11:06 AM|
|Seen: 594 times|
|Last updated: 4/13/15, 11:06 AM|