Merge lp:~openerp-dev/openerp-web/trunk-bug-1197323-psa into lp:openerp-web

Proposed by Paramjit Singh Sahota(OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openerp-web/trunk-bug-1197323-psa
Merge into: lp:openerp-web
Diff against target: 23 lines (+8/-4)
1 file modified
addons/web_calendar/static/src/js/calendar.js (+8/-4)
To merge this branch: bzr merge lp:~openerp-dev/openerp-web/trunk-bug-1197323-psa
Reviewer Review Type Date Requested Status
OpenERP R&D Web Team Pending
Review via email: mp+173133@code.launchpad.net

Description of the change

Hello,

Fixed the issue when we switch to any calendar view where date_stop was not declared than itz will show the traceback **AttributeError: 'NoneType' object has no attribute 'split'**.

Thankz You.

To post a comment you must log in.

Unmerged revisions

3770. By Paramjit Singh Sahota(OpenERP)

[FIX] [trunk/7.0]OpenERP Server Error when clicking on 'Order Planning'

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-05 06:03:26 +0000
4@@ -399,11 +399,15 @@
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_stop, '>=', A], [this.date_stop, '<=', B],
11- '&', [this.date_start, '<', A], [this.date_stop, '>', B]
12+ '&', [this.date_start, '>=', A], [this.date_start, '<=', B]
13 ];
14+ if (this.date_stop) {
15+ domain.push(
16+ '&', [this.date_stop, '>=', A], [this.date_stop, '<=', B],
17+ '&', [this.date_start, '<', A], [this.date_stop, '>', B]
18+ );
19+ domain.unshift("|", "|");
20+ }
21 domain.concat(this.last_search[0].slice(0))
22 return domain;
23 },