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.

2

How to export in csv format with pipe delimeter?

By
JC
on 5/31/14, 3:26 AM 1,019 views

1. Is there a way to change the delimeter for export  to | ?

2. How to remove external id from csv export?

3. or where is the .py and .xml  code for export function where I can make changes on code level, any openerp expert can help?

1

JC

--JC--
807
| 5 1 8
Kuala Lumpur, Malaysia
--JC--

 

JC
On 5/31/14, 7:15 PM

In order to change delimeter to '|'  for export , edit   addons\web\controller\main.py line 1645 *1645   writer = csv.writer(fp, quoting=csv.QUOTE_ALL)* change to * writer = csv.writer(fp, delimiter='|', quoting=csv.QUOTE_ALL)*

1

Prakash

--Prakash--
3173
| 5 4 7
Bikaner, India
--Prakash--

OpenERP Devloper at SunARC Technology

Prakash
On 5/31/14, 6:00 AM

2) To remove external ID

    In the core module in the directory addons\web\static\src\js\data_export.js

    Uncomment the below Line no: 378

   /* exported_fields.unshift({name: 'id', label: 'External ID'}); */

    OR override on_click_export_data Method in custom module

3) Export Code

  1) addons\web\static\src\xml\base.xml

  2)  addons\web\static\src\js\data_export.js

EDIT:-

  3) addons\web\controller\main.py   class CSVExport(ExportFormat, http.Controller):

I think You can change the CSV format in the above python file.

Prakash, thanks for the answer. Is the a way to export multiple tables in one export?

JC
on 5/31/14, 6:43 PM

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

1 follower(s)

Stats

Asked: 5/31/14, 3:26 AM
Seen: 1019 times
Last updated: 1/18/16, 7:53 AM