From: Albert Cervera i Areny <> Date: Sat, 3 Oct 2009 13:37:16 +0000 (+0530) Subject: [FIX] Purchase : PO with different pricelists should not be merged X-Git-Tag: 5.0.7rc1-server~80^2~2 X-Git-Url: http://git.inspyration.org/?a=commitdiff_plain;h=1f4ef0a39dbcbc908825e24de749f3b3bf4d7b09;p=odoo%2Fodoo.git [FIX] Purchase : PO with different pricelists should not be merged lp bug: https://launchpad.net/bugs/440711 fixed bzr revid: jvo@tinyerp.com-20091003133716-zkd40gb4x8hlbtfb --- diff --git a/addons/purchase/wizard/wizard_group.py b/addons/purchase/wizard/wizard_group.py index 6add3ad..fdacf95 100644 --- a/addons/purchase/wizard/wizard_group.py +++ b/addons/purchase/wizard/wizard_group.py @@ -37,6 +37,7 @@ merge_form = """ * their status is draft * they belong to the same partner * are going to the same location + * have the same pricelist - lines will only be merged if: * they are exactly the same except for the quantity and unit @@ -76,7 +77,7 @@ def _merge_orders(self, cr, uid, data, context): # compute what the new orders should contain new_orders = {} for porder in [order for order in order_obj.browse(cr, uid, data['ids']) if order.state == 'draft']: - order_key = make_key(porder, ('partner_id', 'location_id')) + order_key = make_key(porder, ('partner_id', 'location_id', 'pricelist_id')) new_order = new_orders.setdefault(order_key, ({}, [])) new_order[1].append(porder.id)