← Back to team overview

openerp-connector-community team mailing list archive

Re: Products update

 

On 12/30/2014 09:55 PM, Tomek Chojnacki wrote:
> Hi,
> 
> I've just started using the connector.
> First I imported all the products from Magento. Next I changed their
> SKU's (to give it a test, as I have to do it repeatedly).
> Then I tried to run the import again (to update the data), but it failed.
> The exception information ends with:
> DETAIL: Key (default_code)=(ct_fly_hook_light) already exists.
> 
> The thing is, that the default code given in the message is the SKU that
> I changed in Magento.
> 
> Does anyone have an idea how to fix it?
> 
> Best regards,
> Tomek
> 
> 

Hi,

In odoo, what do you see in the "Connector" tab of the product with the
code ct_fly_hook_light? Do you have one binding with the same Magento ID
than the one on Magento?

By default, the Magento connector don't add a unique constraint on the
default_code, did you added one yourself?

Changing a SKU should work as expected because the binding between
Magento and Odoo is made with the ids. But if you have a unique
constraint and use a SKU already used, 2 products will end with the same
one and you will have the error you mentioned.

-- 
Guewen Baconnier
Business Solutions Software Developer

Camptocamp SA
PSE A, CH-1015 Lausanne
Phone: +41 21 619 10 39
Office: +41 21 619 10 10
http://www.camptocamp.com/


References