from netforce.model import Model, fields class PatientCycle(Model): _name="clinic.patient.cycle" _string="Patient Cycle" _key=['patient_id','cycle_id','day'] _fields={ "patient_id": fields.Many2One('clinic.patient',"Patient",required=True,on_delete="cascade",search=True), "cycle_id": fields.Many2One('clinic.cycle',"Cycle",search=True), "department_id": fields.Many2One('clinic.department',"Department",search=True), 'day': fields.Selection([('mon', 'Monday'), ('tue','Tuesday'), ('wed','Wednesday'),('thu','Thursday'),('fri','Friday'),('sat','Saturday'),('sun','Sunday')], 'Day',search=True), } PatientCycle.register()