[FIX] mrp: studio on workorder gantt view
Traceback happens because it doesn't require records and call the function without row records. The code doesn't handle that case. Don't try to find unavailabilities in that case and just skip this part of code closes odoo/odoo#113104 Signed-off-by: Steve Van Essche <svs@odoo.com>
This commit is contained in:
@@ -580,7 +580,7 @@ class MrpWorkorder(models.Model):
|
||||
row_workcenter_ids = set()
|
||||
if 'groupedBy' in row and row.get('groupedBy')[0] == 'workcenter_id':
|
||||
row_workcenter_ids.add(row.get('resId'))
|
||||
else:
|
||||
elif 'records' in row:
|
||||
for record in row.get('records'):
|
||||
row_workcenter_ids.add(record['workcenter_id'][0])
|
||||
row['workcenter_ids'] = row_workcenter_ids
|
||||
|
||||
Reference in New Issue
Block a user