I have created  two classes  (shown below) along with the necessary views 
but when I open the views associated with class AppointmentSchedule  the 
day selection-field from class AppointmentHours is not shown in 
active_hours many2one field  hour_start and hour_end field display 
correctly.

class AppointmentHours(ModelSQL, ModelView):
    'Appointment Hours'
    __name__ = 'gnuhealth.appointment.hours'
    day = fields.Selection([('monday','Monday'),('tuesday','Tuesday'),
    ('wednesday','Wednesday'),('thursday','Thursday'),('friday','Friday'),
    ('saturday','Saturday'),('sunday','Sunday')],'Day of the Week',
    required=True, select=True) 
    hour_start = fields.Time('Hour Start')
    hour_end = fields.Time('Hour End')


    
class AppointmentSchedule(ModelSQL, ModelView):
    'Appointment Schedule'
    __name__ = 'gnuhealth.appointment.schedule'
    
    physician = 
fields.Many2One('gnuhealth.physician','Physician',required=True)
    
    active_hours= fields.One2Many('gnuhealth.appointment.hours','day', 
'Working Hours')
  

  
furthermore when I attempt to create a new entry I receive this message.

File 
"/home/gnuhealth/2.8.test/tryton-2.8.1/tryton/gui/window/view_form/view/form_gtk/one2many.py",
 
line 340, in _sig_new
    many=field_size, context=ctx)

  File 
"/home/gnuhealth/2.8.test/tryton-2.8.1/tryton/gui/window/win_form.py", line 
35, in __init__
    self.screen.new()

  File 
"/home/gnuhealth/2.8.test/tryton-2.8.1/tryton/gui/window/view_form/screen/screen.py",
 
line 439, in new
    record = group.new(default)

  File 
"/home/gnuhealth/2.8.test/tryton-2.8.1/tryton/gui/window/view_form/model/group.py",
 
line 312, in new
    record.default_get()

  File 
"/home/gnuhealth/2.8.test/tryton-2.8.1/tryton/gui/window/view_form/model/record.py",
 
line 346, in default_get
    elif (self.group.fields[self.parent_name].attrs['relation']

Help is appreciated

Reply via email to