Skip to content
Snippets Groups Projects
Commit 09ba8577 authored by Touati Djamel (otd)'s avatar Touati Djamel (otd)
Browse files

[FIX] product_expiry, stock: choose the correct lot in FEFO


Steps to reproduce the bug:
- Install product_expiry and inventory
- Go to inventory settings and enable “Expiration date”
- Create a product with tracking by lots and an expiration date
- Set on the product category: Force Removal Strategy = FEFO
- Create a PO for the product > Receive product and set expiration date to “30/10” for LOT1
- Create another PO for LOT 2 with an expiration date set to “29/10”
- Create a sales order for this product > Go to delivery

Problem:
Lot1 will be chosen on the delivery linked to the SO while lot2 must be selected
because it has an expiration date before the lot 1

The lot is chosen based on the date defined in the removal_date field,
so this field should always be calculated when an expiration date is defined

Solution:
Set the fields ("use_date", "removal_date", "alert_date") when an expiration date is defined

opw-2613711

closes odoo/odoo#77261

Signed-off-by: default avatarWilliam Henrotin <Whenrow@users.noreply.github.com>
parent 352e2f5a
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment