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: fix delivery note invoice assignment by using invoice IDs #4592

Open
1 of 2 tasks
francesco-ooops opened this issue Jan 31, 2025 · 0 comments · Fixed by #4591 · May be fixed by #4593
Open
1 of 2 tasks

l10n_it_delivery_note: fix delivery note invoice assignment by using invoice IDs #4592

francesco-ooops opened this issue Jan 31, 2025 · 0 comments · Fixed by #4591 · May be fixed by #4593
Labels
16.0 bug needs porting This issue has already been resolved for some version

Comments

@francesco-ooops
Copy link
Contributor

francesco-ooops commented Jan 31, 2025

Describe the bug

Fix Mixing apples and oranges.

File "/opt/odoo/custom/oca/l10n-italy/l10n_it_delivery_note/wizard/delivery_note_create.py", line 132, in confirm
sale_order_id._assign_delivery_notes_invoices(sale_order_id.invoice_ids)
File "/opt/odoo/custom/oca/l10n-italy/l10n_it_delivery_note/models/sale_order.py", line 92, in _assign_delivery_notes_invoices
ready_invoice_ids = [
File "/opt/odoo/custom/oca/l10n-italy/l10n_it_delivery_note/models/sale_order.py", line 95, in
if invoice_id in invoice_ids
File "/usr/lib/python3/dist-packages/odoo/models.py", line 5601, in contains
raise TypeError("Mixing apples and oranges: %s in %s" % (item, self))
Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/http.py", line 652, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 317, in _handle_exception
raise exception.with_traceback(None) from new_cause
TypeError: Mixing apples and oranges: 899717 in account.move(899717,)

To Reproduce

Affected versions:

Expected behavior
A clear and concise description of what you expected to happen.

Additional context
Add any other context about the problem here. (e.g. OS, Python version, ...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
16.0 bug needs porting This issue has already been resolved for some version
Projects
None yet
1 participant