Hello,

The "export only changed categories" in the connector for version 5 was
not fine, so I'm sorry because I did not test enough my patch the last
time.

The buggy use case is : 
 - Creation of a category A in OpenERP
 - Creation of a category B in OpenERP
 - Set the category A as child of category B
 - Export the catalog
 - The connector creates the category A and after it creates the B. Normally it 
must create the B first, then the A below the B.

After many tests and debug, I found the problem. 
I have pushed the correction of the connector on a branch : 
http://bazaar.launchpad.net/~gbaconnier-c2c/magentoerpconnect/magentoerpconnect/revision/361

As you may see, it is a small modification. In the mapping script of the 
parent_id, when the parent category does not exist, it calls ext_export to 
create it. But the ext_export method in magentoerpconnect/product.py needs the 
context's element "shop_id" which was not passed. Then the parent category was 
not created on Magento. I'm not sure if we have to pass the entire context 
variable or only the shop_id value. 
I wonder if you have the same issue on the version 6 because the shop_id is not 
passed either.

The 2 lines modified in product.py are just to maintain the sorting of
the categories and is a backport from the connector version 6.

To maintain the sorting, we also have to backport that revision on extra-addons 
: 
http://bazaar.launchpad.net/~openerp-commiter/openobject-addons/trunk-extra-addons/revision/5092.1.36
to ensure the order of the categories is maintained.
I have attached a patch with the modifications to apply on extra-addons version 
5.0.

I tested a lot this correction, with creations of all categories from
empty / updates / adds and indeed no update of the categories and it
works well.

Hoping that will be useful.

Thanks & Regards
Guewen

** Patch added: "base_external_referential read_w_order"
   
https://bugs.launchpad.net/magentoerpconnect/+bug/669901/+attachment/1783470/+files/base_external_referential_prod_categories.patch

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/669901

Title:
  Export only changed categories for OpenERP v5

Status in Magento Open ERP Connector:
  Confirmed

Bug description:
  Hello,

I saw you have developed the blueprint export-only-changed-categories, thank 
you, it's a nice improvement (it was taking so time to update some products 
when you have +2000 categories ;-).

As we need it in OpenERP v5 I backported it and it works nice. I had nothing to 
change on your method from v6 to v5.

Thank you,
Regards,
Guewen



_______________________________________________
Mailing list: https://launchpad.net/~c2c-oerpscenario
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~c2c-oerpscenario
More help   : https://help.launchpad.net/ListHelp

Reply via email to