from netforce.model import Model, fields class VisitPlane(Model): _name="clinic.visit.plane" _string="Visit Plan" _fieldname="visit_id" _fields={ 'visit_id': fields.Many2One("clinic.visit","Visit"), 'hd_case_id': fields.Many2One("clinic.hd.case","HD Case"), "date": fields.Date("Date"), "time_start": fields.DateTime("Time Start"), "time_stop": fields.DateTime("Time Stop"), "state": fields.Selection([("open","Open"),("close","Close")],"Status"), 'active': fields.Boolean("Active"), # to hide } _defaults={ 'state': 'open', 'active': True, } VisitPlane.register()