Skip to content

Commit

Permalink
Merge pull request #397 from frePPLe/15.0
Browse files Browse the repository at this point in the history
Syncing from upstream frePPLe/odoo (15.0)
  • Loading branch information
bt-admin authored Jan 22, 2024
2 parents 9fb4a66 + 4de5a32 commit cb10353
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions frepple/controllers/outbound.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,13 +499,13 @@ def export_calendar(self):
"mrp.workcenter",
search=[("resource_calendar_id", "!=", False)],
fields=[
"id",
"resource_id",
"resource_calendar_id",
],
):
if i["resource_calendar_id"][0] not in calendar_resource:
calendar_resource[i["resource_calendar_id"][0]] = set()
calendar_resource[i["resource_calendar_id"][0]].add(i["id"])
calendar_resource[i["resource_calendar_id"][0]].add(i["resource_id"][0])

# Read from the attendance/leaves which resource has specific entries
self.resources_with_specific_calendars = {}
Expand Down Expand Up @@ -884,6 +884,7 @@ def export_workcenters(self):
"mrp.workcenter",
fields=[
"name",
"resource_id",
"owner",
"resource_calendar_id",
"time_efficiency",
Expand All @@ -899,10 +900,10 @@ def export_workcenters(self):
owner = i["owner"]
available = (
i["resource_calendar_id"]
if not self.resources_with_specific_calendars.get(i["id"])
if not self.resources_with_specific_calendars.get(i["resource_id"][0])
else (
0,
"calendar for %s" % (name,),
"calendar for %s" % (i["resource_id"][1],),
)
)
self.map_workcenters[i["id"]] = name
Expand Down

0 comments on commit cb10353

Please sign in to comment.