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

hi

i want to create a button to do the hotkey "ctrl+p".

the following code in my .xml file:


<button string="Print PDF" name="print_report" type="object" class="oe_highlight" icon="fa-print"/>
and in .py file:
import pyautogui
@api.one
def print_report(self):
return pyautogui.hotkey('ctrl', 'p')
those codes are properly work in microsoft edge and internet explore , but not work in chorome. why?
please help me to find the solution.
thanks

อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด


    return pyautogui.hotkey('ctrl', 'shift','p')
It's done.


อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
2
ก.ย. 19
3327
1
ม.ค. 20
5063
0
พ.ย. 16
4359
0
ก.ย. 23
1917
0
ก.ย. 23
1611