Tuesday, June 11, 2024
41 changes · saas-17.2
Resolved issues and error corrections
The Argentinian tax report filter now shows clear tax type names instead of technical object references. Selecting a tax type from the dropdown now correctly applies the filter, making reports easier and more reliable to use.
Original PR description
Fix display and functionality of tax type filter - Corrected the display of dropdown items to show tax type names instead of object references. - Updated the `onSelected` event handler to ensure the tax filter is correctly applied when a dropdown item is selected. opw-3976746
New or updated employee contracts now automatically use the right default vehicle cost values. This helps payroll teams avoid missing or incorrect fleet-related cost entries when assigning or changing a company car.
Original PR description
When a new contract is created (or if we change the vehicle_id on an existing one, it'll take the default value on the contract, or the previous contract value as default values for the cost
Fixed an issue that caused the scheduled Mail Fetch service to fail when the Chilean electronic invoicing module was installed. This keeps automated email processing running reliably for affected databases.
Original PR description
Currently, an error is generated when run 'Mail: Fetchmail Service' scheduled action. Step to produce: - Install the 'l10n_cl_edi' module. - And manually trigger the 'Mail: Fetchmail Service'…
Currently, an error is generated when run 'Mail: Fetchmail Service' scheduled action.
Step to produce:
- Install the 'l10n_cl_edi' module.
- And manually trigger the 'Mail: Fetchmail Service' scheduled action.
Stacktrace
```
TypeError: FetchmailServer.fetch_mail() got an unexpected keyword argument 'raise_exception'
File "odoo/tools/safe_eval.py", line 383, in safe_eval
return unsafe_eval(c, globals_dict, locals_dict)
File "ir.actions.server(128,)", line 1, in <module>
File "addons/mail/models/fetchmail.py", line 186, in _fetch_mails
return self.search([('state', '=', 'done'), ('server_type', '!=', 'local')]).fetch_mail(raise_exception=False)
ValueError: <class 'TypeError'>: "FetchmailServer.fetch_mail() got an unexpected keyword argument 'raise_exception'" while evaluating
'model._fetch_mails()'
File "odoo/addons/base/models/ir_cron.py", line 388, in _callback
self.env['ir.actions.server'].browse(server_action_id).run()
File "home/odoo/src/custom/trial/saas_trial/models/sentry.py", line 33, in run
res = super().run()
File "odoo/addons/base/models/ir_actions.py", line 972, in run
res = runner(run_self, eval_context=eval_context)
File "odoo/addons/base/models/ir_actions.py", line 802, in _run_action_code_multi
safe_eval(self.code.strip(), eval_context, mode="exec", nocopy=True, filename=str(self)) # nocopy allows to return 'action'
File "odoo/tools/safe_eval.py", line 397, in safe_eval
raise ValueError('%s: "%s" while evaluating\n%r' % (ustr(type(e)), ustr(e), expr))
```
The issue arises during the execution of the 'Mail: Fetchmail Service' scheduled action because the 'fetch_mail()' method call without argument, as we can see at [1], And this argument is added from this PR https://github.com/odoo/odoo/pull/152637.
link [1]: https://github.com/odoo/enterprise/blob/ba99dd4c236353c43376210a9aabcb0af5bd0299/l10n_cl_edi/models/fetchmail_server.py#L51
To resolve the issue, Add a default keyword argument at [2] to prevent an issue.
link [2]: https://github.com/odoo/enterprise/blob/ba99dd4c236353c43376210a9aabcb0af5bd0299/l10n_cl_edi/models/fetchmail_server.py#L51
sentry-5284073241Public visitors could trigger an error when selecting text or double-clicking in certain forum posts. This update checks that the toolbar option exists before changing it, preventing the page from breaking for forum users.
Original PR description
HOW TO REPRODUCE: ================= - website_helpdesk_forum addon shall be installed - Do not login (navigate as a public user) - Go to the Website > Forum > Help > any post - Double-click anywhere…
HOW TO REPRODUCE: ================= - website_helpdesk_forum addon shall be installed - Do not login (navigate as a public user) - Go to the Website > Forum > Help > any post - Double-click anywhere in the post body or select some text - You should get the following client error from `OdooEditor._updateToolbar: Cannot read properties of null (reading 'classList')` HOW TO FIX: =========== By ensuring the wysiwig toolbar unlink button is present in the page before adding classes to it. The bug seems to be in relation to the following PR odoo/odoo#147919, where the `OdooEditor._updateToolbar` method is slightly modified to ensure the toolbar unlink button is not visible initially, but forgets to check whether the element exists before hiding it. The bug can be spotted when `website_helpdesk_forum` is installed as it sets to 0 the level of karma required to answer a post while keeping the full edit rights (image and link) to 30 pts. As a consequence, the WYSIWYG is included in the post page even when requested by the public users, but the WYSIWYG toolbar does not include the unlink button. task-3932751 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fixes occasional failures in automated tests that verify Discuss channel subscriptions. The change makes the tests reliably detect when users join or leave channels, helping keep release validation stable without changing user-facing behavior.
Original PR description
Before this PR, some bus subscription tests were occasionally failing. These tests open Discuss and assert that bus subscriptions are correctly handled in different scenarios, such as joining/leaving a channel. To achieve this, they use the `waitForChannel` helper. Sometimes, the subscription is made before calling `waitForChannel`, which causes the test to fail. This PR replaces the `waitForChannel` method by adding a step when `bus_service.addChannel` is called. Since this setup can be done before opening Discuss, we ensure that the subscription is not missed. fixes runbot-61294,65319,61969
Miscellaneous changes
ComercioExterior20 has wrong path for its xsd runbot-55568 Forward-Port-Of: odoo/enterprise#63429
Original PR description
ComercioExterior20 has wrong path for its xsd runbot-55568 Forward-Port-Of: odoo/enterprise#63429
Purpose ======= Do not crash when grouping by a property, instead we want to disable the group by like it has been done for the gantt view. Clean a test about the group by in the gantt view. Task-3876726 Forward-Port-Of: odoo/enterprise#62551
Original PR description
Purpose ======= Do not crash when grouping by a property, instead we want to disable the group by like it has been done for the gantt view. Clean a test about the group by in the gantt view. Task-3876726 Forward-Port-Of: odoo/enterprise#62551
Document fields in the salary configurator now check for existing files on the current contract. Fields are set to required only if no associated file is detected on the contract, otherwise we just show the already existed file. Task-3468245 Forward-Port-Of: odoo/enterprise#55641
Original PR description
Document fields in the salary configurator now check for existing files on the current contract. Fields are set to required only if no associated file is detected on the contract, otherwise we just show the already existed file. Task-3468245 Forward-Port-Of: odoo/enterprise#55641
Currently, when a user has 2 pos preparation displays, one set on some categories the other on all, if you add on the order a product that is not in the categories of the first display, the order will show no changes. Steps to reproduce: ------------------- * Go to the **Kitchen display** App * Have two displays created * Display 1: `Product Categories`: Food * Display 2: `Product Categories`: All (Leave blank) * Go to the **Point of Sale** App * Open restaurant session * Select a
Original PR description
Currently, when a user has 2 pos preparation displays, one set on some categories the other on all, if you add on the order a product that is not in the categories of the first display, the order…
Currently, when a user has 2 pos preparation displays, one set on some categories the other on all, if you add on the order a product that is not in the categories of the first display, the order will show no changes. Steps to reproduce: ------------------- * Go to the **Kitchen display** App * Have two displays created * Display 1: `Product Categories`: Food * Display 2: `Product Categories`: All (Leave blank) * Go to the **Point of Sale** App * Open restaurant session * Select a table and add a drink to the order > Observations: The order button is not highlighted. Why the fix: ------------ Before the refactoring, the categories loaded for each display would use the function `_get_pos_category_ids()`. This function would return a list of all possible categories (ex: `[1, 2, 3, 4, 5]`) when the setting was set on all categories. After the refactoring, the categories loaded correspond to the setting of the display. Thus, in the case of a display on all categories it would return `[]`. At the end, we would end up concatenating stuff like `([5], [])` instead of `([5], [1, 2, 3, 4, 5])`. Only displays with categories set would be taken into account. opw-3923383 Forward-Port-Of: odoo/enterprise#63315
In the reports, the groups called '(No Group)' fold and unfold together. ### Steps to reproduce: - in Accounting app go in Configuration > Account Groups and create an account group for the current company - Go in Reporting > Profit and Loss - All '(No Group)' lines fold and unfold together ### Cause: Line ids are duplicate for (No Group) lines: '\~account.group\~'. The hierarchy is ignored for these ids, there is no reference to the parent line. ### Solution: Integrate the parent
Original PR description
In the reports, the groups called '(No Group)' fold and unfold together. ### Steps to reproduce: - in Accounting app go in Configuration > Account Groups and create an account group for the current company - Go in Reporting > Profit and Loss - All '(No Group)' lines fold and unfold together ### Cause: Line ids are duplicate for (No Group) lines: '\~account.group\~'. The hierarchy is ignored for these ids, there is no reference to the parent line. ### Solution: Integrate the parent line in the ids to take the hierarchy into consideration. ### opw-3885400 Forward-Port-Of: odoo/enterprise#63804 Forward-Port-Of: odoo/enterprise#62647
User using the filters in the bank reco widget want to be able to save them for next time. In the implementation of the search view of the kanban, we only added the filter. This commit will add the favorite section. task-3871505 Forward-Port-Of: odoo/enterprise#60860
Original PR description
User using the filters in the bank reco widget want to be able to save them for next time. In the implementation of the search view of the kanban, we only added the filter. This commit will add the favorite section. task-3871505 Forward-Port-Of: odoo/enterprise#60860
We recently renamed `o-sidePanelButton` to `o-button` in the library but did not change it inside Odoo. Forward-Port-Of: odoo/enterprise#51744
Original PR description
We recently renamed `o-sidePanelButton` to `o-button` in the library but did not change it inside Odoo. Forward-Port-Of: odoo/enterprise#51744
Purpose ------- Let's say a user works a lot on a spreadsheet and performs a lot of heavy operations generating very large revisions (with lots of commands), such as copy-pasting a very large zone (there's one UPDATE_CELL command per copy-pas cell) If the user does multiple such very large revision, one after the other, every thing is fine client side. The next time the spreadsheet is open though: the server needs to load all those revisions to send them to the client. The revisions ca
Original PR description
Purpose ------- Let's say a user works a lot on a spreadsheet and performs a lot of heavy operations generating very large revisions (with lots of commands), such as copy-pasting a very large zone…
Purpose ------- Let's say a user works a lot on a spreadsheet and performs a lot of heavy operations generating very large revisions (with lots of commands), such as copy-pasting a very large zone (there's one UPDATE_CELL command per copy-pas cell) If the user does multiple such very large revision, one after the other, every thing is fine client side. The next time the spreadsheet is open though: the server needs to load all those revisions to send them to the client. The revisions can be so large it can blow up the server memory limit. The spreadsheet cannot be open anymore. Solution -------- In this commit, we increase the number of snapshot by snapshotting more often. Previously, we used to snapshot when opening a spreadsheet and no activity was done in the spreadsheet in the last 12 hours. It's reduced to 2 hours in this commit. The reason we don't want to snapshot too often is that it kills the local history (CTRL+Z) of connected users. Task: 3940465 Forward-Port-Of: odoo/enterprise#63741
Currently, a traceback with `KeyError: 'emisor'` occurs when attempting to update payments after creating and signing a PPD and external trade invoice, and registering a payment. opw-3904458 Forward-Port-Of: odoo/enterprise#62976
Original PR description
Currently, a traceback with `KeyError: 'emisor'` occurs when attempting to update payments after creating and signing a PPD and external trade invoice, and registering a payment. opw-3904458 Forward-Port-Of: odoo/enterprise#62976
When a user in US/Pacific generates a file after 17:00 the File Creation Date field incorrectly has tomorrow's date. To fix it use the localized timestamp for the File Creation Date as well. opw-3942095 Forward-Port-Of: odoo/enterprise#64188 Forward-Port-Of: odoo/enterprise#64172
Original PR description
When a user in US/Pacific generates a file after 17:00 the File Creation Date field incorrectly has tomorrow's date. To fix it use the localized timestamp for the File Creation Date as well. opw-3942095 Forward-Port-Of: odoo/enterprise#64188 Forward-Port-Of: odoo/enterprise#64172
With this commit whenever utm.source name is written it will check its uniquness (generating a unique name if necessary). [Reproduce] - Install marketing_automation - Have Campaign with a Template: - Access the Campaign's Template and go to the Settings tab. - Note down the NAME of the `utm.source` (found in the Advanced section, under the field "Name"). - Delete this template (which will also delete associated `mailing.mailing` records.) - Create new template (by returning to the Campaign
Original PR description
With this commit whenever utm.source name is written it will check its uniquness (generating a unique name if necessary). [Reproduce] - Install marketing_automation - Have Campaign with a Template: -…
With this commit whenever utm.source name is written it will check its uniquness (generating a unique name if necessary). [Reproduce] - Install marketing_automation - Have Campaign with a Template: - Access the Campaign's Template and go to the Settings tab. - Note down the NAME of the `utm.source` (found in the Advanced section, under the field "Name"). - Delete this template (which will also delete associated `mailing.mailing` records.) - Create new template (by returning to the Campaign form, opening an activity, creating template) - Open the Campaign's Template: - Disable read-only on the Name field in Advanced section (modify the `mailing.mailing.form` view). - Change its name to the previously noted `utm.source` NAME. - Save -> BUG: Trackback "The name must be unique" [Why this bug happens?] When you delete a template (`mailing.mailing`) related to a `utm.source`, the `utm.source` will still exist. Then, when attempting to change the `utm.source` name, the system is supposed to detect if the name already exists and generate a new unique name if necessary. However, due to the mechanism utilized in the function (ref.1), which searches for existing names based on existing templates (`mailing.mailing`), which you have deleted, the existing `utm.source` NAME won't be found. Consequently, the function mistakenly believes the name is unique and doesn't generate a new name, leading to the encountered error. (ref.1) `UtmMixin._get_unique_names` https://github.com/odoo/odoo/blob/205caa3d6539187009a8b8bbd1557e75fe045ff3/addons/utm/models/utm_mixin.py#L77 opw-3835704 Forward-Port-Of: odoo/enterprise#64071 Forward-Port-Of: odoo/enterprise#63360
**Steps:** - Go to project > task > archive a task - Open portal view of project > go to the same project - Filter the search view by choosing 'Archived' - Click on the archived task **Issue:** - Session error when trying to open the archive task **Cause:** - By clicking on the archived task, page is refreshed and it tries to open the kanban view again and hence gives session expire error **Fix:** - Hiding the archived filter as suggested by the specs of the task because it seems
Original PR description
**Steps:** - Go to project > task > archive a task - Open portal view of project > go to the same project - Filter the search view by choosing 'Archived' - Click on the archived task **Issue:** - Session error when trying to open the archive task **Cause:** - By clicking on the archived task, page is refreshed and it tries to open the kanban view again and hence gives session expire error **Fix:** - Hiding the archived filter as suggested by the specs of the task because it seems to be irrelevant in project sharing - Passing the correct context so that it will take all the tasks in counting and not just the active tasks. **Affected version**: saas-16.3 - master **Task**-3690536 Forward-Port-Of: odoo/odoo#150866
Current behavior: --- When logged as a mass mailing user, in a mailing, using the editor, when applying a shape to an image, the image disappears. Steps to reproduce: --- 1. Make sure Marc Demo has the role User 2. Log in as Marc Demo 3. Create a new mailing 4. Select a template 5. Insert a picture 6. Select the picture 7. Change its shape to round 8. (preview works fine) 9. Save the mailing 10. Picture disappears Cause of the issue: --- When applying a shape to an image,
Original PR description
Current behavior: --- When logged as a mass mailing user, in a mailing, using the editor, when applying a shape to an image, the image disappears. Steps to reproduce: --- 1. Make sure Marc Demo has…
Current behavior: --- When logged as a mass mailing user, in a mailing, using the editor, when applying a shape to an image, the image disappears. Steps to reproduce: --- 1. Make sure Marc Demo has the role User 2. Log in as Marc Demo 3. Create a new mailing 4. Select a template 5. Insert a picture 6. Select the picture 7. Change its shape to round 8. (preview works fine) 9. Save the mailing 10. Picture disappears Cause of the issue: --- When applying a shape to an image, the resulting file is of mimetype 'image/svg+xml', when sending it to the server, the attachment is going to go through _check_contents https://github.com/odoo/odoo/blob/d752abb24d9b25bb6d10e411961447c8c8e28bba/odoo/addons/base/models/ir_attachment.py#L364 and if the mimetype is "xml_like", it will check for views write rights, without what the mimetype will be forced to text/plain. But in web_editor, when computing the image src https://github.com/odoo/odoo/blob/b6392e2c7dbc8e1ece326e28a9698801142714b7/addons/web_editor/models/ir_attachment.py#L34 if the mimetype is not a supported image type, src will be False. Fix: --- Override of _writeShape to use canvas to convert the image from svg to png. opw-3672798 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#164703 Forward-Port-Of: odoo/odoo#159497
PURPOSE Fix various issues related to automatic source creation and naming involving auto increment to avoid uniqueness constraint issues. Notably * avoid always incrementing (e.g. same name should not increment); * do not fail to start counters at 0 when possible; * improve write / batch bad support; * correctly check uniqueness in utm.source.mixin currently done on wrong model; * fill holes in counter sequence instead of continuing above higher found counter;
Original PR description
PURPOSE
Fix various issues related to automatic source creation and naming involving
auto increment to avoid uniqueness constraint issues.
Notably
* avoid always incrementing (e.g. same name should not increment);
* do not fail to start counters at 0 when possible;
* improve write / batch bad support;
* correctly check uniqueness in utm.source.mixin currently done on wrong
model;
* fill holes in counter sequence instead of continuing above higher found
counter;
See sub commits for more details.
LINKS
Task-3874538 (odoo/odoo#162229) Do not create endless copies
Task-3837272 (odoo/odoo#159699) Incorrect UTM source enumeration
Forward-Port-Of: odoo/odoo#168439
Forward-Port-Of: odoo/odoo#164287Current behavior before PR: - Cannot select projects with `company_id` = `False` when creating sale orders.  Desired behavior after PR is merged: - Allow to select projects with `company_id` = `False`.  --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port
Original PR description
Current behavior before PR: - Cannot select projects with `company_id` = `False` when creating sale orders.  Desired behavior after PR is merged: - Allow to select projects with `company_id` = `False`.  --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#167144
prior this PR, when a user selects an option from the HSN autocomplete widget using the keyboard, the selected value is not reflected in the input field. Technical Reason: The `onSelect()` method in the HSN autocomplete widget calls `this.props.record.update()`, followed by a call to `commitChanges()` in `input_field_hook.js` due to the `keydown` event. Consequently, the update method is called twice: first with the selected option value and then with the user's typed input value. This
Original PR description
prior this PR, when a user selects an option from the HSN autocomplete widget using the keyboard, the selected value is not reflected in the input field. Technical Reason: The `onSelect()` method in the HSN autocomplete widget calls `this.props.record.update()`, followed by a call to `commitChanges()` in `input_field_hook.js` due to the `keydown` event. Consequently, the update method is called twice: first with the selected option value and then with the user's typed input value. This sequence results in the input field displaying the typed value instead of the selected option. With this PR, selecting an option from the HSN autocomplete widget using the keyboard correctly updates the input field with the selected value. task-3961406 Forward-Port-Of: odoo/odoo#167501
With the update of ace to 1.32.3, the lib is formatting her cells by getting them with hardcoded position in a array (here: 0, 1 and 2). On our side we are adding our o_info as first element, so the lib returns a traceback because her elements are shifted. After this commit, our info node is added after the lib nodes to not shift the all bunch. runbot issue 55085 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#168
Original PR description
With the update of ace to 1.32.3, the lib is formatting her cells by getting them with hardcoded position in a array (here: 0, 1 and 2). On our side we are adding our o_info as first element, so the lib returns a traceback because her elements are shifted. After this commit, our info node is added after the lib nodes to not shift the all bunch. runbot issue 55085 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#168264
**Current behavior:** Depending on the created picking type and product costing method, unlocking a validated picking and changing the quantity field of a move will not update the qty_received field of the respective purchase order line. **Expected behavior:** These values will be synchronized. **Steps to reproduce:** 1. Make a purchase order with a following combination: A) `picking_type = receipt` `product cost_method != standard` B) `picking_type = dropship`
Original PR description
**Current behavior:** Depending on the created picking type and product costing method, unlocking a validated picking and changing the quantity field of a move will not update the qty_received field…
**Current behavior:**
Depending on the created picking type and product costing
method, unlocking a validated picking and changing the quantity
field of a move will not update the qty_received field of the
respective purchase order line.
**Expected behavior:**
These values will be synchronized.
**Steps to reproduce:**
1. Make a purchase order with a following combination:
A) `picking_type = receipt`
`product cost_method != standard`
B) `picking_type = dropship`
(product cost_method is arbitrary)
2. Confirm the order, validate the picking
3. Unlock the picking and change the quantity value of the stock
move
4. Observe that the purchase order's qty_received value does not
change
**Cause of the issue:**
In the case of the receipt picking type, when creating a stock
valuation layer for the related move with a 'standard' product
costing method we do not call `_get_price_unit()`. This method
will compute the qty_received value of a purchase order line.
After we unlock the picking and change the move quantity, this
field will not be recomputed (because it is stored). Thus, it is
not updated.
The dropship case is similar, except in the creation of a
dropship SVL, `_get_price_unit()` is called before checking the
product's cost method- so the bug always occurs.
**Fix:**
Make the purchase order line's qty_received field depend on it's
stock moves' quantities.
Reorder the conditional in the dropship SVL creation so it
matches that of the incoming SVL creation- this is for
improving consistency rather than a necessary modification for
the fix.
opw-3863510
Forward-Port-Of: odoo/odoo#166366Small 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
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 Forward-Port-Of: odoo/odoo#168504
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
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' ``` Forward-Port-Of: odoo/odoo#168132
We recently renamed `o-sidePanelButton` to `o-button` in the library but did not change it inside Odoo. 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 Forward-Port-Of: odoo/odoo#144139
Original PR description
We recently renamed `o-sidePanelButton` to `o-button` in the library but did not change it inside Odoo. 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 Forward-Port-Of: odoo/odoo#144139
-PROPBLEM: one of the common onboarding step is setup company data where we will fill street, country or phone,... . Currently, when doing that step, the system always considers done eventhough we just open it and do nothing, unlike behavior in v16 where we will need to fill 'street' at least to be able to consider done -Solution is to do same like in 16.0, check if 'street' then we will consider the setup company data onboarding is finish https://github.com/odoo/odoo/blob/16.0/odoo/addons/b
Original PR description
-PROPBLEM: one of the common onboarding step is setup company data where we will fill street, country or phone,... . Currently, when doing that step, the system always considers done eventhough we just open it and do nothing, unlike behavior in v16 where we will need to fill 'street' at least to be able to consider done -Solution is to do same like in 16.0, check if 'street' then we will consider the setup company data onboarding is finish https://github.com/odoo/odoo/blob/16.0/odoo/addons/base/models/res_company.py#L336-L338 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 Forward-Port-Of: odoo/odoo#167941
Problem: Combo product can have a price that is not the expected one Steps to reproduce: - Install "Point of Sale" app - Go to POS settings and go to the Tax settings - In the tab "Advanced Options", check "Included in Price" - Create a product of type "Combo", set the price to $7.00 - Add 3 combo choices with products prices as $7.00, $2.50 and $1.50 with no extra price - In the shop, sell this combo - The total price is $6.99 rather than $7.00 Cause: The condition supposed to fi
Original PR description
Problem: Combo product can have a price that is not the expected one Steps to reproduce: - Install "Point of Sale" app - Go to POS settings and go to the Tax settings - In the tab "Advanced Options", check "Included in Price" - Create a product of type "Combo", set the price to $7.00 - Add 3 combo choices with products prices as $7.00, $2.50 and $1.50 with no extra price - In the shop, sell this combo - The total price is $6.99 rather than $7.00 Cause: The condition supposed to fill the remaining price in the last orderline was always false opw-3897431 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#167472
Currently administrators for the POS app don't see margins and costs when the setting is disabled. The setting should only affect simple POS users and admins should always see the margins and costs. Steps to reproduce: ------------------- * Connect as admin * Go to the current user settings and make sure he is a POS administrator * Go the **Point of Sale** App * Go to setting, make sure **Margins and Costs** is disabled * Open a shop session * Select the information icon on a product
Original PR description
Currently administrators for the POS app don't see margins and costs when the setting is disabled. The setting should only affect simple POS users and admins should always see the margins and costs. Steps to reproduce: ------------------- * Connect as admin * Go to the current user settings and make sure he is a POS administrator * Go the **Point of Sale** App * Go to setting, make sure **Margins and Costs** is disabled * Open a shop session * Select the information icon on a product > Margins and Costs are not shown Why the fix: ------------ Data loaded is different since using the new relational model https://github.com/odoo/odoo/commit/28b7d698be8255f933ba5314e44e7059746fc234 opw-3897694 Forward-Port-Of: odoo/odoo#166294
Issue: ------ The use case in which certain employees, who work part-time over several days (and not part-time with full days with one or more days off), want to take leaves distributed via allocations given in days is unfortunately not taken into account. For example: - monday morning: duration = 0.4 - monday afternoon: duration = 0.4 allocation duration = round(0.8 * 16) / 16 = round(12.8) / 16 = 13 / 16 = 0.8125 ~= 0.81 Note: It's strange to round up to the sixteenth of an 8-hou
Original PR description
Issue: ------ The use case in which certain employees, who work part-time over several days (and not part-time with full days with one or more days off), want to take leaves distributed via allocations given in days is unfortunately not taken into account. For example: - monday morning: duration = 0.4 - monday afternoon: duration = 0.4 allocation duration = round(0.8 * 16) / 16 = round(12.8) / 16 = 13 / 16 = 0.8125 ~= 0.81 Note: It's strange to round up to the sixteenth of an 8-hour day. It makes sense to have half-hour intervals, but it is does not work correctly with calendars that differ from the standard 8-hour calendar. opw-3957459 Forward-Port-Of: odoo/odoo#168517
Currently, when buying products with variants the attribute values are not reflected on the backend order. Steps to reproduce: ------------------- * Go to the **Point of Sale** app * Open a shop session * Make an order for the product `Desk Organizer` * Select any option from the product configuration popup * Pay and Validate the order * Go in the backend * Navigate to **Orders** * Select the last order > Observation: Selected options for the product are not reflected Why the fix
Original PR description
Currently, when buying products with variants the attribute values are not reflected on the backend order. Steps to reproduce: ------------------- * Go to the **Point of Sale** app * Open a shop…
Currently, when buying products with variants the attribute values are not reflected on the backend order. Steps to reproduce: ------------------- * Go to the **Point of Sale** app * Open a shop session * Make an order for the product `Desk Organizer` * Select any option from the product configuration popup * Pay and Validate the order * Go in the backend * Navigate to **Orders** * Select the last order > Observation: Selected options for the product are not reflected Why the fix: ------------ The function `set_full_product_name()` was changed with https://github.com/odoo/odoo/commit/672c853ab7d77ac1cebd2f4d16bd98fc454b2d55 It basically changed the behavior to set the `full_product_name` to `display_name` where it was previously computed with the attribute values. The fix is based on the fix made for the `pos_retaurant` module. https://github.com/odoo/odoo/commit/3b6455eb979078354e3b1009a354ca7010e5fec9 This will re-introduce a feature removed from the first commit mentioned which is to show the attribute values in full name of the product. This has already been re-introduced in later versions https://github.com/odoo/odoo/blob/8e00b5337a2ee30e667b0b2e6ff26b7df9fef2e3/addons/point_of_sale/static/src/app/store/models.js#L315-L320 This is in sass-17.2 opw-3950366 Forward-Port-Of: odoo/odoo#168697 Forward-Port-Of: odoo/odoo#168121
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 P
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 Forward-Port-Of: odoo/odoo#168311
Steps: - Install Ecom. - Buy a product without login and set different address for billing and shipping. Issue: - SO email sent to both billing and shipping emails it should only be sent to billing (main address). Cause: - In Ecom address controller it set both shipping and billing partner record to follower of SO and because of that SO sent to both emails. Fix: - Only set main address partner to follower of SO so it'll only send email to Customer's main email like it do for normal
Original PR description
Steps: - Install Ecom. - Buy a product without login and set different address for billing and shipping. Issue: - SO email sent to both billing and shipping emails it should only be sent to billing (main address). Cause: - In Ecom address controller it set both shipping and billing partner record to follower of SO and because of that SO sent to both emails. Fix: - Only set main address partner to follower of SO so it'll only send email to Customer's main email like it do for normal Sales flow. opw-3714686 Forward-Port-Of: odoo/odoo#168259
## Description As an internal user one has access to many timesheets as if from the backend. If the group by option of the portal view `/my/timesheets` is set to `None`, on a large database with millions of timesheets, the computation for the aggregate of the `unit_amount` is really slow, and it faces an internal limitation of the ORM when the `mapped` hitting fields out of cache. The code path used to fetch the missing records `expands_ids` has a bad space complexity and with millions of reco
Original PR description
## Description As an internal user one has access to many timesheets as if from the backend. If the group by option of the portal view `/my/timesheets` is set to `None`, on a large database with millions of timesheets, the computation for the aggregate of the `unit_amount` is really slow, and it faces an internal limitation of the ORM when the `mapped` hitting fields out of cache. The code path used to fetch the missing records `expands_ids` has a bad space complexity and with millions of records, this leads to an Memory Error (OOM). ## Benchmark On a database with over 4+M of timesheets matching the domain: | | Before | After | |--------|-----------|-------| | Timing | N/A (OOM) | 0.7s | ## Reference task-3977971 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#168549
### Issue: When in firm mode, it is possible to change manually the name of an invoice, so it is possible to change its sequence number when the invoice is in draft. If the invoice sequence is more than 1, it is impossible to change the journal afterward. The client need to reset the name to nothing, change the journal and then rechange the name if he wants to change the journal. The same thing happens with Vendor Bills when the firm setting is activated. ### Steps to reproduce: - In Set
Original PR description
### Issue: When in firm mode, it is possible to change manually the name of an invoice, so it is possible to change its sequence number when the invoice is in draft. If the invoice sequence is more…
### Issue: When in firm mode, it is possible to change manually the name of an invoice, so it is possible to change its sequence number when the invoice is in draft. If the invoice sequence is more than 1, it is impossible to change the journal afterward. The client need to reset the name to nothing, change the journal and then rechange the name if he wants to change the journal. The same thing happens with Vendor Bills when the firm setting is activated. ### Steps to reproduce: - In Settings > Accounting > 'Accounting Firms Mode' select "Customer Invoices and Vendor Bills" - In Accounting > Customers > Invoices create a new Invoice - Choose a name, for example 'INV234' and a journal - Save the record - Change the journal - When saving a popup indicates it is impossible to change the journal when a sequence number is assigned ### Cause: When not in firm mode the invoice can't be filled (displays as Draft) and will be generated from the previous invoice name (In fact the user can only modify the name of the first invoice created in the journal, not the next ones). With the firm mode activated, the user can always modify the name of the draft invoice, giving it a sequence number. Then when changing the journal, it is blocked because the user is not supposed to change the journal of an invoice with a sequence number greater than 1. The check: https://github.com/odoo/odoo/blame/16.0/addons/account/models/account_move.py#L2303 ### Solution: Modify the condition of the UserError so that it is not triggered when the 'Firm Mode' is active. opw-3925402 Forward-Port-Of: odoo/odoo#168319
As the selection badge is not checking if a badge is selected to set the value, when clicking to a badge that is selected yet, is updating the value to itself, so the value does not change.  By checking if the badge is trying to assign the same value, we can set the badge to false.  cc @Te
Original PR description
As the selection badge is not checking if a badge is selected to set the value, when clicking to a badge that is selected yet, is updating the value to itself, so the value does not change.  By checking if the badge is trying to assign the same value, we can set the badge to false.  cc @Tecnativa --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#167191 Forward-Port-Of: odoo/odoo#140544
Prior to this PR, colors of "Today" were inconsistent depending on the view in calendar, sometimes red, sometimes purple. There was also a contrast issue when switching to dark mode. This PR adjusts the color of "Today" to maintain color consistency and to provide contrast in bright mode and dark mode. task-3754159 Part of task-3575827 | Before | After | |--------|--------| |  |  |  | |  |  | |  |  | |  |  | --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#154856
The field is translatable, but the default value wasn't being translated so new projects' tasks labels were always defaulting to English regardless of language. opw-3976888 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 Forward-Port-Of: odoo/odoo#168567 Forward-Port-Of: odoo/odoo#168482
Original PR description
The field is translatable, but the default value wasn't being translated so new projects' tasks labels were always defaulting to English regardless of language. opw-3976888 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 Forward-Port-Of: odoo/odoo#168567 Forward-Port-Of: odoo/odoo#168482
When the user performs a mass produce, the generated serial numbers will only be created if they do not already exist in the database Forward-Port-Of: odoo/odoo#168141
Original PR description
When the user performs a mass produce, the generated serial numbers will only be created if they do not already exist in the database Forward-Port-Of: odoo/odoo#168141
Before this fix, undoing a command MOVE_GLOBAL_FILTER broke the history because the inverse command was missing from the inverse registry. This fix adds the missing inverse command. OWP: 3966053 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#168744
Original PR description
Before this fix, undoing a command MOVE_GLOBAL_FILTER broke the history because the inverse command was missing from the inverse registry. This fix adds the missing inverse command. OWP: 3966053 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#168744
Steps to reproduce: - Install eCommerce and `l10n_be` (to get a second company) - Enable online payment in the settings - Go to the payment provider and duplicate it for belgium company - Publish the payment provider - Make an invoice for a customer - Send or generate the link - Open the link in incognito - Pay the invoice Issues: When we create the `temp_move` we don't provide the `company_id` as such we will go in the compute which will fail. https://github.com/odoo/odoo/blob/f1
Original PR description
Steps to reproduce: - Install eCommerce and `l10n_be` (to get a second company) - Enable online payment in the settings - Go to the payment provider and duplicate it for belgium company - Publish the…
Steps to reproduce: - Install eCommerce and `l10n_be` (to get a second company) - Enable online payment in the settings - Go to the payment provider and duplicate it for belgium company - Publish the payment provider - Make an invoice for a customer - Send or generate the link - Open the link in incognito - Pay the invoice Issues: When we create the `temp_move` we don't provide the `company_id` as such we will go in the compute which will fail. https://github.com/odoo/odoo/blob/f1d6ad2645fcc206b43454400e2c70d1d23a4ee3/addons/account/models/account_journal.py#L363 https://github.com/odoo/odoo/blob/17d85347f92d813704d3f8faef366166bbbaa730/addons/account/models/account_move.py#L693 In this line we call the `_accessible_branches` method on the belgium company as expected, in this method we use `self.env.companies` (default company) and we do an intersection with the current company (belgium). This results in an empty recordset for the company. Later in the stock we face this instruction which ends up in an empty recordset error as we have an ensure one at the beggining of `_get_violated_lock_dates`. https://github.com/odoo/odoo/blob/f1d6ad2645fcc206b43454400e2c70d1d23a4ee3/addons/account/models/account_move.py#L4394 https://github.com/odoo/odoo/blob/f1d6ad2645fcc206b43454400e2c70d1d23a4ee3/addons/account/models/company.py#L370 Website solve it by copying the `public_user` and affecting it to the desired company. https://github.com/odoo/odoo/blob/9079b7038754ca4fe547086d3fe8947a4bb6ddce/addons/website/models/res_company.py#L43-L57 A potential approach to solve this problem could be to allow `public_user` to access all of the companies (possibly problematic w.r.t. security). The solution chosen for this PR is a local solution as it makes more sense for stable. opw-3859791 Forward-Port-Of: odoo/odoo#162058