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
1=== modified file 'magentoerpconnect_bundle/product.py'
2--- magentoerpconnect_bundle/product.py 2011-07-06 13:50:01 +0000
3+++ magentoerpconnect_bundle/product.py 2012-03-21 16:05:22 +0000
4@@ -28,11 +28,11 @@
5
6 def get_bundle_component(self, cr, uid, ids, context):
7 res = {}
8- for product in self.browse(cr, uid, product_read[0], context=context):
9+ for product in self.browse(cr, uid, ids, context=context):
10 res[product.id] = []
11 for product_item_set in product.item_set_ids:
12 for product_item_set_line in product_item_set.item_set_line_ids:
13- res[product.id] += product_item_set_line.product.id
14+ res[product.id] += [product_item_set_line.product_id.id]
15 return res
16
17 def action_before_exporting(self, cr, uid, id, product_type, external_referential_ids, defaults, context=None):
18@@ -43,7 +43,7 @@
19 for id in component_ids:
20 if not self.oeid_to_extid(cr, uid, id, shop.referential_id.id):
21 self.ext_export(cr, uid, [id], external_referential_ids, defaults, context)
22- return super(self, product_product).action_before_exporting(cr, uid, id, product_type, external_referential_ids, defaults, context=context)
23+ return super(product_product, self).action_before_exporting(cr, uid, id, product_type, external_referential_ids, defaults, context=context)
24
25
26 def add_data_to_create_bundle_product(self, cr, uid, oe_id, data, context=None):