Wednesday, May 3, 2023
4 changes · master
Code cleanup and technical improvements
This internal refactoring makes JavaScript module dependencies explicit instead of being automatically detected. It simplifies the platform's web asset handling and should make future maintenance more reliable, with no intended change for end users.
Original PR description
This commit makes the `dependencies` param of `odoo.define` mandatory. It was optional and when omitted, a regexp read the function to find the dependencies. We can simplify it now almost all js modules have been converted to esm. The transpiler already adds the param for the es modules except if the module has an alias. task id: 3271352 enterprise PR: https://github.com/odoo/enterprise/pull/40040
The barcode parsing component was modernized so related apps use a single, consistent way to prepare barcode rules. This should make barcode-related features easier to maintain without changing day-to-day user workflows.
Original PR description
In this commit, we are converting the `BarcodeParser` to js class. As a consequence, instead of having 2 options of instantiating the parser -- via nomenclature_id or via nomenclature -- we are…
In this commit, we are converting the `BarcodeParser` to js class. As a consequence, instead of having 2 options of instantiating the parser -- via nomenclature_id or via nomenclature -- we are removing the first option. Instantiating the parser will now only require the built nomenclature object. This is possible because in all the pathways where the parser is instantiated, the web services are ready, meaning `rpc` and/or `orm` services are ready. As a result, the consumer of the parser can just build the nomenclature object itself by fetching the nomenclature details from the server. A helper static method called `fetchNomenclature` is introduced in the `BarcodeParser` class to aid in building the nomenclature object it needed. Furthermore, the methods that return the required nomenclature and rule fields are converted to static fields which can still be patched (check barcodes_gs1_nomenclature in enterprise). --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update reorganizes the barcode parsing logic in Inventory Barcode into a more modern structure. It should not change day-to-day behavior, but it makes the code easier to maintain and improve over time.
Original PR description
For more info, check: https://github.com/odoo/odoo/pull/120228
The Sign app received an internal code cleanup to align with newer JavaScript loading standards. This reduces legacy processing behind the scenes and helps keep the application easier to maintain without changing user-facing behavior.
Original PR description
This commit makes the `dependencies` param of `odoo.define` mandatory. It was optional and when omitted, a regexp read the function to find the dependencies. We can simplify it now almost all js modules have been converted to esm. The transpiler already adds the param for the es modules except if the module has an alias. task id: 3271352 community PR: https://github.com/odoo/odoo/pull/119145