[IMP] Make sure consume lines create procurements

bzr revid: jco@openerp.com-20130919104336-dmu0pvb9f7780ueb
This commit is contained in:
Josse Colpaert
2013-09-19 12:43:36 +02:00
parent 01c98d49e5
commit 56757bc3b9
+2 -2
View File
@@ -913,10 +913,10 @@ class mrp_production(osv.osv):
'location_id': source_location_id,
'location_dest_id': destination_location_id,
'move_dest_id': production.move_prod_id.id,
'state': 'waiting',
'company_id': production.company_id.id,
}
move_id = stock_move.create(cr, uid, data, context=context)
stock_move.action_confirm(cr, uid, [move_id], context=context)
production.write({'move_created_ids': [(6, 0, [move_id])]}, context=context)
return move_id
@@ -941,10 +941,10 @@ class mrp_production(osv.osv):
'location_id': source_location_id,
'location_dest_id': destination_location_id,
'move_dest_id': parent_move_id,
'state': 'waiting',
'company_id': production.company_id.id,
'procure_method': 'make_to_order',
})
stock_move.action_confirm(cr, uid, [move_id], context=context)
production.write({'move_lines': [(4, move_id)]}, context=context)
return move_id