Odoo Help

0
4 Answers
0

Hi all! I'm sorry for posting a not-reply on this old post. However, I am encountering the same issue. As mentioned above, this error seems to appear randomly: one day the modules will load in fine, and the next day I'll get a keyerror:[model name]. May I ask, does anyone have a solution for this issue? Cheers!

0
Ed Gow
5/9/18, 7:46 PM

My original description of the problem is wrong. The real issue has to do with load order of model definitions during server start-up. This can happen intermittently if a module dependency is left out of the manifest file (thanks to Graeme Gellatly for this diagnosis). In my case the cause appears to be a bit different. I have models defined in two files. The order in which those files are loaded may be indeterminate, so on occasion the dependent one will be loaded first and cause a failure. 

Though the description is wrong, I think it may be worth leaving this post up to help others who may encounter a similar KeyError due to load failure. 

2 Comments
Ray Carnes
5/9/18, 8:01 PM

Can you clarify "the order in which those files are loaded may be indeterminate" - and have you seen https://github.com/odoo/odoo/issues/1053 ?

Ed Gow
5/9/18, 8:42 PM

I think that the problem I'm seeing is different than 1053 because it is intermittent. Almost all the time my module loads w/o any problem. On occasion it has a missing dependency. This would indicate that something changed from one start-up to another. Though I've yet to prove it, I suspect that the two files that define the models in my module are not loaded in a deterministic order. I don't know of a way to tell Odoo in what order to load files in the `models/` directory of a module.

Ask a Question
Writer
Tag
Keep Informed
2 follower(s)
About This Community

This platform 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.

Register
Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now