Tuesday, May 9, 2023
13 changes · master
Resolved issues and error corrections
This update fixes a flaky automated test related to emoji handling in Discuss messages. It helps keep validation runs stable by checking the intended emoji behavior without being affected by timing issues.
Original PR description
This PR fixes the `Posting message should transform relevant data to emoji` test that sometimes failed due to a race condition. The assertion was too strict, this test just needs to check that the emoji are properly parsed when posting a message. Fixes runbot error: 20934.
This fixes a small issue in the Mail app where conversation state data could be stored in the wrong format. Correcting this helps keep messaging behavior reliable and prevents potential inconsistencies in how threads are handled.
The website editor now correctly shows image width options when editing page snippets. This prevents confusing placeholder text from appearing, making it easier for users to adjust image layouts accurately.
Original PR description
Since commit [1], underscore functions have been replaced with native JavaScript functions. However, this replacement caused a display issue with the 'sprintf' function that is used to display…
Since commit [1], underscore functions have been replaced with native JavaScript functions. However, this replacement caused a display issue with the 'sprintf' function that is used to display several "width" values in the image option width selector. In order to properly display the "width" values, the 'sprintf' function should handle both string (%s) and numeric (%d) placeholders, as it was done with underscore. However, the function only handled string placeholders (%s), resulting in non-string "width" values being improperly displayed. To fix this issue, this commit updates the image option width selector to use only string values (%s) in the 'sprintf' function. Steps to reproduce the bug: - Open the home page in Website edit mode. - Drag and drop a "Text-image" snippet onto the page. - Click on the image to show its options in the editor panel. - Open the "width" selector in the image option section. - Bug: the "%d" placeholders have not been replaced by the correct numeric values. [1]: https://github.com/odoo/odoo/commit/614de869892fd2623311ac1fae5c76ee06a356c7 task-3289218
This change removes an unnecessary validation step when editing list views with the keyboard. It helps avoid misleading checks while keeping the existing validation in place where records are actually added.
Original PR description
In this commit, we will remove unnecessary uses of the checkValidity function. In the ListRenderer, during a keydown, we do if checkValidity but it is an async function so the condition is always true. We have checked the various calls and they are probably unnecessary as the add(...) function will perform its checkValidity.
This fixes a crash that could happen when a hidden related-list field was made visible in Studio. Users can now display these fields without the page failing due to a missing optional display setting.
Original PR description
Before this commit, when having a x2many field invisible in a view, and displaying it anyway in studio, there was a crash because some variable was undefined. This originated from commit f22961ad07e4b04efe4b504ee5a276f20802ed1f, which did not account for the fact that viewMode is an optional props. 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
Some user-facing text was not being included in translation exports, which could leave parts of the interface untranslated. The change adjusts how those messages are written so they can be properly detected and translated without changing the current dependency policy.
Original PR description
Some translations could not be exported, as reported in odoo/odoo#114711. This is due to Babel—the library we use to extract `_t` occurrences from the sources—ignoring javascript template literals, resulting in any gettext inside template literals not being parsed and exported as translatable resources. From version 2.12.0 of the library, support for javascript template literals can be enabled by providing the `parse_template_string` option to the Babel `extract` method. Unfortunately, the library cannot be updated for now, as our policy is to stick to the version of packages from the official Debian repository. This commit refactors some code so that no gettext is inlined within template literals. Enterprise: https://github.com/odoo/enterprise/pull/40457
This update cleans up how asset files are listed in several Odoo module manifests, removing unnecessarily complex patterns. It should make the configuration easier to maintain without changing how users experience the product.
Original PR description
Some glob are more complex than they should. Since `**` matches no/one or many directories, the use of /**/**/ is the same as /**/. Since **.js is similar to *.js except if you except to have a js file in a directory ending with js. Moreover ** will match any directory recursively before a js file.
This fix updates the barcode picking screens so action buttons keep their intended spacing after recent interface changes. It also makes the edit button look clearly available, reducing confusion for users managing stock operations.
Original PR description
Enteprise part of odoo/odoo#119381 Following the Kanban view refactor that came with WOWL, the `style` attribute set on a button put in a kanban view is no longer used. So instead we make use of the Bootstrap classes to set the paddings of the extra button in the kanban view, since classes are properly handled. This avoids breaking the layout of the header line. Also removes the opacity dimming on the edit button of a picking, since it kinda gave the impression that the button was disabled. Task-3218314
This update cleans up how several Odoo apps list and organize their web assets, removing overly complex patterns and placing static files in the expected location. It should make the system easier to maintain without changing day-to-day user behavior.
Original PR description
Some glob are more complex than they should. Since `**` matches no/one or many directories, the use of /**/**/ is the same as /**/. Since **.js is similar to *.js except if you except to have a js file in a directory ending with js. Moreover ** will match any directory recursively before a js file. Also move static file into a static directory
This fixes document PDF processing so it remains compatible with newer Python versions. Businesses using Odoo on Python above 3.10 avoid failures caused by changes in the underlying PDF library.
Original PR description
Odoo uses a more up to date version of PyPDF2 for Python > 3.10, and the api has changed. This commit fixes the issue by wrapping the import in a try/except block to use the correct api. The same code is present in the report code in base.
Odoo Studio now reliably displays hidden one-to-many or many-to-many fields when users enable the "Show invisible" option while editing a form. This prevents crashes and helps teams safely customize forms that include hidden related-record fields.
Original PR description
Have a form view with an invisible x2many field (with `invisible="1"`) In studio, edit that form view and enable the "Show invisible" switch in the sidebar. Before this commit, that flow was not tested, leading to the feature being constantly lost and crashy. After this commit, and in link with odoo/odoo#120685, this flow is fixed and tested.
Some text in spreadsheet and cohort views was not available for translation because it was written in a format the translation tool could not read. The code was adjusted so those labels can be exported and translated properly, improving localization without changing user workflows.
Original PR description
This is due to Babel—the library we use to extract `_t` occurrences from the sources—ignoring javascript template literals, resulting in any gettext inside template literals not being parsed and exported as translatable resources. From version 2.12.0 of the library, support for javascript template literals can be enabled by providing the `parse_template_string` option to the Babel `extract` method. Unfortunately, the library cannot be updated for now, as our policy is to stick to the version of packages from the official Debian repository. This commit refactors some code so that no gettext is inlined within template literals. Community: https://github.com/odoo/odoo/pull/119996
Payroll attendance calculations now compare employee check-in dates consistently with payroll date ranges. This prevents attendance records from being missed or handled incorrectly when generating payslips.
Original PR description
bug was introduced in https://github.com/odoo/enterprise/pull/38639 bug: check_in is a datetime but is compared with 2 dates. fix: convert check_in to date for comparison.