Friday, January 9, 2026
1 change · saas-17.4
Resolved issues and error corrections
This update corrects a bug that prevented users from setting deadline dates on tasks. The issue stemmed from a missing calendar configuration, specifically when assigning tasks to users without a linked calendar. The fix ensures tasks can be created with deadlines regardless of the user's calendar setup.
Original PR description
Currently, an error occurs when adding a deadline interval date to a task. Step to produce: - Install the `industry_fsm` module and turn on the debugger. - Go to Settings / Technical / Resource /…
Currently, an error occurs when adding a deadline interval date to a task.
Step to produce:
- Install the `industry_fsm` module and turn on the debugger.
- Go to Settings / Technical / Resource / Resources, open record name 'Mitchell admin' and remove the value of 'Working Time'.
- Go to Project / Tasks / My tasks, Create a task with Deadline intervals, Make sure Assignees is a 'Mitchell admin' as we removed the value of 'Working Time' from it
Traceback On Sentry:
```
ValueError: not enough values to unpack (expected 1, got 0)
File "odoo/models.py", line 5851, in ensure_one
_id, = self._ids
ValueError: Expected singleton: resource.calendar()
File "odoo/http.py", line 2248, in __call__
response = request._serve_db()
File "odoo/http.py", line 1823, in _serve_db
return self._transactioning(_serve_ir_http, readonly=ro)
File "odoo/http.py", line 1843, in _transactioning
return service_model.retrying(func, env=self.env)
File "odoo/service/model.py", line 134, in retrying
result = func()
File "odoo/http.py", line 1821, in _serve_ir_http
return self._serve_ir_http(rule, args)
File "odoo/http.py", line 1828, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 2053, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 220, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 756, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/web/controllers/dataset.py", line 38, in call_kw
return self._call_kw(model, method, args, kwargs)
File "addons/web/controllers/dataset.py", line 34, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "odoo/api.py", line 458, in call_kw
result = getattr(recs, name)(*args, **kwargs)
File "addons/web/models/models.py", line 71, in web_save
self.write(vals)
File "home/odoo/src/enterprise/saas-17.2/helpdesk_fsm/models/project_task.py", line 45, in write
res = super().write(vals)
File "home/odoo/src/enterprise/saas-17.2/industry_fsm/models/project_task.py", line 193, in write
return super(Task, self_fsm).write(vals)
File "addons/project_sms/models/project_task.py", line 25, in write
res = super().write(vals)
File "home/odoo/src/enterprise/saas-17.2/project_enterprise/models/project_task.py", line 472, in write
work_intervals = calendar._work_intervals_batch(start, stop, resources=resource)
File "addons/resource/models/resource_calendar.py", line 434, in _work_intervals_batch
attendance_intervals = self._attendance_intervals_batch(start_dt, end_dt, resources, tz=tz or self.env.context.get("employee_timezone"))
File "addons/resource/models/resource_calendar.py", line 273, in _attendance_intervals_batch
self.ensure_one()
File "odoo/models.py", line 5854, in ensure_one
raise ValueError("Expected singleton: %s" % self)
```
An error occurs when the system tries to access the method name '_work_intervals_batch' without a resource calendar record at [1].
link [1]: https://github.com/odoo/enterprise/blob/4a09f71c13f26dd538603c1fdbb34da7bc0d2a97/project_enterprise/models/project_task.py#L470-L472
To resolve this issue, Add a condition that checks if the resource calendar_id is not available, then try to plan tasks for a user that has no calendar.
sentry - 5534568281