Odoo api.onchange decorator is used to invoke a method when a field’s value changed. It can be used to validate the data or to trigger an action.
Video Contents
00:15 Introduction
00:45 Define an onchange function
The function of this decorator will be called when the field value changes. Moreover, it supports only single field names; on the contrary, dotted names such as parent_id.field_name will not be considered.
Furthermore, onchange methods are invoked on pseudo-records that contain values of the form. In this video, we are invoking a function to set the country automatically when we set a value in the Nationality field.
Connect With Us:
➡️Website:
➡️Email : info@cybrosys.com
➡️Twitter:
➡️LinkedIn:
➡️Facebook:
➡️Instagram:
➡️Pinterest:
#api.onchange #Odoo15 #api.onchange #Odoo15 #Odoo #Development #Tutorials