콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
5276 화면

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),

    }

 

아바타
취소
작성자 베스트 답변

any help please !

아바타
취소
베스트 답변

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.

아바타
취소