Skip to content

Commit

Permalink
[MRG] purchase: don't duplicate origin when merging purchase orders
Browse files Browse the repository at this point in the history
  • Loading branch information
yann-papouin authored and Stefan Rijnhart committed Jul 2, 2014
1 parent c3bc1f8 commit 75fc0f8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion addons/purchase/purchase.py
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,8 @@ def make_key(br, fields):
if porder.notes:
order_infos['notes'] = (order_infos['notes'] or '') + ('\n%s' % (porder.notes,))
if porder.origin:
order_infos['origin'] = (order_infos['origin'] or '') + ' ' + porder.origin
if not porder.origin in order_infos['origin'] and not order_infos['origin'] in porder.origin:
order_infos['origin'] = (order_infos['origin'] or '') + ' ' + porder.origin

for order_line in porder.order_line:
line_key = make_key(order_line, ('name', 'date_planned', 'taxes_id', 'price_unit', 'product_id', 'move_dest_id', 'account_analytic_id'))
Expand Down

0 comments on commit 75fc0f8

Please sign in to comment.