Monday, June 10, 2024
4 changes · 17.0
Resolved issues and error corrections
Optional products added from a quotation template now appear at the end of the quotation instead of being inserted earlier in the list. This keeps sales quotes organized and preserves the expected product order for users and customers.
Original PR description
Steps: - Create a quotation template with 2+ products and optional products. - Create a new quotation using the template. - Add an optional product from the template. Issue: - Optional product is not added at the end of the quotation. Cause: - Optional product sequence defaults to 10 instead of continuing the sequence. Fix: - Adjust the sequence of added optional products in add_order_button to be the max sequence + 1. opw-3932966 I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This change updates internal tests so they pass consistently across Linux distributions that package different Babel date-formatting behavior. It reduces false test failures without changing customer-facing Odoo functionality.
Original PR description
Since Babel issue 621 [0] searching the week number of a date alongside with the year can lead to a wrong year in the result. e.g.: `2023-01-01` gives `W1 2022` Before the present commit, the tests…
Since Babel issue 621 [0] searching the week number of a date alongside with the year can lead to a wrong year in the result. e.g.: `2023-01-01` gives `W1 2022` Before the present commit, the tests were surprisingly expecting the wrong result. An attempt was made [1] to fix the upstream issue but was never merged. In the meanwhile, Debian reverted the Babel issue 621 [2] in their package. It means that our test would fail with the patched Debian package like in Ubuntu Noble or Debian Bookworm. On the other hand, if we fix the test to expect the correct value, it would fail on unpatched version of the Babel lib. So, this commit mitigate the issue by guessing the expected value even if the result is wrong. [0]: https://github.com/python-babel/babel/pull/621 [1]: https://github.com/python-babel/babel/pull/887 [2]: https://sources.debian.org/patches/python-babel/2.10.3-1/ For reference (from @Xavier-Do ) Pip version and Jammy ```python In [1]import babel.dates In [2]: import datetime In [3]: babel.dates.format_date(datetime.datetime(2023, 1, 1), "EEE w YYYY", "fr_BE") Out[3]: 'dim. 52 2022' In [4]: babel.dates.format_date(datetime.datetime(2023, 1, 1), "EEE w YYYY", "en_US") Out[4]: 'Sun 1 2022' ``` It looks like the week year used is actually not localized, adding a cornercase on Sunday Noble version ```python In [1]import babel.dates In [2]: import datetime In [3]: babel.dates.format_date(datetime.datetime(2023, 1, 1), "EEE w YYYY", "fr_BE") Out[3]: 'dim. 52 2022' In [4]: babel.dates.format_date(datetime.datetime(2023, 1, 1), "EEE w YYYY", "en_US") Out[4]: 'Sun 1 2023' ```
This fix removes an unnecessary required prompt that could block users from saving unrelated changes to monetary field settings, such as labels or translations. Existing validation still ensures currency information is provided when it is actually needed.
Original PR description
Small fix on commit 71ab15e4 to remove the `required` attribute on `currency_field` in the form view, which makes it impossible to save the form if the field is not set and editing something…
Small fix on commit 71ab15e4 to remove the `required` attribute on `currency_field` in the form view, which makes it impossible to save the form if the field is not set and editing something unrelated on a monetary field, for ex. the field label or the translations. The checks in the constraint `_check_currency_field()` added in the same commit should be enough to ensure the `currency_field` is set as needed. Impacted branches: `17.0` and `master` Steps to reproduce: 1. Go to the Technical menu -> Fields and select a monetary type field 2. Try to update the Field Label or any field translation Current behavior: The editing is blocked by the required 'Currency field'. Expected behavior: Allow editing the form view or the related translations. 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 ensures website editor option panels, such as text highlight and animation settings, close properly when users select text that does not use those effects. It prevents confusing leftover controls while translating website content, making editing more reliable for multilingual sites.
Original PR description
This commit extracts the working block that hides the unselected options in the editor. Then we apply this same function block before the fast return of the translate mode use case. Steps to reproduce : - Install French on website 1. - Drop a Text block in master - Add a highlight on some text. - Add an animation on some text. - Save. - Translate French version. - Click inside the highlighted text: the text highlight options are shown. - Click on text without highlight nor animation: the highlight button is unselected, but the options remain displayed. - Click inside the animated text: the animation options are shown. - Click on text without highlight nor animation: the animate button is unselected, but the options remain displayed. task-3975683 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr