Skip to content

Commit

Permalink
Merge PR #4591 into 14.0
Browse files Browse the repository at this point in the history
Signed-off-by francesco-ooops
  • Loading branch information
OCA-git-bot committed Jan 31, 2025
2 parents 77ab6bb + fd020f5 commit be2ba2d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion l10n_it_delivery_note/models/stock_picking.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,9 @@ def button_validate(self):
delivery_note = self._create_delivery_note()
self.write({"delivery_note_id": delivery_note.id})
if self.sale_id:
self.sale_id._assign_delivery_notes_invoices(self.sale_id.invoice_ids)
self.sale_id._assign_delivery_notes_invoices(
self.sale_id.invoice_ids.ids
)
return res

def _create_delivery_note(self):
Expand Down
2 changes: 1 addition & 1 deletion l10n_it_delivery_note/wizard/delivery_note_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def confirm(self):

self.selected_picking_ids.write({"delivery_note_id": delivery_note.id})
if sale_order_id:
sale_order_id._assign_delivery_notes_invoices(sale_order_id.invoice_ids)
sale_order_id._assign_delivery_notes_invoices(sale_order_id.invoice_ids.ids)

if self.user_has_groups("l10n_it_delivery_note.use_advanced_delivery_notes"):
return delivery_note.goto()
2 changes: 1 addition & 1 deletion l10n_it_delivery_note/wizard/delivery_note_select.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def confirm(self):
sale_order_ids = self.selected_picking_ids.sale_id
sale_order_id = sale_order_ids and sale_order_ids[0] or self.env["sale.order"]
if sale_order_id:
sale_order_id._assign_delivery_notes_invoices(sale_order_id.invoice_ids)
sale_order_id._assign_delivery_notes_invoices(sale_order_id.invoice_ids.ids)

if self.user_has_groups("l10n_it_delivery_note.use_advanced_delivery_notes"):
return self.delivery_note_id.goto()

0 comments on commit be2ba2d

Please sign in to comment.