[FIX] Resource : Set the day of the week field mandatory for working time/resource calendar to nullify the possibility of configuration mistake

lp bug: https://launchpad.net/bugs/881839 fixed

bzr revid: support@serpentcs.com-20111026212339-rkh78s6qq0lbchj4
This commit is contained in:
Serpent Consulting Services
2011-10-27 02:53:39 +05:30
parent 5ef63c30a6
commit f1d7ef6a32
+7 -1
View File
@@ -211,15 +211,21 @@ resource_calendar()
class resource_calendar_attendance(osv.osv):
_name = "resource.calendar.attendance"
_description = "Work Detail"
_columns = {
'name' : fields.char("Name", size=64, required=True),
'dayofweek': fields.selection([('0','Monday'),('1','Tuesday'),('2','Wednesday'),('3','Thursday'),('4','Friday'),('5','Saturday'),('6','Sunday')], 'Day of week'),
'dayofweek': fields.selection([('0','Monday'),('1','Tuesday'),('2','Wednesday'),('3','Thursday'),('4','Friday'),('5','Saturday'),('6','Sunday')], 'Day of week', required=True),
'date_from' : fields.date('Starting date'),
'hour_from' : fields.float('Work from', size=8, required=True, help="Working time will start from"),
'hour_to' : fields.float("Work to", size=8, required=True, help="Working time will end at"),
'calendar_id' : fields.many2one("resource.calendar", "Resource's Calendar", required=True),
}
_order = 'dayofweek, hour_from'
_defaults = {
'dayofweek' : '0'
}
resource_calendar_attendance()
def convert_timeformat(time_string):