[IMP] website_event_track: improve next talk suggestion
This commit aim to improve the algorithm to select the next talk suggestion after a track has ended, in order to support small interact between two longer talks. Idea: - all talks that begin less than 10 minutes before (all at same ordering level whatever actual time) - then talks beginning in a near future Task ID: 2344522 closes odoo/odoo#58701 X-original-commit: 7f1e46331aecdaa4e08828240a495923c251c69f Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit is contained in:
@@ -478,8 +478,9 @@ class Track(models.Model):
|
||||
track_candidates = track_candidates.sorted(
|
||||
lambda track:
|
||||
(track.is_published,
|
||||
track.is_track_live,
|
||||
track.track_start_remaining > 0,
|
||||
track.track_start_remaining == 0 # First get the tracks that started less than 10 minutes ago
|
||||
and track.track_start_relative < (10*60),
|
||||
track.track_start_remaining > 0, # Then the one that will begin later (the sooner come first)
|
||||
-1 * track.track_start_remaining,
|
||||
track.is_reminder_on,
|
||||
not track.wishlisted_by_default,
|
||||
|
||||
Reference in New Issue
Block a user