Skip to content

Commit 5e69133

Browse files
sergiocoratoSirAionTech
authored andcommitted
[12.0][IMP] importo bollo non più obbligatorio e-invoice 1.6 (OCA#1866)
[UPD] Update l10n_it_fatturapa_out_stamp.pot [UPD] README.rst l10n_it_fatturapa_out_stamp 12.0.2.0.0 Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: l10n-italy-12.0/l10n-italy-12.0-l10n_it_fatturapa_out_stamp Translate-URL: https://translation.odoo-community.org/projects/l10n-italy-12-0/l10n-italy-12-0-l10n_it_fatturapa_out_stamp/
1 parent 5516958 commit 5e69133

7 files changed

Lines changed: 13 additions & 23 deletions

File tree

l10n_it_fatturapa_out_stamp/README.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ Contributors
5656
~~~~~~~~~~~~
5757

5858
* Lorenzo Battistini <https://github.com/eLBati>
59+
* Sergio Corato <https://github.com/sergiocorato>
5960

6061
Maintainers
6162
~~~~~~~~~~~

l10n_it_fatturapa_out_stamp/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"name": "Italian Localization - Fattura elettronica - Integrazione bollo",
66
"summary": "Modulo ponte tra emissione fatture elettroniche e imposta di "
77
"bollo",
8-
"version": "12.0.1.0.5",
8+
"version": "12.0.2.0.0",
99
"development_status": "Beta",
1010
"category": "Hidden",
1111
"website": "https://github.com/OCA/l10n-italy",

l10n_it_fatturapa_out_stamp/i18n/it.po

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,5 @@ msgstr ""
2222
msgid "Export E-invoice"
2323
msgstr "Esporta e-fattura"
2424

25-
#. module: l10n_it_fatturapa_out_stamp
26-
#: code:addons/l10n_it_fatturapa_out_stamp/wizard/wizard_export_fatturapa.py:20
27-
#, python-format
28-
msgid "Tax Stamp Product not set for company %s"
29-
msgstr "Prodotto imposta di bollo non impostato per l'azienda %s"
25+
#~ msgid "Tax Stamp Product not set for company %s"
26+
#~ msgstr "Prodotto imposta di bollo non impostato per l'azienda %s"

l10n_it_fatturapa_out_stamp/i18n/l10n_it_fatturapa_out_stamp.pot

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,3 @@ msgstr ""
1818
msgid "Export E-invoice"
1919
msgstr ""
2020

21-
#. module: l10n_it_fatturapa_out_stamp
22-
#: code:addons/l10n_it_fatturapa_out_stamp/wizard/wizard_export_fatturapa.py:20
23-
#, python-format
24-
msgid "Tax Stamp Product not set for company %s"
25-
msgstr ""
26-
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
* Lorenzo Battistini <https://github.com/eLBati>
2+
* Sergio Corato <https://github.com/sergiocorato>

l10n_it_fatturapa_out_stamp/static/description/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,7 @@ <h2><a class="toc-backref" href="#id3">Authors</a></h2>
402402
<h2><a class="toc-backref" href="#id4">Contributors</a></h2>
403403
<ul class="simple">
404404
<li>Lorenzo Battistini &lt;<a class="reference external" href="https://github.com/eLBati">https://github.com/eLBati</a>&gt;</li>
405+
<li>Sergio Corato &lt;<a class="reference external" href="https://github.com/sergiocorato">https://github.com/sergiocorato</a>&gt;</li>
405406
</ul>
406407
</div>
407408
<div class="section" id="maintainers">
Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
# -*- coding: utf-8 -*-
22

33
from odoo import models
4-
from odoo.tools.translate import _
5-
from odoo.exceptions import UserError
6-
from odoo.tools.float_utils import float_round
4+
from odoo.tools.float_utils import float_round, float_is_zero
75
from odoo.addons.l10n_it_fatturapa.bindings.fatturapa import (
86
DatiBolloType
97
)
@@ -16,13 +14,11 @@ def setDatiGeneraliDocumento(self, invoice, body):
1614
res = super(WizardExportFatturapa, self).setDatiGeneraliDocumento(
1715
invoice, body)
1816
if invoice.tax_stamp:
19-
if not invoice.company_id.tax_stamp_product_id:
20-
raise UserError(_(
21-
"Tax Stamp Product not set for company %s"
22-
) % invoice.company_id.name)
23-
stamp_price = invoice.company_id.tax_stamp_product_id.list_price
2417
body.DatiGenerali.DatiGeneraliDocumento.DatiBollo = DatiBolloType(
25-
BolloVirtuale="SI",
26-
ImportoBollo='%.2f' % float_round(stamp_price, 2),
27-
)
18+
BolloVirtuale="SI")
19+
if invoice.company_id.tax_stamp_product_id:
20+
stamp_price = invoice.company_id.tax_stamp_product_id.list_price
21+
if not float_is_zero(stamp_price, precision_digits=2):
22+
body.DatiGenerali.DatiGeneraliDocumento.DatiBollo.ImportoBollo = \
23+
'%.2f' % float_round(stamp_price, 2)
2824
return res

0 commit comments

Comments
 (0)