Thursday, December 15, 2022
6 changes · master
Resolved issues and error corrections
This update aligns several internal method definitions across Odoo modules so they behave consistently when called in newer supported ways. It reduces compatibility issues for customizations and adds automated checks to help prevent similar problems in future changes.
Original PR description
*: base, account, crm, hr, hr_attendance, test_access_rights The various public methods of the ORM can be override in other models, those overrides sometime don't implement the exact same signature…
*: base, account, crm, hr, hr_attendance, test_access_rights The various public methods of the ORM can be override in other models, those overrides sometime don't implement the exact same signature as the original method in the ORM. In this work we sanitize all the overrides to ensure a better compatibility. The background objective is to make it possible to call any public method using kwarg: `search(domain=[...])`. * `search`, the first parameter was renamed from `args` to `domain` in 0e9adf7 but the overrides were not updated. * `invalidate_models` and `invalidate_recordset`, a new `flush=True` parameter was introduced in 9c3b9a4 but the overrides were not updated. * `update`, there is a clash between the `update` method responsible for writing on a record and `update` in bus responsible to update the user presence. The bus method has been renamed so it doesn't clash with the ORM. This sanitization comes with a new linter that verifies that all overrides of BaseModel public methods share a compatible signature. The linter has been disabled for `init` and `update` until the deprecation expires. 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
Button text for copying payment links now uses the standard label field, so it is included in translation workflows. This helps users see the correct localized text in multilingual Odoo environments.
Original PR description
Before this commit, the text of a `CopyClipboardButtonField` could be edited with a `label` option. But this label was never translated. After this commit, the field `string` is used instead to rename the button. This is automatically exported for translatation. task-3054813
Fixed payment provider fees are now shown as monetary amounts and converted into the selected payment currency. This helps businesses display and calculate payment fees accurately for customers using different currencies.
Original PR description
Payment fees appeared as float (and not monetary) in the Payment provider form and were not converted into the chosen payment currency task-2854143 See also: - https://github.com/odoo/upgrade/pull/4106
Duplicating a field service task now keeps the worksheet templates manually set on its subtasks. This prevents teams from losing task-specific worksheet setup and having it overwritten by the project default.
Original PR description
Steps to reproduce: - We have to go to any project with subt-tasks and workseets enabled. - We create a new task with a few sub-tasks inside and select manually a worksheet template for each sub-task. - We duplicate this task. Issue: When we duplicate the task we lose the sub-tasks worksheet templates and they're replaced by the default project worksheet template. Solution: Following the same flow of computing the worksheets templates in project , we have to add the proper condition to not lose the worksheet template of the task if it has one already. This bug affects all versions from saas-15.2 until master. opw-3058207
Cleaned up a misleading test comment in the HR mobile area that referenced a dependency which does not exist. This prevents internal asset processing from treating the comment as a real dependency, helping avoid unnecessary test or loading issues.
Original PR description
In order to avoid extracting dependencies from the js at each asset load, in task 3062390 we decided to extract the dependencies directly into the js_transpiler. This implies that all requires are considered as dependencies. Even those present in comments, it is therefore necessary to avoid writing a require(...) with an invalid dependency in a comment.
This update aligns method definitions in affected modules with the core system to prevent compatibility issues when features call shared model operations. It reduces the risk of errors in customized or extended business workflows and adds automated checks to catch similar issues in the future.
Original PR description
*: knowledge The various public methods of the ORM can be override in other models, those overrides sometime don't implement the exact same signature as the original method in the ORM. In this work we sanitize all the overrides to ensure a better compatibility. The background objective is to make it possible to call any public method using kwarg: `search(domain=[...])`. * `search`, the first parameter was renamed from `args` to `domain` in 0e9adf7 but the overrides were not updated. * `invalidate_models` and `invalidate_recordset`, a new `flush=True` parameter was introduced in 9c3b9a4 but the overrides were not updated. This sanitization comes with a new linter that verifies that all overrides of BaseModel public methods share a compatible signature.