Monday, December 2, 2024
22 changes · saas-17.4
Resolved issues and error corrections
Users now see a clear error if they try to request time off while their account has no employee record in the selected company. This prevents confusing failures and helps users understand what needs to be fixed before submitting leave.
Original PR description
Steps to reproduce: 1. Login as `Mitchell Admin`. 2. Select Indian Company (without selecting any other company). 1. Open `Time Off` app. 3. Click on any day on the calendar. 4. Confirm the time off. 5. An error will occur. In order take a time off from the dashboard, the logged in user must have an employee in the selected company. `Mitchell Admin` doesn't have an employee in the `Indian Company` which causes the bug. This problem is general and happens when any user tries to take a time off from the dashboard without having an employee in the selected company. To solve the issue, an error message will appear to the user if they try to take a time off without having an employee in the selected company. task-4034228
Fixed an issue where changing an employee's home-to-work distance during salary contract setup did not update the employee's private information. This ensures HR records stay consistent with the distance entered in the salary configurator, regardless of the distance unit setting.
Original PR description
To reproduce, sign a new contract in the salary configurator with a different home to work distance. Check the employee's private info and the distance is not updated. The issue happens because the salary configurator works on the field `km_home_work` while there is also `distance_home_work` that works with either miles or kilometers. An inverse was introduced in: https://github.com/odoo/odoo/pull/178160 but it used the wrong field when computing `distance_from_work`. task-4306551 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Users can now click a pinned-message notification and be taken to the pinned message even if it has not loaded yet. This makes it easier to find referenced conversations and avoids a frustrating dead-end in channel navigation.
Original PR description
Before this PR, clicking on the "user pinned a message to the channel" notification linked to a not yet loaded message would not scroll to the pinned message. This issue arises because the `highlightMessage` function does nothing if the message's thread is different from the current one. However, when a message is unknown, the thread is also unknown, and the function does nothing. The notification is only displayed in the origin thread of the message, so we can safely pass this information, assuming the message thread and the notification thread are the same.
Customers using translated websites will now see the pickup point selection dialog fully translated, including the title, action button, and closed-day label. This improves the checkout experience for shoppers in non-English languages and avoids confusing mixed-language text.
Original PR description
When you try to ship your products to a pick-up point on the website, you encounter a dialog to choose the exact location of the pick-up point that has the following strings untranslated: "Choose a pick-up point", "Choose this location", and "Closed" (if the pick-up location is closed on someday). This happens because these strings are defined in `delivery` module, which is not a frontend module. This commit redefines those strings in `website_sale` module, which is a fronend module. Task-4328208 OPW-4326840
This update removes leftover customer display code from an earlier point of sale redesign. It helps keep the system cleaner and reduces the chance of confusion or unintended behavior without changing how users interact with the feature.
Original PR description
In acf78c27b12cf014cd80d20ea5853e63ab9ca03f we completely refactored the customer display into it's own owl app, but failed to remove part of the old code. In this commit we fix the issue. Task: 4367166 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Miscellaneous changes
**Steps to reproduce the bug:** - Create a storable product: - "Finished Product" with the following BoM: - Component: 1 unit of "C1" - Byproducts: - 1 unit of "By-product 1" - 1 unit of "By-product 2" - Create a manufacturing order to produce 5 units of the finished product. - Confirm the MO. - Set the quantity produced to 5 units. - Set the quantity of byproducts to: - By-product 1: 4 units - By-product 2: 3 units - Validate the MO. - Print
Original PR description
**Steps to reproduce the bug:**
- Create a storable product:
- "Finished Product" with the following BoM:
- Component: 1 unit of "C1"
- Byproducts:
- 1 unit of "By-product 1"
- 1 unit of "By-product 2"
- Create a manufacturing order to produce 5 units of the finished product.
- Confirm the MO.
- Set the quantity produced to 5 units.
- Set the quantity of byproducts to:
- By-product 1: 4 units
- By-product 2: 3 units
- Validate the MO.
- Print the cost analysis.
**Problem:**
The reported quantity does not show the actual quantity produced but
instead shows the "to produce" quantity.
opw-4312292
Forward-Port-Of: odoo/odoo#188854Originally, the inventory adjustment view will attempt to merge quants eventhough this merging is done in the scheduler. In this PR we allow a way to skip the function _quant_tasks which performs merging. This is done through a system parameter. Merging quants has been seen to cause deadlocks in cases where multiple users are visiting the same view at the same time. Skipping this process will make sure to only merge quants through the scheduler. This will speedup opening the quants views and
Original PR description
Originally, the inventory adjustment view will attempt to merge quants eventhough this merging is done in the scheduler. In this PR we allow a way to skip the function _quant_tasks which performs merging. This is done through a system parameter. Merging quants has been seen to cause deadlocks in cases where multiple users are visiting the same view at the same time. Skipping this process will make sure to only merge quants through the scheduler. This will speedup opening the quants views and could also be helpful in debugging. opw-4226821 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#189053
When creating an invoice in foreign currency with only 0% tax, we still want to display the company currency table on the invoice pdf. task-4367088 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#188955
Original PR description
When creating an invoice in foreign currency with only 0% tax, we still want to display the company currency table on the invoice pdf. task-4367088 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#188955
As the previous 'embed_viewer' was also (wrongly) used in maintenance, make it available globally. Runbot issue: https://runbot.odoo.com/web#id=105095&view_type=form&model=runbot.build.error&menu_id=405&cids=1 Forward-Port-Of: odoo/odoo#188857 Forward-Port-Of: odoo/odoo#187035
Original PR description
As the previous 'embed_viewer' was also (wrongly) used in maintenance, make it available globally. Runbot issue: https://runbot.odoo.com/web#id=105095&view_type=form&model=runbot.build.error&menu_id=405&cids=1 Forward-Port-Of: odoo/odoo#188857 Forward-Port-Of: odoo/odoo#187035
In previous commit [1] we added text at the bottom of email sent when sending invoices, this doesn't work well for translation to have <a> tags in the middle of sentences, in particular in Dutch and German. We move the cliquable URL at the end of the sentence in an icon. [1]: https://github.com/odoo/odoo/commit/42cc1ea713aa977794231897b2f04758e30d8e19 task-no  Forward-Port-Of: odoo/odoo#189157
Original PR description
In previous commit [1] we added text at the bottom of email sent when sending invoices, this doesn't work well for translation to have <a> tags in the middle of sentences, in particular in Dutch and German. We move the cliquable URL at the end of the sentence in an icon. [1]: https://github.com/odoo/odoo/commit/42cc1ea713aa977794231897b2f04758e30d8e19 task-no  Forward-Port-Of: odoo/odoo#189157
Improvements for PR https://github.com/odoo/odoo/pull/130806 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#189238
Original PR description
Improvements for PR https://github.com/odoo/odoo/pull/130806 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#189238
### Description of the issue/feature this PR addresses: On selecting multiple cells in a table and applying formatting commands like (Bold, Italic, Underline, and Strikethrough) resulted in the loss of selection. The root cause of this issue was identified in the `cleanForSave()` function, which triggered `deselectTable()` during command execution, removing the entire selection from the table results in collapsing the selection to start. ### Approach: This PR addresses the issue by rest
Original PR description
### Description of the issue/feature this PR addresses: On selecting multiple cells in a table and applying formatting commands like (Bold, Italic, Underline, and Strikethrough) resulted in the loss…
### Description of the issue/feature this PR addresses: On selecting multiple cells in a table and applying formatting commands like (Bold, Italic, Underline, and Strikethrough) resulted in the loss of selection. The root cause of this issue was identified in the `cleanForSave()` function, which triggered `deselectTable()` during command execution, removing the entire selection from the table results in collapsing the selection to start. ### Approach: This PR addresses the issue by restoring selection using `historyResetLatestComputedSelection()` after executing the command, ensuring that the selection is preserved as intended. Additionally, a specific issue related to applying heading tags was encountered, stemming from the call to `getDeepRange()` within the `formatSelection()` function, disrupting proper selection restoration, particularly in the case of headings. ### Desired behavior after PR is merged: We maintain the selection after applying formatting commands (Bold, Italic, Underline, and Strikethrough) in table. task-3822527 Forward-Port-Of: odoo/odoo#188452 Forward-Port-Of: odoo/odoo#165089
Description of the issue this PR addresses: Current behavior before PR: When pasting content containing `<div>` elements with inline child nodes, the `<div>` tags were unwrapped, causing all inline content within multiple `<div>` elements to merge into a single line. Desired behavior after PR is merged: `<div>` elements are now converted to `<p>` tags. This preserves the block structure and ensures inline content within each `<div>` remains in original format. task-4309745 ---
Original PR description
Description of the issue this PR addresses: Current behavior before PR: When pasting content containing `<div>` elements with inline child nodes, the `<div>` tags were unwrapped, causing all inline content within multiple `<div>` elements to merge into a single line. Desired behavior after PR is merged: `<div>` elements are now converted to `<p>` tags. This preserves the block structure and ensures inline content within each `<div>` remains in original format. task-4309745 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#186862
When generating the mail alias for a journal, we check whether the name of the company is already in it, and add it if it's not. The problem is before this commit, we didn't sanitize the name of the company to do that check, so a company name with spaces or accents would never be detected as part of the alias, and could end up being in it twice. This caused issues in the Winbooks import of one customer, who ended up with duplicate aliases because of that, since the journal code was not proper
Original PR description
When generating the mail alias for a journal, we check whether the name of the company is already in it, and add it if it's not. The problem is before this commit, we didn't sanitize the name of the company to do that check, so a company name with spaces or accents would never be detected as part of the alias, and could end up being in it twice. This caused issues in the Winbooks import of one customer, who ended up with duplicate aliases because of that, since the journal code was not properly added to the generated alias while it should, and a duplicate of the company name was put instead. opw-4196597 Forward-Port-Of: odoo/odoo#189149
**Steps to reproduce the bug:** - Create a storable product: - "Finished Product" with the following BoM: - Component: 1 unit of "C1" - Byproducts: - 1 unit of "By-product 1" - 1 unit of "By-product 2" - Create a manufacturing order to produce 5 units of the finished product. - Confirm the MO. - Set the quantity produced to 5 units. - Set the quantity of byproducts to: - By-product 1: 4 units - By-product 2: 3 units - Validate the MO. - Print
Original PR description
**Steps to reproduce the bug:**
- Create a storable product:
- "Finished Product" with the following BoM:
- Component: 1 unit of "C1"
- Byproducts:
- 1 unit of "By-product 1"
- 1 unit of "By-product 2"
- Create a manufacturing order to produce 5 units of the finished product.
- Confirm the MO.
- Set the quantity produced to 5 units.
- Set the quantity of byproducts to:
- By-product 1: 4 units
- By-product 2: 3 units
- Validate the MO.
- Print the cost analysis.
**Problem:**
The reported quantity does not show the actual quantity produced but
instead shows the "to produce" quantity.
opw-4312292
Forward-Port-Of: odoo/enterprise#73666Problem ---------- Since 1st October, the SHIF replace the NHIF, the only difference is the computation of the amount. All payslip before and on the 9 October use the NHIF and all new payslip from the 9 October use the SHIF Objective ---------- Adapt the salary rules to compute the good rule. Adapt the NHIF Report to make NHIF or SHIF reports. Solution ---------- Create new SHIF rule parameter with a min amount and rate computation. Create a new report wizard to manage the 2 differe
Original PR description
Problem ---------- Since 1st October, the SHIF replace the NHIF, the only difference is the computation of the amount. All payslip before and on the 9 October use the NHIF and all new payslip from the 9 October use the SHIF Objective ---------- Adapt the salary rules to compute the good rule. Adapt the NHIF Report to make NHIF or SHIF reports. Solution ---------- Create new SHIF rule parameter with a min amount and rate computation. Create a new report wizard to manage the 2 different rules NHIF and SHIF task-4294419 Forward-Port-Of: odoo/enterprise#74241
Issue: When printing PDF reports, long account names cause the report to overflow out of the page. Steps to reproduce: - Install the accounting app - Enable "Analytic Accounting" in the settings - Create one (or more) analytic account(s) with very long names - Open either "Balance Sheet" or "Profit and Loss" reporting - Do an "Analytic Group By" with the created account(s) - Print the PDF Cause: The default style in the associated scss file does not use wrapping. https://github.co
Original PR description
Issue: When printing PDF reports, long account names cause the report to overflow out of the page. Steps to reproduce: - Install the accounting app - Enable "Analytic Accounting" in the settings -…
Issue: When printing PDF reports, long account names cause the report to overflow out of the page. Steps to reproduce: - Install the accounting app - Enable "Analytic Accounting" in the settings - Create one (or more) analytic account(s) with very long names - Open either "Balance Sheet" or "Profit and Loss" reporting - Do an "Analytic Group By" with the created account(s) - Print the PDF Cause: The default style in the associated scss file does not use wrapping. https://github.com/odoo/enterprise/blob/bf6c64b8fd5591f271e9b0f18f40d205a64cd5bd/account_reports/static/src/scss/account_pdf_export_template.scss#L41 Solution: Override the default style by using the "o_overflow_name" class. This is the class already used for handling overflow in the tables' content lines. This gives a more readable result than just editing the "white-space" field (see below for comparison). The proposed solution gives the following result:  As opposed to just editing to "white-space: wrap;"  Ticket: opw-4277596 Forward-Port-Of: odoo/enterprise#73761
## Issue: When we create a batch from a payment by selecting it and clicking on "Create Batch", even if the payment is already in a batch or validated, it is possible to add it to a new batch, which can lead to issues when validating the batch. ## Steps to reproduce: - Create a payment (posted but not sent) SEPA transfer. - Select this payment and create batch payment. - validate the batch - Open payments list again, and select that same payment, then create a batch payment from the se
Original PR description
## Issue: When we create a batch from a payment by selecting it and clicking on "Create Batch", even if the payment is already in a batch or validated, it is possible to add it to a new batch, which…
## Issue: When we create a batch from a payment by selecting it and clicking on "Create Batch", even if the payment is already in a batch or validated, it is possible to add it to a new batch, which can lead to issues when validating the batch. ## Steps to reproduce: - Create a payment (posted but not sent) SEPA transfer. - Select this payment and create batch payment. - validate the batch - Open payments list again, and select that same payment, then create a batch payment from the selection. - a new batch payment will be created. - If you open the batch payments list you'll notice 2 batches: 1. the original batch now has no payments inside it so the "re-generate Export File" button won't show up. 2. the second batch now contains the payment, but we can't re-generate the export file because it shows an error: The batch could not be validated, Some payments have already been sent. Solution: - before creating a batch with payments or adding payments to a batch we check if the payments we are adding are already in a batch. - also in the constrain method `_check_payments_constrains` we added a check to validate wether the payment we're adding is already validated. OPW-3976563 Forward-Port-Of: odoo/enterprise#73992 Forward-Port-Of: odoo/enterprise#67315
In this commit, we fix sign_resend_expired_link_tour tour by doing click in step action instead of doing nothing. Forward-Port-Of: odoo/enterprise#74767
Original PR description
In this commit, we fix sign_resend_expired_link_tour tour by doing click in step action instead of doing nothing. Forward-Port-Of: odoo/enterprise#74767
In safari (and all webkit navigators) `HTMLCanvasElement.toDataUrl` does not support `image/webp` as `type` parameter. https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toDataURL#browser_compatibility Before this commit, spreadsheet_edition/hooks.js:useSpreadsheetThumbnail draws an image to a canvas and convert it to base64. But the code assumes that the conversion to webp will work. `toDataUrl` uses `png` type if it doesn't work https://developer.mozilla.org/en-US/do
Original PR description
In safari (and all webkit navigators) `HTMLCanvasElement.toDataUrl` does not support `image/webp` as `type` parameter. https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toDataURL#browser_compatibility Before this commit, spreadsheet_edition/hooks.js:useSpreadsheetThumbnail draws an image to a canvas and convert it to base64. But the code assumes that the conversion to webp will work. `toDataUrl` uses `png` type if it doesn't work https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toDataURL#type With this commit, the regexp that removes the encoding data will supports `webp` **and** `png` Forward-Port-Of: odoo/enterprise#74870
…ayslip form Steps: • Install the payroll app. • Install l10n_au_hr_payroll module. • Open payslip and remove the employee from the form and click outside to apply changes. • It will cause the traceback error. Cause of the issue: • After removing the employee name corresponding contract will become empty. • The issue is due to empty record set of contract. Fix: • Added a check to ensure contract is present. task-4341523 Forward-Port-Of: odoo/enterprise#74238
Original PR description
…ayslip form Steps: • Install the payroll app. • Install l10n_au_hr_payroll module. • Open payslip and remove the employee from the form and click outside to apply changes. • It will cause the traceback error. Cause of the issue: • After removing the employee name corresponding contract will become empty. • The issue is due to empty record set of contract. Fix: • Added a check to ensure contract is present. task-4341523 Forward-Port-Of: odoo/enterprise#74238
[link to broken tests](https://runbot.odoo.com/web#id=68972&menu_id=424&cids=1&action=573&model=runbot.build.error&view_type=form) since [this pr](https://github.com/odoo/enterprise/pull/62136), a lot of things changed in swiss payroll localization. One of the changes was introduction of new module, l10n_ch_hr_payroll_elm. This affected one of the assertQueryCount tests checking compute_sheet function, which is also overwriten in said module. Therefore, we need to increase the query count acc
Original PR description
[link to broken tests](https://runbot.odoo.com/web#id=68972&menu_id=424&cids=1&action=573&model=runbot.build.error&view_type=form) since [this pr](https://github.com/odoo/enterprise/pull/62136), a lot of things changed in swiss payroll localization. One of the changes was introduction of new module, l10n_ch_hr_payroll_elm. This affected one of the assertQueryCount tests checking compute_sheet function, which is also overwriten in said module. Therefore, we need to increase the query count accordingly. Flamegraph of function _get_base_local_dict before above mentioned pr:  Flamegraph of same function after the pr:  Forward-Port-Of: odoo/enterprise#73831