Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

How to specify a loading order for data files in a custom module ?

By
PY
on 11/27/14, 4:16 AM 658 views

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 ! 

1

Bole

--Bole--
2385
| 5 4 6
Zagreb | Karlovac, Croatia
--Bole--

there is only 10 kind of people the ones that understand binary ... and others

Bole
On 12/2/14, 6:27 AM

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 !

PY
on 12/3/14, 3:46 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 11/27/14, 4:16 AM
Seen: 658 times
Last updated: 3/16/15, 8:10 AM