Merge lp:~yann-papouin/ocb-addons/6.1-bug-1091268-purchase-merge-no-origin-duplicates into lp:ocb-addons/6.1

Proposed by Yann Papouin
Status: Merged
Approved by: Yannick Vaucher @ Camptocamp
Approved revision: no longer in the source branch.
Merged at revision: 6837
Proposed branch: lp:~yann-papouin/ocb-addons/6.1-bug-1091268-purchase-merge-no-origin-duplicates
Merge into: lp:ocb-addons/6.1
Diff against target: 13 lines (+2/-1)
1 file modified
purchase/purchase.py (+2/-1)
To merge this branch: bzr merge lp:~yann-papouin/ocb-addons/6.1-bug-1091268-purchase-merge-no-origin-duplicates
Reviewer Review Type Date Requested Status
Yannick Vaucher @ Camptocamp code review, no tests Approve
Holger Brunn (Therp) code review Approve
Pedro Manuel Baeza code review Approve
Review via email: mp+205175@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :

Why do you need the second part of the if (and not order_infos['origin'] in porder.origin)? Please put an example.

Again, I insist in the convenience of porting also this kind of patches to OCB 7.0, because the patch will arrive on trunk, not on v7.

Regards.

review: Needs Information
Revision history for this message
Yann Papouin (yann-papouin) wrote :

The merge will occurs in one side or another, since a merged purchase order can be merged again and again.
>>> originA = 'AAA'
>>> originB = 'AAA BBB CCC'
>>> originA in originB
True
>>> originB in originA
False

About the OCB 7.0, I currently concentrate my effort on pushing on OCB all 6.1 bugs fixes I currently use in production. About this I would be interested in a script that could auto replay a merge proposal from 6.1 to 7.0.

Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :

OK, now I get it.

About the script, it's difficult to make it automatic, but maybe bzr-replay must serve. I made all manually for the moment. It's only a little effort, but community will appreciate it if you do it! ;)

Regards.

review: Approve (code review)
Revision history for this message
Holger Brunn (Therp) (hbrunn) :
review: Approve (code review)
Revision history for this message
Yannick Vaucher @ Camptocamp (yvaucher-c2c) :
review: Approve (code review, no tests)

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 2013-11-20 01:17:39 +0000
3+++ purchase/purchase.py 2014-02-06 14:46:55 +0000
4@@ -592,7 +592,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+ if not porder.origin in order_infos['origin'] and not order_infos['origin'] in porder.origin:
10+ order_infos['origin'] = (order_infos['origin'] or '') + ' ' + porder.origin
11
12 for order_line in porder.order_line:
13 line_key = make_key(order_line, ('name', 'date_planned', 'taxes_id', 'price_unit', 'notes', 'product_id', 'move_dest_id', 'account_analytic_id'))

Subscribers

People subscribed via source and target branches