OdooWiki OCA HUB

ITA - Localizzazione valute per amount_to_text

l10n_it_amount_to_text folder_open OCA/l10n-italy open_in_new
Localization/Italy License: AGPL-3

Italiano

Il core di Odoo fornisce amount_to_text, il quale converte importi numerici in testo ottenendo la lingua dal contesto fornito o dalle impostazioni utente/partner, con alcune limitazioni.

Esempio: 45,75 €

  • Lingua utente "Inglese" → Forty-Five Euros and Seventy-Five Cents
  • Lingua utente "Italiano" → Quarantacinque Euros e Settantacinque Cents

L'unità/sottounità di valuta non viene tradotta e non viene gestita la forma singolare. Inoltre tutte le parole possiedono l'iniziale maiuscola, forma non corretta nella lingua italiana.

Questo modulo fornisce una base per tradurre le unità/sottounità di valuta, adattando le parole alle regole della lingua italiana.

Vengono inoltre gestite le eccezioni per la forma singolare delle valute EUR, USD, GBP e CNY.

Esempio: 1,01 €

  • La parte intera diventa "un euro", non "uno euro"
  • La parte decimale diventa "un centesimo", non "uno centesimi"

English

Odoo core provides amount_to_text, which converts numerical amounts to text getting language from given context or user/partner setting, with some limitations.

Example: 45,75 €

  • User Language 'English' -\> Forty-Five Euros and Seventy-Five Cents
  • User Language 'Italian' -\> Quaranta Euros e Settantacinque Cents

Currency unit/subunit is not translated and singular form is not handled. Moreover all words are capitalized, which is incorrect in italian language.

This module provides a base for translating currency unit/subunit adapting words to italian language rules.

Singular form expections for EUR, USD, GBP and CNY currencies are handled as well.

Example: 1,01 €

  • Integer part becomes "un euro", not "uno euro"
  • Decimal part becomes "un centesimo", not "uno centesimi"

auto_awesome What this module does

AI-generated from the code · Odoo 19.0

Converts currency amounts into written Italian words, correctly translating currency units and subunits and handling singular forms for EUR, USD, GBP and CNY.

This module improves how Odoo writes out amounts in words when the user's language is Italian. It extends the currency model (res.currency) and overrides the amount_to_text method, so any screen or report that turns a number into text (for example payment amounts or invoice totals) will produce proper Italian wording.

When the active language is Italian, the module uses the num2words library to spell out the amount as a currency. If that library does not support the specific currency, it falls back to spelling the integer part and appending the currency's unit label in lower case, then adds the subunit label after "e" when there are decimals.

Business rules shown in the code: - Only applies when the language code is it_IT; otherwise the standard Odoo behaviour is kept. - Currency unit and subunit labels are taken from the currency record and lower-cased. - Singular forms are handled for EUR, USD, GBP and CNY, so 1,01 € becomes "un euro" and "un centesimo" instead of "uno euro". - Decimal places follow the currency's configured precision.

It touches the res.currency model and requires the Python package num2words version 0.5.12 or newer. No new menus or screens are added; the change is visible wherever amounts are converted to text in Italian.

Depends on

base
Models and fields (1)
  • res.currency · extends an existing model

Text generated by AI (DeepSeek) from reading the Odoo 19.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub

Availability by version

Reviewed: 2026-11-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 4 confirmed, 5 with no information of 9 versions.

Sources · Odoo 19.0

Confirmed on 2026-11-03 in branch 19.0 of OCA/l10n-italy.

terminal Installation and usage

OCA documentation · Odoo 19.0

Italiano

Versione libreria num2words \>= 0.5.12

English

num2words library version \>= 0.5.12

Italiano

Chiamare la funzione amount_to_text nel modello valuta (res.currency).

Per esempio, se è necessario convertire un importo in testo aggiungere questo codice ai report:

English

Call function amount_to_text in currency model (res.currency).

For example, add this code if you need to convert amount to text in your reports:

No verified information in OCA: Installation.

info

Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.