Community mailing list archives

Re: How to import data from postgresql to excel

- 07/03/2015 07:49:37
Thank you very much for your answer.
I have a query string which is working as the way I want but as u suggested me to put this query string in tmp/cust-sale.csv file.
But as I am using bitnami for Odoo on ubuntu. so in bitnami the"tmp/cust-sale.csv" file is not present. 
So is there any other way to put query string in some another file?


From: "Mignon, Laurent" <>
To: Community <>
Sent: Tuesday, 30 June 2015 6:08 PM
Subject: Re: How to import data from postgresql to excel


May be this one can help you: sql_export module
sql_export_module is for advanced users/integrator since it requires you know the database structure and should be use with caution since the security is not enforced. 



On Tue, Jun 30, 2015 at 2:22 PM, John Walsh <> wrote:

If you want data directly from postgresql, you will want to log in to psql and do a query like the following:

COPY (SELECT, from sale_order s LEFT JOIN res_partner p on TO '/tmp/cust-sale.csv' CSV HEADER;

That query will give you the customer name and the sales order number/name and the resulting file can be exported to excel.  See also this stack overflow question and answer:

If, however, you want to just export a certain list view, check out:

Best of luck!
~John Walsh

On Tuesday, June 30, 2015 7:15 AM, Sayali Kothawade <> wrote:

        I am trying to import data from Postgresql from sales modules to excel.
I want data from customers and sales order on a single excel sheet. 
Can you please suggest me any solution?

Thanks & Regards,
Sayali Kothawade.
Ayanworks Technolgy Solutions Pvt. Ltd.
Post to:

Post to:

Laurent Mignon
Senior software engineer

Tel: +352 20 21 10 20 32
Fax: +352 20 21 10 21

Acsone SA, Succursale de Luxembourg 
22, Zone Industrielle
​ ​
​| L-8287 Kehlen, Luxembourg
TVA LU24733605
​ | ​RCS B160400​

Acsone sa/nv
Boulevard de la Woluwe 56, b4  Woluwedal
​ | B-1200 Bruxelles - Brussel 
RPM Bruxelles 0835.207.216 RPR Brussel  

Post to: