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

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
3140
3
апр. 17
2653
0
апр. 17
5222
2
мар. 19
3079
0
окт. 15
9505