Daily updates from Odoo
Wednesday, January 24, 2024
3 changes
Resolved issues and error corrections
This fix resolves a performance issue in the General Ledger report where clicking "Unfold All" would load all lines at once, causing browser slowdowns or freezes on large databases. The system now properly applies the load limit (80 lines by default) to prevent overwhelming the browser with too many elements to render at once.
Original PR description
Before this fix, when clicking "Unfold All" on the General Ledger, the "Load More Limit" assigned to the report (80 by default) was not applied, and all the lines were always loaded in the UI. This caused performance issues on large databases, where the high number of move lines do display can overload the browser, slow it down a lot, or even freeze it (due to the high number of elements needing to be rendered). This was due to the fact the General Ledger's _custom_batch_data_generator needed to filter the additional elements it loads. We cannot filter directly in SQL because we get everything in a single batched query, but we can restrict the number of elements we return after getting them from the db. OPW 3672271 Forward-Port-Of: odoo/enterprise#54664 Forward-Port-Of: odoo/enterprise#54384
This fix addresses a critical accounting discrepancy that occurred when changing a product's inventory valuation method. Previously, when a product's category was changed from manual to real-time valuation after creating inventory adjustments, the system would show mismatched values between inventory and accounting records (a 60€ difference in the example). This fix reverts a previous change that introduced this issue, ensuring accurate financial reporting.
Original PR description
This reverts commit 652edc38527b14995f017d514053a57825091813. It creates a new issue with valuation change. Steps to reproduce: -Create a new product with a cost of 10 (std, manual) -Create an inventory adjustment to set the quantity to -3 -Change the product's category to real-time -Now the valuation for this product is -30€, but the accounting part has 30€, creating a difference of 60€." A better solution to fix both issues has been tried but it was far from optimal. Since it's an edge usecase we will not support it until master 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 Forward-Port-Of: odoo/odoo#149053 Forward-Port-Of: odoo/odoo#147949
This fix resolves a crash that occurs in the email marketing editor when users save content containing text or comment nodes within card blocks. The issue affected users creating email templates with the Comparisons block (version 15.0) or Event block (version 16.0+). The fix ensures the editor properly handles all types of content nodes without crashing during the save process.
Original PR description
__Current behavior before commit:__ If `child` is not an `Element` (like a Text or a Comment node), the call to `querySelectorAll` at the following line will crash. __Description of the fix:__ End the current loop iteration if `child` is not an `Element` to avoid calling `querySelectorAll` on it. __Steps to reproduce the issue on runbot:__ In 15.0: - Open Email Marketing > Mailings > Create > Second template - Drag and drop a `Comparisons` block - Display source code - Write some text under the `<div class="card ...">` - Save --> Traceback In 16.0+: - Open Email Marketing > Mailings > New > `Start From Scratch` - Drag and drop an `Event` block - Replace one of the image (a comment node will be added [here][1]) - Save --> Traceback opw-3682469 opw-3689181 [1]: https://github.com/odoo/odoo/blob/df1b43a6de5ad15a8fee3713de7d8ec926c61f12/addons/web_editor/static/src/js/backend/convert_inline.js#L715 Forward-Port-Of: odoo/odoo#150096