Rationale for having Registry / Loading / Update / Tests in the same code ?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Rationale for having Registry / Loading / Update / Tests in the same code ?

Valentin LAB
Hi,

Has anybody a few hints about why 'registry' (name to python class
directory), 'loading' (auto-init these classes), 'update' (reading XML
files and updating SQL model definition), and 'test' (YAML test,
unittest before and after loading, phantomjs code) are all mixed up in
odoo ?

I'm speaking of the lengthy function in openerp/module/loading.py

I can understand that 'loading' feeds the 'registry'. But why 'updating'
gets in the middle ?, and moreover, it is the only application that
forces 'updating' to allow 'testing' that I've encountered. That last
one puzzles me the most.

With a very naive view, we could imagine a 'loading' code that would
feed the 'registry' (reversing the actual launch of 'loading' when
asking for a new registry). 'update' would be a separate code/process.
And 'testing' would be also completely separated.

I'm sure there are plenty of simple rationale about all this that I'd
like to hear about if anyone cares.

--
Valentin LAB

tel:  +33 6 71 39 62 13
mail: [hidden email]

_______________________________________________
Mailing list: https://launchpad.net/~openerp-expert-framework
Post to     : [hidden email]
Unsubscribe : https://launchpad.net/~openerp-expert-framework
More help   : https://help.launchpad.net/ListHelp
Loading...