[IMP] Make sure consume lines create procurements
bzr revid: jco@openerp.com-20130919104336-dmu0pvb9f7780ueb
This commit is contained in:
+2
-2
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user