Daily updates from Odoo
Friday, April 5, 2024
9 changes
4 changes
Resolved issues and error corrections
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.
1 change
Resolved issues and error corrections
This update fixes an issue where a duplicate error popup appeared when saving website pages. The change ensures that error messages are displayed correctly and consistently, providing a better user experience. This improves the reliability of the website editor.
Original PR description
If an error happens when a website page is being saved, the error message is displayed as a popup on the edited block. Unfortunately, an error dialog is also displayed. This commit prevents that dialog from being displayed when the error is already shown to the user. task-3599890 Forward-Port-Of: odoo/odoo#154050
4 changes
Resolved issues and error corrections
This update removes the ability to duplicate websites from the website form view. The duplication feature was misleading because it couldn't properly copy website content, pages, and other important data—only technical fields that shouldn't be duplicated anyway. The team plans to focus on a proper export/import feature for websites in the future instead.
Original PR description
At the moment, duplicating a website is not possible in the sense of duplicating content, pages, etc. It is still available as an action from the form view, and it could make sense to start up a new website with a few common values (social media? etc?)... but many of website fields are technical fields that should not be copied and many are dubious to copy and not even visible in the form view. Really, duplicating a website at the moment is misleading. This commit disables the possibility from the form view. In the future, we want to focus on the ability to export / import a full website, but that's not for now. opw-3782830 Forward-Port-Of: odoo/odoo#160463
This update fixes a display issue in the Project module where task stage names were misaligned when viewing the kanban board on mobile devices. The fix prevents text overflow by applying proper styling to stage names, ensuring they display correctly regardless of length.
Original PR description
Steps to reproduce: - Open the project in mobile view - go to the kanban view enable task stages - add one new staged with large name you can see name is misaligned Issue: - In mobile view task stage name is misaligned Solution: - Adding class 'o_text_overflow' to not overflow name in kanban view task-3602610 Forward-Port-Of: odoo/odoo#145915
This update makes it easier to configure Viva Wallet payments by automatically copying the webhook to your clipboard with a single click, eliminating the need to manually select and copy the text. This streamlines the payment method setup process for users.
Original PR description
Currently, when you copy the viva wallet webhook to configure it in your account, you have to select it manually. With this commit we add a “CopyClipboardChar” widget which does this automatically. 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
This update corrects an incorrect translation in the Slovak language file. The word for "Lithuania" was mistakenly using a corrupted version of the Latvian translation. This fix ensures users in Slovakia see the proper translation of country names in the system.
Original PR description
Description of the issue/feature this PR addresses: current translation is bastardized (missing one letter) translation of Latvia (sk: Lotyšsko). Current behavior before PR: Desired behavior after PR is merged: Correct translation of Lithuania This goes back to at least 12.0 Not skilled enough to find original commit for this :-( --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr