تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
3469 أدوات العرض

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.


الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
2
سبتمبر 19
3254
1
يناير 20
4981
0
نوفمبر 16
4300
0
سبتمبر 23
1854
0
سبتمبر 23
1552