Merge lp:~unifield-team/unifield-wm/us-156 into lp:unifield-wm/sync

Proposed by jftempo
Status: Merged
Merged at revision: 553
Proposed branch: lp:~unifield-team/unifield-wm/us-156
Merge into: lp:unifield-wm/sync
Diff against target: 20 lines (+6/-4)
1 file modified
sync_so/picking.py (+6/-4)
To merge this branch: bzr merge lp:~unifield-team/unifield-wm/us-156
Reviewer Review Type Date Requested Status
UniField Sync Reviewer Pending
Review via email: mp+254240@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'sync_so/picking.py'
2--- sync_so/picking.py 2015-02-26 08:59:06 +0000
3+++ sync_so/picking.py 2015-03-26 13:06:16 +0000
4@@ -97,10 +97,12 @@
5
6 # product
7 product_name = data['product_id']['name']
8- product_ids = prod_obj.search(cr, uid, [('name', '=', product_name)], context=context)
9- if not product_ids:
10- raise Exception, "The corresponding product does not exist here. Product name: %s" % product_name
11- product_id = product_ids[0]
12+ product_id = self.pool.get('product.product').find_sd_ref(cr, uid, xmlid_to_sdref(data['product_id']['id']), context=context)
13+ if not product_id:
14+ product_ids = prod_obj.search(cr, uid, [('name', '=', product_name)], context=context)
15+ if not product_ids:
16+ raise Exception, "The corresponding product does not exist here. Product name: %s" % product_name
17+ product_id = product_ids[0]
18
19 # UF-1617: asset form
20 asset_id = False

Subscribers

People subscribed via source and target branches

to all changes: