How to trigger an onchange event?

  • type
      technical
  • info created for version
      14.0
  • mvc
      Python (models/controllers)
Add to Cart

@api.onchange('code_prefix_start')
def _onchange_code_prefix_start(self):
    if not self.code_prefix_end or self.code_prefix_end < self.code_prefix_start:
        self.code_prefix_end = self.code_prefix_start