Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
3963 Представления

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
3656
3
апр. 17
3054
0
апр. 17
5544
2
мар. 19
3432
0
окт. 15
9876