Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
3479 Widoki

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

Awatar
Odrzuć
Autor Najlepsza odpowiedź


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


Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
2
wrz 19
3269
1
sty 20
4991
0
lis 16
4307
0
wrz 23
1857
0
wrz 23
1555