Merge lp:~openerp-dev/openobject-addons/trunk-bug-1091268-api into lp:openobject-addons

Proposed by Arnaud Pineux (OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-bug-1091268-api
Merge into: lp:openobject-addons
Diff against target: 14 lines (+2/-2)
1 file modified
purchase/purchase.py (+2/-2)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-bug-1091268-api
Reviewer Review Type Date Requested Status
Yannick Vaucher @ Camptocamp (community) Needs Fixing
OpenERP Core Team Pending
Review via email: mp+140625@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Yannick Vaucher @ Camptocamp (yvaucher-c2c) wrote :

order_infos['origin'] can be False if first origin of first purchase order is empty.

Thus it will fail on order_infos['origin'].split(" ")

review: Needs Fixing

Unmerged revisions

8404. By Arnaud Pineux (OpenERP)

[FIX] origin duplication during purchase merge resolved

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'purchase/purchase.py'
2--- purchase/purchase.py 2012-12-18 22:50:15 +0000
3+++ purchase/purchase.py 2012-12-19 10:57:23 +0000
4@@ -766,8 +766,8 @@
5 if porder.notes:
6 order_infos['notes'] = (order_infos['notes'] or '') + ('\n%s' % (porder.notes,))
7 if porder.origin:
8- order_infos['origin'] = (order_infos['origin'] or '') + ' ' + porder.origin
9-
10+ if not porder.origin in order_infos['origin'].split(" ") and not order_infos['origin'] in porder.origin.split(" "):
11+ order_infos['origin'] = (order_infos['origin'] or '') + ' ' + porder.origin
12 for order_line in porder.order_line:
13 line_key = make_key(order_line, ('name', 'date_planned', 'taxes_id', 'price_unit', 'product_id', 'move_dest_id', 'account_analytic_id'))
14 o_line = order_infos['order_line'].setdefault(line_key, {})

Subscribers

People subscribed via source and target branches

to all changes: