Created
March 12, 2019 22:27
-
-
Save allanaguilar/8ebd9d3a35c390e88cab3cbb257649c1 to your computer and use it in GitHub Desktop.
Onchange ODOO
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.onchange('phase_type') | |
def _onchange_phase_type(self): | |
if self.phase_type: | |
phase_line_ids = [] | |
for line in self.phase_type.phase_lines: | |
phase_line_ids.append((0, 0, { | |
'phase': line.phase_id.id, | |
})) | |
self.project_sch_lines = phase_line_ids |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment