Skip to content

Commit

Permalink
[FIX] stock_release_channel: A released picking is a picking with a l…
Browse files Browse the repository at this point in the history
…ast_release_date

Before this change a released picking was a picking that do no more need to be released. With the management of backorders introduced in #478, some released pickings could still need to be released since qties were not available for some product at release time. Fortunately, at the same time as this change in the management of the release process, a new field has been added to log the timestamp of the last release done on a picking. Therefore, to kown if picking is released we can replace the search on 'need_release' by a search on 'last_release_date'. A released picking is a picking with a last_release_date filled.
  • Loading branch information
lmignon authored and TDu committed Mar 10, 2023
1 parent c26567b commit cd4192d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions stock_release_channel/models/stock_release_channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,24 +279,24 @@ def _field_picking_domains(self):
),
],
"count_picking_released": [
("need_release", "=", False),
("last_release_date", "!=", False),
("state", "in", ("assigned", "waiting", "confirmed")),
],
"count_picking_assigned": [
("need_release", "=", False),
("last_release_date", "!=", False),
("state", "=", "assigned"),
],
"count_picking_waiting": [
("need_release", "=", False),
("last_release_date", "!=", False),
("state", "in", ("waiting", "confirmed")),
],
"count_picking_late": [
("need_release", "=", False),
("last_release_date", "!=", False),
("scheduled_date", "<", fields.Datetime.now()),
("state", "in", ("assigned", "waiting", "confirmed")),
],
"count_picking_priority": [
("need_release", "=", False),
("last_release_date", "!=", False),
("priority", "=", "1"),
("state", "in", ("assigned", "waiting", "confirmed")),
],
Expand Down

0 comments on commit cd4192d

Please sign in to comment.