Daily updates from Odoo
Friday, April 5, 2024
10 changes · saas-17.2
Resolved issues and error corrections
Fixes spreadsheet list and pivot drilldown options so users can reliably open the related records from cells, including cells whose formulas return blank values. It also improves navigation fallback when a requested view is not available, reducing dead ends when opening reports or records.
Original PR description
Since e210809e, the concept of empty cell was altered. Before the aforementioned commit, an evaluated cell with the type "empty" could be empty or have a formula whose result is an empty string. Now, only really empty cells (no content) have the evaluated type "empty". Empty string result is now mapped to the "text" type. The menu actions to drilldown records were relying on the previous logic and were not properly adapted. Task: 3827310 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Users working in debug mode who switch away from a company can now be redirected cleanly when the current record is no longer accessible. This avoids a confusing access error and keeps behavior consistent with the standard non-debug experience.
Original PR description
… in debug mode Be logged in multiple companies (A and B) with debug mode. Be on a form view of some record which is visible only on company B via ir.rules. With the company switcher, unlog from company B. Before this commit, the user ends up on the multi-record view of that model and received an AccessError. The behaviour is different from the one when the user is not in debug mode. The user should be redirected to the multi-record view but without the AccessError.
This fixes grid scrolling for right-to-left languages, so content displays and moves correctly for users working in those layouts. It improves the experience for international users without changing existing features.
Original PR description
If an element's direction is rtl (right-to-left), then scrollLeft is 0 when the scrollbar is at its rightmost position (at the start of the scrolled content), and then increasingly negative as you scroll towards the end of the content. **Before this commit** The useVirtualGrid hook did not take that into account. **After this commit** Now it does, making use of the ABS math operator.
Changing the language from My Profile could fail when a new sales order screen was open, interrupting users with an error. This fix makes the profile language change handle unsaved records safely, so users can update their preferences without disrupting their workflow.
Original PR description
An error occurred when attempting to change the language in my profile. Steps to reproduce: - Install the ``sale_management`` and ``hr`` module - Settings / Translations / Languages - Activate any…
An error occurred when attempting to change the language in my profile.
Steps to reproduce:
- Install the ``sale_management`` and ``hr`` module
- Settings / Translations / Languages
- Activate any Language
- Open Sales / Click New / Click the profile icon / click ``My Profile``
- Change the language
Traceback:
``` ValueError: too many values to unpack (expected 1)
File "odoo/models.py", line 5848, in ensure_one
_id, = self._ids
ValueError: Expected singleton: sale.order('n', 'e', 'w')
File "odoo/http.py", line 2251, in __call__
response = request._serve_db()
File "odoo/http.py", line 1827, 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 134, in retrying
result = func()
File "odoo/http.py", line 1825, 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 220, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 739, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/web/controllers/action.py", line 67, in load_breadcrumbs
display_names.append(request.env[act['res_model']].browse(record_id).display_name)
File "odoo/fields.py", line 1202, in __get__
record.ensure_one()
File "odoo/models.py", line 5851, in ensure_one
raise ValueError("Expected singleton: %s" % self)
```
In line[1] we are getting the record ID as ('n', 'e', 'w') while trying to
change the language.
This commit resolves the mentioned issue by checking the type of record ID
[1] : https://github.com/odoo/odoo/blob/853bd97eda1f4eca5f9f63ef1c5909fddaa98d27/addons/web/controllers/action.py#L67
sentry - 5135218331
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prThis update fixes an issue where default list values in the mail module could be unintentionally shared across multiple records. Each record now gets its own default values, reducing unexpected behavior and improving reliability in messaging-related features.
Original PR description
Before this commit, the default value definition of a Record.attr() was saved once and given to all records of the given model at record creation. This meant that lists were shared between records, which is definitely an undesireable side-effect of the implementation. This commit fixes the issue by instead getting default value from usual lifecyle as a class instance.
This fix ensures invoice and bill audit hashes are created in the correct chronological order, even when documents are sent or printed later. It also separates audit chains by invoice numbering prefix and warns accounting users when journal entries still need hashing, improving legal integrity reporting and reducing confusing audit results.
Original PR description
Entreprise PR: https://github.com/odoo/enterprise/pull/59243
This update brings the spreadsheet component to its latest 17.2 version with several fixes for charts, menus, data validation, exports, and sheet handling. Users should see more reliable spreadsheet behavior, better performance with large datasets, and fewer interface glitches across common spreadsheet actions.
Original PR description
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/c15836d72 [REL] 17.2.2 https://github.com/odoo/o-spreadsheet/commit/87b7e625d [FIX] Checkbox: unused className prop in…
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/c15836d72 [REL] 17.2.2 https://github.com/odoo/o-spreadsheet/commit/87b7e625d [FIX] Checkbox: unused className prop in checkbox https://github.com/odoo/o-spreadsheet/commit/da05049bf [FIX] chart: preserve label order when aggregate https://github.com/odoo/o-spreadsheet/commit/e3a29bf40 [PERF] helpers: faster default cell height Task: 3845472 https://github.com/odoo/o-spreadsheet/commit/d9630b071 [IMP] package: update owl to version 2.2.10 https://github.com/odoo/o-spreadsheet/commit/d393330db [FIX] *: Compute max/min on huge arrays Task: 3802691 https://github.com/odoo/o-spreadsheet/commit/94b0703de [FIX] menu: non-aligned menu items Task: 3814222 https://github.com/odoo/o-spreadsheet/commit/baaba22c2 [FIX] SplitIntoColumnsPanel: Panel closes instantly Task: 3829192 https://github.com/odoo/o-spreadsheet/commit/90bd1b55f [FIX] EditionPlugin: data validation duplicate values https://github.com/odoo/o-spreadsheet/commit/8c7f35e51 [FIX] Composer: weird behavior of autocomplete dropdown https://github.com/odoo/o-spreadsheet/commit/39eba8ca5 [FIX] BottomBarSheet: Rename a sheet with style content on Firefox Task: 3754944 https://github.com/odoo/o-spreadsheet/commit/95ff322a9 [FIX] bottom_bar: disable sheet drag & drop in readonly Task: 3820888 https://github.com/odoo/o-spreadsheet/commit/88f98a919 [FIX] export: export non-Excel formulas as value https://github.com/odoo/o-spreadsheet/commit/1aa3f0310 [FIX] headers_overlay: unhide cols/rows icon position broken
This fixes a timing issue where mail and Discuss updates could be missed during page startup. Users should see more reliable real-time notifications, counters, and conversation updates when opening Odoo.
Original PR description
Waiting for init messaging to subscribe could lead to notifications being lost, because the bus dispatches them as soon as it receives them, even if no handler is registered yet. 1. delay in…
Waiting for init messaging to subscribe could lead to notifications being lost, because the bus dispatches them as soon as it receives them, even if no handler is registered yet. 1. delay in subscribe This delay in subscribe was necessary in the past, because some notification handlers assumed the initial state was received, to make "diff" on the inital state (example: incrementing counter). We now explicitly check if the state is "ready" to receive the "diff", by comparing the current bus id to the last one known when the state was received. This is further improved in this commit as a generic init bus id cannot possibly work when different pieces of data are received at different times. Each data that should receive diff from the bus should have its own memory of bus id. 2. init data dependency Some others handlers relied on some initial data that was previously received from init messaging, but these are now received from session info at page load. Related runbot issues: https://runbot.odoo.com/web/#id=60477&menu_id=424&cids=1&action=573&model=runbot.build.error&view_type=form https://runbot.odoo.com/web/#id=60550&menu_id=424&cids=1&action=573&model=runbot.build.error&view_type=form https://runbot.odoo.com/web/#id=60551&menu_id=424&cids=1&action=573&model=runbot.build.error&view_type=form https://runbot.odoo.com/web/#id=60613&menu_id=424&cids=1&action=573&model=runbot.build.error&view_type=form https://runbot.odoo.com/web/#id=60614&menu_id=424&cids=1&action=573&model=runbot.build.error&view_type=form https://runbot.odoo.com/web/#id=60615&menu_id=424&cids=1&action=573&model=runbot.build.error&view_type=form https://runbot.odoo.com/web/#id=60637&menu_id=424&cids=1&action=573&model=runbot.build.error&view_type=form https://runbot.odoo.com/web/#id=60638&menu_id=424&cids=1&action=573&model=runbot.build.error&view_type=form https://runbot.odoo.com/web/#id=60672&menu_id=424&cids=1&action=573&model=runbot.build.error&view_type=form https://runbot.odoo.com/web/#id=60673&menu_id=424&cids=1&action=573&model=runbot.build.error&view_type=form https://runbot.odoo.com/web/#id=60727&menu_id=424&cids=1&action=573&model=runbot.build.error&view_type=form https://runbot.odoo.com/web/#id=60988&menu_id=424&cids=1&action=573&model=runbot.build.error&view_type=form https://runbot.odoo.com/web/#id=60989&menu_id=424&cids=1&action=573&model=runbot.build.error&view_type=form https://runbot.odoo.com/web/#id=61029&menu_id=424&cids=1&action=573&model=runbot.build.error&view_type=form https://runbot.odoo.com/web/#id=61050&menu_id=424&cids=1&action=573&model=runbot.build.error&view_type=form https://runbot.odoo.com/web/#id=61131&menu_id=424&cids=1&action=573&model=runbot.build.error&view_type=form https://runbot.odoo.com/web/#id=61132&menu_id=424&cids=1&action=573&model=runbot.build.error&view_type=form https://runbot.odoo.com/web/#id=61135&menu_id=424&cids=1&action=573&model=runbot.build.error&view_type=form https://runbot.odoo.com/web/#id=61150&menu_id=424&cids=1&action=573&model=runbot.build.error&view_type=form https://runbot.odoo.com/web/#id=61160&menu_id=424&cids=1&action=573&model=runbot.build.error&view_type=form https://runbot.odoo.com/web/#id=61161&menu_id=424&cids=1&action=573&model=runbot.build.error&view_type=form https://runbot.odoo.com/web/#id=61163&menu_id=424&cids=1&action=573&model=runbot.build.error&view_type=form https://runbot.odoo.com/web/#id=61164&menu_id=424&cids=1&action=573&model=runbot.build.error&view_type=form https://runbot.odoo.com/web/#id=61166&menu_id=424&cids=1&action=573&model=runbot.build.error&view_type=form https://runbot.odoo.com/web/#id=61168&menu_id=424&cids=1&action=573&model=runbot.build.error&view_type=form https://runbot.odoo.com/web/#id=61261&menu_id=424&cids=1&action=573&model=runbot.build.error&view_type=form https://runbot.odoo.com/web/#id=61295&menu_id=424&cids=1&action=573&model=runbot.build.error&view_type=form https://runbot.odoo.com/web/#id=61306&menu_id=424&cids=1&action=573&model=runbot.build.error&view_type=form https://runbot.odoo.com/web/#id=61349&menu_id=424&cids=1&action=573&model=runbot.build.error&view_type=form https://runbot.odoo.com/web/#id=61421&menu_id=424&cids=1&action=573&model=runbot.build.error&view_type=form
This fix restores the ability to issue partial refunds for point of sale orders. It addresses an incorrect order total calculation that was blocking valid partial refund workflows, helping staff process customer returns more accurately.
Original PR description
This reverts commit https://github.com/odoo/odoo/commit/3d26099621f113b041b0f38b9604494b5a19c620 to allow partial refunding of pos order as the total_amount is not correct anymore. opw-3827876
PDF viewer files now use a more widely supported file type so documents load correctly on common web server setups such as Nginx. The update also prevents problematic PDFs from unexpectedly opening the print dialog, improving the viewing experience for users.
Original PR description
Follow-up of #151714 To avoid error like "Loading module from “/web/static/lib/pdfjs/build/pdf.mjs” was blocked because of a disallowed MIME type (“application/octet-stream”)." when JavaScript Modules using .mjs file extension are served from some common HTTP server (i.e. Nginx [1]), this commit renames PDF.js assets who uses this extension (introduced in commit [2]) to a more traditional .js extension. opw-3844829 opw-3850119 [1]: https://trac.nginx.org/nginx/ticket/2216 [2]: odoo/odoo@0216dc4f9ecef49e8b799bb0d52b59250f5f23e8