Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

1

how to start download attachment document on click of button ?

By
Vaibhav
on 6/24/13, 7:30 AM 1,712 views

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  ?

0

Drees Far

--Drees Far--
1130
| 5 2 6
Tunis, Tunisia
--Drees Far--
Drees Far
On 8/13/15, 5:07 AM

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.

0
John
On 3/27/15, 2:36 PM

did you  make progress on it?

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

3 follower(s)

Stats

Asked: 6/24/13, 7:30 AM
Seen: 1712 times
Last updated: 8/13/15, 5:07 AM