Merge lp:~cedric-lebrouster/ocb-web/ocb-6.1-bug-1163912-calendar-view into lp:ocb-web/6.1

Proposed by Cedric Le Brouster(OpenFire)
Status: Needs review
Proposed branch: lp:~cedric-lebrouster/ocb-web/ocb-6.1-bug-1163912-calendar-view
Merge into: lp:ocb-web/6.1
Diff against target: 15 lines (+3/-1)
1 file modified
addons/web_calendar/static/src/js/calendar.js (+3/-1)
To merge this branch: bzr merge lp:~cedric-lebrouster/ocb-web/ocb-6.1-bug-1163912-calendar-view
Reviewer Review Type Date Requested Status
Holger Brunn (Therp) Needs Fixing
Review via email: mp+215171@code.launchpad.net

Description of the change

Fixes the bug 1163912 (Calendar views did not show events starting in previous month).

To post a comment you must log in.
Revision history for this message
Holger Brunn (Therp) (hbrunn) wrote :

To stay compatible with calendars using date_delay, you should do your behavior if date_stop is defined and the original otherwise. So instead of deleting #8, wrap it into "if(!this.date_stop)"

review: Needs Fixing

Unmerged revisions

2522. By Cedric Le Brouster(OpenFire)

[FIX] Calendar month view does not show events starting in previous month. bug-1163912

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'addons/web_calendar/static/src/js/calendar.js'
2--- addons/web_calendar/static/src/js/calendar.js 2013-03-01 09:35:20 +0000
3+++ addons/web_calendar/static/src/js/calendar.js 2014-04-10 13:09:33 +0000
4@@ -438,8 +438,10 @@
5 get_range_domain: function() {
6 var format = openerp.web.date_to_str,
7 domain = this.last_search[0].slice(0);
8- domain.unshift([this.date_start, '>=', format(this.range_start.clone().addDays(-6))]);
9 domain.unshift([this.date_start, '<=', format(this.range_stop.clone().addDays(6))]);
10+ if (this.date_stop) {
11+ domain.unshift([this.date_stop, '>=', format(this.range_start.clone().addDays(-6))]);
12+ }
13 return domain;
14 },
15 do_show: function () {

Subscribers

People subscribed via source and target branches