← Back to team overview

openerp-community-reviewer team mailing list archive

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

 

Cedric Le Brouster(OpenFire) has proposed merging lp:~cedric-lebrouster/ocb-web/ocb-7.0-bug-1163912-calendar-view into lp:ocb-web.

Requested reviews:
  OpenERP Community Backports Team (ocb)
Related bugs:
  Bug #1163912 in OpenERP Web: "[Trunk/7.0] Calendar month view does not show events starting in previous month"
  https://bugs.launchpad.net/openerp-web/+bug/1163912

For more details, see:
https://code.launchpad.net/~cedric-lebrouster/ocb-web/ocb-7.0-bug-1163912-calendar-view/+merge/215111

Correction of the fix 3989 for the bug 1163912 (didn't work for calendars using date_delay instead of date_stop).
-- 
https://code.launchpad.net/~cedric-lebrouster/ocb-web/ocb-7.0-bug-1163912-calendar-view/+merge/215111
Your team OpenERP Community Backports Team is requested to review the proposed merge of lp:~cedric-lebrouster/ocb-web/ocb-7.0-bug-1163912-calendar-view into lp:ocb-web.
=== modified file 'addons/web_calendar/static/src/js/calendar.js'
--- addons/web_calendar/static/src/js/calendar.js	2014-02-14 11:42:58 +0000
+++ addons/web_calendar/static/src/js/calendar.js	2014-04-10 08:56:57 +0000
@@ -396,19 +396,12 @@
         });
     },
     get_range_domain: function() {
-        var format = instance.web.date_to_str;
-        var A = format(this.range_start.clone().addDays(-6));
-        var B = format(this.range_stop.clone().addDays(6));
-        var domain = [
-            '&', [this.date_start, '>=', A], [this.date_start, '<=', B]
-        ];
+        var format = instance.web.date_to_str,
+            domain = this.last_search[0].slice(0);
+        domain.unshift([this.date_start, '<=', format(this.range_stop.clone().addDays(6))]);
         if (this.date_stop) {
-            domain.push(
-            '&', [this.date_stop, '>=', A], [this.date_stop, '<=', B],
-            '&', [this.date_start, '<', A], [this.date_stop, '>', B]);
-            domain.unshift("|", "|");
+            domain.unshift([this.date_stop, '>=', format(this.range_start.clone().addDays(-6))]);
         }
-        domain.concat(this.last_search[0].slice(0))
         return domain;
     },
     do_show: function () {


Follow ups