diff options
| author | Jeremy Kersten <jke@odoo.com> | 2018-12-05 08:52:28 +0000 |
|---|---|---|
| committer | Jeremy Kersten <jke@odoo.com> | 2018-12-05 08:54:19 +0000 |
| commit | 8a0e42e8f41f323a605d60aabf008711158e7386 (patch) | |
| tree | 075708f7a86b980df79108cc870efff6099e5539 /addons/website_event_track/controllers | |
| parent | ba7454eb088a10b98e0a51422aabffb31bc3da5d (diff) | |
[FIW] website_event_track: fix location order
Without this commit, each refresh of the agenda, will randomly show the locs.
-- Fix done in prod for oxp
closes odoo/odoo#29300
Diffstat (limited to 'addons/website_event_track/controllers')
| -rw-r--r-- | addons/website_event_track/controllers/main.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/addons/website_event_track/controllers/main.py b/addons/website_event_track/controllers/main.py index 036c108a3bd..ce7fa9fbf94 100644 --- a/addons/website_event_track/controllers/main.py +++ b/addons/website_event_track/controllers/main.py @@ -64,6 +64,7 @@ class WebsiteEventTrackController(http.Controller): locations[location][-1][3] -= 1 locations[location].append([track, start_date, end_date, 1]) dates[-1][1][location] = locations[location][-1] + locations = collections.OrderedDict(sorted(locations.items(), key=lambda t: t[0].id if t[0] else 0)) return { 'locations': locations, 'dates': dates |
