Last active
July 18, 2017 07:19
-
-
Save tienhieuD/50a8230b933851bd3565a06b799a17f3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@api.multi | |
@api.onchange('monhoc') | |
def tinhhinhgiaovientrongto(self): | |
lst = [] #list chứa id giáo viên dạy môn học đc chọn | |
tmp1 = self.env['solienlac.monhoc_has_giaovien'].search([ | |
('monhoc.id', '=', self.monhoc.id), | |
]) | |
tmp2 = map(lambda x: x.giaovien.id, tmp1) | |
lst = tmp2 | |
return {'domain':{'giaovien': [('id', 'in', lst)]}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment