Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
3489 Представления

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

Аватар
Отменить
Автор Лучший ответ


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


Аватар
Отменить
Related Posts Ответы Просмотры Активность
2
сент. 19
3291
1
янв. 20
5005
0
нояб. 16
4318
0
сент. 23
1866
0
сент. 23
1575