Odoo provides compute function which helps to calculate from some other fields.It is just like any other regular field along with an additional argument compute.Which can be stored directly and retrieved directly from database,and the api operation @api.depends helps to compute the value based on the change in the depends field. In this video it discusses about this compute function and how to store value in a field using this functionality and @api.depends operation.