Skip to content

Commit

Permalink
[FIX] l10n_it_delivery_note_order_link: count delivery notes from pic…
Browse files Browse the repository at this point in the history
…kings

Instead of getting them from the order lines
  • Loading branch information
renda-dev committed Jul 18, 2024
1 parent 39991cb commit 6a32bdf
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions l10n_it_delivery_note_order_link/models/sale_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ class SaleOrder(models.Model):

def _compute_delivery_notes(self):
for order in self:
delivery_notes = order.order_line.mapped(
"delivery_note_line_ids.delivery_note_id"
)
delivery_notes = order.picking_ids.mapped("delivery_note_id")

order.delivery_note_ids = delivery_notes
order.delivery_note_count = len(delivery_notes)
Expand Down

0 comments on commit 6a32bdf

Please sign in to comment.