Tuesday, November 12, 2024
16 changes · saas-17.4
Resolved issues and error corrections
This change adds logging to help support teams identify when a websocket session has silently fallen back to a public user. It makes troubleshooting easier when messaging appears to work partially but the connection is not tied to the expected user session.
Original PR description
Debugging websocket can be tough as we don't know when a session is downgraded. Some messages can be received, giving the impression that everything is working fine while the socket is actually linked to a public user. This PR introduces some logs to help debugging this scenario. opw-4218953
Delivery tracking links are no longer automatically converted to lowercase. This prevents broken carrier tracking links when the carrier requires specific uppercase and lowercase characters in the URL.
Original PR description
Steps to reproduce the bug:
- Create a storable product P1
- Go to the delivery method
- Select the Standard delivery
- Add this tracking link: “https://iel.co.th/tracking/?trackingNo=<shipmenttrackingnumber>”
- Create a delivery for one unit of P1
- Go to the additional information:
- carrier: Standard delivery
- Tracking Reference: 1234
- Mark as todo
- Click on the racking smartbutton
Problem:
The link is lowercase, so its become not valid (some URLs are CASE-sensitiv)


opw-4296872Weekly Gantt labels now show the correct year when a week crosses into a new calendar year. This prevents misleading planning dates such as showing the first week of 2025 as belonging to 2024 for locales where weeks start on Monday.
Original PR description
Versions -------- - saas-17.4+ Enterprise PR: https://github.com/odoo/enterprise/pull/73318 Steps ----- 1. Have Planning installed; 2. change localisation to 'en_GB' (or any whose weeks start on Monday); 3. open in Gantt view in weekly granularity; 4. go to the week of 2024-12-30. Issue ----- Label on top right displays "W1 2024"; Cause ----- It uses the `getLocalWeekNumber` function to get the week number of 2024-12-30, which falls in the first week of 2025. It then combines it with the `year` of the date, which is 2024. Solution -------- ### Community: Like the `weeknumber` function added in 9c47e911d0ca7 to `odoo.tools.date_utils`, have a function in `web` that returns both year and week number. ### Enterprise: Define a `formatLocalWeekYear` function in `web_gantt` using the new `getLocalYearAndWeek` function from `web`. opw-4280192
The Gantt view now shows the correct year alongside week numbers when a week crosses into a new year. This prevents confusing labels such as showing the first week of 2025 as belonging to 2024 for users with Monday-based week settings.
Original PR description
Versions -------- - saas-17.4+ Community PR: https://github.com/odoo/odoo/pull/186284 Steps ----- 1. Have Planning installed; 2. change localisation to 'en_GB' (or any whose weeks start on Monday); 3. open in Gantt view in weekly granularity; 4. go to the week of 2024-12-30. Issue ----- Label on top right displays "W1 2024"; Cause ----- It uses the `getLocalWeekNumber` function to get the week number of 2024-12-30, which falls in the first week of 2025. It then combines it with the `year` of the date, which is 2024. Solution -------- ### Community: Like the `weeknumber` function added in 9c47e911d0ca7 to `odoo.tools.date_utils`, have a function in `web` that returns both year and week number. ### Enterprise: Define a `formatLocalWeekYear` function in `web_gantt` using the new `getLocalYearAndWeek` function from `web`. opw-4280192
Restaurant table lists in the floor plan now show the linked appointment resource. This helps staff quickly see which resource is associated with each table, reducing confusion when managing restaurant appointments.
Original PR description
Before this commit, appointment_ressource_id was not showing in floor_plan form (table list). It is now. Community PR: odoo/odoo#185808
Miscellaneous changes
At the moment cancelling assets is impossible when audit trail is enabled because it tries to unlink the move. It should be possible, in which case the move should be reversed instead. By adding a check in _can_be_unlinked to return False in such case, the _unlink_or_reverse method will then properly reverse asset moves as expected. Back port of https://github.com/odoo/odoo/pull/181193 task-4251586 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit
Original PR description
At the moment cancelling assets is impossible when audit trail is enabled because it tries to unlink the move. It should be possible, in which case the move should be reversed instead. By adding a check in _can_be_unlinked to return False in such case, the _unlink_or_reverse method will then properly reverse asset moves as expected. Back port of https://github.com/odoo/odoo/pull/181193 task-4251586 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#186052 Forward-Port-Of: odoo/odoo#184535
Currently, the relationship between stock.picking and purchase.order is done via a `related` non-store field that requires iterating all moves. This becomes problematic in a case like `_get_related_invoices` in the purchase_stock module because we need to get the purchase_id of a move, but to do that, we will have to go through the picking_id which will need to iterate all moves related to the same picking. When you have `_prefetch_ids` set on that move, this process becomes extremely slow and m
Original PR description
Currently, the relationship between stock.picking and purchase.order is done via a `related` non-store field that requires iterating all moves. This becomes problematic in a case like…
Currently, the relationship between stock.picking and purchase.order is done via a `related` non-store field that requires iterating all moves. This becomes problematic in a case like `_get_related_invoices` in the purchase_stock module because we need to get the purchase_id of a move, but to do that, we will have to go through the picking_id which will need to iterate all moves related to the same picking. When you have `_prefetch_ids` set on that move, this process becomes extremely slow and memory-expensive because the `purchase_id` field is not stored so it needs to compute the relationship for all moves in the expanded ids due to prefetching. Since there exists a Many2many relationship between stock pickings and purchase orders, it's possible to rely on a search query instead of the `mapped` call. Although this might miss some cache optimizations, it's still much more efficient in terms of memory. This is because this approach is not susceptible to prefetch_ids explosion. It's also worth noting that this function is only called on individual stock moves instead of batches as part of the anglo_saxon_accounting logic. That being said, we don't have to worry this much about cache optimization since the method is not batched to begin with. Using this optimization, we get the following benchmarks. Benchmark: | num stock.move (_prefetch_ids) | time before | no. queries before | time after | no. queries after| |----|------|-----| ----- | ----- | | 1000 | timeout | N/A | ~ 85 seconds | 47897 | opw-4096108 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#181822
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#186718
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 Forward-Port-Of: odoo/odoo#186718
Add a check on adyen callback when paying. Verify if the pending payment line exist before processing the callback. opw-4242322 Forward-Port-Of: odoo/odoo#186641 Forward-Port-Of: odoo/odoo#186580
Original PR description
Add a check on adyen callback when paying. Verify if the pending payment line exist before processing the callback. opw-4242322 Forward-Port-Of: odoo/odoo#186641 Forward-Port-Of: odoo/odoo#186580
With commit [1], `qweb.has_template` was replaced with its owl equivalent. Later, commit [2] further refactored this and consequently broke the possibility to use custom templates based on search type for website search. [1]: https://github.com/odoo/odoo/commit/123ba4ffccd6fc3895a18f3503690ba1593e3023 [2]: https://github.com/odoo/odoo/commit/21ecc7400f2211773713781c619f066a5fb37963 Forward-Port-Of: odoo/odoo#184404
Original PR description
With commit [1], `qweb.has_template` was replaced with its owl equivalent. Later, commit [2] further refactored this and consequently broke the possibility to use custom templates based on search type for website search. [1]: https://github.com/odoo/odoo/commit/123ba4ffccd6fc3895a18f3503690ba1593e3023 [2]: https://github.com/odoo/odoo/commit/21ecc7400f2211773713781c619f066a5fb37963 Forward-Port-Of: odoo/odoo#184404
Steps to reproduce: 1. Invoicing -> Customers -> Payments 2. Create new entry with no customer 3. Post the entry 4. Print the receipt `Marc Demo` Appears as customer task-4182618 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#186739
Original PR description
Steps to reproduce: 1. Invoicing -> Customers -> Payments 2. Create new entry with no customer 3. Post the entry 4. Print the receipt `Marc Demo` Appears as customer task-4182618 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#186739
This commit makes cancelled depreciation entries appear in grey in the depreciation board. It also turns the the depreciation entry's name into a link towards the move's form view. Forward-Port-Of: odoo/enterprise#73165 Forward-Port-Of: odoo/enterprise#72819
Original PR description
This commit makes cancelled depreciation entries appear in grey in the depreciation board. It also turns the the depreciation entry's name into a link towards the move's form view. Forward-Port-Of: odoo/enterprise#73165 Forward-Port-Of: odoo/enterprise#72819
We wait for the next tick to leave the dialog enough time to load properly before changing the mode to draw, this way we avoid to have the canva with the auto result after changing to draw mode. Forward-Port-Of: odoo/enterprise#73248 Forward-Port-Of: odoo/enterprise#69785
Original PR description
We wait for the next tick to leave the dialog enough time to load properly before changing the mode to draw, this way we avoid to have the canva with the auto result after changing to draw mode. Forward-Port-Of: odoo/enterprise#73248 Forward-Port-Of: odoo/enterprise#69785
**Steps to reproduce:** (production credentials required) - Install l10n_cl_edi - Switch to a Chilean company (e.g. CL Company) - Create an invoice for a Chilean customer - Confirm the invoice and process the electronic invoice - Create a credit note and process the electronic credit note - Create a debit note from the credit note (Do not set "SII Reference Code") - Process the electronic debit note **Issue:** The debit note will be rejected because "SII Reference Code" is not set.
Original PR description
**Steps to reproduce:** (production credentials required) - Install l10n_cl_edi - Switch to a Chilean company (e.g. CL Company) - Create an invoice for a Chilean customer - Confirm the invoice and process the electronic invoice - Create a credit note and process the electronic credit note - Create a debit note from the credit note (Do not set "SII Reference Code") - Process the electronic debit note **Issue:** The debit note will be rejected because "SII Reference Code" is not set. **Solution:** Set "SII Reference Code" field as required. opw-4182451 Forward-Port-Of: odoo/enterprise#73551 Forward-Port-Of: odoo/enterprise#72679
TO REPRODUCE =========== 1. Create an appointment with users A and B 2. ...using 'no picture' and 'user then time' 3. go to front end 4. pick a date D both users have slots in 5. go to next month 6. change user in the dropdown (or change TZ) 7. slots appear for day D in previous month ISSUE ===== When selecting an other resource or user in the dropdown in resource_time mode, even if the selected one has no available slot for the current month, slots will appear in the slot list, c
Original PR description
TO REPRODUCE =========== 1. Create an appointment with users A and B 2. ...using 'no picture' and 'user then time' 3. go to front end 4. pick a date D both users have slots in 5. go to next month 6.…
TO REPRODUCE =========== 1. Create an appointment with users A and B 2. ...using 'no picture' and 'user then time' 3. go to front end 4. pick a date D both users have slots in 5. go to next month 6. change user in the dropdown (or change TZ) 7. slots appear for day D in previous month ISSUE ===== When selecting an other resource or user in the dropdown in resource_time mode, even if the selected one has no available slot for the current month, slots will appear in the slot list, corresponding to the first availability overall. This leads to a very strange mismatch between the calendar dates and the slots. The user may select a slot and book for a month they do not currently see on the calendar. SOLUTION ======== Now, we will select the previously selected date if it is in the current month and has slots. Otherwise we select the first day with slots in the currently displayed month (NOT overall). This way, the day is selected and displayed as so in the calendar. The slots match that day. If no availability exist for the current month, we do not click on any day, and show no slots. Task-4169513 Forward-Port-Of: odoo/enterprise#71460
### Steps to reproduce: - In the settings: Enable "product packaging" - Create a storable product - Inventory > Configuration > Product Packaging > New - Create a packaging for that product with a quantity of 15 units - In the barcode app > inventory adjustment > + Add product > You are redirected towards a digipad without any set product_id. - Add a product #### > The packaging button is not displayed for you to add multiples of 15 Follow up of Commit 8db17ef7aa7d0f989da1ab3f05de66
Original PR description
### Steps to reproduce: - In the settings: Enable "product packaging" - Create a storable product - Inventory > Configuration > Product Packaging > New - Create a packaging for that product with a quantity of 15 units - In the barcode app > inventory adjustment > + Add product > You are redirected towards a digipad without any set product_id. - Add a product #### > The packaging button is not displayed for you to add multiples of 15 Follow up of Commit 8db17ef7aa7d0f989da1ab3f05de661fba7a9fc7 opw-4156249 --- Forward-Port-Of: odoo/enterprise#72626