Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
3700 Переглядів

When calling a function without parametter the context is preserved and can be used

@api.multi
def button_print(self):
_logger.info('Context : %s: ', self.env.context)

Calling this function from a button we get a filled context dictionnary.

But calling the same function with a  defined parametter we get an empty context {}

@api.multi
def button_print(self, demo=False):
_logger.info('Context : %s: ', self.env.context)
Аватар
Відмінити
Найкраща відповідь

Hello, did you find a solution for this issue ?

Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
1
квіт. 25
3162
3
квіт. 17
2685
0
квіт. 17
5258
2
бер. 19
3106
0
жовт. 15
9543