odoo-addon-l10n-it-fatturapa-out 16.0.1.0.19.2__py3-none-any.whl → 16.0.1.0.20__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- odoo/addons/l10n_it_fatturapa_out/README.rst +1 -1
- odoo/addons/l10n_it_fatturapa_out/__manifest__.py +1 -1
- odoo/addons/l10n_it_fatturapa_out/data/invoice_it_template.xml +4 -25
- odoo/addons/l10n_it_fatturapa_out/static/description/index.html +1 -1
- odoo/addons/l10n_it_fatturapa_out/wizard/efattura.py +12 -8
- odoo/addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py +17 -6
- {odoo_addon_l10n_it_fatturapa_out-16.0.1.0.19.2.dist-info → odoo_addon_l10n_it_fatturapa_out-16.0.1.0.20.dist-info}/METADATA +2 -2
- {odoo_addon_l10n_it_fatturapa_out-16.0.1.0.19.2.dist-info → odoo_addon_l10n_it_fatturapa_out-16.0.1.0.20.dist-info}/RECORD +10 -10
- {odoo_addon_l10n_it_fatturapa_out-16.0.1.0.19.2.dist-info → odoo_addon_l10n_it_fatturapa_out-16.0.1.0.20.dist-info}/WHEEL +0 -0
- {odoo_addon_l10n_it_fatturapa_out-16.0.1.0.19.2.dist-info → odoo_addon_l10n_it_fatturapa_out-16.0.1.0.20.dist-info}/top_level.txt +0 -0
@@ -7,7 +7,7 @@ ITA - Fattura elettronica - Emissione
|
|
7
7
|
!! This file is generated by oca-gen-addon-readme !!
|
8
8
|
!! changes will be overwritten. !!
|
9
9
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
10
|
-
!! source digest: sha256:
|
10
|
+
!! source digest: sha256:1026a35f5ef87e131f3398d4fb6c1c593bed1b97795d25ac5df4b7c3139e8158
|
11
11
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
12
12
|
|
13
13
|
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
@@ -170,7 +170,7 @@ e 'line' per riga di fattura (a seconda del livello in cui sono chiamati)
|
|
170
170
|
t-call="l10n_it_fatturapa_out.account_invoice_line_it_sconto_maggiorazione"
|
171
171
|
/>
|
172
172
|
<PrezzoTotale
|
173
|
-
t-out="format_monetary(fpa_to_eur(line.price_subtotal, record), euro)"
|
173
|
+
t-out="format_monetary(fpa_to_eur(line.price_subtotal, record, line.currency_rate), euro)"
|
174
174
|
/>
|
175
175
|
<AliquotaIVA
|
176
176
|
t-if="not line_is_section_note"
|
@@ -219,27 +219,6 @@ e 'line' per riga di fattura (a seconda del livello in cui sono chiamati)
|
|
219
219
|
</DettaglioLinee>
|
220
220
|
</template>
|
221
221
|
|
222
|
-
<template id="account_invoice_line_it_dati_riepilogo">
|
223
|
-
<t t-set="tax" t-value="tax_line.tax_line_id" />
|
224
|
-
<DatiRiepilogo>
|
225
|
-
<!--2.2.2-->
|
226
|
-
<AliquotaIVA t-out="format_numbers(tax.amount)" />
|
227
|
-
<Natura t-if="tax.kind_id.code" t-out="tax.kind_id.code" />
|
228
|
-
<!-- <SpeseAccessorie t-out=""/>-->
|
229
|
-
<!-- <Arrotondamento t-out=""/>-->
|
230
|
-
<ImponibileImporto
|
231
|
-
t-out="format_monetary(fpa_to_eur(tax_line.tax_base_amount, record), euro)"
|
232
|
-
/>
|
233
|
-
<Imposta
|
234
|
-
t-out="format_monetary(fpa_to_eur(tax_line.price_total, record), euro)"
|
235
|
-
/>
|
236
|
-
<EsigibilitaIVA t-if="tax.payability" t-out="tax.payability" />
|
237
|
-
<RiferimentoNormativo
|
238
|
-
t-if="tax.law_reference"
|
239
|
-
t-out="encode_for_export(tax.law_reference, 100)"
|
240
|
-
/>
|
241
|
-
</DatiRiepilogo>
|
242
|
-
</template>
|
243
222
|
<template id="account_invoice_it_FatturaPA_sede">
|
244
223
|
<t t-set="indirizzo"><t
|
245
224
|
t-if="partner_id.street2"
|
@@ -599,10 +578,10 @@ e 'line' per riga di fattura (a seconda del livello in cui sono chiamati)
|
|
599
578
|
<!-- <SpeseAccessorie t-out=""/>-->
|
600
579
|
<!-- <Arrotondamento t-out=""/>-->
|
601
580
|
<ImponibileImporto
|
602
|
-
t-out="format_monetary(
|
581
|
+
t-out="format_monetary(tax_data['ImponibileImporto'], euro)"
|
603
582
|
/>
|
604
583
|
<Imposta
|
605
|
-
t-out="format_monetary(
|
584
|
+
t-out="format_monetary(tax_data['Imposta'], euro)"
|
606
585
|
/>
|
607
586
|
<EsigibilitaIVA
|
608
587
|
t-if="tax_data.get('EsigibilitaIVA', False)"
|
@@ -647,7 +626,7 @@ e 'line' per riga di fattura (a seconda del livello in cui sono chiamati)
|
|
647
626
|
/>
|
648
627
|
<ImportoPagamento
|
649
628
|
t-if="not record.company_id.xml_divisa_value == 'keep_orig'"
|
650
|
-
t-out="format_numbers_two(fpa_to_eur(payment.amount_currency or payment.debit, record))"
|
629
|
+
t-out="format_numbers_two(fpa_to_eur(payment.amount_currency or payment.debit, record, payment.currency_rate))"
|
651
630
|
/>
|
652
631
|
|
653
632
|
<!-- <CodUfficioPostale t-out=""/>-->
|
@@ -366,7 +366,7 @@ ul.auto-toc {
|
|
366
366
|
!! This file is generated by oca-gen-addon-readme !!
|
367
367
|
!! changes will be overwritten. !!
|
368
368
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
369
|
-
!! source digest: sha256:
|
369
|
+
!! source digest: sha256:1026a35f5ef87e131f3398d4fb6c1c593bed1b97795d25ac5df4b7c3139e8158
|
370
370
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
371
371
|
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/l10n-italy/tree/16.0/l10n_it_fatturapa_out"><img alt="OCA/l10n-italy" src="https://img.shields.io/badge/github-OCA%2Fl10n--italy-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/l10n-italy-16-0/l10n-italy-16-0-l10n_it_fatturapa_out"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/l10n-italy&target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
372
372
|
<p><strong>Italiano</strong></p>
|
@@ -33,6 +33,15 @@ def format_numbers(number):
|
|
33
33
|
return float_repr(number, max(2, len(cents)))
|
34
34
|
|
35
35
|
|
36
|
+
def fpaToEur(amount, invoice, euro, rate=None):
|
37
|
+
currency = invoice.currency_id
|
38
|
+
if currency == euro:
|
39
|
+
return amount
|
40
|
+
elif rate is not None:
|
41
|
+
return amount * (1 / rate)
|
42
|
+
return currency._convert(amount, euro, invoice.company_id, invoice.date, False)
|
43
|
+
|
44
|
+
|
36
45
|
class EFatturaOut:
|
37
46
|
def get_template_values(self): # noqa: C901
|
38
47
|
"""Prepare values and helper functions for the template"""
|
@@ -78,7 +87,7 @@ class EFatturaOut:
|
|
78
87
|
|
79
88
|
# force EUR unless we want the original currency
|
80
89
|
if not original_currency:
|
81
|
-
res = fpa_to_eur(res, line.move_id)
|
90
|
+
res = fpa_to_eur(res, line.move_id, line.currency_rate)
|
82
91
|
|
83
92
|
# XXX arrotondamento?
|
84
93
|
res = "{prezzo:.{precision}f}".format(
|
@@ -207,14 +216,9 @@ class EFatturaOut:
|
|
207
216
|
wiz = self.env["wizard.export.fatturapa"]
|
208
217
|
return wiz.getPayments(invoice)
|
209
218
|
|
210
|
-
def fpa_to_eur(amount, invoice):
|
211
|
-
currency = invoice.currency_id
|
219
|
+
def fpa_to_eur(amount, invoice, rate=None):
|
212
220
|
euro = self.env.ref("base.EUR")
|
213
|
-
|
214
|
-
return amount
|
215
|
-
return currency._convert(
|
216
|
-
amount, euro, invoice.company_id, invoice.date, False
|
217
|
-
)
|
221
|
+
return fpaToEur(amount, invoice, euro, rate)
|
218
222
|
|
219
223
|
if self.partner_id.commercial_partner_id.is_pa:
|
220
224
|
# check value code
|
@@ -17,7 +17,7 @@ from odoo.tools.translate import _
|
|
17
17
|
|
18
18
|
from odoo.addons.l10n_it_account.tools.account_tools import encode_for_export
|
19
19
|
|
20
|
-
from .efattura import EFatturaOut, format_numbers
|
20
|
+
from .efattura import EFatturaOut, format_numbers, fpaToEur
|
21
21
|
|
22
22
|
_logger = logging.getLogger(__name__)
|
23
23
|
|
@@ -87,12 +87,13 @@ class WizardExportFatturapa(models.TransientModel):
|
|
87
87
|
values w/o altering the original lines"""
|
88
88
|
|
89
89
|
class _Payment:
|
90
|
-
__slots__ = "date_maturity", "amount_currency", "debit"
|
90
|
+
__slots__ = "date_maturity", "amount_currency", "debit", "currency_rate"
|
91
91
|
|
92
|
-
def __init__(self, date_maturity, amount_currency, debit):
|
92
|
+
def __init__(self, date_maturity, amount_currency, debit, currency_rate):
|
93
93
|
self.date_maturity = date_maturity
|
94
94
|
self.amount_currency = amount_currency
|
95
95
|
self.debit = debit
|
96
|
+
self.currency_rate = currency_rate
|
96
97
|
|
97
98
|
payments = []
|
98
99
|
for line in invoice.line_ids.filtered(
|
@@ -100,7 +101,12 @@ class WizardExportFatturapa(models.TransientModel):
|
|
100
101
|
in ("asset_receivable", "liability_payable")
|
101
102
|
):
|
102
103
|
payments.append(
|
103
|
-
_Payment(
|
104
|
+
_Payment(
|
105
|
+
line.date_maturity,
|
106
|
+
line.amount_currency,
|
107
|
+
line.debit,
|
108
|
+
line.currency_rate,
|
109
|
+
)
|
104
110
|
)
|
105
111
|
return payments
|
106
112
|
|
@@ -131,6 +137,7 @@ class WizardExportFatturapa(models.TransientModel):
|
|
131
137
|
def _key(tax_id):
|
132
138
|
return tax_id.id
|
133
139
|
|
140
|
+
euro = self.env.ref("base.EUR")
|
134
141
|
out_computed = {}
|
135
142
|
# existing tax lines
|
136
143
|
tax_ids = invoice.line_ids.filtered(lambda line: line.tax_line_id)
|
@@ -170,7 +177,9 @@ class WizardExportFatturapa(models.TransientModel):
|
|
170
177
|
"AliquotaIVA": aliquota,
|
171
178
|
"Natura": tax_id.kind_id.code,
|
172
179
|
# 'Arrotondamento':'',
|
173
|
-
"ImponibileImporto":
|
180
|
+
"ImponibileImporto": fpaToEur(
|
181
|
+
line.price_subtotal, invoice, euro, rate=line.currency_rate
|
182
|
+
),
|
174
183
|
"Imposta": 0.0,
|
175
184
|
"EsigibilitaIVA": tax_id.payability,
|
176
185
|
}
|
@@ -179,7 +188,9 @@ class WizardExportFatturapa(models.TransientModel):
|
|
179
188
|
tax_id.law_reference, 100
|
180
189
|
)
|
181
190
|
else:
|
182
|
-
out[key]["ImponibileImporto"] +=
|
191
|
+
out[key]["ImponibileImporto"] += fpaToEur(
|
192
|
+
line.price_subtotal, invoice, euro, rate=line.currency_rate
|
193
|
+
)
|
183
194
|
out[key]["Imposta"] += 0.0
|
184
195
|
out.update(out_computed)
|
185
196
|
return out
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: odoo-addon-l10n_it_fatturapa_out
|
3
|
-
Version: 16.0.1.0.
|
3
|
+
Version: 16.0.1.0.20
|
4
4
|
Requires-Python: >=3.10
|
5
5
|
Requires-Dist: elementpath
|
6
6
|
Requires-Dist: odoo-addon-l10n_it_account>=16.0dev,<16.1dev
|
@@ -28,7 +28,7 @@ ITA - Fattura elettronica - Emissione
|
|
28
28
|
!! This file is generated by oca-gen-addon-readme !!
|
29
29
|
!! changes will be overwritten. !!
|
30
30
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
31
|
-
!! source digest: sha256:
|
31
|
+
!! source digest: sha256:1026a35f5ef87e131f3398d4fb6c1c593bed1b97795d25ac5df4b7c3139e8158
|
32
32
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
33
33
|
|
34
34
|
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
@@ -1,7 +1,7 @@
|
|
1
|
-
odoo/addons/l10n_it_fatturapa_out/README.rst,sha256=
|
1
|
+
odoo/addons/l10n_it_fatturapa_out/README.rst,sha256=OJtaBk59RPqTnqMsNLhHWhgoN2E6SPxdbKyr-lidNTg,5552
|
2
2
|
odoo/addons/l10n_it_fatturapa_out/__init__.py,sha256=W3SLrBcwzfdkH0kPgcqn6I9vWke1eAXoWdS6LBjaLKw,137
|
3
|
-
odoo/addons/l10n_it_fatturapa_out/__manifest__.py,sha256=
|
4
|
-
odoo/addons/l10n_it_fatturapa_out/data/invoice_it_template.xml,sha256=
|
3
|
+
odoo/addons/l10n_it_fatturapa_out/__manifest__.py,sha256=i8mH7aoY037rcRxIkQthPwBpCeNyg5D8ZbTqrepRuG8,1403
|
4
|
+
odoo/addons/l10n_it_fatturapa_out/data/invoice_it_template.xml,sha256=6xcLZYWE-uC5XuoX1VjPUjoK26JzM0xo-0DDh6YiaNM,35640
|
5
5
|
odoo/addons/l10n_it_fatturapa_out/data/l10n_it_fatturapa_out_data.xml,sha256=OkEskrtlI1TklcV52BeHnTe9Idmr438b8agZgD7in3c,320
|
6
6
|
odoo/addons/l10n_it_fatturapa_out/i18n/am.po,sha256=FrGfHmHkjZHK-DfghfLHrT585TYTFHYNx50YExAHaSY,30916
|
7
7
|
odoo/addons/l10n_it_fatturapa_out/i18n/ar.po,sha256=M5JuyaJQbxKZ2SBML31CY9rmMC3iwymQUMMVy96wPAI,31124
|
@@ -89,7 +89,7 @@ odoo/addons/l10n_it_fatturapa_out/readme/USAGE.md,sha256=CPBqji3HDYYP9aGBkn6Cknh
|
|
89
89
|
odoo/addons/l10n_it_fatturapa_out/security/ir.model.access.csv,sha256=hheFLdZySR_wQd0-zdRpJeewdlrlE1LtKj_-seX_3pM,340
|
90
90
|
odoo/addons/l10n_it_fatturapa_out/security/rules.xml,sha256=6_swzyFR5GaxWSA9j3NeUOVGgKVbLDOFk7jVDzUdUfg,514
|
91
91
|
odoo/addons/l10n_it_fatturapa_out/static/description/icon.png,sha256=_NDgbxF3ta8ijPcvP_MPNmjN8w4hlN218cE3omw8EGM,4829
|
92
|
-
odoo/addons/l10n_it_fatturapa_out/static/description/index.html,sha256=
|
92
|
+
odoo/addons/l10n_it_fatturapa_out/static/description/index.html,sha256=ZHItn_ZrbM8Q_dJ7HTJSJrgkttrdL3p-JyASj-rksmY,16177
|
93
93
|
odoo/addons/l10n_it_fatturapa_out/tests/__init__.py,sha256=KNxMSQSj8RCCaGVrqzTQ5Od7v2x6gUrdZz_PubpUp2A,148
|
94
94
|
odoo/addons/l10n_it_fatturapa_out/tests/fatturapa_common.py,sha256=WK3-H3_h8YklXN3x-cwS1o1zPeEukuL9lvRi385qBhM,11487
|
95
95
|
odoo/addons/l10n_it_fatturapa_out/tests/test_fatturapa_out_noteline.py,sha256=KO7of281GNIPLjcAJXv-2jdA9q1nFLGu8XBcftGrlE4,8950
|
@@ -119,12 +119,12 @@ odoo/addons/l10n_it_fatturapa_out/views/attachment_view.xml,sha256=egr5QgpSlCkTU
|
|
119
119
|
odoo/addons/l10n_it_fatturapa_out/views/company_view.xml,sha256=pxMr-1GRNraEYBH353iG6nhgcyr-Vj-4oZSV0s4SJ7U,3081
|
120
120
|
odoo/addons/l10n_it_fatturapa_out/views/partner_view.xml,sha256=DvVhn8VfHkt8YSFPlKI9k1lrV4D6fg7e5s5vNlDnq4g,513
|
121
121
|
odoo/addons/l10n_it_fatturapa_out/wizard/__init__.py,sha256=ZWQbHot4YQecoYNooAZtguia2eQat_XatBfN9bkNsYs,140
|
122
|
-
odoo/addons/l10n_it_fatturapa_out/wizard/efattura.py,sha256=
|
123
|
-
odoo/addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py,sha256=
|
122
|
+
odoo/addons/l10n_it_fatturapa_out/wizard/efattura.py,sha256=OmdGkEM4I4iwW4Yhl6ZhCSfpyB-sBkkLtBaSHYvMVTA,11482
|
123
|
+
odoo/addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py,sha256=AnNQQM1BQ0aT_5b0VZjP2xh-pwrfTUw_e1uSFiz9mA0,12733
|
124
124
|
odoo/addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa_regenerate.py,sha256=wWr5g6bT1WkXetBmcsS5KRtICisb2eb3BxiEaNnsma4,2357
|
125
125
|
odoo/addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa_view.xml,sha256=ljilCk05gfHX2AvYGyGF4ayuikz5-y8fweD_S2PiHgM,1795
|
126
126
|
odoo/addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa_view_regenerate.xml,sha256=ZK2JL46SfqWWClapEhwW65PXWxffvxZKFrmQSU9Iyrs,1465
|
127
|
-
odoo_addon_l10n_it_fatturapa_out-16.0.1.0.
|
128
|
-
odoo_addon_l10n_it_fatturapa_out-16.0.1.0.
|
129
|
-
odoo_addon_l10n_it_fatturapa_out-16.0.1.0.
|
130
|
-
odoo_addon_l10n_it_fatturapa_out-16.0.1.0.
|
127
|
+
odoo_addon_l10n_it_fatturapa_out-16.0.1.0.20.dist-info/METADATA,sha256=UUuYsCk3RFyvl5Rqwqfie-8RfddNt4T2MlYdWr6J270,6399
|
128
|
+
odoo_addon_l10n_it_fatturapa_out-16.0.1.0.20.dist-info/WHEEL,sha256=8Rd4enx1PCuyDWP4SABqO5Fv8rpaknqp3VzjoFFLa6c,83
|
129
|
+
odoo_addon_l10n_it_fatturapa_out-16.0.1.0.20.dist-info/top_level.txt,sha256=QE6RBQ0QX5f4eFuUcGgU5Kbq1A_qJcDs-e_vpr6pmfU,4
|
130
|
+
odoo_addon_l10n_it_fatturapa_out-16.0.1.0.20.dist-info/RECORD,,
|
File without changes
|