Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] stock: quant in_date should be the date the product arrives to the warehouse #162094

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions addons/stock/models/stock_move_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,9 @@ def _action_done(self):
# if this move line is force assigned, unreserve elsewhere if needed
ml._synchronize_quant(-ml.quantity_product_uom, ml.location_id, action="reserved")
available_qty, in_date = ml._synchronize_quant(-ml.quantity_product_uom, ml.location_id)
# we don't want the in_date if it's an incoming move from a supplier
if ml.location_id.usage == "supplier":
in_date = False
ml._synchronize_quant(ml.quantity_product_uom, ml.location_dest_id, package=ml.result_package_id, in_date=in_date)
if available_qty < 0:
ml._free_reservation(
Expand Down