Connectors mailing list archives

connectors@odoo-community.org

Avatar

Re: Custom Connector requires module dependency

by
nicoclavier
- 26/10/2016 13:50:31
Hi,

Thank you for your answer, it makes sense. 

Cheers 
Nicolas

On 25 Oct 2016, at 20:07, Jared Kipe <jared@hibou.io> wrote:

That is normal across all of Odoo.


The ‘depends’ sections sets up an implicit order for the module loading (e.g. installing views) and ORM initialization (e.g. overriding methods in a python class).

In general, if you don’t ‘depend' on a module that you actually do depend on, you’ll get errors when upgrading for views trying to hook into fields or sections that don’t exist.

Thanks,
Jared

On Oct 25, 2016, at 2:22 AM, Nicolas Clavier <nicoclavier@gmail.com> wrote:

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

_______________________________________________
Mailing-List: http://odoo-community.org/groups/connectors-30
Post to: mailto:connectors@odoo-community.org
Unsubscribe: http://odoo-community.org/groups?unsubscribe


_______________________________________________
Mailing-List: http://odoo-community.org/groups/connectors-30
Post to: mailto:connectors@odoo-community.org
Unsubscribe: http://odoo-community.org/groups?unsubscribe

Reference