Daily updates from Odoo
Friday, July 5, 2024
16 changes · master
Enhancements to existing features
The appraisal settings page now makes it clearer how appraisal dates and automatic appraisal creation work. This helps HR teams understand that next appraisal dates are still calculated by default, while appraisal plans enable automatic creation of due appraisals.
Original PR description
For appraisals, next_appraisal_date is computed regardless with default whether appraisal_plan is set or not. While when appraisal_plan is set, cron creates due appraisals automatically. It was not obvious with previous settings view. This commit reworks UX to clarify that. task-3961343
This update replaces an internal search operator with a standard equivalent across several Odoo business apps. The change should not alter day-to-day behavior, but it helps keep the platform easier to maintain and more consistent for future updates.
Original PR description
We can use 'in' SQL instead of inselect which is an internal operator. odoo/odoo#171371 https://github.com/odoo/documentation/pull/10026 task-4022654
The Indian GST reporting tests were updated to match the latest invoice-level HSN code validation rules. This helps ensure tax reports continue to validate product classification details correctly after recent changes.
Original PR description
In this PR: Fix merge conflicts in Task ID 3681519 by updating test cases to align with new HSN code validation at the invoice level. Task ID: 3681519
The helpdesk ticket confirmation page now has a cleaner, more elegant layout that matches the website thank-you page. This gives customers a more consistent and polished experience after submitting a support request.
Original PR description
This PR enhances the layout of the "ticket received" page of `website_helpdesk` to make it more elegant and to keep the layout consistent with the `website` "thank you" page (see [odoo/#166138](https://github.com/odoo/odoo/pull/166138)). task-3790303 Requires: - https://github.com/odoo/odoo/pull/166138 --- | Before | After | |--------|--------| | <img width="1141" alt="Capture d’écran 2024-05-30 à 13 03 01" src="https://github.com/odoo/enterprise/assets/80679690/68c3bc56-ccca-4960-998f-98e580d5067c"> | <img width="473" alt="Capture d’écran 2024-05-30 à 13 02 44" src="https://github.com/odoo/enterprise/assets/80679690/3dfed26b-e899-477e-ac1f-09b1dc74e900"> |
When a salary rule is duplicated, the copied rule name now automatically ends with “(copy)”. This makes it easier for payroll users to distinguish originals from duplicates and avoid confusion when managing salary rules.
Original PR description
This commit adds `(copy)` at the end of the salary rule name when the user duplicates the rule. task: 4014255
Belgian salary package contracts now include the company car model name as a tracked benefit. This helps HR and employees clearly see when the selected car model changes as part of signing a new contract.
Original PR description
This commit adds car model name as a benefit, so that it can be reflected as a change when a new contract is signed. task: 3908690
Code cleanup and technical improvements
This update prepares automated test tours for a simpler step format by replacing a special modal-search option with direct modal selectors. It is an internal cleanup that helps reduce maintenance complexity without changing day-to-day user behavior.
Original PR description
In order to simplify the structure of a tour step, it was decided to remove the "in_modal" key. The purpose of this key is to search for the trigger in a modal element. But actually you just need to add ".modal" to the selector. This functionality therefore really has little added value. That's why we're removing it. In this commit, we prepare the ground to be able to remove this functionality by adding .modal to the selectors and forcing the fact of not looking in a modal (in_modal: false) otherwise that would be duplicative. task~3974087 https://github.com/odoo/odoo/pull/171709
Miscellaneous changes
### Issue: A quantity of `3` gets displayed as `3.00...004`. ### Steps to reproduce: - Settings > Technical > Database Structure > Decimal Accuracy - Change the `Digits` of `Product Unit of measure` to 5 - Create a storable product P1 with a BOM: - In the operation tab: one operation in `Assembly line 1` - In the component tab: 1 unit of P2 consumed in the operation - Create and confirm an MO for 3 units of P1 - Go to the shopfloor module, remove the MO ready filter Two issues can b
Original PR description
### Issue: A quantity of `3` gets displayed as `3.00...004`. ### Steps to reproduce: - Settings > Technical > Database Structure > Decimal Accuracy - Change the `Digits` of `Product Unit of measure`…
### Issue: A quantity of `3` gets displayed as `3.00...004`. ### Steps to reproduce: - Settings > Technical > Database Structure > Decimal Accuracy - Change the `Digits` of `Product Unit of measure` to 5 - Create a storable product P1 with a BOM: - In the operation tab: one operation in `Assembly line 1` - In the component tab: 1 unit of P2 consumed in the operation - Create and confirm an MO for 3 units of P1 - Go to the shopfloor module, remove the MO ready filter Two issues can be noticed: - Click on Register Production A pop up opens. Before validating it: The displayed producing quantity of P1 and the quantity of P2 that should be consumed by the operation is`3.00...004`. After validation, the produced quantity is rounded. However, if you click on the cross the rounding error will remain. In addition, the second rounding issue will remain even after validation of the consumed qty. ### Cause of the issue: Our float utils introduce tiny rounding errors, especially at higher precisions. In our case, these errors are introduced during the call of the write method of the `web_save`. ### Fix: We eliminate the rounding errors for the display in the same way as initially ptoposed by https://github.com/odoo/enterprise/pull/58880 see commit https://github.com/odoo/enterprise/commit/1c2f0068d319917bb4af163396d0861a1ff6c9e1 and adapt it to also apply to the raw_move_ids of the MO. opw-3861892 --- Forward-Port-Of: odoo/enterprise#62510
For the `Special Economic Zone` , we don't need to show invoice lines in nil category table. The issue was part of the PR https://github.com/odoo/enterprise/pull/61433 but it got missed from saas-17.2 version while resolving the conflicts. saas-17.2 version PR https://github.com/odoo/enterprise/pull/65105 Forward-Port-Of: odoo/enterprise#66051
Original PR description
For the `Special Economic Zone` , we don't need to show invoice lines in nil category table. The issue was part of the PR https://github.com/odoo/enterprise/pull/61433 but it got missed from saas-17.2 version while resolving the conflicts. saas-17.2 version PR https://github.com/odoo/enterprise/pull/65105 Forward-Port-Of: odoo/enterprise#66051
The withholding extra is being computed based on the current date, and not based on the payslip one. This is of course incorrect. Forward-Port-Of: odoo/enterprise#65868
Original PR description
The withholding extra is being computed based on the current date, and not based on the payslip one. This is of course incorrect. Forward-Port-Of: odoo/enterprise#65868
Before, when creating an invoice for eu operations, lines without product were not accounted inside the ec sales report. Now when an invoice with lines without product happens, it will be displayed inside the ec sales report. This fix had to change the way the sbr icp export retrieved those values. Task: 3978307 Forward-Port-Of: odoo/enterprise#66006 Forward-Port-Of: odoo/enterprise#64265
Original PR description
Before, when creating an invoice for eu operations, lines without product were not accounted inside the ec sales report. Now when an invoice with lines without product happens, it will be displayed inside the ec sales report. This fix had to change the way the sbr icp export retrieved those values. Task: 3978307 Forward-Port-Of: odoo/enterprise#66006 Forward-Port-Of: odoo/enterprise#64265
Following https://github.com/odoo/enterprise/pull/57063 , demo companies were merged with base companies, we adapt the demo data references to fix tests. Forward-Port-Of: odoo/enterprise#66067
Original PR description
Following https://github.com/odoo/enterprise/pull/57063 , demo companies were merged with base companies, we adapt the demo data references to fix tests. Forward-Port-Of: odoo/enterprise#66067
This PR introduces a `l10n` test over the Balance Sheet reports. Each Balance Sheet report in the `LOC_DATA` global at the head of the file will be tested. The test generates a journal entry with a line in every account that is not `off_balance`. It then checks whether the Balance Sheet is balanced. The test does this both for debits and for credits. The test will give a warning for any installed Balance Sheet report which is not specified in the LOC_DATA global. The aim is to change th
Original PR description
This PR introduces a `l10n` test over the Balance Sheet reports. Each Balance Sheet report in the `LOC_DATA` global at the head of the file will be tested. The test generates a journal entry with a…
This PR introduces a `l10n` test over the Balance Sheet reports.
Each Balance Sheet report in the `LOC_DATA` global at the head of the file will be tested.
The test generates a journal entry with a line in every account that is not `off_balance`.
It then checks whether the Balance Sheet is balanced.
The test does this both for debits and for credits.
The test will give a warning for any installed Balance Sheet report which is not specified in the LOC_DATA global. The aim is to change this to an error once all existing Balance Sheets are tested, to make this test mandatory for any new localizations.
For each localization with a Balance Sheet, the test needs to know the XMLIDs of:
- the CoA
- the Balance Sheet report
- the Total Assets line of the Balance Sheet
- the Total Liabilities line of the Balance Sheet
- the Total Equity line of the Balance Sheet (if applicable)
Setting the global `IDENTIFY_INCORRECT_ACCOUNTS` to `True` switches the behaviour of the test: it identifies the accounts that cause the imbalance using a binary search. This is off by default for runbot.
**Performance impact**
- For each Balance Sheet, the test does the following:
- load the chart template
- create an account.move with 4 AMLs for each account (one debit and credit in the account; and one debit and credit in the counterpart account)
- generate the report once.
- The Binary Search (which can be toggled when testing locally) is quite efficient:
- If there is just one incorrect account, then the report needs to be generated `log2(<number of accounts>)` times.
- If there are `X` incorrect accounts, then in the worst-case the report may need to be generated `X * log2(<number of accounts>)` times.
On the Belgian CoA, with no incorrect accounts, the test takes 14s on my PC. With 4 incorrect accounts, the test takes 33s.
Task: 3060790
Forward-Port-Of: odoo/enterprise#66007
Forward-Port-Of: odoo/enterprise#36838Forward-Port-Of: odoo/enterprise#66017 Forward-Port-Of: odoo/enterprise#65957
Original PR description
Forward-Port-Of: odoo/enterprise#66017 Forward-Port-Of: odoo/enterprise#65957
Before this commit, selection item options were not updated properly. 1. When adding some options, validating and then removing the options and go to sign, the removed options would still be there. This happened because when passing an empty array to the backend it would be recognized as an empty set of commands, it's like we are telling odoo to do nothing. To fix this we use the command [6, false, [new_ids]]. 2. `state.option_ids` were updated using `changes.option_ids` which is ve
Original PR description
Before this commit, selection item options were not updated properly. 1. When adding some options, validating and then removing the options and go to sign, the removed options would still be there.…
Before this commit, selection item options were not updated properly. 1. When adding some options, validating and then removing the options and go to sign, the removed options would still be there. This happened because when passing an empty array to the backend it would be recognized as an empty set of commands, it's like we are telling odoo to do nothing. To fix this we use the command [6, false, [new_ids]]. 2. `state.option_ids` were updated using `changes.option_ids` which is very fragile, for example in 16.0 we the changes are given in the form of `[6, false, [id1, id2, ..]]` but in 17.0 we have a list of commands for adding and removing for example `[[4, id1], [3, id2]]` To count on some fixed form of updates would introudce bugs if this form changes in future. To fix this we use `record.data.option_ids.currentIds` which is basically the live set of Ids. 3. when updating both options and responsible at the same time before validating, responsible won't update. This happened becase of the return statement when the options change. To fix this wer remove the return keyword and allow them both to be updated. Task: 3972994 Forward-Port-Of: odoo/enterprise#64333
Prior to this commit, when uploading a file through a share, the file upload note used the share creator's id instead of the id of the actual user who uploaded the file. After this commit, the id of the actual file uploader is used. Forward-Port-Of: odoo/enterprise#65398
Original PR description
Prior to this commit, when uploading a file through a share, the file upload note used the share creator's id instead of the id of the actual user who uploaded the file. After this commit, the id of the actual file uploader is used. Forward-Port-Of: odoo/enterprise#65398