Merge pull request #13 from odoo/master-build-order-fix-ged

[FIX] makes sure the build order is FIFO
This commit is contained in:
odony 2014-07-04 16:36:44 +02:00
commit ee222b09d3

View File

@ -287,7 +287,7 @@ class runbot_repo(osv.osv):
# find sticky pending build if any, otherwise, last pending (by id, not by sequence) will do the job
pending_ids = bo.search(cr, uid, dom + [('state', '=', 'pending'), ('branch_id.sticky', '=', True)], limit=1)
if not pending_ids:
pending_ids = bo.search(cr, uid, dom + [('state', '=', 'pending')], order="id desc")
pending_ids = bo.search(cr, uid, dom + [('state', '=', 'pending')], order="sequence", limit=1)
pending = bo.browse(cr, uid, pending_ids[0])
pending.schedule()