Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
3496 Lượt xem

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

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất


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


Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 9 19
3310
1
thg 1 20
5018
0
thg 11 16
4324
0
thg 9 23
1879
0
thg 9 23
1581