Merge lp:~cedric-lebrouster/openerp-web/7.0-bug-1163912-calendar-view into lp:openerp-web/7.0

Proposed by Cedric Le Brouster(OpenFire)
Status: Needs review
Proposed branch: lp:~cedric-lebrouster/openerp-web/7.0-bug-1163912-calendar-view
Merge into: lp:openerp-web/7.0
Diff against target: 27 lines (+4/-11)
1 file modified
addons/web_calendar/static/src/js/calendar.js (+4/-11)
To merge this branch: bzr merge lp:~cedric-lebrouster/openerp-web/7.0-bug-1163912-calendar-view
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+215129@code.launchpad.net

Description of the change

Correction of the fix 3989 for the bug 1163912 (didn't work for calendars using date_delay instead of date_stop).

To post a comment you must log in.

Unmerged revisions

4172. By Cedric Le Brouster(OpenFire)

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

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 2014-02-14 11:42:58 +0000
3+++ addons/web_calendar/static/src/js/calendar.js 2014-04-10 10:02:31 +0000
4@@ -396,19 +396,12 @@
5 });
6 },
7 get_range_domain: function() {
8- var format = instance.web.date_to_str;
9- var A = format(this.range_start.clone().addDays(-6));
10- var B = format(this.range_stop.clone().addDays(6));
11- var domain = [
12- '&', [this.date_start, '>=', A], [this.date_start, '<=', B]
13- ];
14+ var format = instance.web.date_to_str,
15+ domain = this.last_search[0].slice(0);
16+ domain.unshift([this.date_start, '<=', format(this.range_stop.clone().addDays(6))]);
17 if (this.date_stop) {
18- domain.push(
19- '&', [this.date_stop, '>=', A], [this.date_stop, '<=', B],
20- '&', [this.date_start, '<', A], [this.date_stop, '>', B]);
21- domain.unshift("|", "|");
22+ domain.unshift([this.date_stop, '>=', format(this.range_start.clone().addDays(-6))]);
23 }
24- domain.concat(this.last_search[0].slice(0))
25 return domain;
26 },
27 do_show: function () {