Context passing between methods.

Asked by Vivek poddar

Hi,

I was just wondering if there is any way to pass context between two methods methods. It will be helpful in the situations where I want to change the behaviour of my function based on some parameters. OR is there any concept of setting global context which can be shared between methods. Here I am not talking about the context which I set from the view as that is a different logic. Pls, help me if this feature exists.

Thanks and Regards!
Vivek Poddar

Question information

Language:
English Edit question
Status:
Solved
For:
Odoo Server (MOVED TO GITHUB) Edit question
Assignee:
No assignee Edit question
Solved by:
Numérigraphe
Solved:
Last query:
Last reply:
Revision history for this message
Best Numérigraphe (numerigraphe) said :
#1

If I understand correctly, this is planned in the new API in v7.0.
It doesn't exist for the moment however: you have to pass the context as
a parameter of every method you call.
Lionel Sausin

Revision history for this message
Vivek poddar (vivekimsit) said :
#2

Thanks Numérigraphe, that solved my question.