=== modified file 'purchase/wizard/wizard_group.py' --- purchase/wizard/wizard_group.py 2010-06-02 14:00:26 +0000 +++ purchase/wizard/wizard_group.py 2010-09-01 13:47:35 +0000 @@ -138,6 +138,11 @@ neworder_id = order_obj.create(cr, uid, order_data) allorders.append(neworder_id) + #make procurements pointing to the old order point ot the new order + proc_obj = pooler.get_pool(cr.dbname).get('mrp.procurement') + proc_ids = proc_obj.search(cr, uid, [('purchase_id', 'in', old_ids)]) + proc_obj.write(cr, uid, proc_ids, {'purchase_id': neworder_id}) + # make triggers pointing to the old orders point to the new order for old_id in old_ids: wf_service.trg_redirect(uid, 'purchase.order', old_id, neworder_id, cr)