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

Proposed by Cedric Le Brouster(OpenFire)
Status: Rejected
Rejected by: Holger Brunn (Therp)
Proposed branch: lp:~cedric-lebrouster/ocb-web/ocb-7.0-bug-1163912-calendar-view
Merge into: lp:ocb-web
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/ocb-web/ocb-7.0-bug-1163912-calendar-view
Reviewer Review Type Date Requested Status
Holger Brunn (Therp) Disapprove
Review via email:

Description of the change

Correction of the fix 3989 for the bug 1163912

This patch fixes the problem of calendars not shown in next months when parameter date_delay is used.
I also think the domain is better when date_stop is used, with 2 tests instead of 6 for the same result.

However, it brings an other problem.
As I can't find a way to use date_delay in domain, every calendars prior to current month are returned, which can significantly slow down process for big databases, and which makes unwanted 'colors' shown in the right panel.

For this reason, I would understand if this merge were rejected.

The best way I see to make it work perfectly would be to change every calendar using date_delay to use date_stop instead.

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

Same as for your 6.1 fix: Do your behavior if you have a date_stop, the original otherwise.

review: Needs Fixing
Revision history for this message
Holger Brunn (Therp) (hbrunn) wrote :

please make a pull request for if you still consider this fix relevant.

Revision history for this message
Holger Brunn (Therp) (hbrunn) wrote :

Development for 7.0 has moved to github on - please move your merge proposal there if it is still valid.

(I close and reject this in order to have a cleaner overview for 6.1 MPs which indeed have to be done on launchpad)

review: Disapprove

Unmerged revisions

4180. 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 08:56:57 +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 () {