From 9e5a2d4e2706b897d518cfc4102533d24a876e09 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Mon, 11 Oct 2010 21:16:13 +0200 Subject: [PATCH] [FIX] stock: correct destination location for order point + autovalidate chained moves for procurements bzr revid: odo@openerp.com-20101011191613-aw9753wodzb57wq2 --- addons/procurement/procurement.py | 1 + addons/procurement/schedulers.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/procurement/procurement.py b/addons/procurement/procurement.py index ce59251b9fc..c8cb8f460f0 100644 --- a/addons/procurement/procurement.py +++ b/addons/procurement/procurement.py @@ -331,6 +331,7 @@ class procurement_order(osv.osv): 'date_expected': procurement.date_planned, 'state': 'draft', 'company_id': procurement.company_id.id, + 'auto_validate': True, }) move_obj.action_confirm(cr, uid, [id], context=context) self.write(cr, uid, [procurement.id], {'move_id': id, 'close_move': 1}) diff --git a/addons/procurement/schedulers.py b/addons/procurement/schedulers.py index 777a8de45cc..06cbb86957a 100644 --- a/addons/procurement/schedulers.py +++ b/addons/procurement/schedulers.py @@ -241,7 +241,7 @@ class procurement_order(osv.osv): 'product_id': op.product_id.id, 'product_qty': qty, 'product_uom': op.product_uom.id, - 'location_id': op.warehouse_id.lot_input_id.id, + 'location_id': op.location_id.id, 'procure_method': 'make_to_order', 'origin': op.name })