How it works...

An onchange method uses the @api.onchange decorator, which is passed the names of the fields that change and thus will trigger the call to the method. In our case, we say that whenever member_id is modified in the user interface, the method must be called.

In the body of the method, we search the books currently borrowed by the member, and we use an attribute assignment to update the book_ids attribute of the wizard.

The @api.onchange decorator takes care of modifying the view sent to the web client to add an on_change attribute to the field. This used to be a manual operation in the "old API".
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.223.33.157