-
-
Notifications
You must be signed in to change notification settings - Fork 319
[16.0] new module l10n_it_fatturapa_out_dn #4054
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 16.0
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
bf6b932
to
06aceaf
Compare
/ocabot rebase |
@francesco-ooops The rebase process failed, because command
|
@TheMule71 puoi fare rebase? |
961fdea
to
ce6af3e
Compare
ce6af3e
to
662c34e
Compare
La modifica è stata introdotta con #4176. Per caso è cambiato qualcosa nell'ambiente di esecuzione dei test (e In ogni caso prob. va fixato visto che non deve dipendere da |
"NumeroDDT": delivery_note.name, | ||
"DataDDT": delivery_note.date, | ||
} | ||
e_invoice_lines = self.get_e_invoice_lines(invoice) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ho cambiato questa parte così per mettere il riferimentonumerolinea solo se c'è più di un DN collegato e togliere le righe nota/sezione:
if len(invoice.delivery_note_ids) > 1:
# RiferimentoNumeroLinea should not be populated
# if all the lines of the invoice
# are linked to this delivery_note
e_invoice_lines = self.get_e_invoice_lines(invoice)
e_invoice_delivery_note_lines = e_invoice_lines.filtered(
lambda eil, delivery_note=delivery_note:
eil.delivery_note_id == delivery_note and eil.display_type == 'product')
e_invoice_lines_list = list(e_invoice_lines)
lines_refs_list = [
e_invoice_lines_list.index(line) + 1 # NumeroLinea is 1-based
for line in e_invoice_delivery_note_lines
]
ddt_data.update(
{
"_invoice_lines": e_invoice_delivery_note_lines,
"RiferimentoNumeroLinea": lines_refs_list,
}
)
dati_ddt_list.append(ddt_data)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non seguo la logica, in che senso se len(invoice.delivery_note_ids) > 1
allora tutte le righe fattura sono collegate allo stesso DDT?
Potrebbero esserci righe che non sono collegate al DDT.
È vero che probabilmente la maggior parte delle volte non sarebbe un problema perché tali righe saranno magari per servizi e quindi va da sé che non riguardano il DDT. Però è una considerazione di pratica, in teoria nulla vieta questo scenario:
crei SO -> consegni -> crei DDT -> crei fattura
ora aggiungi uno o più prodotti alla fattura
prima avrebbe riportato nell'XML i riferimenti alle sole righe derivate del DDT;
se non sbaglio, con questa modifica, riporterebbe l'intera fattura riferita al quel DDT, e se uno va a cercare i prodotti aggiunti dopo in fattura nel DDT non li trova.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non seguo la logica, in che senso se len(invoice.delivery_note_ids) > 1 allora tutte le righe fattura sono collegate allo stesso DDT?
No, collego solo quelle che appartengono ai DN come si vede in questo passaggio:
e_invoice_delivery_note_lines = e_invoice_lines.filtered(
lambda eil, delivery_note=delivery_note:
eil.delivery_note_id == delivery_note and eil.display_type == 'product')
se non sbaglio, con questa modifica, riporterebbe l'intera fattura riferita al quel DDT, e se uno va a cercare i prodotti aggiunti dopo in fattura nel DDT non li trova.
se committi queste modifiche le si può provare anche nel runboat e dovresti vedere che funziona
lo stiamo usando in produzione da un cliente, ho fatto un test con il flusso che hai indicato e correttamente la riga aggiunta post in fattura non viene collegata a DN
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, ma quello lo fai se len(invoice.delivery_note_ids) > 1
.
Il caso che ho portato era per len(invoice.delivery_note_ids) == 1
.
Rileggendo nel mio commento precedente non è chiaro, riformulo:
Non seguo la logica, in che senso se len(invoice.delivery_note_ids) == 1 allora tutte le righe fattura sono collegate allo stesso DDT?
292aed2
to
c02958d
Compare
173564b
to
e3a0c81
Compare
Ok ho rivisto alcune cose, adesso |
5a4610b
to
173564b
Compare
Ok, come non detto, Si torna a 173564b
è sempre vuoto. |
Io lo trovo impostato ed il modulo con questa modifica sta funzionando in produzione da un cliente da mesi: |
Tu hai righe prodotto con Ho disfatto la patch perché i test non passavano. A questo punto ti direi di fare una PR a questa PR, così vediamo i test verdi. |
|
@odooNextev |
@odooNextev |
74c94b6
to
9cafc9b
Compare
This module adds DatiDDT section to e-invoices
e76520a
to
4b7a78a
Compare
Mi sa che la tua PR in realtà dipende da: #4385 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Fixes #4005
Modulo di collegamento tra l10n_it_fatturapa_out e l10n_it_delivery_note
vd. anche #2202