python - Fetch records from other table in OpenERP 8(Odoo) -
i have been using odoo in ubuntu14.04.i trying fetch records contained in other tables based on values entered in field. have table 'hr_employee' getting employee names through many2one field. on basis of value of field , want field value of other table('hr_contract') matching values of employee names in joins. dont want use db cursor here. can done through search function or there other thing can do. hopes suggestion
yes can thing search method follow,
contacts = self.env['hr.contact'].search([('employee_id','=',self.employee_id.id)]) contact in contacts: wage = contact.wage ### add code here
Comments
Post a Comment