How it works...

Monetary fields are similar to Float fields, but Odoo is able to represent them correctly in the user interface since it knows what their currency is through a second field for that purpose.

This currency field is expected to be named currency_id, but we can use whatever field name we like as long as it is indicated using the currency_field optional parameter.

This is very useful when you need to maintain amounts in different currencies in the same record, for example, in the currency of the sale order and in the currency of the company. You can configure two fields as fields.Many2one(res.currency) and use the first one for the first amount and the other one for the second amount.

You might like to know that the decimal precision for the amount is taken from the currency definition (the decimal_precision field of the res.currency model).