コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
6222 ビュー

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 !

関連投稿 返信 ビュー 活動
2
5月 23
2613
0
9月 20
2861
1
3月 15
8886
3
3月 15
10256
3
1月 18
17300