← Back to team overview

openerp-connector-community team mailing list archive

Re: Problem with backend_adapter

 

Thanks for the quick answer, I'll search for the imports and see if I find
the problem.

I'm sending the code to github, in a bit I'll send the link to the code.

2015-07-13 10:59 GMT-03:00 Guewen Baconnier <guewen.baconnier@xxxxxxxxxxxxxx
>:

> On Mon, Jul 13, 2015 at 3:51 PM, Danimar Ribeiro
> <danimaribeiro@xxxxxxxxx> wrote:
> > Hi,
> > I'm trying to create a new connector for integrate with WooCommerce,
> > I've created a backend adapter, which inherits from CrudAdapter, then in
> my
> > Importer I call self.backend_adapter, I got an error as if I had created
> > three backend adapters.
> >
> > "AssertionError: Several classes found for <class
> > 'openerp.addons.connector.unit.backend_adapter.BackendAdapter'>"
> >
> > Check the attached images for the full error.
> >
> >
> > --
> > Danimar Ribeiro
> > Code
> > Blog
> >
>
> It would help if you could show the complete code.
> One of the issues here is in relation with how Odoo cheats the
> namespaces, we see 2 times the same class in a different namespace:
> one in "openerp.addons", the other in "woocommerce_connect". Normally,
> they should always be in "openerp.addons" but I already saw errors
> like that when an import which doesn't respect this namespace is done
> somewhere.
> That means, search for import like "import woocommerce_connect" or
> "from woocommerce_connect import ..." and replace them with their full
> path "import openerp.addons.woocommerce_connect" or "from
> openerp.addons.woocommerce_connect import ...".
>
> For the 2 last classes which same the same class in the same
> namespace, showing the code would definitely help.
>



-- 
Danimar Ribeiro
Code <https://github.com/danimaribeiro>
Blog <http://openerpbr.blogspot.com.br/>

Follow ups

References