Merge lp:~savoirfairelinux-openerp/openerp-web/7.0-fix-1197323 into lp:openerp-web/7.0

Status: Needs review
Proposed branch: lp:~savoirfairelinux-openerp/openerp-web/7.0-fix-1197323
Merge into: lp:openerp-web/7.0
Diff against target: 22 lines (+7/-4)
1 file modified
addons/web_calendar/static/src/js/calendar.js (+7/-4)
To merge this branch: bzr merge lp:~savoirfairelinux-openerp/openerp-web/7.0-fix-1197323
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+175400@code.launchpad.net

Description of the change

[FIX] Calendar view by backporting the fix from trunk

To post a comment you must log in.

Unmerged revisions

4002. By Maxime Chambreuil (http://www.savoirfairelinux.com)

[FIX] Backport of the trunk fix

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-06-28 09:07:06 +0000
3+++ addons/web_calendar/static/src/js/calendar.js 2013-07-17 20:47:24 +0000
4@@ -399,11 +399,14 @@
5 var A = format(this.range_start.clone().addDays(-6));
6 var B = format(this.range_stop.clone().addDays(6));
7 var domain = [
8- '|', '|',
9- '&', [this.date_start, '>=', A], [this.date_start, '<=', B],
10+ '&', [this.date_start, '>=', A], [this.date_start, '<=', B]
11+ ];
12+ if (this.date_stop) {
13+ domain.push(
14 '&', [this.date_stop, '>=', A], [this.date_stop, '<=', B],
15- '&', [this.date_start, '<', A], [this.date_stop, '>', B]
16- ];
17+ '&', [this.date_start, '<', A], [this.date_stop, '>', B]);
18+ domain.unshift("|", "|");
19+ }
20 domain.concat(this.last_search[0].slice(0))
21 return domain;
22 },