Merge lp:~openerp-dev/openerp-web/7.0-opw-594748-fka into lp:openerp-web/7.0

Proposed by Foram Katharotiya (OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openerp-web/7.0-opw-594748-fka
Merge into: lp:openerp-web/7.0
Diff against target: 22 lines (+7/-3)
1 file modified
addons/web_calendar/static/src/js/calendar.js (+7/-3)
To merge this branch: bzr merge lp:~openerp-dev/openerp-web/7.0-opw-594748-fka
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+173179@code.launchpad.net

Description of the change

Hello,

 Fixed The issue of AttributeError: 'NoneType' object has no attribute 'split' in calander view of all modules where date_stop field was not passed.

Thanks,
FKA

To post a comment you must log in.
Revision history for this message
Csaba TOTH (tsabi) wrote :

This patch was merged in rev 4003
Please mark as merged!

Unmerged revisions

3995. By Foram Katharotiya (OpenERP)

[FIX] AttributeError: 'NoneType' object has no attribute 'split' in calander viewof all module where date_stop field wasn't declared

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 10:48: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 ];
13+ if (this.date_stop) {
14+ domain.push(
15+ '&', [this.date_stop, '>=', A], [this.date_stop, '<=', B],
16+ '&', [this.date_start, '<', A], [this.date_stop, '>', B]
17+ );
18+ domain.unshift("|", "|");
19+ }
20 domain.concat(this.last_search[0].slice(0))
21 return domain;
22 },