Wednesday, November 19, 2025
34 changes · saas-18.4
Resolved issues and error corrections
This change corrects how website page links are saved so they stay readable and open properly across browsers. It prevents valid page URLs from turning into 404 errors when users type them manually or copy and paste them, especially for characters like Korean text.
Original PR description
Scenario: - create a page with url "가" (\N{HANGUL SYLLABLE GA}) then in safari: copy the url to open it in a new tab => a 404 error is shown in all browser: go to /가 writing it manually => a 404…
Scenario:
- create a page with url "가" (\N{HANGUL SYLLABLE GA})
then in safari: copy the url to open it in a new tab => a 404 error is shown
in all browser: go to /가 writing it manually => a 404 error is shown
Cause:
We decompose the unicode combination to remove diacritics, but never
recompose them, so we save the slug
\N{HANGUL CHOSEONG KIYEOK}\N{HANGUL JUNGSEONG A} (NFD normalization)
instead of \N{HANGUL SYLLABLE GA} (NFC normalization). Those appear
exactly the same, but when typing you would usually use the NFC one.
Comparing other software, they usually convert NFD to NFC but not the
other way.
When you use the address bar in safari, the URL is normalized with NFC
so you can't type or copy paste a NFKD path to get to it (and can only
get to it by link).
But the issue still exists for other browser where you will usually
manually type NFC and not NFKD.
This is not reproduced, but this could also have effect with search motor
that would normalize link content.
Fix:
When creating slug, normalize to NFC after the removal of diacritics.
opw-5184532
__pr note:__
the original ticket also reported about removal of diacritical mark in Vietnamese and Japanese, but this seems a more of a feature for master change since we have had "éléphant" becomes "elephant" since forever.
other services that allow unicode in path (such as wordpress, wix) seems to just keep the diacritics and normalize to NFC even if the input was in NFD.
for NFD / NFC explanation: https://docs.python.org/3/library/unicodedata.html#unicodedata.normalize
Forward-Port-Of: odoo/odoo#234416This change fixes a problem where attaching a file could fail after users interacted with elements inside modern, embedded UI components. It makes file uploads work reliably in those cases, reducing frustrating errors for testers and users.
Original PR description
Before this commit, using 'setInputFile' after interacting with an element contained in any shadow root would not work ("no input has been interacted with" error).
This commit allows the listeners responsible for detecting clicks/focus on file inputs to handle the shadow root cases properly.
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#235961Fixes an issue where the “Update extra prices” action could disappear after a form was saved, even when other variant lines still needed updating. This ensures all relevant product variant prices stay in sync, reducing the risk of incorrect prices being added to sales orders.
Original PR description
Versions -------- - 18.0+ Steps ----- 1. Have a product with multiple variants; 2. go to one of its attributes; 3. in the form, change the default extra price on multiple lines; 4. click on "Update…
Versions -------- - 18.0+ Steps ----- 1. Have a product with multiple variants; 2. go to one of its attributes; 3. in the form, change the default extra price on multiple lines; 4. click on "Update extra prices"; 5. add the updated variants to a sale order. Issue ----- Only the line on which "Update extra prices" was clicked has been updated, even though the button disappeared on all lines after clicking it. Cause ----- The `_compute_default_extra_price_changed` method only compares the `default_extra_price` of the current record to its `_origin` value. Consequently, after saving the form, it will return `False`, even though only one attribute has been updated. Solution -------- Aside from checking whether the value changed on the form, also check whether any product template attribute value has a `price_extra` that's different from the product attribute value's `default_extra_price`. This way, clicking on "Update extra prices" once won't make the other update buttons disappear. opw-5240236 Forward-Port-Of: odoo/odoo#235088
The activity list now keeps paging correctly when some activities are hidden from a user by access rules. This prevents users from getting stuck on the first page and makes sure they can browse all activities they are allowed to see.
Original PR description
**Steps to reproduce:** - Create some activities which should not be accessible to a specific user (according to the `_search` filtering of `mail.activity`) - Go to Activity Menu > View all…
**Steps to reproduce:** - Create some activities which should not be accessible to a specific user (according to the `_search` filtering of `mail.activity`) - Go to Activity Menu > View all activities as the given user - Ensure that the limit (default: 80) is lower than the total number of activities which should be returned and that the new activities are in the returned elements - On `web_search_read` some records are removed by the `_search` override - The pagination navigation buttons are disabled as the returned number of records is lower than the limit - This means that some activities are not accessible to the user (everything above the given limit) **Issue:** The issue comes from the `_search` override which checks the records available to the user. As it's done after fetching with the limit, the resulting number of records can be lower than expected and this breaks the `_format_web_search_read_results` which considers that we have all the possible records and doesn't try to fetch the total count of records. **Fix:** The main issue can't be directly fixed without modifying the way the access are checked in the `_search` override. This could be mitigated by changing the search limit, making the search as superuser, or adding specific filtering but each has its own limitations. Adding `force_search_count` should allow the user to navigate between pages anyway and see all the available activities. But the number displayed in the pagination will often be incorrect for the current and total count. (e.g. we can have 75 records but 1-80/150 is displayed out of 140 actually readable records) opw-5046389 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#233585
Users with billing access can now revoke SEPA Direct Debit mandates even if the mandate was used for an online customer payment. The linked saved payment methods are deactivated automatically, avoiding access errors for non-admin users.
Original PR description
**Issue:** As a user without "Administration / Settings" access, it is not possible to revoke SEPA Mandates that have been used to pay invoices through the customer portal. **Steps to Reproduce:** -…
**Issue:** As a user without "Administration / Settings" access, it is not possible to revoke SEPA Mandates that have been used to pay invoices through the customer portal. **Steps to Reproduce:** - Enable SEPA Direct Debit payment provider in Test Mode - Create a mandate for a customer w/ valid IBAN - Create an invoice for that customer and post it - Action > Generate a Payment Link, open this in an incognito window - Pay using SEPA Direct Debit - Call `_set_done()` on the payment.transaction - Try to revoke the mandate as a non-admin with "Accounting / Billing" -> Access Error, can't modify payment.token **Cause:** - When SEPA Mandate is revoked, we check for all associated payment tokens (saved payment methods from SEPA Direct Debit payment provider) and deactivate them. - The check in code isn't called with sudo, so it uses the current user access rights, but only admins can modify the payment tokens in any way. **Solution:** - Write to the `linked_tokens` with sudo so we can archive the tokens regardless of user access opw-5136221 Forward-Port-Of: odoo/enterprise#99592 Forward-Port-Of: odoo/enterprise#99232
This fix ensures dialogs opened from chat actions are displayed in front of the mobile chat window instead of being hidden behind it. As a result, users can see and use these dialogs immediately without having to minimize the chat window first.
Original PR description
**Purpose of this PR :** - Before this PR, dialogs triggered by message actions were rendered beneath the chat window in mobile view due to incorrect `z-index` hierarchy. This created a confusing UX where users had no visual feedback, only discovering the hidden dialog after minimizing the chat window. - This PR adjusts the `z-index` values to ensure dialogs are properly elevated above the chat window layer, restoring the expected stacking context and enabling direct interaction with modal dialogs. **Current behavior before PR:** [before_z.webm](https://github.com/user-attachments/assets/8063633f-6de7-4874-9884-963f4d223587) **Desired behavior after PR is merged:** [after_z.webm](https://github.com/user-attachments/assets/5674a953-8308-4469-907d-311a0d5a3f94) Backport of https://github.com/odoo/odoo/pull/235852 task-[5208322](https://www.odoo.com/odoo/project/1519/tasks/5208322) Forward-Port-Of: odoo/odoo#234540
This change prevents an error that could happen when a sales user quickly adds a product from the catalog and immediately removes it. If no order line has been created yet, the system now falls back to the sales price list instead of crashing, making the sales order flow more reliable.
Original PR description
Currently, an error occurs when the user immediately removes a catalog product after adding it. Steps to Reproduce ([Video](https://drive.google.com/file/d/12hOavt1zCa6hbG0EWHsIDGxfgVkxJmLW/view)): -…
Currently, an error occurs when the user immediately removes a catalog product after adding it. Steps to Reproduce ([Video](https://drive.google.com/file/d/12hOavt1zCa6hbG0EWHsIDGxfgVkxJmLW/view)): - Install the `sale_management` module. - Go to `Sales Orders` and create a new `sale order`. - In the order line, click on the `Catalog` button. - `Add` a product and then immediately `remove` it. `ValueError: Expected singleton: sale.order.line()` After [this commit], when the user clicks the Remove button immediately after clicking the Add button (within 500 ms). In this case, the system proceeds with the last request due to the useDebounced delay [1], which removes the product. However, since there is no order line yet for that product [2] and the quantity is 0, the order line [3] is not created. When it attempts to retrieve the discounted price, it raises the error [4]. This commit ensures that if no order line exists, the product's price is returned according to the sale order's pricelist. [this commit]: https://github.com/odoo/odoo/pull/233098/commits/697c559791fdf00b5602b9459bbdf21f392757d8 [1]- https://github.com/odoo/odoo/blob/ec212f38e50520edf612522717952855c8c09a80/addons/product/static/src/product_catalog/kanban_record.js#L17-L19 [2]- https://github.com/odoo/odoo/blob/ec212f38e50520edf612522717952855c8c09a80/addons/sale/models/sale_order.py#L2202 [3]- https://github.com/odoo/odoo/blob/ec212f38e50520edf612522717952855c8c09a80/addons/sale/models/sale_order.py#L2218-L2219 [4]- https://github.com/odoo/odoo/blob/ec212f38e50520edf612522717952855c8c09a80/addons/sale/models/sale_order_line.py#L1602-L1603 sentry-7019831319 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#235470
This update corrects how journal items are handled on accounting entries so the system uses the right data behind the scenes. It prevents existing lines from disappearing and ensures debit and credit amounts are computed correctly when new lines are added.
Original PR description
The [commit](https://github.com/odoo/odoo/commit/6ed1e43b3f7d53c6a45fe24a1c68f8386e6adf8e) introduced the `journal_line_ids` field on `account.move` to hide sections and notes from the Journal Items tab. However, the context for the Journal Items was not updated to reference this new field. It still referenced the previous `line_ids` field, which caused inconsistencies when the `onchange` method was triggered. Specifically, this led to: - The existing lines being lost during the `onchange` computation. - Incorrect computation of the `debit` and `credit` fields when adding new lines, as the balance computation was prevented. This commit updates the context to use `journal_line_ids` correctly, resolving the inconsistencies and restoring proper balance computation. task-5241650 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
When a customer pays for an order that includes a gift card, the system could fail with an error and not produce the gift card report. This fix restores the expected checkout flow so the report is generated and downloaded correctly after validation.
Original PR description
Current behavior: ----------------- A traceback occurs upon validation of an order that contains a giftcard. Steps to reproduce: ------------------- * Open shop * Add giftcard to the order * Go to pay the order * Select a payment method and validate > Observation: A traceback occurs, giftcard report not downloaded Why the fix: ------------ It seems like when this code was forwarded some uses this.env.services.report and some just this.report. https://github.com/odoo/odoo/commit/246515874e863b72626da11a4f5151599b0fa7b5 18.0 has already been changed to use this.env.services.reports and was not merged forward because 18.2 was already using this.env.services.reports. However we need to fix the version pat 18.2 using this.report. opw-5261898 Forward-Port-Of: odoo/odoo#236215
This update fixes an issue where the system could stop too early when several accounting entries were unbalanced. As a result, users now get a complete error message showing all affected entries, making it easier to identify and correct problems faster.
Original PR description
The commit 3467b5971423f70581c6be2caf7f8a8d86ee70f1 intended to improve the error message in `_check_balanced()` by tailoring it based on the number of affected entries. However, in the case of multiple affected entries, the error was raised after the first iteration, preventing the full list of unbalanced entries from being collected and displayed to the user. no-task --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#236212
This fix removes an error that could block refusing a time-off allocation when a leave already existed in the same period. It ensures the allocation is assessed correctly, so users are not asked to delete the wrong leave before they can cancel the allocation.
Original PR description
## Issue: When you have an allocation and set a leave for that period, if you add a new allocation for that period and you validate it, it will be impossible to Refuse this allocation later A…
## Issue: When you have an allocation and set a leave for that period, if you add a new allocation for that period and you validate it, it will be impossible to Refuse this allocation later A UserError was raised asking to remove the leave even if it should be linked to the first allocation created ## Cause: The `action_refuse()` method for `hr.leave.allocation` uses the `virtual_leaves_taken` value inside the `_get_consumed_leaves()` function's result That parameter is calculated for the allocation as far as it state is `validate`, for all the leaves in that time interval, including previously created leaves The leaves will be allocated to the last allocation created, so the last one can't be removed later As a result, the allocation is considered as already used by these pre-existing leaves, even if the leave can still be modified to return to the state prior to the allocation's validation ## Steps to reproduce: - Create an initial Allocation (that should end after the next created Allocation) - Create a Leave from 22/12/2025 to 31/12/2025 - Create an Allocation including the leave period (01/12/2025 to 31/12/2025) - Validate, then Refuse opw-4900686 Forward-Port-Of: odoo/odoo#235711 Forward-Port-Of: odoo/odoo#222171
This change restores the expected behavior of the VoIP keypad backspace key when highlighted text starts at the beginning of the field. It prevents a regression where deleting selected characters could stop working, while still keeping the input safe when the cursor is in sensitive positions.
Original PR description
This commit fixes a regression introduced in commit [1] prevented deleting when a selection began at index 0; extend the guard so the numpad (keypad) backspace still removes the highlighted characters while keeping the cursor-safety logic. [1]: https://github.com/odoo/enterprise/commit/73b01fa5e1f56d4ab71d67760b15942fb2fa0e31 task-5217676 Forward-Port-Of: odoo/enterprise#99655 Forward-Port-Of: odoo/enterprise#99358
This fix ensures that when an invoice is converted into a credit note, or the other way around, the amounts keep the correct debit or credit placement when storno is enabled. This avoids incorrect negative values and helps accounting documents stay accurate during these conversions.
Original PR description
This commit fixes the amounts of move lines when converting from invoice to credit note and vice versa when storno is enabled. Previously, when converting from invoice/credit note, the amounts remained negative and switches from debit/credit. The quantities should remain in same debit/credit position and only change sign as I switch from invoice/credit note. task-5226311 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#234027
This update corrects how the Point of Sale cash move popup creates its order so it includes the right configuration reference. As a result, receipt printing is less likely to fail or behave unexpectedly after cash movements.
Original PR description
Before this commit, the cash move popup created an order that missing the config_id field, leading to potential issues in receipt printing. opw-5251257 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#236203
This fix restores the ability for customers to choose drop-off locations when a Sendcloud delivery service uses locker-based last-mile options. It ensures the map selection appears for both locker and service-point variants, so delivery methods behave as expected.
Original PR description
Steps to reproduce ----- - Create a Sendcloud delivery method - Select a delivery service with "Locker or service point" as "Last mile" (eg "bpost @ bpack") > "Use Sendcloud locations" is set to…
Steps to reproduce ----- - Create a Sendcloud delivery method - Select a delivery service with "Locker or service point" as "Last mile" (eg "bpost @ bpack") > "Use Sendcloud locations" is set to false Cause ----- There is a problem with the values retrieved from the Sendcloud API call, more specifically the `available_functionalities` > `last_mile` value. The Sendcloud API (of both previous and current beta version) specifies the possible values to only be the following - `home_delivery` - `mailbox` - `pobox` - `service_point` - null https://api.sendcloud.dev/docs/sendcloud-public-api/shipping-options/operations/create-a-shipping-option https://api.sendcloud.dev/docs/sendcloud-public-api/branches/v2/shipping-products/operations/list-shipping-products However, it seems like they have added some new undocumented values `locker` and `locker_or_service_point`. To detect whether to use drop-off locations, we do https://github.com/odoo/enterprise/blob/5b64c63301bc814c7c9d99146af6a86d37563762/website_delivery_sendcloud/models/delivery_sendcloud.py#L51-L53 Where we compare the retrieved value with the string 'Service point' https://github.com/odoo/enterprise/blob/5b64c63301bc814c7c9d99146af6a86d37563762/website_delivery_sendcloud/models/delivery_sendcloud.py#L13 In our "Locker or service point" case, this does not work because the `in` operator makes a case sensitive comparison. Solution ----- Functionally, both lockers and service points work the same. The user should be prompted a map on which they choose where the delivery should be dropped off. So we can add `Locker` and `Locker or service point` as accepted values and enable the use of sendcloud locations for both. ----- Ticket: opw-5217796 Forward-Port-Of: odoo/enterprise#98875
This change fixes several WebSocket timeout issues so connections are handled more consistently. If the other side does not answer a close request in time, the connection is now properly terminated instead of lingering unexpectedly, improving reliability for users of the chat/bus system.
Original PR description
This PR fixes several issues with WebSocket timeouts: - Waiting for more than one response was not handled properly, resulting in missed timeouts. - The closing handshake did not strictly follow the RFC when initiated on the server side (it closed without waiting for the other peer). - Close timeouts were not enforced (the connection was not terminated when the other peer did not respond to the close frame). Forward-Port-Of: odoo/odoo#236016 Forward-Port-Of: odoo/odoo#234881
When a message template is duplicated, its attachments are now copied too instead of being shared between templates. This prevents accidental cross-updates and reduces the risk of attachment access issues when different rules apply to different templates. The copy behavior was also adjusted so user-provided values are preserved correctly.
Original PR description
Copying tmeplates should copy their attachments. Otherwise they are
shared, which means
* wrong res_id: ACL check on attachments relies on a specific
template, as res_model / res_id is used in access check;
* propagated changes: changing one attachment changes it on all
duplicated templates;
If custom rules on templates are implemented, this means notably
ACL issues when accessing attachments. It is not the case in standard
Odoo 17 as everyone can read templates but this notably changes in
future versions of Odoo.
While being there, also fix 'default' usage in copy override. User
given values should not be erased by default computation of name.
Task-5128863
Forward-Port-Of: odoo/odoo#234565
Forward-Port-Of: odoo/odoo#232877The import panel now recognizes CSV files whether their extension is written as .csv or .CSV. This avoids confusing differences in the import screen and makes file uploads behave more consistently for users.
Original PR description
Before this fix, the import side panel displayed the formatting options only when the uploaded file had a lowercase .csv extension. Files with an uppercase .CSV extension could still be imported but did not show the format selection section, leading to inconsistent behavior. This commit updates the condition to perform a case-insensitive comparison on the file extension. Task-5145031 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#236020 Forward-Port-Of: odoo/odoo#235061
This fix ensures that salary offer links are created with a valid access token even when an offer is added manually from the list view. As a result, recipients can open the offer link reliably, including in private or incognito browsing sessions.
Original PR description
- Go to Recruitment > Applications > All Applications. - Open an applicant form and click "Generate Offer". - Repeat a few times so that the "Offers" smart button shows a list view. - From the list…
- Go to Recruitment > Applications > All Applications. - Open an applicant form and click "Generate Offer". - Repeat a few times so that the "Offers" smart button shows a list view. - From the list view, click "New" to create an offer. - Compare both flows: * With "Generate Offer" button: the generated offer link has a valid token and works even in an incognito window. * With "New" button: the generated offer link has `token=False`, which leads to an invalid link. #### Issue In the first scenario, `action_generate_offer()` generates an `access_token` for the offer's link in `hr.applicant`. In the second scenario, no token was generated in `hr.contract.salary.offer`, so offers created via the "New" button end up with `access_token=False` in their links. #### Fix Add a compute to `access_token` in `hr.contract.salary.offer` to generate a token if there is no employee or if the employee on the offer has no linked user. #### Additional - Mark the field `access_token` as readonly. task-5051394 Forward-Port-Of: odoo/enterprise#93561
This change removes a Windows IoT printing setting that was causing PDF labels to print with the wrong alignment on Zebra printers. It restores the expected label position and helps prevent misprinted labels in warehouse and shipping workflows.
Original PR description
Adding the argument "-dPDFFitPage" in the printer driver for the windows IoT broke the alignment when printing PDF labels on Zebra printers. Issue introduced in #232866 opw-5220275 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#236041
Fixed an issue where deleted mail records were not consistently reflected in the interface. This makes the record status update automatically so users see accurate information without needing to refresh.
Original PR description
The `exists` function of mail records is not reactive. Indeed, it uses a symbol, stored on the proxy internal field which is not observed. This commit fixes the issue by storing it on the record and ensuring we write on the full proxy when the record is deleted. 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#236346 Forward-Port-Of: odoo/odoo#236042
This change makes the small dots on hatched calendar events easier to see, especially for unpublished items. It also moves the styling to the correct view layer so it works consistently in modules like Planning, even when Calendar is not installed.
Original PR description
When pills are hatched (unpublished event) in the calendar view (eg. planning) the `o_event_dot` is barely visible. Additionally the styling to display the dot as outlined on hatched event is wrongly scoped in `/calendar` with the calendar status styling. It should be in the view instead. Otherwise, for the planning module which doesn't depend on calendar, the styling is not applied if calendar is not installed, rendering the filled dot. task-3916768 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#235978 Forward-Port-Of: odoo/odoo#235286
When users scan a different serial number for a kit component, the system now updates the existing reserved line instead of creating a duplicate one. This prevents incorrect backorder prompts and makes delivery processing smoother and more accurate.
Original PR description
### Issue: Scanning an unreserved lot of a kit component creates a new barcode line rather than updating the value of the initially reserved lot. As a result, the backorder porcess considers that…
### Issue:
Scanning an unreserved lot of a kit component creates a new barcode line rather than updating the value of the initially reserved lot. As a result, the backorder porcess considers that every unscanned yet initially reserved quantity is to backorder.
### Steps to reproduce:
- Create a kit product with a kit BOM:
- 1 x COMP (tracked by SN)
- Add two Serial numbers SN001 and SN002 in stock for the COMP product
- Create and confirm a delivery order for 1 unit of oyur kit product
- Go the barcode app to process your delivery
- Scan SN002
> A new line is created instead of updating the initial reservation
- Validate the delivery
#### > A backorder dialog opens proposing to update the unscanned reservation
### Cause of the issue:
Scanning a lot will first try to find a line to update, however, currently a line will only be found if the scanned lot has been reserved or if no particular lot has been reserved:
https://github.com/odoo/enterprise/blob/a1113eebf634302f7ceece612e7ee068c99781e4/stock_barcode/static/src/models/barcode_model.js#L1659-L1661 https://github.com/odoo/enterprise/blob/a1113eebf634302f7ceece612e7ee068c99781e4/stock_barcode/static/src/models/barcode_model.js#L743-L746 In particular, since no line is considered as valid, a new line is created. And, since this new line does not refer to any `move_id` while the existing one does, the move with the initial reservation will be backordered considering none of its demand was fulfilled: https://github.com/odoo/enterprise/blob/a1113eebf634302f7ceece612e7ee068c99781e4/stock_barcode/static/src/models/barcode_picking_model.js#L904-L921
### Fix:
In order to loosen the condition of lot override on barcode lines we add a check on the package and the location of the line in order to avoid use cases where the initial move line already contains info's that are proper to the initial lot.
opw-5100026
Forward-Port-Of: odoo/enterprise#99739
Forward-Port-Of: odoo/enterprise#98589This change prevents an error that could appear when reopening a point of sale register with the default Takeout preset selected. It ensures the system only creates a new order at the correct stage, so users can reopen registers without the traceback interrupting their work.
Original PR description
STEPS TO REPRODUCE: -------- 1. Set default preset as Takeout in configuration. 2. Open a register than Close the register. 3. Reopen the register. 4. Observe traceback. CAUSE: ----------------- LoginScreen created an order before the ProductScreen was loaded causing preset logic to access undefined order data. FIX: ----------------------------- Create a new order only when the selected screen is ProductScreen: Task-5237713
This fix makes the Replenishment list filters return accurate results when searching for items with a zero To Order value. It prevents records with a non-zero order quantity from being incorrectly included, which improves the reliability of inventory planning and filtering.
Original PR description
**Issue** In replenishment, filtering with `to_order = 0` does not correctly exclude records where `to_order != 0`. **Steps to reproduce** 1. Go to Inventory > Operations > Procurement >…
**Issue** In replenishment, filtering with `to_order = 0` does not correctly exclude records where `to_order != 0`. **Steps to reproduce** 1. Go to Inventory > Operations > Procurement > Replenishment 2. Create a replenishment with a forecast quantity smaller than the min and max quantity (without editing the To Order) 3. Apply a custom filter `to_order = 0` → Records with non-zero `to_order` are incorrectly included **Cause** `qty_to_order` was split into `qty_to_order_computed` and `qty_to_order_manual` in [this commit](https://github.com/odoo/odoo/commit/156bed3f430d706e13822bbd95d91c8dfd3ea42d#diff-0eb18a8d7773b5f99b402392188594178c3ba2004e4bcab26dbc84b1c8d7256a). In the [`_search_qty_to_order` method](https://github.com/odoo/odoo/blob/322c6d0468bf79e9d29e1375c49aa13d4a7b7a67/addons/stock/models/stock_orderpoint.py#L338), all records with `qty_to_order_manual = 0` are included. Since `qty_to_order_manual` defaults to 0 when untouched by the user, this causes incorrect results. Additionally, [`to_order`](https://github.com/odoo/odoo/blob/322c6d0468bf79e9d29e1375c49aa13d4a7b7a67/addons/stock/models/stock_orderpoint.py#L323) displays `qty_to_order_computed` if `qty_to_order_manual = 0`, creating inconsistency. **Solution** Fix the inconsistency by ignoring `qty_to_order_manual` when searching for zero `to_order` values. opw-5150643 Forward-Port-Of: odoo/odoo#234908