-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] l10n_it_edi: vendor bill is not being created from PEC
When one or more vendor bills in Italian e-invoice format were sent to the registered PEC mailbox, nothing happened. The e-invoice related vendor bill should be automatically created when the xml file is fetched from the PEC mailbox instead. - There was a traceback when account_move.l10n_it_einvoice_name was searched because it's a non-stored computed field. - Also, the field name account_move.source_email was used, but it was renamed to invoice_source_email. - The xml parsing etree.fromstring() was incorrectly used with string arguments instead of bytes. - The context was mistakenly initialized twice on invoice creation. Tests have been provided for the email reading methods. opw-2460485 closes odoo#69254 Signed-off-by: Josse Colpaert <jco@openerp.com>
- Loading branch information
1 parent
a2d63e8
commit 1bf2e88
Showing
7 changed files
with
485 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# -*- coding: utf-8 -*- | ||
# Part of Odoo. See LICENSE file for full copyright and licensing details. | ||
|
||
from . import test_ir_mail_server |
113 changes: 113 additions & 0 deletions
113
addons/l10n_it_edi/tests/expected_xmls/IT01234567890_FPR01.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<p:FatturaElettronica versione="FPR12" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" | ||
xmlns:p="http://ivaservizi.agenziaentrate.gov.it/docs/xsd/fatture/v1.2" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://ivaservizi.agenziaentrate.gov.it/docs/xsd/fatture/v1.2 http://www.fatturapa.gov.it/export/fatturazione/sdi/fatturapa/v1.2/Schema_del_file_xml_FatturaPA_versione_1.2.xsd"> | ||
<FatturaElettronicaHeader> | ||
<DatiTrasmissione> | ||
<IdTrasmittente> | ||
<IdPaese>IT</IdPaese> | ||
<IdCodice>01234560157</IdCodice> | ||
</IdTrasmittente> | ||
<ProgressivoInvio>00001</ProgressivoInvio> | ||
<FormatoTrasmissione>FPR12</FormatoTrasmissione> | ||
<CodiceDestinatario>ABC1234</CodiceDestinatario> | ||
<ContattiTrasmittente/> | ||
</DatiTrasmissione> | ||
<CedentePrestatore> | ||
<DatiAnagrafici> | ||
<IdFiscaleIVA> | ||
<IdPaese>IT</IdPaese> | ||
<IdCodice>01234560157</IdCodice> | ||
</IdFiscaleIVA> | ||
<Anagrafica> | ||
<Denominazione>SOCIETA' ALPHA SRL</Denominazione> | ||
</Anagrafica> | ||
<RegimeFiscale>RF19</RegimeFiscale> | ||
</DatiAnagrafici> | ||
<Sede> | ||
<Indirizzo>VIALE ROMA 543</Indirizzo> | ||
<CAP>07100</CAP> | ||
<Comune>SASSARI</Comune> | ||
<Provincia>SS</Provincia> | ||
<Nazione>IT</Nazione> | ||
</Sede> | ||
</CedentePrestatore> | ||
<CessionarioCommittente> | ||
<DatiAnagrafici> | ||
<CodiceFiscale>01234560157</CodiceFiscale> | ||
<Anagrafica> | ||
<Denominazione>DITTA BETA</Denominazione> | ||
</Anagrafica> | ||
</DatiAnagrafici> | ||
<Sede> | ||
<Indirizzo>VIA TORINO 38-B</Indirizzo> | ||
<CAP>00145</CAP> | ||
<Comune>ROMA</Comune> | ||
<Provincia>RM</Provincia> | ||
<Nazione>IT</Nazione> | ||
</Sede> | ||
</CessionarioCommittente> | ||
</FatturaElettronicaHeader> | ||
<FatturaElettronicaBody> | ||
<DatiGenerali> | ||
<DatiGeneraliDocumento> | ||
<TipoDocumento>TD01</TipoDocumento> | ||
<Divisa>EUR</Divisa> | ||
<Data>2014-12-18</Data> | ||
<Numero>01234567890</Numero> | ||
<Causale>LA FATTURA FA RIFERIMENTO AD UNA OPERAZIONE AAAA BBBBBBBBBBBBBBBBBB CCC DDDDDDDDDDDDDDD E FFFFFFFFFFFFFFFFFFFF GGGGGGGGGG HHHHHHH II LLLLLLLLLLLLLLLLL MMM NNNNN OO PPPPPPPPPPP QQQQ RRRR SSSSSSSSSSSSSS</Causale> | ||
<Causale>SEGUE DESCRIZIONE CAUSALE NEL CASO IN CUI NON SIANO STATI SUFFICIENTI 200 CARATTERI AAAAAAAAAAA BBBBBBBBBBBBBBBBB</Causale> | ||
</DatiGeneraliDocumento> | ||
<DatiOrdineAcquisto> | ||
<RiferimentoNumeroLinea>1</RiferimentoNumeroLinea> | ||
<IdDocumento>66685</IdDocumento> | ||
<NumItem>1</NumItem> | ||
</DatiOrdineAcquisto> | ||
<DatiContratto> | ||
<RiferimentoNumeroLinea>1</RiferimentoNumeroLinea> | ||
<IdDocumento>01234567890</IdDocumento> | ||
<Data>2012-09-01</Data> | ||
<NumItem>5</NumItem> | ||
<CodiceCUP>01234567890abc</CodiceCUP> | ||
<CodiceCIG>456def</CodiceCIG> | ||
</DatiContratto> | ||
<DatiTrasporto> | ||
<DatiAnagraficiVettore> | ||
<IdFiscaleIVA> | ||
<IdPaese>IT</IdPaese> | ||
<IdCodice>24681012141</IdCodice> | ||
</IdFiscaleIVA> | ||
<Anagrafica> | ||
<Denominazione>Trasporto spa</Denominazione> | ||
</Anagrafica> | ||
</DatiAnagraficiVettore> | ||
<DataOraConsegna>2012-10-22T16:46:12.000+02:00</DataOraConsegna> | ||
</DatiTrasporto> | ||
</DatiGenerali> | ||
<DatiBeniServizi> | ||
<DettaglioLinee> | ||
<NumeroLinea>1</NumeroLinea> | ||
<Descrizione>DESCRIZIONE DELLA FORNITURA</Descrizione> | ||
<Quantita>5.00</Quantita> | ||
<PrezzoUnitario>1.00</PrezzoUnitario> | ||
<PrezzoTotale>5.00</PrezzoTotale> | ||
<AliquotaIVA>22.00</AliquotaIVA> | ||
</DettaglioLinee> | ||
<DatiRiepilogo> | ||
<AliquotaIVA>22.00</AliquotaIVA> | ||
<ImponibileImporto>5.00</ImponibileImporto> | ||
<Imposta>1.10</Imposta> | ||
<EsigibilitaIVA>I</EsigibilitaIVA> | ||
</DatiRiepilogo> | ||
</DatiBeniServizi> | ||
<DatiPagamento> | ||
<CondizioniPagamento>TP01</CondizioniPagamento> | ||
<DettaglioPagamento> | ||
<ModalitaPagamento>MP01</ModalitaPagamento> | ||
<DataScadenzaPagamento>2015-01-30</DataScadenzaPagamento> | ||
<ImportoPagamento>6.10</ImportoPagamento> | ||
</DettaglioPagamento> | ||
</DatiPagamento> | ||
</FatturaElettronicaBody> | ||
</p:FatturaElettronica> |
Oops, something went wrong.