from netforce.model import Model, fields class PatientMorbidity(Model): _name="clinic.patient.morbidity" _string="Patient Patient Morbidity" _fields={ "patient_id": fields.Many2One("clinic.patient","Patient",required=True,on_delete="cascade"), "morbility_id": fields.Many2One("clinic.morbidity","Morbidity"), "ans": fields.Selection([['yes','Yes'],['no','No']], "Answer"), "analysis_date": fields.Date("Analysis Date"), } _defaults={ 'ans': "no", } PatientMorbidity.register()