Saturday, January 18, 2025
25 changes · saas-18.1
Enhancements to existing features
Product prices are now displayed more clearly in point of sale product information popups and banners. This helps cashiers and sales staff read pricing details faster and reduces confusion during checkout or product lookup.
Original PR description
- Improve product price inside `product_info_popup` and `prodcut_info_banner`. task-id: 4477205 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
Resolved issues and error corrections
A planning test was updated so it checks shifts in the correct order. This helps prevent false build failures and keeps release validation more reliable without changing user-facing planning behavior.
Original PR description
The tour fails as it splits a wrong shift and the last shift can't be split, you can have a look at screenshot in failed builds. Fixed the order of pills to be checked. task-4491233
Miscellaneous changes
Since odoo/odoo#191886, "download handlers" is available through "Update" page. As Windows IoT Boxes have no access to this page, the feature was unreachable. This commit fixes this behaviour by allowing access to Update page and disabling Linux specific tools on it. Forward-Port-Of: odoo/odoo#194145
Original PR description
Since odoo/odoo#191886, "download handlers" is available through "Update" page. As Windows IoT Boxes have no access to this page, the feature was unreachable. This commit fixes this behaviour by allowing access to Update page and disabling Linux specific tools on it. Forward-Port-Of: odoo/odoo#194145
The transfer form layout was corrected so its two lists display at full width instead of being squeezed into half the space. This makes the screen easier to read and use for accounting teams managing automatic transfers.
Original PR description
The transfer form view contains two list views that were poorly displayed. The two were shrunk to half the available space. This is due to the fact that a group is by default two divs in a row each expecting one element, usually the label and the field value. However, only the value is to be displayed in our case. Hence, why the list only take up half of the space made avalailable by the group. To solve this, we can simply force the number of columns taken by the list to 2. task-4481314
This commit fixes a typo in two mobile form view's tests where "screenLeft" was used instead of "scrollX". Note: this was detected while testing for the new Chrome's headless mode set by default on Chrome 128+. Forward-Port-Of: odoo/odoo#194105
Original PR description
This commit fixes a typo in two mobile form view's tests where "screenLeft" was used instead of "scrollX". Note: this was detected while testing for the new Chrome's headless mode set by default on Chrome 128+. Forward-Port-Of: odoo/odoo#194105
### Before When creating a new vendor bill through Vendors > 'Example Vendor 1'> Vendor Bills (magic button), if the vendor was changed to 'Example Vendor 2' and the draft saved then it would show up under the 'Example Vendor 1' in the Partner Ledger instead of under the correct 'Example Vendor 2'. This is due to the partner_id being defined in the context when going through the 'Example Vendor 1' view. ### Now During the creation of the account move lines we use a context without the
Original PR description
### Before When creating a new vendor bill through Vendors > 'Example Vendor 1'> Vendor Bills (magic button), if the vendor was changed to 'Example Vendor 2' and the draft saved then it would show up under the 'Example Vendor 1' in the Partner Ledger instead of under the correct 'Example Vendor 2'. This is due to the partner_id being defined in the context when going through the 'Example Vendor 1' view. ### Now During the creation of the account move lines we use a context without the default_partner_id. The Partner Ledger now shows the draft bill entry under the right vendor. opw-4407709 Forward-Port-Of: odoo/odoo#194052 Forward-Port-Of: odoo/odoo#192567
**Steps to reproduce:** - Configure `Analytic Accounting` via `Accounting` module's settings; - Go to `Analytic Plans` through `Accounting / Configuration / Analytic Accounting`: - Select any record and change its name for a really long one;  - Go to `Expenses` app: - Select any expense in the list; - Open the `Analytic Distribution` widget. ___ **
Original PR description
**Steps to reproduce:** - Configure `Analytic Accounting` via `Accounting` module's settings; - Go to `Analytic Plans` through `Accounting / Configuration / Analytic Accounting`: - Select any record…
**Steps to reproduce:**
- Configure `Analytic Accounting` via `Accounting` module's settings;
- Go to `Analytic Plans` through `Accounting / Configuration / Analytic Accounting`:
- Select any record and change its name for a really long one;

- Go to `Expenses` app:
- Select any expense in the list;
- Open the `Analytic Distribution` widget.
___
**Issue:**
Long `Analytic Plans` names are wrapped and may lead to unreadable texts.

*(from the ticket - Odoo 17)*

___
**Expected:**
A smooth UI should display `Analytic Plans` as when accessed through an invoice line from `Accounting` app.

