[FIX] mrp_workorder: fix the WO planned date

we recently fixed this issue via this commit: https://github.com/odoo/odoo/pull/78377/commits/f3bb0dcc013960d6a43b9182b7daa5d33cab5aaa
But we forgot to add a “break” in the loop in order to go to the next available interval when the current interval duration has been used

the test has been modified to better cover the use case

closes odoo/odoo#79361

X-original-commit: b8201b7a523b66cfdbb4a220250608e15d67190c
Related: odoo/enterprise#22096
Signed-off-by: Steve Van Essche <svs@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
This commit is contained in:
Touati Djamel (otd)
2021-11-04 13:40:52 +00:00
parent 8abe924d2d
commit fdc2ed1ee6
+2
View File
@@ -266,6 +266,8 @@ class MrpWorkcenter(models.Model):
else:
# Decrease a part of the remaining duration
remaining -= interval_minutes
# Go to the next available interval because the possible current interval duration has been used
break
return False, 'Not available slot 700 days after the planned start'
def action_archive(self):