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

Trying to move data from one db to another vis CSV import

My csv has...

id 1 (name)  "A company"

id 2 (name) "Fred"  (parent_id) "id 1

Can I get openerp to associate  (parent_id) "id 1 with "id1" during an import


Regards


Cameron

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

Yes ish!

I solved this by exporting the data to a csv, replacing id references with actual values


eg

sales_order.parter_id = 322,  - export this to csv you get the id 322 from res_partner, which openerp cannot import/match to partner

Using this SQL

copy
(SELECT so.id, rp.name FROM sale_order so
INNER JOIN res_partner rp ON so.partner_id = rp.id)
TO '/tmp/salesorder.csv' delimiter ',' csv header;


322 is replaced with the name from res_partner, which is easy to import

아바타
취소
베스트 답변

To import the external id of a related company, use:

parent_id/id

To import the database id of a related company, use:

parent_id/.id

아바타
취소
관련 게시물 답글 화면 활동
2
7월 15
10636
2
11월 24
1757
1
11월 24
2338
1
10월 23
2972
2
5월 24
10359