___
**Cause:**
The `Analytic Distribution` widget style of the invoice view inherits from the list renderer, forcing a `nowrap` style while the expense view of the same widget does not.
___
**Fix:**
Force a `nowrap` style for that specific widget.

___
opw-4357324
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#194162
Forward-Port-Of: odoo/odoo#192203Problem: When a manufacturing order with a work order that was not planned is completed, a resource.calendar.leave is created for the work order. During this process the work order’s date_finished field is recalculated. This means that this work order reserves a slot in the work center to be finished in the future even though it has already been completed. Purpose: If the work order already has a date_finished value, then that value should be used instead of it being recalculated based on the
Original PR description
Problem: When a manufacturing order with a work order that was not planned is completed, a resource.calendar.leave is created for the work order. During this process the work order’s date_finished…
Problem: When a manufacturing order with a work order that was not planned is completed, a resource.calendar.leave is created for the work order. During this process the work order’s date_finished field is recalculated. This means that this work order reserves a slot in the work center to be finished in the future even though it has already been completed. Purpose: If the work order already has a date_finished value, then that value should be used instead of it being recalculated based on the availability of the work center. This will help ensure that completed work orders are not reserving time in a work center when it has already been completed. Steps to Reproduce on Runbot: 1. Create a new storable product. 2. Create a BoM for this product and navigate to the Operations tab and add an operation. 3. Create a manufacturing order, confirm it, and then produce all without planning it. 4. Navigate to the completed work order and observe the finished date is in the future. 5. Navigate to the work centers working hours’ time off and find the record associated with the work order. 6. Observe that the end date is in the future. opw-4393301 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#193705 Forward-Port-Of: odoo/odoo#192393
Steps to produce: - Drop 'Text - Image' block - Replace image by illustration - Try to crop image - A notification is displayed - Try saving The issue is ImageCrop is still not opened and we are trying to wait for image_cropper_destroyed to trigger, so here we check if ImageCrop is not opened. task-4246644 Forward-Port-Of: odoo/odoo#193679 Forward-Port-Of: odoo/odoo#188577
Original PR description
Steps to produce: - Drop 'Text - Image' block - Replace image by illustration - Try to crop image - A notification is displayed - Try saving The issue is ImageCrop is still not opened and we are trying to wait for image_cropper_destroyed to trigger, so here we check if ImageCrop is not opened. task-4246644 Forward-Port-Of: odoo/odoo#193679 Forward-Port-Of: odoo/odoo#188577
Before this commit, the form compiler did a search in the whole DOM, when compiling a form, to find anchors, for which the target node would be in the form being compiled. The point of this was to automatically open the notebook tab when an anchor is click for an element that is hidden in a non active tab. However, looking in the DOM makes no sense. It's very likely that the found element won't be there anymore when the view we compile will be put in the DOM, and moreover the compilation is d
Original PR description
Before this commit, the form compiler did a search in the whole DOM, when compiling a form, to find anchors, for which the target node would be in the form being compiled. The point of this was to…
Before this commit, the form compiler did a search in the whole DOM, when compiling a form, to find anchors, for which the target node would be in the form being compiled. The point of this was to automatically open the notebook tab when an anchor is click for an element that is hidden in a non active tab. However, looking in the DOM makes no sense. It's very likely that the found element won't be there anymore when the view we compile will be put in the DOM, and moreover the compilation is done only once, so if we come back later on on the same form, we'll still use the information of the anchor we found the first time, which is ever less likely to be again in the DOM. This was actually a code mistake, as what we aimed to do was to find anchors **in the form**, pointing to elements hidden in the notebook, but definitely not **in the dom**. This mistake produces a crash: go to "Timesheet / Configuration / Settings" and try to open the "Internal" project in the time off section => traceback. This commit removes the look up in the document. The feature of automatically opening the tab already partially works, but we won't fix it, and we'll even drop it in master. opw~4457605 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#194119
Issue: * Accrued Expense Entry shows wrong currency symbol for 'Total in Currency' for multicurrency POs. Steps To Reproduce: * In a multicurrency environmentcreate a PO with a currency different than the one of the company and confirm it. * Receive the product and validate it. * On the PO action wheel, create `Accrued Expense Entry`. * Notice 'Total in Currency' is set to the wrong currency. Solution: * In `_compute_move_vals` I set the move's `currency_id` of the accrual move to t
Original PR description
Issue: * Accrued Expense Entry shows wrong currency symbol for 'Total in Currency' for multicurrency POs. Steps To Reproduce: * In a multicurrency environmentcreate a PO with a currency different than the one of the company and confirm it. * Receive the product and validate it. * On the PO action wheel, create `Accrued Expense Entry`. * Notice 'Total in Currency' is set to the wrong currency. Solution: * In `_compute_move_vals` I set the move's `currency_id` of the accrual move to that of the order's currency. * in `create_entries` I prevent the creation of the accrual move if orders have different currencies. * Please note that there were no issues with currency conversions. opw-4072932 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#194050 Forward-Port-Of: odoo/odoo#177929
## Issue: - Child contacts of followers were unable to access the tasks menu in the portal home, despite having access according to the access rules. ## Steps to reproduce: 1. Create a parent contact with a child contact. 2. Grant the child contact portal access. 3. Create a task with the parent contact as the customer. 4. Add the parent contact as a follower or send a message in the task chatter. 5. Log in as the child contact in the portal. 6. Notice the tasks menu is unavailable.
Original PR description
## Issue: - Child contacts of followers were unable to access the tasks menu in the portal home, despite having access according to the access rules. ## Steps to reproduce: 1. Create a parent contact with a child contact. 2. Grant the child contact portal access. 3. Create a task with the parent contact as the customer. 4. Add the parent contact as a follower or send a message in the task chatter. 5. Log in as the child contact in the portal. 6. Notice the tasks menu is unavailable. ## Solution: - The issue originated in `_prepare_home_portal_values`, where the task count was computed with a restrictive domain and sudo instead of relying on the access rules. - Removed the unnecessary domain filter to let the access rules handle it. opw-4306834 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#194030 Forward-Port-Of: odoo/odoo#191601
When cusomers access portal view, they are able to see deliveries/returns made for their sales order. Currently in the returns list, incoming deliveries are shown, without checking if it is a real return. This will show incoming deliveries from third party vendor that a customer should not see - Activate Route MTO - In Route Buy, open the first rule and set - Propagation of Procurement Group: Propagate - Create a product [TEST] with: - Product Type: Goods - Invoicing Policy: Ordere
Original PR description
When cusomers access portal view, they are able to see deliveries/returns made for their sales order. Currently in the returns list, incoming deliveries are shown, without checking if it is a real return. This will show incoming deliveries from third party vendor that a customer should not see - Activate Route MTO - In Route Buy, open the first rule and set - Propagation of Procurement Group: Propagate - Create a product [TEST] with: - Product Type: Goods - Invoicing Policy: Ordered Quantities - [Purchase tab] Set a Vendor - [Inventory Tab] Routes Buy, MTO - Create a Sales Order with [TEST] - Confirm - Open the Purchase order and confirm it - Back to the SO, 2 deliveries are created - Open portal Issue: Under 'Returns' it is listed the delivery from the vendor to the company. opw-4420364 Forward-Port-Of: odoo/odoo#192729
\* = im_livechat, portal, web Validating access in controllers based on generic queries is slow, so it needs to be removed. It also grants more access than necessary, effectively making some avatars fully public depending on hard to track states or relations, when it only needs to be available in a specific context. Access could be validated with more specific queries instead, for example for a specific thread. While that solves the biggest performance issue, it's still not the fastest,
Original PR description
\* = im_livechat, portal, web Validating access in controllers based on generic queries is slow, so it needs to be removed. It also grants more access than necessary, effectively making some avatars…
\* = im_livechat, portal, web Validating access in controllers based on generic queries is slow, so it needs to be removed. It also grants more access than necessary, effectively making some avatars fully public depending on hard to track states or relations, when it only needs to be available in a specific context. Access could be validated with more specific queries instead, for example for a specific thread. While that solves the biggest performance issue, it's still not the fastest, but more importantly it requires a lot of contextual info to be forwarded to the route. And having one route per thread removes the ability to cache the avatar between various context (in particular from one channel to the next). Also avatar are not always displayed in the context of threads, so it doesn't fully resolve the issue and requires to think about more conditions and more contexts. The generic token of the target record could be used when it exists, but the token could be used to leak other information (portal, ...), and it doesn't always exist. This commit introduces a solution resolving all issues, with almost no drawback. The access is granted through a token which is specific to displaying the avatar. The token is only given when necessary, so minimal access is granted in all cases. The token is the same in all contexts, allowing caching. Validating the token is much faster than making queries. The token has an expiration date to minimize data access in time, but it can be refreshed at any time if the user can still access the source of the token. https://github.com/odoo/enterprise/pull/77037 Forward-Port-Of: odoo/odoo#187799
Steps to reproduce: - install Documents - create a new spreadsheet - hit the Share button - change the sharing settings to "Anyone with the link: Viewer / Musty have the link to access" - open the sharing link in an incognito window - hit the download button => 404 not found A public user cannot convert a spreadsheet to an excel file and downlaod it because a route needs to be called to create the excel file. This route is currently not allowed for public users. For frozen sprea
Original PR description
Steps to reproduce: - install Documents - create a new spreadsheet - hit the Share button - change the sharing settings to "Anyone with the link: Viewer / Musty have the link to access" - open the…
Steps to reproduce: - install Documents - create a new spreadsheet - hit the Share button - change the sharing settings to "Anyone with the link: Viewer / Musty have the link to access" - open the sharing link in an incognito window - hit the download button => 404 not found A public user cannot convert a spreadsheet to an excel file and downlaod it because a route needs to be called to create the excel file. This route is currently not allowed for public users. For frozen spreadsheet, we generate the excel file before-hand (when the internal user shares the spreadsheet). For a regular "live" share though, we cannot pre-generate the excel file since the spreadsheet continues to live and evolve. The `spreadsheet` module needs to be updated for this bug fix to take effect. (otherwise the download button won't do anything, which is not worse than facing a 404 response) See also Enterprise PR. Task: 4440241 opw: 4417519 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#192349
We now also delete `lib/` directory before deleting/downloading new IoT handlers. In community, this directory does not exist, resulting in Path error while trying to `iterdir()` on it. We now look for files recursively inside `iot_handlers/`, and provide the list to the updated method `unlink_file` that now accepts multiple arguments to avoid excessively switching between rw/ro filesystem modes. Forward-Port-Of: odoo/odoo#193990
Original PR description
We now also delete `lib/` directory before deleting/downloading new IoT handlers. In community, this directory does not exist, resulting in Path error while trying to `iterdir()` on it. We now look for files recursively inside `iot_handlers/`, and provide the list to the updated method `unlink_file` that now accepts multiple arguments to avoid excessively switching between rw/ro filesystem modes. Forward-Port-Of: odoo/odoo#193990
Before this PR: - The Upload Button was assigned the shortcut Alt+B. - This caused a conflict with Odoo's default shortcut for navigating backward. After this PR: - The shortcut for the Upload Button is now updated to Alt+Shift+I. - This resolves the conflict and ensures smooth navigation and functionality. Task ID:-4417310 Forward-Port-Of: odoo/odoo#191003
Original PR description
Before this PR: - The Upload Button was assigned the shortcut Alt+B. - This caused a conflict with Odoo's default shortcut for navigating backward. After this PR: - The shortcut for the Upload Button is now updated to Alt+Shift+I. - This resolves the conflict and ensures smooth navigation and functionality. Task ID:-4417310 Forward-Port-Of: odoo/odoo#191003
When "Automatic Check-Out" was enabled for the Attendance app, a scheduled action will run every given interval to clock out employees who are still clocked-in after their defined work hours for a day (typically 8 hours.) The issue is that this action was clocking every employee out every time it ran because the condition was comparing a value in seconds to a value in hours, where the former would dominate every time. This change fixes this by normalizing the units to hours in all calculation
Original PR description
When "Automatic Check-Out" was enabled for the Attendance app, a scheduled action will run every given interval to clock out employees who are still clocked-in after their defined work hours for a…
When "Automatic Check-Out" was enabled for the Attendance app, a scheduled action will run every given interval to clock out employees who are still clocked-in after their defined work hours for a day (typically 8 hours.) The issue is that this action was clocking every employee out every time it ran because the condition was comparing a value in seconds to a value in hours, where the former would dominate every time. This change fixes this by normalizing the units to hours in all calculations. This can be tested on Runbot by following these steps: 1) In Attendances > Configuration, check the "Automatic Check-Out" box and set the tolerance to 0. The tolerance won't make much of a difference here because it is measured in hours and we'll find later that we are calculating time in seconds, but this is the tolerance that the customer has set.) 2) In Attendances > Overview, create a new attendance record for any given employee by clicking "New." Set the check-in date and time to be the current time to simulate a small interval of working time. Delete the check-out date entirely so that we functionally have a "checked-in" employee. (You could also clock this employee in using other methods like the kiosk, but I think this way is clear and easy too.) 3) Now that there is a short interval of time for this employee, navigate to Settings > Scheduled Actions > "Attendance: Automatically check-out employees" and run it manually to simulate what would happen when it should run 4 hours later. 4) Observe that the employee has not been clocked out because they have not gone over their allotted work hours for the day: BUG SQUASHED. 💥🐛 opw-4383268 Forward-Port-Of: odoo/odoo#192396
Currently, there are two mail templates named "Settings: New User Invite" in the records. To avoid duplication, we will rename the template used to welcome portal users who register as internal users to "Settings: New Portal Sign Up". Follow up of #188391 Task-4481862 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#194067
Original PR description
Currently, there are two mail templates named "Settings: New User Invite" in the records. To avoid duplication, we will rename the template used to welcome portal users who register as internal users to "Settings: New Portal Sign Up". Follow up of #188391 Task-4481862 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#194067
[FIX] hr_contract_salary: Custom document field not working Steps: - Create a new file field on employee - Open salary package configurator / personal info - Create a new info with the created field - category: personal documents - display type: document - Open Employee/Abigail - Open its contract - Generate an offer - 17 - Send by email - From the generated template, copy the button link - Open the copied link in another tab - master
Original PR description
[FIX] hr_contract_salary: Custom document field not working
Steps:
- Create a new file field on employee
- Open salary package configurator / personal info
- Create a new info with the created field
- category: personal documents
- display type: document
- Open Employee/Abigail
- Open its contract
- Generate an offer
- 17
- Send by email
- From the generated template, copy the button link
- Open the copied link in another tab
- master
- Just open the Link field
Actual result:
- KeyError for the filename of the new file field
Expected result:
- No error
- Filename field is also used when using a binary field
- File input is well show in the website configurator
opw-4382086
Caused by https://github.com/odoo/enterprise/commit/8e50071471d194bc8b594a79a95fe951cd5055ab & https://github.com/odoo/enterprise/commit/6f40549b98e65f813456442f7df35e9349a7639c
Forward-Port-Of: odoo/enterprise#75868When we click on the waning the action does not show the correct list. - replace the `self.env['fleet.vehicle']` with `self.env['hr.employee']` as `employees_multiple_vehicles` is a list with employee_ids not vehicle_ids Task: 4458500 Forward-Port-Of: odoo/enterprise#77115 Forward-Port-Of: odoo/enterprise#76679
Original PR description
When we click on the waning the action does not show the correct list. - replace the `self.env['fleet.vehicle']` with `self.env['hr.employee']` as `employees_multiple_vehicles` is a list with employee_ids not vehicle_ids Task: 4458500 Forward-Port-Of: odoo/enterprise#77115 Forward-Port-Of: odoo/enterprise#76679
Enterprise counter-part. https://github.com/odoo/odoo/pull/187799 Forward-Port-Of: odoo/enterprise#74167
Original PR description
Enterprise counter-part. https://github.com/odoo/odoo/pull/187799 Forward-Port-Of: odoo/enterprise#74167
This commit's purpose is to clean up the graph view of the sla report analysis model. Some fields were added on the view by a generic improvement task to handle the widget 'float_time' with grap view. In this case, those fields are a nuisance for readability, so we're getting rid of them. target version 17.0 - master task - 4351830 Forward-Port-Of: odoo/enterprise#76237
Original PR description
This commit's purpose is to clean up the graph view of the sla report analysis model. Some fields were added on the view by a generic improvement task to handle the widget 'float_time' with grap view. In this case, those fields are a nuisance for readability, so we're getting rid of them. target version 17.0 - master task - 4351830 Forward-Port-Of: odoo/enterprise#76237
Steps to reproduce: - install Documents - create a new spreadsheet - hit the Share button - change the sharing settings to "Anyone with the link: Viewer / Musty have the link to access" - open the sharing link in an incognito window - hit the download button => 404 not found A public user cannot convert a spreadsheet to an excel file and downlaod it because a route needs to be called to create the excel file. This route is currently not allowed for public users. For frozen sprea
Original PR description
Steps to reproduce: - install Documents - create a new spreadsheet - hit the Share button - change the sharing settings to "Anyone with the link: Viewer / Musty have the link to access" - open the sharing link in an incognito window - hit the download button => 404 not found A public user cannot convert a spreadsheet to an excel file and downlaod it because a route needs to be called to create the excel file. This route is currently not allowed for public users. For frozen spreadsheet, we generate the excel file before-hand (when the internal user shares the spreadsheet). For a regular "live" share though, we cannot pre-generate the excel file since the spreadsheet continues to live and evolve. The `spreadsheet` module needs to be updated for this bug fix to take effect. (otherwise the download button won't do anything, which is not worse than facing a 404 response) See also community PR. Task: 4440241 opw: 4417519 Forward-Port-Of: odoo/enterprise#76460
Forward-Port-Of: odoo/enterprise#77126
Original PR description
Forward-Port-Of: odoo/enterprise#77126