Odoo Help


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.


How to import multiple lines text fields with CSV ?

on 2/21/13, 5:58 AM 6,655 views

When I use export tool, carriage returns in fields (eg: partner comment, product description) are converted into spaces.

When I re-import the generated file, there is no more CR in fields, the whole content is in one line separated with spaces.

Is it possible to import data fields with multiples lines with CSV file ?


Mohammad Alhashash

--Mohammad Alhashash--
| 5 5 8
Giza, Egypt
--Mohammad Alhashash--


Mohammad Alhashash
On 2/23/13, 5:16 AM

You should add double quotes " around fields with special characters including new line.

OpenERP uses the standard python csv module to decode csv input with the parameters: quotechar='"', delimiter=','.

This solution works fine for import, but when you export datas from openERP, make some modifications and want to re-import them, you must put CR again on each description lines that already have before export.

on 2/23/13, 8:37 AM

I agree, import works fine with CR within delimiters and export of such imported data is OK too. But records created or modified with OpenERP interface are not exported correctly (CR are converted into space). It's a little annoying...

on 2/25/13, 4:52 AM

Ray Carnes

--Ray Carnes--
| 9 7 9
Greater Los Angeles, United States
--Ray Carnes--

Senior Odoo Analyst

OpenERP 6.1, 7.0 and Odoo 8.0, 9.0 (Since 2012)

Completed Functional and Technical Training.

Major Skills:

  • Needs Discovery and Requirements Analysis;

  • Function and Technical Specifications;

  • Project Planning;

  • Prototyping and Proof of concepts;

  • Data migration;

  • Configuration & Customization (UI and modules);

  • Integration - data, business logic and service levels;

  • Training and Knowledge transfer;

  • Go Live support;

  • Help desk;

  • Version Migration.

I have over 20 years of experience empowering and enabling users with enterprise information systems that make a real and measurable difference in their ability to proactively manage their businesses and organizations. 

Ray Carnes
On 2/21/13, 8:26 PM

It normally works fine - I have never had this problem

The file at http://www.filedropper.com/respartner was directly exported from OpenERP 7.0 and all carriage returns are preserved.

It sounds like it is either the editor you are using; the method you are using to get the file to your computer (email, file transfer); or something to do with your regional settings that affect field delimeters.

There is no carriage returns into fields in your example file. Carriage returns are only at the end of the lines to separate records.

on 2/22/13, 4:01 AM

I'm sorry but I still can't see carriage returns (with various editors) in your file except at the end of the lines. Can you tell me on which record and in which field ?

on 2/22/13, 1:51 PM

Never mind Ray. I just wondered if I wasn't becoming crazy. But my problem is still here. I think it's not possible to import fieds that contains multiples lines of text.

on 2/22/13, 7:40 PM

I remember I did need to do this once and had the same problem. I replaced all the carriage returns with a proxy character like ~ hoping that I could then fix the problem after they were imported. This was so long ago I think I gave up because it was too hard for me.

Bista Solutions US, Ray Carnes
on 2/22/13, 8:22 PM

Ahmet Altinisik

--Ahmet Altinisik--
| 8 7 10
ANKARA, Turkey
--Ahmet Altinisik--


Ahmet Altinisik
On 2/22/13, 4:44 AM

Yes it is possible, I do it everyday without any problem. (with V6.1) OpenERP csv import and export feature works without any problem.

You should use a better csv file editor. I use ASAP extension for excel to import and export csv files http://www.asap-utilities.com

Openoffice also imports csv files nicely however cannot export them nicely (if you have HTML tags and CR LF characters in the fields.

For changing encoding of files to UTF-8 I use Notepad++ (cut the text -> change the encoding -> paste the text back)

I'm OK with you, import/export works very well. But with fields like comments, notes which can contains multiples lines (separated with CR/LF), import/export doesn't work. It is impossible to handle multiple lines. CR are converted into spaces in export, and it's impossible to import CR/LF into one field.

on 2/22/13, 7:46 PM

I did not see any CR in the fields either. I am using Notepad++.

Altınkaya Elektronik Cihaz Kutuları imalat Ticaret ltd sti, Ahmet Altinisik
on 2/23/13, 3:49 AM

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

2 follower(s)


Asked: 2/21/13, 5:58 AM
Seen: 6655 times
Last updated: 3/16/15, 8:10 AM