Skip to Content
Menú
This question has been flagged
1 Respondre
3501 Vistes

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
Descartar
Autor Best Answer


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


Avatar
Descartar
Related Posts Respostes Vistes Activitat
2
de set. 19
3312
1
de gen. 20
5026
0
de nov. 16
4330
0
de set. 23
1887
0
de set. 23
1586