Friday, April 18, 2025
9 changes · 17.0
Resolved issues and error corrections
Partner autocomplete now handles cases where GST lookup returns no company details instead of failing. This prevents users from being blocked by an error when a GST number has no enrichment data available.
Original PR description
This happened because the Partner Autocomplete service was returning an empty response for this particular GST number and the code was assuming that the name was always present. Sentry - 6327760196
This update corrects an automated test for Italian delivery documents so it uses the right permissions when creating a sales order. It helps keep quality checks reliable and prevents false failures during development.
Original PR description
`TestItEdiDDT.test_deferred_invoice` creates a sales order but does not ensure the user has the rights to create one. https://runbot.odoo.com/odoo/error/163639
Fixes an issue where website popups configured to reappear after a short delay could stay hidden indefinitely for visitors. The change ensures the popup delay is saved correctly by browsers, so campaigns and notices appear again at the intended time.
Original PR description
Steps to reproduce the issue: - Add a popup with a 0.0001 days config. - Visit the page as a non-connected user. - The popup opens at some point. - Close the popup. - Wait 10 seconds. - Refresh the…
Steps to reproduce the issue: - Add a popup with a 0.0001 days config. - Visit the page as a non-connected user. - The popup opens at some point. - Close the popup. - Wait 10 seconds. - Refresh the page ---> The popup never reappears. This issue comes from the fact that we were setting a non-integer value for the cookie expiration. The "max-age" attribute does not accept float values, so the cookie is treated as a "session" cookie. It only expires when the session ends, which can be effectively "never" on some browsers that keep sessions open indefinitely. This used to work before commit [1] because we were also setting an "expires" attribute. When the "max-age" attribute was invalid, the browser would fallback to the "expires" attribute. Since that commit removed the "expires" attribute, the only remaining value (max-age) is invalid, and the popup never reappears as expected. This fix ensures the value used in "max-age" is always an integer, avoiding any invalid cookie behavior. [1]: https://github.com/odoo/odoo/commit/006ee1fc470eabdcbde68077259cf543633d6490 task-4690318
Service products now honor the unit of measure defaults configured by users when the Timesheets on Sales module is installed. This prevents products from being automatically set to hours when the business has chosen a different default unit.
Original PR description
**Issue:** When User-defined Defaults are set for Unit of Measure (product.template or product.product) and sale_timesheet module is installed, the uom default is not respected. **Steps to reproduce:** - ensure sale_timesheet module is installed - settings > technical > user-defined Defaults - create a default for unit of measure (product.template) other than hour - create a new product of type service The issue occurs in both product.template and product.product opw-4604491
This fixes an error that could occur in Point of Sale manufacturing tests when setting up bills of materials without product variants enabled. The change avoids using a hidden product variant field, making setup more reliable without changing business functionality.
Original PR description
Similar to #206050, sale_mrp has a bunch of forms which try to set the `product_id` on a bom without product variants being enabled, in which case the field is invisible and setting it fails. Since they don't seem to really care for variants, and the products are not created with variants, as in #206050 just don't set `product_id`. https://runbot.odoo.com/odoo/error/163112
This update stops unnecessary warning messages from filling IoT Box logs when harmless message types are received. It makes logs easier to review and helps teams focus on issues that actually need attention.
Original PR description
Currently the IoT Box are being infested with logs like `2025-04-17 11:30:46,925 13649 WARNING ? odoo.addons.hw_drivers.websocket_client: message type not supported: bundle_changed` This PR removes them as they aren't useful information task-4735615
Fixes a crash that could occur when a spreadsheet attachment has missing or empty stored data, such as during upgrades without the original file storage. This helps keep document and spreadsheet records usable and avoids background processing failures.
Original PR description
Steps to reproduce: 1. Install documents module with demo data 2. After this navigate Settings -> Technical -> Database Structure -> Attachments 4. In attachment delete the spreadsheet(Partner…
Steps to reproduce:
1. Install documents module with demo data
2. After this navigate Settings -> Technical -> Database Structure
-> Attachments
4. In attachment delete the spreadsheet(Partner Spreadsheet Test)
from file content and try to save it will raise below mentioned
traceback will raise
Why following this flow -> during upgrade don't have the filestore so there is possiblity spreadsheet_data would be empty and traceback can raise.
that is why handling this:
```
Traceback (most recent call last):
File "/home/odoo/src/odoo/odoo/addons/base/models/ir_autovacuum.py", line 39, in _run_vacuum_cleaner
self.env.cr.commit()
File "/home/odoo/src/odoo/odoo/sql_db.py", line 472, in commit
self.flush()
File "/home/odoo/src/odoo/odoo/sql_db.py", line 137, in flush
self.transaction.flush()
File "/home/odoo/src/odoo/odoo/api.py", line 879, in flush
env_to_flush.flush_all()
File "/home/odoo/src/odoo/odoo/api.py", line 737, in flush_all
self._recompute_all()
File "/home/odoo/src/odoo/odoo/api.py", line 733, in _recompute_all
self[field.model_name]._recompute_field(field)
File "/home/odoo/src/odoo/odoo/models.py", line 6978, in _recompute_field
field.recompute(records)
File "/home/odoo/src/odoo/odoo/fields.py", line 1379, in recompute
apply_except_missing(self.compute_value, recs)
File "/home/odoo/src/odoo/odoo/fields.py", line 1352, in apply_except_missing
func(records)
File "/home/odoo/src/odoo/odoo/fields.py", line 1401, in compute_value
records._compute_field_value(self)
File "/home/odoo/src/odoo/addons/mail/models/mail_thread.py", line 424, in _compute_field_value
return super()._compute_field_value(field)
File "/home/odoo/src/odoo/odoo/models.py", line 4924, in _compute_field_value
fields.determine(field.compute, self)
File "/home/odoo/src/odoo/odoo/fields.py", line 102, in determine
return needle(*args)
File "/home/odoo/src/enterprise/documents/models/documents_document.py", line 149, in _compute_is_multipage
document.is_multipage = bool(document._get_is_multipage()) # None => False
File "/home/odoo/src/enterprise/documents_spreadsheet/models/documents_document.py", line 256, in _get_is_multipage
spreadsheet_data = json.loads(self.spreadsheet_data)
File "/usr/lib/python3.10/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.10/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.10/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
```
upg-2752614
opw-4711261A test setup issue in the Kenya OSCU stock integration was corrected so sales documents can be created with the right permissions during automated checks. This helps prevent false test failures and supports more reliable validation of the module.
Original PR description
`_test_send_invoice_and_credit_note` and `_test_send_invoiced_stock_moves` try to create sale orders, but don't check that the group is set on the user. https://runbot.odoo.com/odoo/error/163637
The update fixes internal test setup so Mexican e-invoicing sales tests use the right permissions when creating sales orders. This helps prevent false test failures and improves confidence in future changes without affecting customer-facing features.
Original PR description
These tests create sale orders, but `self.env.user` does not necessarily have the right to create one by default. https://runbot.odoo.com/odoo/error/163635