Skip to content

Commit

Permalink
IMP l10n_it_fatturapa_out: showing the XML field that is failing (for…
Browse files Browse the repository at this point in the history
… ProgressivoInvio) (OCA#571)
  • Loading branch information
eLBati authored and TheMule71 committed Dec 30, 2022
1 parent 0576813 commit 1e9f641
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 35 deletions.
2 changes: 1 addition & 1 deletion l10n_it_fatturapa_out/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

{
'name': 'Italian Localization - FatturaPA - Emission',
'version': '10.0.1.0.2',
'version': '10.0.1.0.3',
'category': 'Localization/Italy',
'summary': 'Electronic invoices emission',
'author': 'Davide Corio, Agile Business Group, Innoviu,'
Expand Down
67 changes: 37 additions & 30 deletions l10n_it_fatturapa_out/i18n/l10n_it_fatturapa_out.pot
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ msgid "Checksum/SHA1"
msgstr ""

#. module: l10n_it_fatturapa_out
#: code:addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:199
#: code:addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:206
#, python-format
msgid "City not set."
msgstr ""
Expand All @@ -56,7 +56,7 @@ msgid "Company"
msgstr ""

#. module: l10n_it_fatturapa_out
#: code:addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:86
#: code:addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:93
#, python-format
msgid "Company Country not set."
msgstr ""
Expand All @@ -68,13 +68,13 @@ msgid "Company TIN not set."
msgstr ""

#. module: l10n_it_fatturapa_out
#: code:addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:125
#: code:addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:132
#, python-format
msgid "Company Telephone number not set."
msgstr ""

#. module: l10n_it_fatturapa_out
#: code:addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:95
#: code:addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:102
#, python-format
msgid "Company does not have fiscal code or VAT"
msgstr ""
Expand All @@ -85,7 +85,7 @@ msgid "Confirm?"
msgstr ""

#. module: l10n_it_fatturapa_out
#: code:addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:205
#: code:addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:212
#, python-format
msgid "Country not set."
msgstr ""
Expand All @@ -108,31 +108,31 @@ msgid "Creation"
msgstr ""

#. module: l10n_it_fatturapa_out
#: code:addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:314
#: code:addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:321
#, python-format
msgid "Customer ZIP not set."
msgstr ""

#. module: l10n_it_fatturapa_out
#: code:addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:317
#: code:addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:324
#, python-format
msgid "Customer city not set."
msgstr ""

#. module: l10n_it_fatturapa_out
#: code:addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:323
#: code:addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:330
#, python-format
msgid "Customer country not set."
msgstr ""

#. module: l10n_it_fatturapa_out
#: code:addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:320
#: code:addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:327
#, python-format
msgid "Customer province not set."
msgstr ""

#. module: l10n_it_fatturapa_out
#: code:addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:311
#: code:addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:318
#, python-format
msgid "Customer street not set."
msgstr ""
Expand All @@ -154,7 +154,7 @@ msgid "Display Name"
msgstr ""

#. module: l10n_it_fatturapa_out
#: code:addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:130
#: code:addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:137
#, python-format
msgid "Email address not set."
msgstr ""
Expand All @@ -172,6 +172,13 @@ msgstr ""
msgid "Export FatturaPA"
msgstr ""

#. module: l10n_it_fatturapa_out
#: code:addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:82
#, python-format
msgid "FatturaElettronicaHeader.DatiTrasmissione.ProgressivoInvio:\n"
"%s"
msgstr ""

#. module: l10n_it_fatturapa_out
#: model:ir.ui.view,arch_db:l10n_it_fatturapa_out.view_invoice_form_fatturapa
msgid "FatturaPA"
Expand All @@ -195,7 +202,7 @@ msgid "FatturaPA attachments"
msgstr ""

#. module: l10n_it_fatturapa_out
#: code:addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:154
#: code:addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:161
#, python-format
msgid "FatturaPA fiscal position not set for company %s. (Go to Accounting --> Configuration --> Settings --> Fattura PA)"
msgstr ""
Expand Down Expand Up @@ -233,7 +240,7 @@ msgid "ID"
msgstr ""

#. module: l10n_it_fatturapa_out
#: code:addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:115
#: code:addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:122
#, python-format
msgid "IPA Code not set on partner form."
msgstr ""
Expand All @@ -249,19 +256,19 @@ msgid "Invoice"
msgstr ""

#. module: l10n_it_fatturapa_out
#: code:addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:663
#: code:addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:670
#, python-format
msgid "Invoice %s has FatturaPA Export File yet"
msgstr ""

#. module: l10n_it_fatturapa_out
#: code:addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:398
#: code:addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:405
#, python-format
msgid "Invoice does not have a number."
msgstr ""

#. module: l10n_it_fatturapa_out
#: code:addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:485
#: code:addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:492
#, python-format
msgid "Invoice line %s does not have tax"
msgstr ""
Expand All @@ -278,7 +285,7 @@ msgid "Invoices"
msgstr ""

#. module: l10n_it_fatturapa_out
#: code:addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:637
#: code:addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:644
#, python-format
msgid "Invoices must belong to the same partner"
msgstr ""
Expand Down Expand Up @@ -312,14 +319,14 @@ msgid "Mime Type"
msgstr ""

#. module: l10n_it_fatturapa_out
#: code:addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:544
#: code:addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:551
#, python-format
msgid "No 'law reference' field for tax %s"
msgstr ""

#. module: l10n_it_fatturapa_out
#: code:addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:509
#: code:addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:540
#: code:addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:516
#: code:addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:547
#, python-format
msgid "No 'nature' field for tax %s"
msgstr ""
Expand All @@ -330,31 +337,31 @@ msgid "Out Invoices"
msgstr ""

#. module: l10n_it_fatturapa_out
#: code:addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:279
#: code:addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:286
#, python-format
msgid "Partner VAT and Fiscalcode not set."
msgstr ""

#. module: l10n_it_fatturapa_out
#: code:addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:566
#: code:addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:573
#, python-format
msgid "Payment term %s does not have a linked fatturaPA payment method"
msgstr ""

#. module: l10n_it_fatturapa_out
#: code:addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:562
#: code:addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:569
#, python-format
msgid "Payment term %s does not have a linked fatturaPA payment term"
msgstr ""

#. module: l10n_it_fatturapa_out
#: code:addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:202
#: code:addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:209
#, python-format
msgid "Province not set."
msgstr ""

#. module: l10n_it_fatturapa_out
#: code:addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:342
#: code:addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:349
#, python-format
msgid "RappresentanteFiscale not handled"
msgstr ""
Expand Down Expand Up @@ -395,19 +402,19 @@ msgid "Stored Filename"
msgstr ""

#. module: l10n_it_fatturapa_out
#: code:addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:193
#: code:addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:200
#, python-format
msgid "Street not set."
msgstr ""

#. module: l10n_it_fatturapa_out
#: code:addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:150
#: code:addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:157
#, python-format
msgid "TIN not set."
msgstr ""

#. module: l10n_it_fatturapa_out
#: code:addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:377
#: code:addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:384
#, python-format
msgid "TerzoIntermediarioOSoggettoEmittente not handled"
msgstr ""
Expand All @@ -423,7 +430,7 @@ msgid "The record id this is attached to."
msgstr ""

#. module: l10n_it_fatturapa_out
#: code:addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:488
#: code:addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:495
#, python-format
msgid "Too many taxes for invoice line %s"
msgstr ""
Expand All @@ -444,7 +451,7 @@ msgid "You can either upload a file from your computer or copy/paste an internet
msgstr ""

#. module: l10n_it_fatturapa_out
#: code:addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:196
#: code:addons/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py:203
#, python-format
msgid "ZIP not set."
msgstr ""
Expand Down
14 changes: 10 additions & 4 deletions l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,15 @@ def setProgressivoInvio(self, fatturapa):
raise UserError(
_('FatturaPA sequence not configured.'))
number = fatturapa_sequence.next_by_id()
fatturapa.FatturaElettronicaHeader.DatiTrasmissione.\
ProgressivoInvio = number
try:
fatturapa.FatturaElettronicaHeader.DatiTrasmissione.\
ProgressivoInvio = number
except (SimpleFacetValueError, SimpleTypeValueError) as e:
msg = _(
'FatturaElettronicaHeader.DatiTrasmissione.'
'ProgressivoInvio:\n%s'
) % unicode(e)
raise UserError(msg)
return number

def _setIdTrasmittente(self, company, fatturapa):
Expand Down Expand Up @@ -671,8 +678,7 @@ def exportFatturaPA(self):

number = self.setProgressivoInvio(fatturapa)
except (SimpleFacetValueError, SimpleTypeValueError) as e:
raise UserError(
(unicode(e)))
raise UserError(unicode(e))

attach = self.saveAttachment(fatturapa, number)

Expand Down

0 comments on commit 1e9f641

Please sign in to comment.