from netforce.model import Model, fields class Branch(Model): _name="clinic.branch" _string="Branch" _key=['name'] _fields={ "name": fields.Char("Name",required=True,search=True), "parent_id": fields.Many2One("clinic.branch","Parent"), } Branch.register()