|
| 1 | +.. image:: https://odoo-community.org/readme-banner-image |
| 2 | + :target: https://odoo-community.org/get-involved?utm_source=readme |
| 3 | + :alt: Odoo Community Association |
| 4 | + |
| 5 | +============================================== |
| 6 | +ITA - Localizzazione valute per amount_to_text |
| 7 | +============================================== |
| 8 | + |
| 9 | +.. |
| 10 | + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 11 | + !! This file is generated by oca-gen-addon-readme !! |
| 12 | + !! changes will be overwritten. !! |
| 13 | + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 14 | + !! source digest: sha256:8a87a67dfcdafd6c37d9855fa442852462175c70dde2dd062806c1cbc2d009ee |
| 15 | + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 16 | +
|
| 17 | +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png |
| 18 | + :target: https://odoo-community.org/page/development-status |
| 19 | + :alt: Beta |
| 20 | +.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png |
| 21 | + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html |
| 22 | + :alt: License: AGPL-3 |
| 23 | +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fl10n--italy-lightgray.png?logo=github |
| 24 | + :target: https://github.com/OCA/l10n-italy/tree/18.0/l10n_it_amount_to_text |
| 25 | + :alt: OCA/l10n-italy |
| 26 | +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png |
| 27 | + :target: https://translation.odoo-community.org/projects/l10n-italy-18-0/l10n-italy-18-0-l10n_it_amount_to_text |
| 28 | + :alt: Translate me on Weblate |
| 29 | +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png |
| 30 | + :target: https://runboat.odoo-community.org/builds?repo=OCA/l10n-italy&target_branch=18.0 |
| 31 | + :alt: Try me on Runboat |
| 32 | + |
| 33 | +|badge1| |badge2| |badge3| |badge4| |badge5| |
| 34 | + |
| 35 | +**Italiano** |
| 36 | + |
| 37 | +Il core di Odoo fornisce ``amount_to_text``, il quale converte importi |
| 38 | +numerici in testo ottenendo la lingua dal contesto fornito o dalle |
| 39 | +impostazioni utente/partner, con alcune limitazioni. |
| 40 | + |
| 41 | +Esempio: 45,75 € |
| 42 | + |
| 43 | +- Lingua utente "Inglese" → Forty-Five Euros and Seventy-Five Cents |
| 44 | +- Lingua utente "Italiano" → Quarantacinque Euros e Settantacinque Cents |
| 45 | + |
| 46 | +L'unità/sottounità di valuta non viene tradotta e non viene gestita la |
| 47 | +forma singolare. Inoltre tutte le parole possiedono l'iniziale |
| 48 | +maiuscola, forma non corretta nella lingua italiana. |
| 49 | + |
| 50 | +Questo modulo fornisce una base per tradurre le unità/sottounità di |
| 51 | +valuta, adattando le parole alle regole della lingua italiana. |
| 52 | + |
| 53 | +Vengono inoltre gestite le eccezioni per la forma singolare delle valute |
| 54 | +EUR, USD, GBP e CNY. |
| 55 | + |
| 56 | +Esempio: 1,01 € |
| 57 | + |
| 58 | +- La parte intera diventa "un euro", non "uno euro" |
| 59 | +- La parte decimale diventa "un centesimo", non "uno centesimi" |
| 60 | + |
| 61 | +**English** |
| 62 | + |
| 63 | +Odoo core provides ``amount_to_text``, which converts numerical amounts |
| 64 | +to text getting language from given context or user/partner setting, |
| 65 | +with some limitations. |
| 66 | + |
| 67 | +Example: 45,75 € |
| 68 | + |
| 69 | +- User Language 'English' -> Forty-Five Euros and Seventy-Five Cents |
| 70 | +- User Language 'Italian' -> Quaranta Euros e Settantacinque Cents |
| 71 | + |
| 72 | +Currency unit/subunit is not translated and singular form is not |
| 73 | +handled. Moreover all words are capitalized, which is incorrect in |
| 74 | +italian language. |
| 75 | + |
| 76 | +This module provides a base for translating currency unit/subunit |
| 77 | +adapting words to italian language rules. |
| 78 | + |
| 79 | +Singular form expections for EUR, USD, GBP and CNY currencies are |
| 80 | +handled as well. |
| 81 | + |
| 82 | +Example: 1,01 € |
| 83 | + |
| 84 | +- Integer part becomes "un euro", not "uno euro" |
| 85 | +- Decimal part becomes "un centesimo", not "uno centesimi" |
| 86 | + |
| 87 | +**Table of contents** |
| 88 | + |
| 89 | +.. contents:: |
| 90 | + :local: |
| 91 | + |
| 92 | +Configuration |
| 93 | +============= |
| 94 | + |
| 95 | +**Italiano** |
| 96 | + |
| 97 | +Versione libreria ``num2words`` >= 0.5.12 |
| 98 | + |
| 99 | +**English** |
| 100 | + |
| 101 | +``num2words`` library version >= 0.5.12 |
| 102 | + |
| 103 | +Usage |
| 104 | +===== |
| 105 | + |
| 106 | +**Italiano** |
| 107 | + |
| 108 | +Chiamare la funzione ``amount_to_text`` nel modello valuta |
| 109 | +(``res.currency``). |
| 110 | + |
| 111 | +Per esempio, se è necessario convertire un importo in testo aggiungere |
| 112 | +questo codice ai report: |
| 113 | + |
| 114 | +:: |
| 115 | + |
| 116 | + <t t-foreach="docs" t-as="o"> |
| 117 | + <t t-set="currency" t-value="o.currency_id"/> |
| 118 | + <!-- Language obtained from context --> |
| 119 | + <t t-out="currency.with_context(lang='it_IT').amount_to_text(45.75)"/> |
| 120 | + |
| 121 | + <!-- Language obtained from user/partner settings. |
| 122 | + If not it_IT, Odoo core amount_to_text will be used. --> |
| 123 | + <t t-out="currency.amount_to_text(45.75)"/> |
| 124 | + </t> |
| 125 | + |
| 126 | +**English** |
| 127 | + |
| 128 | +Call function ``amount_to_text`` in currency model (``res.currency``). |
| 129 | + |
| 130 | +For example, add this code if you need to convert amount to text in your |
| 131 | +reports: |
| 132 | + |
| 133 | +:: |
| 134 | + |
| 135 | + <t t-foreach="docs" t-as="o"> |
| 136 | + <t t-set="currency" t-value="o.currency_id"/> |
| 137 | + <!-- Language obtained from context --> |
| 138 | + <t t-out="currency.with_context(lang='it_IT').amount_to_text(45.75)"/> |
| 139 | + |
| 140 | + <!-- Language obtained from user/partner settings. |
| 141 | + If not it_IT, Odoo core amount_to_text will be used. --> |
| 142 | + <t t-out="currency.amount_to_text(45.75)"/> |
| 143 | + </t> |
| 144 | + |
| 145 | +Bug Tracker |
| 146 | +=========== |
| 147 | + |
| 148 | +Bugs are tracked on `GitHub Issues <https://github.com/OCA/l10n-italy/issues>`_. |
| 149 | +In case of trouble, please check there if your issue has already been reported. |
| 150 | +If you spotted it first, help us to smash it by providing a detailed and welcomed |
| 151 | +`feedback <https://github.com/OCA/l10n-italy/issues/new?body=module:%20l10n_it_amount_to_text%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. |
| 152 | + |
| 153 | +Do not contact contributors directly about support or help with technical issues. |
| 154 | + |
| 155 | +Credits |
| 156 | +======= |
| 157 | + |
| 158 | +Authors |
| 159 | +------- |
| 160 | + |
| 161 | +* Sergio Zanchetta - Associazione PNLug APS |
| 162 | +* Ecosoft Co. Ltd |
| 163 | + |
| 164 | +Contributors |
| 165 | +------------ |
| 166 | + |
| 167 | +- Saran Lim. <saranl@ecosoft.co.th> |
| 168 | +- Pimolnat Suntian <pimolnats@ecosoft.co.th> |
| 169 | +- Sergio Zanchetta <https://github.com/primes2h> |
| 170 | + |
| 171 | +Maintainers |
| 172 | +----------- |
| 173 | + |
| 174 | +This module is maintained by the OCA. |
| 175 | + |
| 176 | +.. image:: https://odoo-community.org/logo.png |
| 177 | + :alt: Odoo Community Association |
| 178 | + :target: https://odoo-community.org |
| 179 | + |
| 180 | +OCA, or the Odoo Community Association, is a nonprofit organization whose |
| 181 | +mission is to support the collaborative development of Odoo features and |
| 182 | +promote its widespread use. |
| 183 | + |
| 184 | +This module is part of the `OCA/l10n-italy <https://github.com/OCA/l10n-italy/tree/18.0/l10n_it_amount_to_text>`_ project on GitHub. |
| 185 | + |
| 186 | +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
0 commit comments