Skip to content
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

l10n_it_delivery_note: errore nella creazione di un DN se è già stata emessa un fattura collegata al SO #4598

Open
3 tasks
odooNextev opened this issue Feb 4, 2025 · 0 comments · May be fixed by #4600
Open
3 tasks
Labels

Comments

@odooNextev
Copy link
Contributor

odooNextev commented Feb 4, 2025

Module

l10n_it_delivery_note

Describe the bug

Quando si genera un DN da un trasferimento in uscita collegato ad un SO da cui è già stata emessa una fattura si ottiene questo errore:

File "/home/odoo/odoo/addons/l10n-italy/l10n_it_delivery_note/wizard/delivery_note_create.py", line 118, in confirm
    sale_order_id._assign_delivery_notes_invoices(sale_order_id.invoice_ids)
  File "/home/odoo/odoo/addons/l10n-italy/l10n_it_delivery_note/models/sale_order.py", line 109, in _assign_delivery_notes_invoices
    ready_invoice_ids = [
  File "/home/odoo/odoo/addons/l10n-italy/l10n_it_delivery_note/models/sale_order.py", line 112, in <listcomp>
    if invoice_id in invoice_ids
  File "/home/odoo/odoo/odoo/odoo/models.py", line 5822, in __contains__
    raise TypeError(f"unsupported operand types in: {item!r} in {self}")
TypeError: unsupported operand types in: 687 in account.move(687,)

To Reproduce

Affected versions:

Steps to reproduce the behavior:

  1. Creare e confermare un SO con almeno un prodotto da consegnare con un picking
  2. Creare una fattura d'acconto dal SO
  3. Aprire il picking che si è generato confermando il SO e confermarlo
  4. Creare un DN dal picking

Expected behavior
Bisogna ricavare gli ids invece che gli oggetti nella prima riga segnalata nel traceback riportato qui sopra.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant