Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
3717 Visualizzazioni

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
Abbandona
Autore Risposta migliore


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


Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
2
set 19
3553
1
gen 20
5277
0
nov 16
4565
0
set 23
2186
0
set 23
1933