Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
5775 มุมมอง

Hi !

I want to load data files in a specific order, because some records need to be created before their id could be used to create other records.

I use csv files. One file for each model. For example, `res.partner.csv`.

The order of the list under `data` doesn't work.

I know this works fine with one big xml data file, but I want to make it works with csv files.

Thanks ! 

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Order within data section in __openerp__.py is exact order of importimg data... 
That should work check carefully what happens when you install a module... 
Just watch  console output or log entries... and see in which order it imports data....

 

อวตาร
ละทิ้ง
ผู้เขียน

I completely deleted my csv files and use xml files exclusively now. If someone find this usefull, I'm sure he'll say it in a comment, and I will accept the answer. For now, I have no time to re-create csv files and testing that anymore. But thanks anyway for your answer !

Related Posts ตอบกลับ มุมมอง กิจกรรม
Adding constant data to a model failure แก้ไขแล้ว
2
พ.ค. 23
2268
0
ก.ย. 20
2578
1
มี.ค. 15
8475
3
มี.ค. 15
9962
3
ม.ค. 18
16901