Skip to content

[18.0] [ADD] l10n_it_edi_extension_sale: EDI management for sale order - #4834

Open
Borruso wants to merge 1 commit into
OCA:18.0from
Borruso:18.0-add-l10n_it_edi_related_document_sale
Open

Borruso wants to merge 1 commit into
OCA:18.0from
Borruso:18.0-add-l10n_it_edi_related_document_sale

Conversation

@Borruso

@Borruso Borruso commented Jul 11, 2025

Copy link
Copy Markdown
Contributor

No description provided.

@Borruso
Borruso force-pushed the 18.0-add-l10n_it_edi_related_document_sale branch from 0e09d6e to 0fafa68 Compare November 14, 2025 15:08
@Borruso Borruso changed the title [ADD] l10n_it_edi_related_document_sale: related invoice document management for sale order [18.0] [ADD] l10n_it_edi_related_document_sale: related invoice document management for sale order Nov 14, 2025
@Borruso
Borruso force-pushed the 18.0-add-l10n_it_edi_related_document_sale branch from 0fafa68 to 453c0c9 Compare November 14, 2025 15:30
@monen17 monen17 added the missing issue PRs must be linked to an issue. See the wiki. label Jan 9, 2026
@odooNextev

Copy link
Copy Markdown
Contributor

@Borruso Riesci a fare rebase che il runboat non funziona? Grazie!

@Borruso
Borruso force-pushed the 18.0-add-l10n_it_edi_related_document_sale branch 2 times, most recently from b51d472 to 3894c9f Compare March 6, 2026 10:52

@VBNext VBNext 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.

Funzionale OK

@Borruso Borruso mentioned this pull request Mar 21, 2026
41 of 46 tasks
@tafaRU

tafaRU commented Jun 19, 2026

Copy link
Copy Markdown
Member

/ocabot rebase

@OCA-git-bot

Copy link
Copy Markdown
Contributor

Congratulations, PR rebased to 18.0.

@OCA-git-bot
OCA-git-bot force-pushed the 18.0-add-l10n_it_edi_related_document_sale branch from 3894c9f to 682e367 Compare June 19, 2026 07:52
@OCA-git-bot OCA-git-bot added the mod:l10n_it_edi_related_document_sale Module l10n_it_edi_related_document_sale label Jun 19, 2026
@tafaRU

tafaRU commented Jun 19, 2026

Copy link
Copy Markdown
Member

@Borruso puoi controllare i test?

@Borruso
Borruso force-pushed the 18.0-add-l10n_it_edi_related_document_sale branch from 682e367 to 68999da Compare June 19, 2026 12:54
@lorenzoallegrucci

Copy link
Copy Markdown

@tafaRU @Borruso si può mergiare? thx

@francesco-ooops

Copy link
Copy Markdown
Contributor

@Borruso è alternativa a #5004 ? C'è una preferenza?

Puoi aprire una issue?

Grazie!

@Borruso

Borruso commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

@Borruso è alternativa a #5004 ? C'è una preferenza?

Puoi aprire una issue?

Grazie!

Nessuna preferenza.

@francesco-ooops

Copy link
Copy Markdown
Contributor

@OCA/local-italy-maintainers voi avete preferenze?

@Borruso
Borruso force-pushed the 18.0-add-l10n_it_edi_related_document_sale branch from 68999da to 349aacb Compare July 10, 2026 09:17
@OCA-git-bot OCA-git-bot added mod:l10n_it_edi_extension_sale Module l10n_it_edi_extension_sale and removed mod:l10n_it_edi_related_document_sale Module l10n_it_edi_related_document_sale labels Jul 10, 2026
@Borruso Borruso changed the title [18.0] [ADD] l10n_it_edi_related_document_sale: related invoice document management for sale order [18.0] [ADD] l10n_it_edi_extension_sale: EDI management for sale order Jul 10, 2026
@sergiocorato

Copy link
Copy Markdown
Contributor

nota: andiamo avanti con questa riportando tutte le funzionalità da l10n_it_fatturapa_sale e chiudiamo la #5004

@lorenzoallegrucci

Copy link
Copy Markdown

@Borruso @sergiocorato ciao, vedo che è ferma da molti mesi dopo il cambio di nome del modulo, si può mergiare? Grazie!

@eLBati

eLBati commented Oct 2, 2026

Copy link
Copy Markdown
Member

/ocabot rebase

@OCA-git-bot

Copy link
Copy Markdown
Contributor

Congratulations, PR rebased to 18.0.

@OCA-git-bot
OCA-git-bot force-pushed the 18.0-add-l10n_it_edi_related_document_sale branch from 349aacb to 87069b7 Compare October 2, 2026 10:55
Questo modulo permette di impostare i documenti correlati e il
riferimento amministrazione nell'ordine di vendita (o le sue righe) e
propagarli alla fattura (o le sue righe) durante la creazione della
fattura.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Espliciterei cosa fa in più questo modulo rispetto a l10n_it_edi_sale

vals["related_document_ids"] = [
Command.link(rd.id) for rd in self.related_document_ids
]
vals["l10n_it_edi_admin_ref"] = ", ".join(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

il campo l10n_it_edi_admin_ref sta in l10n_it_edi_extension, che però non è tra le dipendenze

def _prepare_invoice_line(self, **optional_values):
vals = super()._prepare_invoice_line(**optional_values)
vals["related_document_ids"] = [
Command.link(rd.id) for rd in self.related_document_ids

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Command.link su un One2many cambia il padre del record: in caso di fatturazione parziale, la prima fattura resta senza documenti.

sale_orders = sale_order_lines.mapped("order_id")

invoice_vals["related_document_ids"] = [
Command.link(rd.id) for rd in sale_orders.related_document_ids

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

def _create_account_invoices(self, invoice_vals_list, final):
for invoice_vals in invoice_vals_list:
id_sale_lines = [
invoice_line[-1]["sale_line_ids"][0][1]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Non tutte le righe fattura hanno sale_line_ids. Mi pare sia questo che faccia fallire i test: qualsiasi fattura finale dopo un acconto va in errore.

Si potrebbe togliere _create_account_invoices e intervenire sulle fatture già create, come faceva la v16

"sale_order_id",
string="Related Documents",
copy=False,
groups="account.group_account_user,sales_team.group_sale_salesman",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Servirà un'ACL su account.move.related_document per sales_team.group_sale_salesman, altrimenti un venditore senza permessi di fatturazione non riesce ad aprire l'ordine.

@Borruso
Borruso force-pushed the 18.0-add-l10n_it_edi_related_document_sale branch from 87069b7 to 6bcf03b Compare October 2, 2026 12:40
@Borruso
Borruso force-pushed the 18.0-add-l10n_it_edi_related_document_sale branch from 6bcf03b to 2d82335 Compare October 2, 2026 13:02
@Borruso
Borruso requested a review from eLBati October 2, 2026 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

missing issue PRs must be linked to an issue. See the wiki. mod:l10n_it_edi_extension_sale Module l10n_it_edi_extension_sale series:18.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants