-
-
Notifications
You must be signed in to change notification settings - Fork 309
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
[FIX] l10n_it_delivery_note: fix delivery note invoice assignment by using invoice IDs #4591
[FIX] l10n_it_delivery_note: fix delivery note invoice assignment by using invoice IDs #4591
Conversation
…using invoice IDs
Hi @MarcoCalcagni, @renda-dev, @aleuffre, |
@GSLabIt grazie della PR! puoi verificare se l'errore sussiste anche nella 16? |
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.
Code review, LGTM
(In alternativa, si poteva considerare di passare il recordset e adattare la funzione _assign_delivery_notes_invoices
, credo sia meglio lavorare con i recordset quando si può)
Ci ho pensato, e sarebbe una cosa sensata ... ma sono stato già cazziato in passato per aver modificato una cosa del genere ..per cui ho scelto di legare l'asino ... vedi anche questa: l10n-italy/l10n_it_delivery_note/models/sale_order.py Lines 120 to 122 in 8f0e9a1
|
@tafaRU @Borruso @TheMule71 abbiamo errori bloccanti in produzione che derivano da #2569 Possibile fare review e merge in tempi brevi? Grazie! |
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
/ocabot merge patch |
Sorry @Borruso you are not allowed to merge. To do so you must either have push permissions on the repository, or be a declared maintainer of all modified addons. If you wish to adopt an addon and become it's maintainer, open a pull request to add your GitHub login to the |
/ocabot merge patch |
On my way to merge this fine PR! |
Congratulations, your PR was merged at fb14058. Thanks a lot for contributing to OCA. ❤️ |
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,)