Daily updates from Odoo
Wednesday, October 9, 2024
13 changes
Resolved issues and error corrections
This fix prevents an automated test for public Discuss call pages from failing unpredictably when background updates arrive before the join response. It improves test stability without changing the user-facing calling experience.
Original PR description
Before this commit, it was possible that a bus message containing a `mail.message.rtc.session` record update reached the client before the response to the `/mail/rtc/channel/join_call` route. Since the condition for the test step is that there is a call (triggered by the presence of a rtc session) while the condition for the error thrown is that there is no `selfSession` (which is obtained as the response of the http request), one condition could be satisfied without the other.
This fixes a problem where Odoo's data population process could stop after encountering limited database permissions. The process now recovers cleanly and continues, improving reliability for environments with restricted database privileges.
Original PR description
## Bug Following ba17d5df1cc6b360598d492046d06a66e0d11dda, a try/except was added to handle the lack of privileges to switch the replication mode of the database to ignore the check on Fkey during the bulk insertion. This fix ignored the fact that when Postgres throws an exception, the cursor is in an aborted state and is closed. Therefor the cursor needs to be reset/rollback to usable state to continue with the `populate` as intended by the user. ## Fix On the first model we try to `populate`, if an exception is raised due to `InsufficientPrivilege`, we rollback the cursor and update a flag so we skip on subsequent models. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update makes automated website sale loyalty tests run faster and more reliably by checking that page elements are ready before continuing. It helps reduce false test failures without changing the customer-facing shopping experience.
Original PR description
In this commit, we decrease checkDelay to make the tours faster. We add intermediate steps to ensure elements are in DOM before to continue the tour. 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
New lots or serial numbers for serial-tracked products are now initialized with the product's cost. This helps keep stock valuation accurate from the moment a lot is created, reducing accounting discrepancies.
Original PR description
Creating a new lot/serial of a product tracked by serial should be initialised with the product cost. 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
The Peppol registration flow now shows a clear user-facing error if a required phone number validation component is not installed. This prevents confusing technical crash messages and helps administrators understand what needs to be installed to continue.
Original PR description
Before this commit, when we tried to import the module phonenumbers which might not be installed on the computer. We got a traceback. Now we raise an error if it could not be imported informing the user to import it --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The dashboard edit shortcut now opens the specific dashboard the user selected, instead of always editing the currently active one. This prevents users from accidentally changing the wrong dashboard and makes dashboard management more reliable.
Original PR description
The newly added button shortcut to edit a dashboard would only always open the active dashboard edition and not the one we clicked on. Task-4236307 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 fix moves a self-ordering point of sale demo file into the proper demo data section. It helps ensure demo content is handled only as sample data, reducing the chance of it being loaded in regular installations.
Original PR description
--- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update fixes automated website checks that were occasionally failing for timing-related reasons. It helps keep website editing and navigation features stable by ensuring tests wait for changes to apply before continuing.
Original PR description
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
When the user tries to activate Portuguese (BR) language, a traceback will appear. Traceback: ``` OSError: Syntax error in po file (line 340): unescaped double quote found File "odoo/tools/translate.py", line 1757, in _get_code_translations p = CodeTranslations._read_code_translations_file(fileobj, filter_func) File "odoo/tools/translate.py", line 1744, in _read_code_translations_file reader = TranslationFileReader(fileobj, fileformat='po') File "odoo/tools/translate.py"
Original PR description
When the user tries to activate Portuguese (BR) language, a traceback will appear. Traceback: ``` OSError: Syntax error in po file (line 340): unescaped double quote found File…
When the user tries to activate Portuguese (BR) language,
a traceback will appear.
Traceback:
```
OSError: Syntax error in po file (line 340): unescaped double quote found
File "odoo/tools/translate.py", line 1757, in _get_code_translations
p = CodeTranslations._read_code_translations_file(fileobj, filter_func)
File "odoo/tools/translate.py", line 1744, in _read_code_translations_file
reader = TranslationFileReader(fileobj, fileformat='po')
File "odoo/tools/translate.py", line 735, in TranslationFileReader
return PoFileReader(source)
File "odoo/tools/translate.py", line 790, in __init__
self.pofile = polib.pofile(source.read().decode())
File "polib.py", line 130, in pofile
return _pofile_or_mofile(pofile, 'pofile', **kwargs)
File "polib.py", line 78, in _pofile_or_mofile
instance = parser.parse()
File "polib.py", line 1348, in parse
raise IOError('Syntax error in po file %s(line %s): '
```
https://github.com/odoo/odoo/blob/11cbd44ada7526849f884b5b16c52a8965d10708/addons/l10n_br/i18n/pt.po#L340
Here, ``"Alagoin"Alagoinha"`` is used instead of ``"Alagoinha"`` as msgstr.
So, it will lead to the above traceback.
sentry-5963927752
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prSpreadsheet unit tests now correctly recognize messages written by the current user. This improves confidence in spreadsheet-related messaging features, especially editing messages authored by the signed-in user.
Original PR description
self-authored messages were not properly detected in spreadsheet unit tests, due to lack of `@web/session` data for the current user. `@web/session` in unit test require explicit patch in order to retrieve the `store.self` data for the good working of Discuss code, especially for features that are conditionally enabled based on the currently authenticated user, like message edition that works on self authored messages. <img width="457" alt="Screenshot 2024-10-09 at 11 33 13" src="https://github.com/user-attachments/assets/e3eff763-e58b-45fe-98c5-58374dd576d6">
The website editor now shows the correct left and right move arrows when repositioning showcase block columns. This removes confusion for editors and makes arranging showcase content behave as expected.
Original PR description
Since [1] when the layout of the `s_showcase` block has been revamped, the selectors of the `SnippetMove` option wrongly match the new external column layout of the block. Because of this, up/down arrows appear instead of left/right arrows. This commit restores the horizontal `SnippetMove` on the external columns of the `s_showcase` block. [1]: https://github.com/odoo/odoo/commit/fe52cb6780ab253e45f40607b1a192aab19fb3a2 task-4206919
The planning calendar now correctly reflects an employee's contract end date without showing an additional shaded day. This prevents managers from mistakenly thinking an employee is still covered by a contract for an extra day when planning shifts.
Original PR description
Steps to reproduce:
- Create a employee with running contract.
- Open planning app.
- Create a planning for him.
- Move through gantt date to employee' contract end date.
Issue:
- You can see there there as extra date being shown white which means he is
contract for visual indication but not in backend.
Fix:
- Handling timezone issues.
task-3815229The dashboard edit shortcut now opens the specific dashboard the user selected, rather than always opening the currently active dashboard. This prevents confusion and ensures users can edit the intended dashboard directly.
Original PR description
The newly added button shortcut to edit a dashboard would only always open the active dashboard edition and not the one we clicked on. Task-4236307