-
-
Notifications
You must be signed in to change notification settings - Fork 316
[18.0][ADD]l10n_it_edi_related_document_type: l10n_it_edi extension for multiple related document type management #4749
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: 18.0
Are you sure you want to change the base?
Conversation
26f0293
to
bdcf23f
Compare
6a0954b
to
d4c7a72
Compare
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.
Grazie della PR!
Come dicevo stamattina in chiamata, secondo me anche questo si potrebbe includere in l10n_it_edi_extension
(#4411) perché non vedo grandi differenze tra questa funzionalità e la visualizzazione dell'anteprima, o le altre funzionalità già incluse in quel modulo.
Anche lasciarlo in un modulo a sé ha senso, ma allora potevamo farlo anche per le altre funzionalità 🤷
Quindi per me vanno bene entrambe le soluzioni.
Non ho visto script di migrazione, quindi se uno migra da 16.0
perde tutti i documenti collegati alle fatture?
d691ce1
to
0e22e76
Compare
@monen17 Grazie mille per la review! Seguendo le indicazioni e commenti nella task del portale Odoo Italia ho scelto di farlo in un modulo separato. Non ci sarebbero comunque problemi ad aggiungere le funzionalità in l10n_it_edi_extension. |
ba46619
to
6cf4ab5
Compare
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.
Grazie delle modifiche!
Oltre ai punti ancora aperti qui sotto, manca ancora lo script di migrazione.
Ah e ricorda di modificare anche il messaggio del commit visto che il nome del modulo è cambiato.
190129c
to
fbc1827
Compare
@monen17 Grazie anche per questa review! Ho aggiornato la pr per gestire il collegamento tra le righe di fattura e i documenti collegati, sia in import xml che nel create. |
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 fatto solo revisione del codice e secondo me manca solo più qualche piccola modifica; non ho modo di verificare la migrazione ma a occhio mi sembra ok.
l10n_it_edi_related_document_type/views/account_move_related_documents.xml
Outdated
Show resolved
Hide resolved
def create(self, vals_list): | ||
line_obj = self.env["account.move.line"] | ||
for vals in vals_list: | ||
if vals.get("lineRef") and not vals.get("invoice_line_id"): |
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.
if vals.get("lineRef") and not vals.get("invoice_line_id"): | |
if vals.get("lineRef") and not vals.get("invoice_line_id") and vals.get("invoice_id"): |
Altrimenti quando più sotto fai vals["invoice_id"]
potrebbe essere sollevato un KeyError
.
invoice_doc_type = related_document.filtered(lambda x: x.type == "invoice")[0] | ||
rcp_doc_type = related_document.filtered(lambda x: x.type == "reception")[0] |
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.
Si potrebbe verificare per almeno un documento che è collegato alla riga corretta?
<field name="cup" /> | ||
</group> | ||
<group groups="base.group_no_one"> | ||
<field name="invoice_id" /> |
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.
<field name="invoice_id" /> | |
<field name="invoice_id" /> | |
<field name="invoice_line_id" /> |
Ora che è tornato, potrebbe essere utile vederlo.
fbc1827
to
0a90443
Compare
Allows import and export of multiple related document types, similar to l10n_it_fatturapa. Also removes the read-only restriction on lineRef. Removes the invoice_line reference from the related document type model, as it is only needed in the report.
Hides l10n_it_edi fields from the invoice view, but keeps them available for import.