Merge lp:~magentoerpconnect-community/magentoerpconnect/no-bom-defined-yet 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/no-bom-defined-yet
Merge into: lp:magentoerpconnect/oerp6.1-oldstable
Diff against target: 12 lines (+2/-0)
1 file modified
magentoerpconnect/product.py (+2/-0)
To merge this branch: bzr merge lp:~magentoerpconnect-community/magentoerpconnect/no-bom-defined-yet
Reviewer Review Type Date Requested Status
Guewen Baconnier @ Camptocamp 2012-03-13 Approve on 2012-03-28
Review via email: mp+97299@code.launchpad.net
To post a comment you must log in.
554. By Maxime Chambreuil (http://www.savoirfairelinux.com) on 2012-03-14

[MERGE]

555. By Maxime Chambreuil (http://www.savoirfairelinux.com) on 2012-03-14

[FIX] local variable 'quantities' referenced before assignment if no BOM defined

Thanks Maxime

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'magentoerpconnect/product.py'
2--- magentoerpconnect/product.py 2012-03-14 12:23:14 +0000
3+++ magentoerpconnect/product.py 2012-03-14 13:07:22 +0000
4@@ -1178,6 +1178,8 @@
5 quantities.update({sku: x[1]})
6 if child_ids: #it is an assembly and it contains the products child_ids:
7 self.ext_export(cr, uid, child_ids, external_referential_ids, defaults, context) #so we export them
8+ else:
9+ return False
10 else:
11 logger.notifyChannel('ext synchro', netsvc.LOG_ERROR, "OpenERP 'grouped' products will export to Magento as 'grouped products' only if they have a BOM and if the 'mrp' BOM module is installed")
12 return quantities, child_ids