Friday, January 9, 2026
2 changes · saas-17.4
Resolved issues and error corrections
Unpublished products can no longer be repeatedly added to a shopper's wishlist. This avoids backend errors and keeps the online shopping experience stable when unavailable products appear in wishlist flows.
Original PR description
Currently, the error arises due to adding an unpublished product to wishlist for multiple times. Steps to reproduce: - Install a 'website_sale_wishlist' module (with demo data). - Open a website and…
Currently, the error arises due to adding an unpublished product to wishlist for multiple times.
Steps to reproduce:
- Install a 'website_sale_wishlist' module (with demo data).
- Open a website and go to the shop.
- Add an unpublished product to the wishlist, then refresh the webpage and again try to add that unpublished product to the wishlist, An error is generated in the backend.
```
UniqueViolation: duplicate key value violates unique constraint "product_wishlist_product_unique_partner_id"
DETAIL: Key (product_id, partner_id)=(2, 3) already exists.
File "odoo/service/model.py", line 134, in retrying
result = func()
File "odoo/http.py", line 1824, in _serve_ir_http
return self._serve_ir_http(rule, args)
File "odoo/http.py", line 1832, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 2057, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 222, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 740, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/website_sale_wishlist/controllers/main.py", line 25, in add_to_wishlist
wish = Wishlist._add_to_wishlist(
File "addons/website_sale_wishlist/models/product_wishlist.py", line 44, in _add_to_wishlist
wish = self.env['product.wishlist'].create({
File "<decorator-gen-30>", line 2, in create
File "odoo/api.py", line 420, in _model_create_multi
return create(self, [arg])
File "odoo/models.py", line 4716, in create
records = self._create(data_list)
File "odoo/models.py", line 4904, in _create
cr.execute(SQL(
File "odoo/sql_db.py", line 346, in execute
res = self._obj.execute(query, params)
TypeError: 'NoneType' object is not subscriptable
File "odoo/http.py", line 2251, in __call__
response = request._serve_db()
File "odoo/http.py", line 1826, in _serve_db
return self._transactioning(_serve_ir_http, readonly=ro)
File "odoo/http.py", line 1847, in _transactioning
return service_model.retrying(func, env=self.env)
File "odoo/service/model.py", line 153, in retrying
raise _as_validation_error(env, exc) from exc
File "odoo/service/model.py", line 112, in _as_validation_error
translate_sql_constraint(env.cr, exc.diag.constraint_name, env.context.get('lang', 'en_US'))
File "odoo/tools/translate.py", line 429, in translate_sql_constraint
return cr.fetchone()[0]
```
An issue arises when clicking on the 'add to wishlist' icon for unpublished products. After refreshing the webpage, the 'add to wishlist' icon remains enabled, allowing users to add the same unpublished product to their wishlist multiple times. Consequently, duplicate records are inserted into the 'product_wishlist' table, An issue arises due to this.
To resolve this issue, the 'Add wishlist' button is now disabled for unpublished products.
sentry-5065439065
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prThis 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