In Odoo, computed and default fields are two types of fields that have different functionalities.
A computed field is a field that is not stored in the database, but rather computed or calculated on the fly when it is needed. The value of a computed field is calculated by a function, which is specified using the @api.depends decorator. The function is executed every time the value of one of the fields listed in the @api.depends decorator changes.
For example, let's say we have a model called Product with two fields price and discount. We want to compute the discounted price of the product based on the price and the discount. We can create a computed field called discounted_price and define a function that calculates its value based on the values of price and discount.
A default field, on the other hand, is a field that is stored in the database, but has a default value assigned to it. The default value is assigned when a new record is created, and can be a static value, a dynamic value based on the current date or time, or a value based on the value of another field in the same record.
For example, let's say we have a model called Customer with a field called date_joined. We want to assign a default value to date_joined that is the current date and time. We can create a default field called date_joined and define a function that returns the current date and time.
In summary, computed fields are calculated on the fly and not stored in the database, while default fields have a default value assigned to them and are stored in the database.