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
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
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
สร้างบัญชีวันนี้เพื่อเพลิดเพลินไปกับฟีเจอร์พิเศษและมีส่วนร่วมกับคอมมูนิตี้ที่ยอดเยี่ยมของเรา!
ลงชื่อRelated Posts | ตอบกลับ | มุมมอง | กิจกรรม | |
---|---|---|---|---|
|
2
ก.ค. 15
|
10560 | ||
|
2
พ.ย. 24
|
1690 | ||
|
1
พ.ย. 24
|
2208 | ||
|
1
ต.ค. 23
|
2897 | ||
|
2
พ.ค. 24
|
10295 |