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 May 7, 2021
1 parent 976cdec commit 6d24877
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 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
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 6d24877

Please sign in to comment.