From 5fde7557ab53b649e5bce09ceff51952be158ed2 Mon Sep 17 00:00:00 2001 From: ced <> Date: Wed, 11 Jul 2007 15:09:48 +0000 Subject: [PATCH] purchase: fix group purchase wizard now account_analytic is on the line and no more on the order bzr revid: ced-b900ba767102768eaf5bed715f72f0ca1a89827f --- addons/purchase/wizard/wizard_group.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/addons/purchase/wizard/wizard_group.py b/addons/purchase/wizard/wizard_group.py index b07fd83c853..3763de358bc 100644 --- a/addons/purchase/wizard/wizard_group.py +++ b/addons/purchase/wizard/wizard_group.py @@ -59,7 +59,7 @@ def _mergeOrders(self, cr, uid, data, context): list_key = [] for field in fields: field_val = getattr(br, field) - if field in ('product_id','move_dest_id'): + if field in ('product_id','move_dest_id', 'account_analytic_id'): if not field_val: field_val = False if isinstance(field_val, browse_record): @@ -86,7 +86,6 @@ def _mergeOrders(self, cr, uid, data, context): 'dest_address_id': porder.dest_address_id.id, 'warehouse_id': porder.warehouse_id.id, 'location_id': porder.location_id.id, - 'project_id': porder.project_id.id, 'pricelist_id': porder.pricelist_id.id, 'state': 'draft', 'order_line': {}, @@ -97,7 +96,7 @@ def _mergeOrders(self, cr, uid, data, context): order_infos['notes'] += ('\n%s' % (porder.notes,)) for order_line in porder.order_line: - line_key = make_key(order_line, ('name', 'date_planned', 'taxes_id', 'price_unit', 'notes', 'product_id', 'move_dest_id')) + line_key = make_key(order_line, ('name', 'date_planned', 'taxes_id', 'price_unit', 'notes', 'product_id', 'move_dest_id', 'account_analytic_id')) o_line = order_infos['order_line'].setdefault(line_key, {}) if o_line: # merge the line with an existing line