In the first step, we added the _update_book_price() method, which searches for all books and increases the price by $10 USD. We started the method name with _ as this is considered private by ORM and cannot be invoked through RPC.
In the second step, we used the <function> tag with two attributes:
- model: The model name in which the method is declared
- name : The name of the method you want to invoke
When you install this module, _update_book_price() will be called and the price of books will be increased by $10.
Always put this function with the noupdate options. Otherwise, it will be invoked every time you update your module.