代码:
for record in self:
dimissions = self.env['dimission.summary'].search([('employee_id','=',record.employee_id.id)])
for dimission in dimissions:
record['x_lzqwlzrq'] = dimission.expected_departure_date
break
==========
for record in self:
dimissions = self.env['dimission.summary'].search([('employee_id','=',record.employee_id.id)])
for dimission in dimissions:
record['x_lzqrlzrq'] = dimission.leave_time
break
代码:
for record in self:
dimissions = self.env ['dimission.summary'] .search( [('employee_id','=',record.employee_id.id)] )
for dimission in dimissions:
record ['x_lzqwlzrq'] = dimission.expected_departure_date
break
==========
for record in self:
dimissions = self.env ['dimission.summary'] .search( [('employee_id','=',record.employee_id.id)] )
for dimission in dimissions:
record ['x_lzqrlzrq'] = dimission.leave_time
break