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.

0

How to get data from a csv file ?

By
jean44
on 9/4/14, 9:19 AM 664 views

Hello,

When the user select the CSV file, I want to parse it and insert data in the field 'data', how I can do that ?

Thanks

 

    _name = "object"

    _columns = {

        'file_data': fields.binary('File to import', required=True),
        'file_fname': fields.char('Filename', size=128, required=True),

        'data': fields.one2many('data.import', 'data', required=True),

    }

 

0

Sudhir Arya (SA)

--Sudhir Arya (SA)--
10150
| 6 8 8
Ahmedabad, India
--Sudhir Arya (SA)--

Working as an OpenERP/Odoo developer and a Team Leader 

Top 5 Odoo contributor On Stackoverflow

LinkedIn

Blog

Stackoverflow

Sudhir Arya (SA)
On 9/5/14, 2:31 PM

Hello Mos,

Following link could help you. The code is about xlrd library but you can use csv library instead and modify the code as per your need.

Import products from excel.

0
jean44
On 9/5/14, 6:32 AM

any help please !

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)

Stats

Asked: 9/4/14, 9:19 AM
Seen: 664 times
Last updated: 3/16/15, 8:10 AM