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

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -