Thursday, December 15, 2022
4 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
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.