Merge lp:~openerp-dev/openerp-web/7.0-improve-gantt-bth into lp:openerp-web/7.0

Proposed by Bhumi Thakkar (Open ERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openerp-web/7.0-improve-gantt-bth
Merge into: lp:openerp-web/7.0
Diff against target: 12 lines (+1/-1)
1 file modified
addons/web_gantt/static/src/js/gantt.js (+1/-1)
To merge this branch: bzr merge lp:~openerp-dev/openerp-web/7.0-improve-gantt-bth
Reviewer Review Type Date Requested Status
Christophe Matthieu (OpenERP) (community) Needs Fixing
Review via email: mp+144255@code.launchpad.net

Description of the change

Hello,

       In gantt view, if value is '0' or '0.00' then return. for string it is done if (!tmp) return but for integer or float it does not work.

In Project => Projects => in Gantt View displayed records which have '0' or '0.00' value.

In IE Browser, Get error because of null values records
"Invalid Argument" also not displayed create button. if records displayed with zero value.

Thanks.

To post a comment you must log in.
Revision history for this message
Christophe Matthieu (OpenERP) (chm-openerp) wrote :

Hi,
Why "tmp < 1" ?
What about the value contained between 0 and 1 ?
Thanks

review: Needs Fixing

Unmerged revisions

3709. By Bhumi Thakkar (Open ERP)

[IMP] Improve code for value is less than 1 then return.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'addons/web_gantt/static/src/js/gantt.js'
2--- addons/web_gantt/static/src/js/gantt.js 2012-12-28 10:31:54 +0000
3+++ addons/web_gantt/static/src/js/gantt.js 2013-01-22 10:02:32 +0000
4@@ -155,7 +155,7 @@
5 } else { // we assume date_duration is defined
6 var tmp = instance.web.format_value(task[self.fields_view.arch.attrs.date_delay],
7 self.fields[self.fields_view.arch.attrs.date_delay]);
8- if (!tmp)
9+ if (!tmp || tmp < 1)
10 return;
11 task_stop = task_start.clone().addMilliseconds(tmp * 60 * 60 * 1000);
12 }