Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
3473 Zobrazení

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
Zrušit
Autor Nejlepší odpověď


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


Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
2
zář 19
3259
1
led 20
4981
0
lis 16
4302
0
zář 23
1855
0
zář 23
1552