openerp-expert-framework team mailing list archive
  
  - 
     openerp-expert-framework team openerp-expert-framework team
- 
    Mailing list archive
  
- 
    Message #01223
  
 Rationale for having Registry / Loading / Update / Tests in the same code ?
  
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: valentin.lab@xxxxxxxxxxx