# Allow entry of floats in duration and effort # Copyright 2005 by Brian C. Christensen """ Change type of many hours fields to float """ # This file is part of GanttPV. # # GanttPV is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # GanttPV is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GanttPV; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # 060725 - first version # 060815 - added assignment # 070321 - fixed error and changed setundo text def Do(): rt = { 'Name': 'Task' } ct = [ { 'Name': 'DurationHours','DataType': 'f', }, # this seems to work { 'Name': 'EffortHours','DataType': 'f', }, # this seems to work (min 1 hour per day??) ] Data.AddReportType(rt, ct) rt = { 'Name': 'Task/Assignment' } ct = [ { 'Name': 'EffortHours','DataType': 'f', }, # this seems to work (min 1 hour per day??) ] Data.AddReportType(rt, ct) rt = { 'Name': 'Resource/Assignment' } ct = [ { 'Name': 'EffortHours','DataType': 'f', }, # this seems to work (min 1 hour per day??) ] Data.AddReportType(rt, ct) # change = { 'Table': 'OtherData', 'ID': 1, 'WeekHours': (1, 1.25, 1.5, 1.75, 2, 0, 0) } # change = { 'Table': 'OtherData', 'ID': 1, 'WeekHours': (1.25, 1.25, 1.25, 1.25, 1.25, 0, 0) } # Data.Update(change) Data.SetUndo("Install Partial Hour Duration") Do()