Connectors mailing list archives

connectors@odoo-community.org

Avatar

Custom Connector requires module dependency

by
nicoclavier
- 25/10/2016 11:12:10
Hi folks, 

I am puzzled with a constraint I met in a custom module. 

Context : 

My connector synchs fine with some models that seem to be loaded by default in odoo (res.partner, calendar, mail.message, etc) and a third party database. So far so good.

I recently introduced a synch with a module from the odoo addons directory : crm_profiling. 
This kept crashing at module load time when upgrading my connector, with keyErrors of the registry like these :

  File "/usr/local/lib/python2.7/dist-packages/odoo-8.0-py2.7.egg/openerp/modules/registry.py", line 102, in __getitem__
    return self.models[model_name]
KeyError: 'crm_profiling.questionnaire'

I managed to fix it by adding crm_profiling in the dependencies in the manifest, but my question remains  : 
is it normal ta have to depend on a module if a connector extends it as in such situation ? Or did I miss something elsewhere ?

Thanks for your time. 
Best regards,
Nicolas

Follow-Ups