Thursday, October 16, 2025
4 changes · master
Resolved issues and error corrections
Fixes several issues in the document extraction correction screen, including crashes when switching columns, missed line matches, disappearing selection boxes on images, and inaccurate selection while scrolling. This makes manual correction of extracted documents smoother and less disruptive for users.
Original PR description
**[FIX] iap_extract: fix crash when clicking on another column of x2many** When a x2many field is filled using the rectangular selection tool, a crash could occur when the component is busy filling…
**[FIX] iap_extract: fix crash when clicking on another column of x2many** When a x2many field is filled using the rectangular selection tool, a crash could occur when the component is busy filling the values for a field and the user clicks on another column. This happened because the `getNewRecordValues` function was using the current value of `this.activeBoxType` to get the value for the new record. This is incorrect as `this.activeBoxType` can change when the user clicks on another column of the x2many. --- **[FIX] iap_extract: fix line matching in manual correction component** In the logic that handles the matching of selected boxes with existing lines, it was assumed that the existing lines were sorted from top to bottom, but that wasn't guaranteed. When it's not sorted, the out-of-order existing lines couldn't be match to the selected boxes. --- **[FIX] iap_extract: fix loss of focus when clicking on image viewer** When the attachment showed by the viewer is an image and the selected field is a date, a click on the image (to start a rectangular selection or to click a box) would cause a loss of focus on the field which caused the boxes to disappear, making it unusable. This happened because the date fields are displaying a calendar popup which listens on the `pointerdown` event to hide itself when the click occurs outside of it. This causes the loss of focus of the field which hides the boxes. On top of this, we also need to prevent the propagation of the click event when it occurs on the box layers, as it also causes the loss of focus on x2many fields (there is a global click event listener that exits the edit mode when the click occurs on another element). These issues weren't noticed before as they only occur on image attachments. On PDFs, the viewer is embedded in an iframe that prevents the `pointerdown` and `click` events to be visible to the main document. --- **[FIX] iap_extract: fix rectangular selection on scrollable images** The rectangular selection needs to be adjusted when the user scrolls while selecting boxes. This was already properly handled for PDFs, but not for image attachments. Forward-Port-Of: odoo/enterprise#96975
Social app users can now post Twitter comments with images without upload errors, because the image type is correctly sent to Twitter. Comment drafts are also preserved when adding emojis or attachments, reducing accidental text loss while replying or editing comments.
Original PR description
Issue 1 ======= Steps to reproduce ----------------------- 1. Go to the Social app. 2. Create or Select any twitter post. 3. Add a comment to that post with an image. 4. Press Enter. ---> An error…
Issue 1
=======
Steps to reproduce
-----------------------
1. Go to the Social app.
2. Create or Select any twitter post.
3. Add a comment to that post with an image.
4. Press Enter.
---> An error notification will be shown.
When adding an image in a post comment to Twitter, the image was not uploaded properly because the MIME type was not set, and it defaulted to `application/octet-stream`.
This caused the following error:
```
{"errors": [{"parameters": {"$.media_type": ["'application/octet-stream'"]},
"message": "$.media_type: does not have a value in the enumeration
[video/mp4, video/webm, video/mp2t, video/quicktime, text/srt, text/vtt,
model/gltf-binary, model/vnd.usdz+zip, image/jpeg, image/gif, image/bmp,
image/png, image/webp, image/pjpeg, image/tiff]"}], "title": "Invalid Request",
"detail": "One or more parameters to your request was invalid.",
"type": "https://api.twitter.com/2/problems/invalid-request"}
```
From the above error, it's clear that Twitter only accepts specific MIME types.
This fix ensures the image has the correct MIME type so it can be uploaded without issues.
-------------------------------------------------------------------------------------------------------------------------------
Issue 2
=======
Steps to Reproduce
------------------------------
1. Select any post from social feed.
2. Add text comment or edit existing comment.
3. Upload file or add emoji.
=> The comment text is cleared/reset to its initial value.
Technical
------------------------------
With commit [1] we added `t-att-value` which sets the value of the textarea
on every re-render of the component.
After this commit
------------------------------
The initial value is only set once when component is mounted.
Removed `remove image` button for attachment while posting comments.
[1] https://github.com/odoo/enterprise/commit/ced5e88f433b7b9a8e1429259cd8bb6594b34852
Task-4845385
Forward-Port-Of: odoo/enterprise#91995Annual Statements can now include localized report variants even when those variants are made up of multiple sections. This prevents errors during setup or upgrades and keeps the correct local financial reports available automatically.
Original PR description
The "Annual Statements" report comes with additional code at create() and write() of account.report, so that any new localized variant of the Balance Sheet, Trial Balance or Profit & Loss will automatically replace its root report in the Annual Statements report's sections. The idea behind that is to "magically" replace those generic reports by the right variant when it's created. The problem with that came when you tried adding a variant to one of those reports that was itself a composite report. In such case, you got a traceback stating a composite report's sections could not have sections themselves. We indeed only support one level of hierarchy for composite reports. We solve the issue by adding all the sections of such composite variant to the Annual Statements instead of adding the variant itself. Bug originally reported by Upgrade, here https://github.com/odoo/upgrade/pull/8571 . Forward-Port-Of: odoo/enterprise#97145
Fixes an issue where returning a regular product included in a rental order could leave the sale order showing the wrong delivered quantity. This improves accuracy for deliveries, returns, and related invoicing in rental workflows.
Original PR description
**Issue**: Returning a non-rental product in a rental order does not correctly update the delivered quantity. **Steps to reproduce**: - Enable rental transfers via Settings > Rental. - Create a…
**Issue**: Returning a non-rental product in a rental order does not correctly update the delivered quantity. **Steps to reproduce**: - Enable rental transfers via Settings > Rental. - Create a rental order with (in that order!): - A rental product - A non-rental product - Confirm the rental order. - Open the related sale order. - Go to the delivery and validate it. - Return the delivery and validate the return. - Observe that the delivered quantity in the sale order is incorrect. **Cause**: The [_get_outgoing_incoming_moves](https://github.com/odoo/odoo/blob/ea6776f095d556e3429d2b847a66f78f2e866380/addons/sale_stock/models/sale_order_line.py#L200C17-L200C85) method fails to detect incoming moves when the destination location has `usage='internal'` (as in rental flows), instead of `customer` (see [_is_outgoing()](https://github.com/odoo/odoo/blob/ea6776f095d556e3429d2b847a66f78f2e866380/addons/stock/models/stock_location.py#L464)). This causes the delivery quantity not to be decremented on return. **Solution**: Relax `_is_incoming()` logic to consider moves as incoming if they come from a rental and go to an internal location. opw-4894358 Forward-Port-Of: odoo/enterprise#97067 Forward-Port-Of: odoo/enterprise#91825