Skip to content

Commit

Permalink
Merge PR camptocamp#110 into 14.0
Browse files Browse the repository at this point in the history
Signed-off-by sebastienbeau
  • Loading branch information
OCA-git-bot committed Jan 6, 2021
2 parents 8422d39 + ed18b7b commit 1ded6cc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion stock_available_to_promise_release/models/stock_picking.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,12 @@ def _search_release_ready(self, operator, value):
@api.depends("move_lines.date_priority")
def _compute_date_priority(self):
for picking in self:
picking.date_priority = min(picking.move_lines.mapped("date_priority"))
dates = [
date_priority
for date_priority in picking.move_lines.mapped("date_priority")
if date_priority
]
picking.date_priority = min(dates) if dates else False

def release_available_to_promise(self):
# When the stock.picking form view is opened through the "Deliveries"
Expand Down

0 comments on commit 1ded6cc

Please sign in to comment.