Thursday, April 20, 2023
1 change · master
Code cleanup and technical improvements
This update replaces older helper-library code with standard JavaScript across several Odoo apps. It should make the codebase easier to maintain and reduce reliance on legacy utilities, with little to no visible change for users.
Original PR description
Replaced _.map(), _.flatten(), _.delay(), _.contains(), _.pluck(), _.isUndefined(), _.isEmpty(), _.isString(), _.isEqual(), _.isBoolean(), _.memoize(), _.invoke(), _.bind(), _.escape(), _.debounce(), _.str.sprintf(), _.str.repeat(), _.str.startswith(), _.str.trim(), _.str.escapeHTML(), _.str.escapeRegExp(), _.str.startsWith(), _.str.include() I had some troubles with _.escape() in legacy so I don't replace its. Description of the refactoring this PR addresses: Current behavior before PR: There are underscore.js function enumerated above used in odoo. Desired behavior after PR is merged: These functions has been replaced by native javascript prototypes/methods/functions. TaskId : 3246238 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr