Skip to Content
Menu
Dette spørgsmål er blevet anmeldt
1 Svar
3508 Visninger

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
Kassér
Forfatter Bedste svar


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


Avatar
Kassér
Related Posts Besvarelser Visninger Aktivitet
2
sep. 19
3317
1
jan. 20
5031
0
nov. 16
4339
0
sep. 23
1898
0
sep. 23
1594