Skip to content

[19.0][MIG] l10n_it_edi_related_document: Migration to 19.0#5084

Open
Borruso wants to merge 9 commits into
OCA:19.0from
Borruso:19.0-mig-l10n_it_edi_related_document
Open

[19.0][MIG] l10n_it_edi_related_document: Migration to 19.0#5084
Borruso wants to merge 9 commits into
OCA:19.0from
Borruso:19.0-mig-l10n_it_edi_related_document

Conversation

@Borruso

@Borruso Borruso commented Feb 6, 2026

Copy link
Copy Markdown
Contributor

@tafaRU

tafaRU commented Feb 6, 2026

Copy link
Copy Markdown
Member

/ocabot migration l10n_it_edi_related_document

@OCA-git-bot OCA-git-bot added this to the 19.0 milestone Feb 6, 2026
@OCA-git-bot OCA-git-bot mentioned this pull request Feb 6, 2026
30 tasks
@Borruso Borruso force-pushed the 19.0-mig-l10n_it_edi_related_document branch 2 times, most recently from 4f20900 to 46744e6 Compare February 12, 2026 08:23
@mmircoli-nexapp

Copy link
Copy Markdown

@Borruso per favore puoi fare rebase? vorrei oltre fare review provare la PR

@Borruso Borruso force-pushed the 19.0-mig-l10n_it_edi_related_document branch from 46744e6 to 61acd4e Compare May 5, 2026 16:03
@OCA-git-bot OCA-git-bot added series:19.0 mod:l10n_it_edi_related_document Module l10n_it_edi_related_document labels May 5, 2026

@mmircoli-nexapp mmircoli-nexapp left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review funzionale ok, XML generato correttamente con i dati

Comment on lines +7 to +11
<xpath expr="//DatiGeneraliDocumento" position="after">
<t
t-call="l10n_it_edi_related_document.account_invoice_it_dati_documenti_correlati"
/>
</xpath>

@micheledic micheledic Jun 8, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<xpath expr="//DatiGeneraliDocumento" position="after">
<t
t-call="l10n_it_edi_related_document.account_invoice_it_dati_documenti_correlati"
/>
</xpath>
<xpath expr="//DatiOrdineAcquisto[last()]" position="after">
<t
t-call="l10n_it_edi_related_document.account_invoice_it_dati_documenti_correlati"
/>
</xpath>

Sarebbe opportuno cambiare l'expr. Lasciando DatiGeneraliDocumento, se si inserisce un contratto in una fattura e la stessa fattura ha il ref, la fattura va in errore :

File non conforme al formato : Invalid content was found starting with element 'DatiOrdineAcquisto'. One of '{DatiContratto, DatiConvenzione, DatiRicezione, DatiFattureCollegate, DatiSAL, DatiDDT, DatiTrasporto, FatturaPrincipale}' is expected. riga: 78 -

è perchè viene messo DatiContratto prima de "DatiOrdineAcquisto" messo da l10n_it_edi e l'ordine corretto è:
image

Borruso and others added 4 commits June 8, 2026 11:46
If standard fields are being used, keep a related document in sync:
l10n_it_origin_document_type
l10n_it_origin_document_name
l10n_it_origin_document_date
l10n_it_cig
l10n_it_cup

NOTE: this happens only programmatically, not via UI
…thod

The _inverse_original_related_document_fields method uses `self` instead
of `record` inside the for loop, causing a "Expected singleton" error
when multiple invoices are created at once.

This was introduced in PR OCA#5046.
A FatturaPA can carry an empty IdDocumento, either as a self-closing
tag or with whitespace-only content. get_text strips whitespace and
returns an empty string in both cases. The dict comprehension that
builds the create vals drops empty values, so name disappears, and
create() raises on the required name field. The whole invoice import
fails.

Skip the row when IdDocumento is empty.
@Borruso Borruso force-pushed the 19.0-mig-l10n_it_edi_related_document branch from de5792a to 7360645 Compare June 8, 2026 09:46
@Borruso Borruso requested a review from micheledic June 8, 2026 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants