Merge lp:~sebastien.beau/magentoerpconnect/magentoerpconnect-bug-1033378 into lp:magentoerpconnect/oerp6.1-stable

Proposed by Sébastien BEAU - http://www.akretion.com
Status: Merged
Merged at revision: 684
Proposed branch: lp:~sebastien.beau/magentoerpconnect/magentoerpconnect-bug-1033378
Merge into: lp:magentoerpconnect/oerp6.1-stable
Diff against target: 20 lines (+2/-8)
1 file modified
magentoerpconnect/settings/1.5.0.0/product/external.mappinglines.template.csv (+2/-8)
To merge this branch: bzr merge lp:~sebastien.beau/magentoerpconnect/magentoerpconnect-bug-1033378
Reviewer Review Type Date Requested Status
Richard deMeester (community) Approve
Guewen Baconnier @ Camptocamp no test, review Approve
MagentoERPConnect core editors Pending
Review via email: mp+141881@code.launchpad.net

Description of the change

Fix the bug https://bugs.launchpad.net/magentoerpconnect/+bug/1033378
An abstract function is used from base_sale_multichannels to avoid repeating code in each connector

To post a comment you must log in.
684. By Sébastien BEAU - http://www.akretion.com

[FIX] magentoerpconnect: fix category export lp:1033378

Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :

LGTM

review: Approve (no test, review)
Revision history for this message
Richard deMeester (richard-willowit) wrote :

Again, visually looks fine.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'magentoerpconnect/settings/1.5.0.0/product/external.mappinglines.template.csv'
2--- magentoerpconnect/settings/1.5.0.0/product/external.mappinglines.template.csv 2012-10-08 15:55:39 +0000
3+++ magentoerpconnect/settings/1.5.0.0/product/external.mappinglines.template.csv 2013-01-04 10:31:29 +0000
4@@ -51,14 +51,8 @@
5 main_categ_id = categ_ids.pop()
6 else:
7 main_categ_id = self.pool.get('external.referential').browse(cr, uid, referential_id).default_pro_cat.id
8-result = [('categ_id', main_categ_id), ('categ_ids',[(6, 0, categ_ids)])]","if 'categ_id' in resource:
9- cat_obj = self.pool.get('product.category')
10- categ_ids = [resource['categ_id'][0]] + resource.get('categ_ids', [])
11- mag_categ_ids = []
12- for categ_id in categ_ids:
13- mag_categ_id = cat_obj.get_or_create_extid(cr, uid, external_session, categ_id, context=context)
14- mag_categ_ids.append(mag_categ_id)
15- result=[('categories', mag_categ_ids)]",,
16+result = [('categ_id', main_categ_id), ('categ_ids',[(6, 0, categ_ids)])]","if 'categ_id' in resource or 'categ_ids' in resource:
17+ result=[('categories', self._get_or_create_ext_category_ids_for_shop(cr, uid, external_session, resource['id'], context=context))]",,
18 "mag1500_product_product_special_price",,"in_out","function","special_price",,"float","False","magentoerpconnect.mag1500_product_product","special_price","if 'x_magerp_special_price' in resource: result = [('x_magerp_special_price', ifield)]","if 'x_magerp_special_price' in resource:
19 if resource['x_magerp_special_price']:
20 result = [('special_price', resource['x_magerp_special_price'])]