Odoo Help


How to import multiple lines text fields with CSV ?

on 2/21/13, 5:58 AM 10,923 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
Keyport, United States
--Ray Carnes--

Senior ERP Analyst

OpenERP 6.1, 7.0; Odoo 8.0, 9.0, 10.0 and 11.0.

Completed Odoo Functional and Technical Training.

Functional Areas:

  • CRM/Sales

  • Inventory

  • Manufacturing

  • Accounting

  • Purchasing

Major Skills:

  • Business Process Reengineering

  • Efficiency Consulting

  • User Needs and GAP Analysis;

  • Functional and Technical Design;

  • Prototyping and Proof of Concepts;

  • Requirements Specifications;

  • Agile Implementation;

  • Data Migration;

  • Configuration & Customization (UI and code);

  • Integration - Odoo and non Odoo Applications and Services;

  • Training and Knowledge Transfer;

  • Go Live Support;

  • Helpdesk;

  • Version Upgrades and Migration.

  • Accounting Expert.

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. 

I am a skilled Communicator and I only take the serious things seriously!

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.

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

About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)


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