I'm going to create employee registration module. There is a organizational structure company -> estate -> division.Need add to estate field estates relevant to above selected company.but i think there is a issue with my code.it shows all the other estates & divisions also after selected company.i keep three tables for company, estate & division also.please advice me to correct my code.here is my worker registration class\[code\]class bpl_worker_registration(osv.osv): def on_change_company(self, cr, uid, ids, company_id, context=None): if not company_id: return {} company = self.pool.get('bpl.company.n.registration').browse(cr, uid, company_id, context=context) estates = company.estates if estates: return { 'value': { 'bpl_estate_id': estates[0].id } } else: return { 'value': { 'bpl_estate_id': 0 } } def on_change_estate(self, cr, uid, ids, estate_id, context=None): if not estate_id: return {} estate = self.pool.get('bpl.estate.n.registration').browse(cr, uid, estate_id, context=context) divisions = estate.divisions if divisions: return { 'value': { 'bpl_division_id': divisions[0].id } } else: return { 'value': { 'bpl_division_id': 0 } } _name = "bpl.worker" _description = "Worker registration details" _columns = { 'bpl_company_id':fields.many2one('bpl.company.n.registration', 'Company', help='Company'), 'bpl_estate_id':fields.many2one('bpl.estate.n.registration', 'Estate', help='Estate'), 'bpl_division_id':fields.many2one('bpl.division.n.registration', 'Division', help='Division'),\[/code\]here is part of my view.xml\[code\]<field name="bpl_company_id" on_change="on_change_company(bpl_company_id)" /><field name="bpl_estate_id" on_change="on_change_estate(bpl_estate_id)" /><field name="bpl_division_id" />\[/code\]below shows how I was created those 3 models (company/estate/field).\[code\]class company_new_registration(osv.osv): _name = "bpl.company.n.registration" _description = "Company" _columns = { 'name': fields.char('Company Name', size=128, required=True), 'estates': fields.one2many('bpl.estate.n.registration', 'company_id', 'Estate') }company_new_registration()class estate_new_registration(osv.osv): _name = "bpl.estate.n.registration" _description = "Estates" _columns = { 'name': fields.char('Estate Name', size=128, required=True), 'company_id': fields.many2one('bpl.company.n.registration', 'Company Name', select=True), 'divisions': fields.one2many('bpl.division.n.registration', 'estate_id', 'Division') }estate_new_registration()class division_new_registration(osv.osv): _name = "bpl.division.n.registration" _description = "Divisions" _columns = { 'name': fields.char('Division Name', size=128, required=True), 'estate_id': fields.many2one('bpl.estate.n.registration', 'Estate Name', select=True), }division_new_registration()\[/code\]also please advice me to is there any efficient way to do these things (ex : company/estate/division mapping)