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

Can you tell me how to start download file on click of button event.

 I created new button on customer form (i.e. res_partner view and if i want to download all attachment related to that customer on single click).To do this job I created zip file in background coding in .py file which is consisting all related documents of respective customer ?

Means till now if I click on that button zip is generated but I am not able to start download of that zip file.

What can I do  ?

الصورة الرمزية
إهمال

I'm trying to achieve the same for tasks... have you figured it out?

أفضل إجابة

did you  make progress on it?

الصورة الرمزية
إهمال
أفضل إجابة

In Python 2, use urllib2 which comes with the standard library.


import urllib2

response = urllib2.urlopen('http://www.odoo.com/')

html = response.read()

This is the most basic way to use the library, minus any error handling. You can also do more complex stuff such as changing headers. The documentation can be found here.

https://docs.python.org/2/library/urllib2.html

Regards.

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
1
مايو 24
1197
2
يناير 23
14001
2
سبتمبر 21
4930
1
مارس 15
8792
0
مايو 25
1241