Friday, May 24, 2024
34 changes
Resolved issues and error corrections
This update resolves a technical issue with how the system compares different types of date and time values. The fix ensures that the base module correctly handles comparisons between naive and timezone-aware datetime objects, preventing errors that could occur during file operations and HTTP requests.
Original PR description
Fine tunning of 447ac7fb97b5 Forward-Port-Of: odoo/odoo#166483
This update fixes a bug in Stripe Express Checkout that was causing errors when customers attempted to complete payments. The issue occurred because recent code updates weren't properly adapted to use the latest payment processing method, which has now been corrected to ensure smooth checkout experiences.
Original PR description
In september 2023 7422eb643c5922bde8c70edfbe7b6f8dad53c1d9 replaced
this._rpc by `this.bindService("rpc")`.
In may 2024 58324ee59946c7bfe9970b5202cce8d4a36a69b0 was
forward-ported without adaptating it to the new way rpc is used.
This is causing report of an error in some case when using stripe
express checkout.
note: in saas-17.1 the code has to be changed again to `await rpc`.
opw-3917632This fix resolves a system crash that occurred when viewing vendor on-time delivery rates after cancelling items in a purchase order. The issue happened because the system tried to calculate delivery performance metrics for products with zero quantities, causing a calculation error. The fix ensures that cancelled or zero-quantity items are properly excluded from the on-time rate calculation.
Original PR description
### Steps to reproduce: - Create a PO: - 1 x storable product 1 - 1 x storable product 2 - Confirm the PO - Change the quantity of the PO line of product 1 to 0 (this modifies the associated delivery…
### Steps to reproduce: - Create a PO: - 1 x storable product 1 - 1 x storable product 2 - Confirm the PO - Change the quantity of the PO line of product 1 to 0 (this modifies the associated delivery accordingly) - Click on the customer to open the res.partner form - Click on the "On-Time Rate" smart button #### > Traceback: psycopg2.errors.DivisionByZero ### Cause of the issue: Clicking on that smart button will call the "_read_group" method and the following sql expression will be added to the associated query: https://github.com/odoo/odoo/blob/b4620c123b753caf2b77472a8d6c42d767471c53/addons/purchase_stock/report/vendor_delay_report.py#L57-L60 The error is therefore rasied because the SUM(qty_total) associated to product 1 was reset to 0 because of our change on the PO line. ### Fix: Since SUM(qty_total) of 0 signifies that no units of that product was not expected to be delivered for that customer. As such they should be removed from the products whose "On-Time Rate" is computed from the vendor.delay.report's. opw-3852055 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#162632
This fix ensures that when a user is linked to an employee, all existing timesheets for that employee are properly updated to show the new user assignment. Previously, timesheets created before a user was assigned to an employee would not appear in that user's timesheet view, causing confusion and missing time tracking records.
Original PR description
Steps to reproduce: ------------------- - create an employee at a time (E) - create a public holiday at some point in the future (PH) - create a user linked to the employee (U) With E < PH < U Issue: ------ The user has no timesheets linked to him/her, even though the employee was already present. As a result, the user does not see the timesheet in the timesheet grid. Solution: --------- Update the timesheet `user_id` field if an employee's user is modified. opw-3876732 Forward-Port-Of: odoo/odoo#166539 Forward-Port-Of: odoo/odoo#166189
This fix improves the payment registration process by automatically hiding the payment difference field when the difference amount exactly matches an early payment discount. This streamlines the reconciliation workflow and prevents confusion when discounts are applied, ensuring payments are properly matched without requiring manual adjustment.
Original PR description
When the Payment Difference amount equals Early Payment Discount, Don't show the payment difference field and consider full reconciliation. task-3944830 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fix resolves an issue where users in one company couldn't view their own inventory transfers when a reusable shipping package was being used by another company. The problem occurred because the system was incorrectly checking access permissions on shared packages when calculating shipping weights. Now the system properly allows companies to view their own transfer history regardless of which packages are in use elsewhere.
Original PR description
**Current behavior:** In a multi-company environment, say we have a reusable box which has been used by multiple companies. While the box actively contains some product of companyA, companyB is not…
**Current behavior:**
In a multi-company environment, say we have a reusable box which has been used by multiple companies. While the box actively contains some product of companyA, companyB is not permitted to view their own stock transfers.
**Expected behavior:**
The current status of a package should not affect the accessibility of a company's picking history.
**Steps to reproduce:**
1. Setup 2 companies, for both:
Enable packages
Enable stock warehouse locations
Enable multi-step routes -> set their in/out routes to 3-step (pick, pack, ship)
2. Create a reusable box type package, don't assign it to either company
3. In CompanyA, create a delivery using the reusable package and complete it so the package is fully emptied and ready to be reused
4. Switch to CompanyB, create a picking (any kind) using the same reusable box -don't finish the transfer- then switch back to CompanyA
5. Try to view Inventory transfers -> AccessError
**Cause of the issue:**
The delivery module adds the `_compute_shipping_weight()` method which is called on-demand when we try to open the transfers tree view. We will eventually look at packages from the picking that used the reusable package (which now 'belongs' to another company) and raise the AccessError.
**Fix:**
Use sudo() to read package records in the iteration over picking records.
We are only reading from pickings which belong to the current company, which makes the access check for the package records redundant (and as we see here problematic).
opw-3813917
Forward-Port-Of: odoo/odoo#166575
Forward-Port-Of: odoo/odoo#164677The spreadsheet component has been updated to the latest version (17.0.23) with several important fixes and improvements. This update addresses scroll issues on newer browsers, fixes clipboard functionality, improves translation handling, and enhances performance when working with merged cells. These changes ensure the spreadsheet feature works smoothly across different browsers and improves the overall user experience.
Original PR description
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/6c10fecf9 [REL] 17.0.23 https://github.com/odoo/o-spreadsheet/commit/62796cad0 [FIX] spreadsheet: fix scroll issue on chromium core 125 Task: 0 https://github.com/odoo/o-spreadsheet/commit/1bf375c14 [FIX] misc: Fix `deepEquals` behaviour Task: 3942782 https://github.com/odoo/o-spreadsheet/commit/ca535adc5 [FIX] translation: replace placeholders even if translation is not loaded Task: 0 https://github.com/odoo/o-spreadsheet/commit/a22fede71 [FIX] clipboard: wrong clipboard invalidation Task: 3901961 https://github.com/odoo/o-spreadsheet/commit/f8e04449d [PERF] merge: faster intersection with zone Task: 3924969 https://github.com/odoo/o-spreadsheet/commit/94c3bfc7a [FIX] Composer: F4 handler should not bubble out of the composer Task: 3916488
This update fixes a bug where link labels weren't being automatically saved when edited in the email marketing editor. Previously, when users changed a link's label and clicked outside the editor, the change would be lost. The fix ensures that link label changes are properly saved without interrupting the editor's tracking system.
Original PR description
Issue: ====== The label of link doesn't auto save. Steps to reproduce the issue: ============================= - Go to email marketing - Add text block - Select some text and convert it to link -…
Issue: ====== The label of link doesn't auto save. Steps to reproduce the issue: ============================= - Go to email marketing - Add text block - Select some text and convert it to link - Change the label of link from the link tools - Click on the top , outside the editable - The label sets back to it's original value Origin of the issue: ==================== `onSelectionChange` is called from the flow of `obeserverApply` which calls `deselectTable` here [1] and it deactivate the observer which clears `this.observerTimout` so `historyStep` don't get caled. Solution: ========= - We don't unactivate the observer when there are no `td` elements to process. [1]: https://github.com/odoo/odoo/blob/saas-16.3/addons/web_editor/static/src/js/editor/odoo-editor/src/OdooEditor.js#3931 --- Issue: ====== Traceback after discard mass mailing with selection Steps to reproduce the issue: ============================= - Create a new mass mailing - Choose the welcome template - Click outside the editable - Select the first paragraph in the template such that the toolbar appears - discard the record - traceback Origin of the issue: ===================== The flow goes as follows, create a new mass mailing, click outside the editable will trigger commitChanges, now we click again inside the editable, `activeSnippet` is called which will add some item to the list of snippetEditors in `SnippetsMenu`. Now clicking on discard will goes as follows, `onWillUnmount` will be called and we find the record dirty because the commited changes have already been cleared from `record.data` so we have 2 flows going in parallel , one for the commitChanges and one for the destroy which will be called in this order while running, commitChanges -> destroy -> observerUnactive -> observerFlush -> observerApply -> contentChanged -> updateCurrentSnippetEditorOverlay -> cover -> `ownerDocument.defaultView` but the docuemnt doesn't have a window anymore so its value is null thus the traceback. Solutions: ========== We add check on the default view to make sure it's not null before accessing it. task-3857016 Forward-Port-Of: odoo/odoo#166233 Forward-Port-Of: odoo/odoo#161845
This fix updates the payroll module's code generation templates to remove references to a deprecated field that was previously deleted from the system. The change ensures that when new payroll modules are created using the scaffolding tool, they will use the correct field names and avoid errors related to missing or outdated references.
Original PR description
-Sinve the removal of 'address_home_id' in https://github.com/odoo/odoo/commit/e8c48f824e078d643a3385fb910707d5525e927d we should adapt the scaffold code for payroll too. 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