Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
3666 Visualizzazioni

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)
Avatar
Abbandona
Risposta migliore

Hello, did you find a solution for this issue ?

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
1
apr 25
3141
3
apr 17
2654
0
apr 17
5222
2
mar 19
3081
0
ott 15
9505