Merge lp:~magentoerpconnect-community/magentoerpconnect/fix-bundle-product into lp:magentoerpconnect/oerp6.1-oldstable

Status: Merged
Merge reported by: Guewen Baconnier @ Camptocamp
Merged at revision: not available
Proposed branch: lp:~magentoerpconnect-community/magentoerpconnect/fix-bundle-product
Merge into: lp:magentoerpconnect/oerp6.1-oldstable
Diff against target: 26 lines (+3/-3)
1 file modified
magentoerpconnect_bundle/product.py (+3/-3)
To merge this branch: bzr merge lp:~magentoerpconnect-community/magentoerpconnect/fix-bundle-product
Reviewer Review Type Date Requested Status
Guewen Baconnier @ Camptocamp Approve
Sébastien BEAU - http://www.akretion.com Pending
Review via email: mp+98663@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) :
review: Approve
Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :

Thanks,

I just replaced
res[product.id] += [product_item_set_line.product_id.id]
by
res[product.id].append(product_item_set_line.product_id.id)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'magentoerpconnect_bundle/product.py'
--- magentoerpconnect_bundle/product.py 2011-07-06 13:50:01 +0000
+++ magentoerpconnect_bundle/product.py 2012-03-21 16:05:22 +0000
@@ -28,11 +28,11 @@
28 28
29 def get_bundle_component(self, cr, uid, ids, context):29 def get_bundle_component(self, cr, uid, ids, context):
30 res = {}30 res = {}
31 for product in self.browse(cr, uid, product_read[0], context=context):31 for product in self.browse(cr, uid, ids, context=context):
32 res[product.id] = []32 res[product.id] = []
33 for product_item_set in product.item_set_ids:33 for product_item_set in product.item_set_ids:
34 for product_item_set_line in product_item_set.item_set_line_ids:34 for product_item_set_line in product_item_set.item_set_line_ids:
35 res[product.id] += product_item_set_line.product.id35 res[product.id] += [product_item_set_line.product_id.id]
36 return res36 return res
37 37
38 def action_before_exporting(self, cr, uid, id, product_type, external_referential_ids, defaults, context=None):38 def action_before_exporting(self, cr, uid, id, product_type, external_referential_ids, defaults, context=None):
@@ -43,7 +43,7 @@
43 for id in component_ids:43 for id in component_ids:
44 if not self.oeid_to_extid(cr, uid, id, shop.referential_id.id):44 if not self.oeid_to_extid(cr, uid, id, shop.referential_id.id):
45 self.ext_export(cr, uid, [id], external_referential_ids, defaults, context)45 self.ext_export(cr, uid, [id], external_referential_ids, defaults, context)
46 return super(self, product_product).action_before_exporting(cr, uid, id, product_type, external_referential_ids, defaults, context=context)46 return super(product_product, self).action_before_exporting(cr, uid, id, product_type, external_referential_ids, defaults, context=context)
47 47
4848
49 def add_data_to_create_bundle_product(self, cr, uid, oe_id, data, context=None):49 def add_data_to_create_bundle_product(self, cr, uid, oe_id, data, context=None):