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 })