Thursday, August 17, 2023
2 changes
Enhancements to existing features
This update removes redundant JavaScript strict mode declarations from several Odoo Enterprise modules. The behavior of the applications is unchanged because Odoo already applies strict mode automatically, making the codebase cleaner and easier to maintain.
Original PR description
According to the [ECMAScript 2023 Language Specification](https://tc39.es/ecma262/2023/#sec-strict-mode-code): > Module code is always strict mode code. [Odoo Modules mimic this behavior and automatically add “use strict“ at the top of the file](https://github.com/odoo/odoo/blob/9eb5ea9746cf277f09f5258dbc276162280b275b/odoo/tools/js_transpiler.py#L104), so there's no need to do it yourself. This commit removes all the useless occurrences of use strict. \*: account_online_synchronization, knowledge, sign Community: https://github.com/odoo/odoo/pull/132235
The Knowledge app now uses a newer built-in copy action for templates instead of an older clipboard library. This keeps the feature simpler to maintain while preserving the same copy-to-clipboard experience for users.
Original PR description
This commit removes the usage of ClipboardJS in the TemplateBehavior component. Instead, the CopyButton component using the native clipboard API has been used.