Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
3755 มุมมอง

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
3279
How do you create a button? แก้ไขแล้ว
3
เม.ย. 17
2767
0
เม.ย. 17
5307
Button to open form. V11 แก้ไขแล้ว
2
มี.ค. 19
3176
0
ต.ค. 15
9605