Steps to reproduce:
- Enable manufacturing lead times in settings
- Create a BOM for product P with lead time 5 days
- Create and process an MO for product P
- End date is wrong
(add date_finished to the MO list view to check)
Bug:
when marking MO as done the end date is correctly set as today
but during the write the compute is triggered which delays it by
the lead time
Fix:
do not modify the end date of done MOs
opw-3536069
closesodoo/odoo#138431
X-original-commit: baa769a56a1236ec75a6042c56643464c2aabd3d
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>