Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

ITA - Localizzazione valute per amount_to_text

Beta License: AGPL-3 OCA/l10n-italy Translate me on Weblate Try me on Runboat

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”

Table of contents

Configuration

Italiano

Versione libreria num2words >= 0.5.12

English

num2words library version >= 0.5.12

Usage

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:

<t t-foreach="docs" t-as="o">
    <t t-set="currency" t-value="o.currency_id"/>
    # Language obtained from context
    <t t-esc="currency.with_context({'lang': 'it_IT'}).amount_to_text(45.75)"/>

    # Language obtained from user/partner settings.
    # If not it_IT, Odoo core amount_to_text will be used.
    <t t-esc="currency.amount_to_text(45.75)"/>
</t>

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:

<t t-foreach="docs" t-as="o">
    <t t-set="currency" t-value="o.currency_id"/>
    # Language obtained from context
    <t t-esc="currency.with_context({'lang': 'it_IT'}).amount_to_text(45.75)"/>

    # Language obtained from user/partner settings.
    # If not it_IT, Odoo core amount_to_text will be used.
    <t t-esc="currency.amount_to_text(45.75)"/>
</t>

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed feedback.

Do not contact contributors directly about support or help with technical issues.

Credits

Authors

  • Sergio Zanchetta - Associazione PNLug APS

  • Ecosoft Co. Ltd

Contributors

Maintainers

This module is maintained by the OCA.

Odoo Community Association

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

This module is part of the OCA/l10n-italy project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

Metadata

Release files for odoo14-addon-l10n-it-amount-to-text 14.0.1.0.1.dev3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for odoo14-addon-l10n-it-amount-to-text 14.0.1.0.1.dev3
File Interpreter ABI Platform Actions
odoo14_addon_l10n_it_amount_to_text-14.0.1.0.1.dev3-py3-none-any.whl Python 3 none any Details for odoo14_addon_l10n_it_amount_to_text-14.0.1.0.1.dev3-py3-none-any.whl

Release files / odoo14_addon_l10n_it_amount_to_text-14.0.1.0.1.dev3-py3-none-any.whl

Download URL odoo14_addon_l10n_it_amount_to_text-14.0.1.0.1.dev3-py3-none-any.whl
Size 28.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
123a078858bd6260bfc41614f2248be4bb39f29e61f4ffefcac2158f4492ba60
BLAKE2b-256 checksum
How to use checksums
a4f18ce7c6fd8b19c27a7131070703f353c41a4b0644d9cb774486459b566ac6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.3

Security for odoo14-addon-l10n-it-amount-to-text 14.0.1.0.1.dev3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page