İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
3513 Görünümler

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

Avatar
Vazgeç
Üretici En İyi Yanıt


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


Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
2
Eyl 19
3321
1
Oca 20
5045
0
Kas 16
4349
0
Eyl 23
1907
0
Eyl 23
1604