Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
3488 Переглядів

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
3286
1
січ. 20
5002
0
лист. 16
4312
0
вер. 23
1862
0
вер. 23
1575