Skip to content

Instantly share code, notes, and snippets.

@allanaguilar
Created March 12, 2019 22:27
Show Gist options
  • Save allanaguilar/8ebd9d3a35c390e88cab3cbb257649c1 to your computer and use it in GitHub Desktop.
Save allanaguilar/8ebd9d3a35c390e88cab3cbb257649c1 to your computer and use it in GitHub Desktop.
Onchange ODOO
@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