Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
1 Responder
3619 Visualizações

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
Cancelar
Autor Melhor resposta


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


Avatar
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
2
set. 19
3468
1
jan. 20
5160
0
nov. 16
4448
0
set. 23
2088
0
set. 23
1830