Skip to content

Commit

Permalink
[FIX]l10n_it_delivery_note_batch: correctly filter pickings when crea…
Browse files Browse the repository at this point in the history
…ting delivery notes
  • Loading branch information
PicchiSeba committed Feb 22, 2024
1 parent f966a79 commit 4d2caca
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions l10n_it_delivery_note_batch/models/stock_picking_batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ def create_delivery_notes(self, **kwargs):

# select only pickings that don't already have a delivery note
# TODO state check on individual pickings?
pickings = rec.mapped("picking_ids").search(
[("delivery_note_id", "=", False), ("batch_id", "=", rec.id)]
)
pickings = rec.picking_ids.filtered(lambda p: not p.delivery_note_id)

# poor man's group by - group by homogeneous pickings
todo_list = {}
Expand Down

0 comments on commit 4d2caca

Please sign in to comment.