← Back to team overview

openerp-connector-community team mailing list archive

Re: Doubt: Mapping fields over an non-customized magento backend version

 

Hi,

Yes, you can have only 1 ConnectorUnit for 1 model and 1 backend
version at a time.
You can't add "concurrent" ConnectorUnit classes because there is no
way to know which one should be used in which order (and for other
reasons).

Did you read this documentation?
http://odoo-connector.com/api/api_backend.html#connector.backend.Backend
Did it help you?

What you could still try:

1. The simplest is to use a "customization backend version". That is,
you create a Backend with a version "@magento1700_custom" inheriting
of "@magento1700" and you register your custom classes on this one.
It won't allow to register your 2 Mappers on the same version and
model, but at least you will be able to register one Mapper with your
changes.

2. Propose a hook in the core module that extract a behavior in
another mapper as it is done in
https://github.com/OCA/connector-magento/blob/8.0/magentoerpconnect/sale.py#L585-L589
Then you will be able to use this syntax

    @magento1700(replacing=MapperToReplace)
    class MyMapper(MapperToReplace):

Still, 2 modules replacing the same class will conflict so it would
only avoid to replace a full ConnectorUnit reducing the chances of a
conflict.


Follow ups

References