Daily updates from Odoo
Monday, September 1, 2025
54 changes
17 changes
Resolved issues and error corrections
India EDI, e-waybill, and IRN retry actions now leave a log entry on the related document. This helps businesses see which user retried a submission, which is important because too many GST requests can temporarily block access for 24 hours.
Original PR description
Manual fw-port of https://github.com/odoo/odoo/pull/223957, https://github.com/odoo/odoo/pull/223886, https://github.com/odoo/odoo/pull/207184 *=edi,ewaybill,ewaybill_irn Following the implementation of [Black list request by GST](odoo/iap-apps#1039) the users are blocked for 24 hours on generating too many request. When processing through EDI there is no log when clicked on the retry button, Which is more essentially needed now to know by which user the EDI was retried and we logged the same on the move --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#224169
Hungarian e-invoicing now correctly reports credit notes as modifications when the original invoice had any payment before reversal. This prevents incorrect STORNO submissions to NAV and helps keep tax reporting accurate.
Original PR description
Before this PR: - Previously, a credit note was marked as STORNO if the base invoice's residual amount was zero, regardless of whether any payments had been made. This led to incorrect STORNO reports being sent to NAV in cases where the invoice had been partially or fully paid before reversal. After this PR: - If any payment was made, the credit note is marked as MODIFY instead of STORNO. Example: - Case 1: No payments before reversal Invoice: 1000 Credit Note 1: -100 Credit Note 2: -900 => Credit Note 1 should be sent as a Modification, Credit Note 2 as STORNO. - Case 2: Payments before reversal Invoice: 1000 Payment: -100 Credit Note: -900 => The Credit Note should be sent as a Modification. task-4818762 Forward-Port-Of: odoo/odoo#224861 Forward-Port-Of: odoo/odoo#211831
This fix prevents order tracking numbers from appearing in every Point of Sale setup, limiting them to restaurant or preparation-display flows where they are useful. It also keeps clear prefixes for kiosk and self-order receipts, helping staff distinguish order sources and avoiding confusion.
Original PR description
- Fix issue where `tracking_number` was displayed for all config. We want to display this number only for `pos_restaurant` configurations. We also want to display it for POS config which have a preparation display configured (see enterprise linked PR). - Ensure Kiosk & Self orders correctly contains a prefix (S or K) inside their `tracking_number` to avoid regression. task-id: 4922308 enterprise PR: https://github.com/odoo/enterprise/pull/91833 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#224492 Forward-Port-Of: odoo/odoo#222094
Unsupported IoT devices are now checked repeatedly while they remain connected, instead of requiring users to unplug and reconnect them. This makes device setup and recovery smoother when a device becomes supported after initial detection.
Original PR description
Before this commit, in order for an unsupported device to become supported, it would need to be disconnected so that it was removed from the detected devices, and then reconnected at which point the supported method will be checked again. After this commit, the supported method is run on every iteration of the interface for any existing unsupported devices. This way if they can become supported without disconnecting them entirely. task-5055685 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Fixes an issue where product capacity lines could seem to disappear immediately after saving a new storage category, even though they returned after reloading. This keeps the saved information visible and consistent for users, and includes a CRM test correction so the fix can be safely validated.
Original PR description
_Note: The main fix of this PR (the orm one) raised an error in CRM, a test was working thanks to some cache pollution (cf description of crm commit). The below text only shows the description of the…
_Note: The main fix of this PR (the orm one) raised an error in CRM, a test was working thanks to some cache pollution (cf description of crm commit). The below text only shows the description of the orm commit._ The use of a computed inverse o2m field does not correctly work when creating the record of the main model. To reproduce: (Need stock) 1. In Settings, enable "Storage Locations" 2. Create a new Storage Category - Make sure to have one Capacity by Product Error: on save, the Capacity by Product disappears. Yet, if the user reloads the page, the capacity will be back. First, few details about the Storage Category model. We are dealing with the field `product_capacity_ids`, a computed inverse o2m field: https://github.com/odoo/odoo/blob/e5e3a3f7bf3770fe2bba11b501870d4fb7ef2e51/addons/stock/models/stock_storage_category.py#L15 Its content is a subset of the `capacity_ids` field: https://github.com/odoo/odoo/blob/e5e3a3f7bf3770fe2bba11b501870d4fb7ef2e51/addons/stock/models/stock_storage_category.py#L14 So, its compute simply get a subset of `capacity_ids` and its inverse will write some values on `capacity_ids`: https://github.com/odoo/odoo/blob/e5e3a3f7bf3770fe2bba11b501870d4fb7ef2e51/addons/stock/models/stock_storage_category.py#L39-L41 Now, back to the issue. When we `web_save` the category, at some point in the create process, it leads here https://github.com/odoo/odoo/blob/bdb24afbf85f4d58722db493f725dd95c5780ff7/odoo/orm/models.py#L4389-L4408 Where we want to resolve all the pending inverse. To do so, we first update the cache (L4401) and we then call the inverse methods (L4408). In the above case, it means that we first update the value of `product_capacity_ids` in the cache. The value we are passing is a `Command.CREATE` value. In that case, when converting the value for the cache, we actually create a `NewId` record: https://github.com/odoo/odoo/blob/ae55f5b494005a1e7566c819592f7dd64623c3fd/odoo/orm/fields_relational.py#L513-L516 When running the inverse, we write this record on `capacity_ids` (cf the code quoted above). This will lead to the actual creation of the capacity record. But... Here is where the problems begin: we have updated the cache with a `NewId` value and define `capacity_ids` with an existing record. However, we don't update anything in the cache. As a result, at the end of `web_save`, we do a `web_read`. It will lead here: https://github.com/odoo/odoo/blob/bdb24afbf85f4d58722db493f725dd95c5780ff7/odoo/orm/models.py#L3427 Where we convert the value of `product_capacity_ids`. Since available in the cache, we will use the `NewId` value and convert it, i.e.: we will return the `.ids` of the recordset: https://github.com/odoo/odoo/blob/ae55f5b494005a1e7566c819592f7dd64623c3fd/odoo/orm/fields_relational.py#L569-L570 Which means... The actual IDs, excluding the `NewId` one. This explains why the line suddenly disappears on save. Then, reloading the page will trigger the compute based on `capacity_ids`. This field is correctly defined, so will do the compute -> the line will appear. Since we update the cache to compute the inverse, we should then clear that cache to ensure proper consistency with what happened during the inverse. OPW-4915087 Forward-Port-Of: odoo/odoo#222763
This fix prevents invoices from crashing during Veri*Factu sending when a Spanish company does not have a VAT number set. Users will see a more reliable invoice sending flow instead of an unexpected system error.
Original PR description
The system will crash when user tries to send the invoice.
**Steps to produce:-**
- Install the **Accounting** module and switch to the **ES company** (with demo data).
- Remove the **VAT** from the ES company and save the changes.
- Go to **Accounting** and create any invoice.
- Click on **Send**.
- In the send wizard, ensure that **Veri\*Factu** is checked at the top, then click the **Send** button.
**Error:-**
`KeyError: 'NIF'`
**Cause:-**
- When the company VAT is not set,` _l10n_es_edi_verifactu_get_values()` does not provide an 'NIF' key.
- Accessing 'NIF' directly in such cases raises a `KeyError` when sending an invoice.
**Solution:-**
- In this PR, `.get('NIF')` instead of direct key access to safely handle missing values.
**sentry-6829500308**
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prIoT Boxes now allow more time and retry when downloading certificates from Odoo.com. This reduces setup or renewal failures caused by slow networks, high service load, or certificate provider delays.
Original PR description
Certificate download on the IoT Box from Odoo.com can take more time than the currently set 10 seconds. This can be due to the network, to odoo.com's load, or to let's encrypt. We aligned the timeout to let's encrypt library's timeout, and added a retry, as the iot box should always get a certificate. Task: 4948448
This fixes supplier bills created from foreign-currency purchase orders when tax is already included in the line price. The bill line balances now deduct the included tax before currency conversion, preventing incorrect accounting amounts.
Original PR description
**Steps to reproduce** - Setup a foreign currency [CUR] with rate - Create a purchase order - Add [CUR] as currency - Add an order line with price included tax - Confirm and receive - Create Bill - Check generated lines values **Issue** Balance of the move lines will be off, as if it was computed using the wrong conversion rate **Investigation** It occurs because when preparing the move values, the system add the balance calculated from the product price. This does not work for price included taxes, as the balance of the invoice line need to have the tax amount deducted opw-4954649 Forward-Port-Of: odoo/odoo#224705 Forward-Port-Of: odoo/odoo#221952
Public holidays spanning multiple days now appear as blocked for every day in calendar views when flexible working schedules are used. This gives employees and managers an accurate view of unavailable days and avoids confusion when planning time off.
Original PR description
**Issue**: Multi-day public holidays only display as single days in calendar views when using flexible working schedules. A 3-day holiday appears as only 1 day blocked, though time-off requests are still correctly prevented for all 3 days. **Cause:** In `_get_unusual_days()`, the implementation for flexible schedules only captures the start date of each leave interval https://github.com/odoo/odoo/blob/132938929d46c8248a9e3a7e2972174ae38eacfa/addons/resource/models/resource_calendar.py#L683-L685 **Steps to reproduce:** 1. Configure a flexible working schedule for an employee or company 2. Go to Time Off > Public Holidays 3. Create a 3 day public holiday 4. Check Time Off calendar view Only 1 day appears blocked instead of all 3 days opw-4997757 Forward-Port-Of: odoo/odoo#224845 Forward-Port-Of: odoo/odoo#224668
Fixes an issue where users could not continue typing after choosing a font size in the HTML editor, even though their text selection still appeared active. The editor now correctly returns focus after the font size dropdown is used, reducing confusion and avoiding interrupted editing workflows.
Original PR description
### Steps to reproduce: - Go to the To-Do app and type something in the editor. - Select the typed text. - Click on the Font Size Input and choose a value from the dropdown (e.g.,80). - Try typing…
### Steps to reproduce: - Go to the To-Do app and type something in the editor. - Select the typed text. - Click on the Font Size Input and choose a value from the dropdown (e.g.,80). - Try typing again in the editable area. - Selection is still visible, the focus is no longer in the editable area. ### Description of the issue/feature this PR addresses: - `focusEditable()` skipped restoring focus if the selection was inside the editor, even when the editor itself wasn’t focused. - When the font size input (inside an iframe) is focused, editable loses focus. - Selecting a value from the dropdown blurs the iframe input, but focus is not returned to the editable area. - As a result, the selection is still visible but the user cannot type. ### Desired behavior after PR is merged: - Does nothing if the editor or its descendants have focus. - Focuses the editor if needed. - Restores selection only when it's outside the editor. - When the iframe input is blurred, focus is returned to the editable area. task-4932364 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#222360 Forward-Port-Of: odoo/odoo#218774
Razorpay payments now check whether the saved access token has expired when a customer pays. If needed, the system automatically generates a new token, reducing failed payments caused by expired authorization.
Original PR description
Version: - saas-18.2 Issue: - The refresh token method was removed in PR https://github.com/odoo/odoo/pull/188774. Because of this, the Razorpay access token expiry was no longer being checked. Fix: - When a user makes a payment, the system now checks if the Razorpay access token has expired. If it has, a new token will be generated automatically. opw-4953953 Forward-Port-Of: odoo/odoo#224233
Subscription orders that include one-time products now correctly create deliveries and generate invoices. This ensures one-off items added to subscriptions are fulfilled and billed as expected, avoiding missed shipments and manual follow-up.
Original PR description
**Version:** - saas-18.4 **Steps to reproduce:** - Install the sale_subscription_stock module. - Create a one-time product and save it. - Create a subscription order, add the one-time product to the order line, and confirm the order. **Before this commit:** - When a one-time product was added to a subscription order, no delivery was created. **After this commit:** - A delivery is properly created, and an invoice is automatically generated when the order includes a one-time product. **Solution:** Add a condition to check for one-time products in the order lines and create a delivery if found. **Impact:** - A delivery is now created when a one-time product is in the sale order. Also, an invoice is automatically generated for it. task-4938898
The Kenya OSCU e-invoicing checks now ignore cancelled or draft credit notes when validating invoice reversals. This prevents incorrect blocking errors when businesses issue a new credit note after an earlier one was cancelled or reset.
Original PR description
[FIX] l10_ke_edi_edi_oscu: ensure quantity and monetary values checks are performed on reconciled reversals only. Fixes a behavior where the checks performed on the credit notes related to their quantities and monetary values include non reconciled credit notes. Steps to reproduce: 1 - activate `l10n_ke` on some company. 2 - Create an invoice. 3 - Create a partial or full credit note ( this one will be reconciled with the invoice automatically ) 4 - cancel the credit note or reset it to draft. 5 - create another credit note where the quantities and/or monetary values exceed that of the invoice if summed up with the cancelled credit note. Following the steps will result in an error message saying that the monetary value or quantities on the credit notes exceed that of the invoice. The correct behavior is to simply not count any credit note that isn't explicitly reconciled with the invoice. opw-4779976 Forward-Port-Of: odoo/enterprise#92319
Users who belong to a secondary company can now create multi-company tax returns without hitting an access error. This ensures tax reporting works smoothly for companies operating across multiple entities.
Original PR description
When a tax return is created with multi companies and a user member of one of the secondary companies, he would get an access error due to missing sudo() task-5039551
Italian POS orders now send only positive payment amounts to the fiscal printer, avoiding unsupported negative change payments. This helps ensure receipts are processed correctly and sales are reported to the authorities as required.
Original PR description
Before this commit, specifying the payment method used to give back the change in a POS order would lead to the fiscal printer receiving a negative payment as input, which is not supported, thus leading to the order not being treated by the fiscal printer (so not reported to the government). Only the payments with is_change=true where filtered out. I am now adding a filter to only keep the positive payments in the receipt, as the fiscal printer is computing the change itself. opw-4931671 Forward-Port-Of: odoo/enterprise#91794
Fixes an issue in Mexican sales where a sale order could show zero invoiced quantity after a related electronic invoice was cancelled and replaced. The system now refreshes the invoiced quantity when the electronic invoice status changes, keeping sales records accurate for users.
Original PR description
How to reproduce the issue: In l10n_mx: 1. Create a sale order. 2. Create an invoice from the SO, with yesterday’s date, and send it to the CFDI. 3. Lock the period at yesterday’s date. 4. Request the invoice cancellation with the “01” method. This creates a new invoice — confirm it. 5. Create a credit note for the original invoice. 6. Retry sending the cancel request to the CFDI; the CFDI state is now cancelled for the original invoice. On the original SO, the quantity invoiced is 0 despite the CFDI state of the original invoice being cancelled. This commit forces a recompute of the quantity invoiced when the CFDI state changes. Since _compute_qty_invoiced uses _get_invoice_lines, which filters out invoices in sent state, only lines from invoices in cancelled state will be taken into account. opw-4910139 Forward-Port-Of: odoo/enterprise#93480 Forward-Port-Of: odoo/enterprise#91924
Rental orders paid through Point of Sale now keep the delivered quantity accurate when items are returned. This prevents returned rental products from being counted as delivered again, improving order accuracy and avoiding confusion in rental operations.
Original PR description
**Issue:** Before this commit, the qty_delivered was wrong when using the Return button when a Picking was made in PoS **Cause:** The `_compute_qty_delivered` method in `pos_sale` adds `pos_line.qty`…
**Issue:** Before this commit, the qty_delivered was wrong when using the Return button when a Picking was made in PoS **Cause:** The `_compute_qty_delivered` method in `pos_sale` adds `pos_line.qty` to the related `sale_line` each time it runs When there is no PoS order, the method add 0 to the line, so the expected behavior work But when you have a PoS Picking, a quantity was added to `qty_delivered` each time the `rental.order.wizard` is used The issue also occured earlier when the `flush_all()` is called in `_process_order()` **Fix:** There is already a `_compute_qty_delivered` method in `pos_sale_stock_renting` that override the `qty_delivered` But it's restricted by `_are_rental_pickings_enabled()` That's not necessary because we don't use any `stock.picking` in the `_compute_qty_delivered` function, only `stock.move` so we removed that verification To make the code working, we also need to extend the _get_outgoing_incoming_moves() results Because there were also block by a `_are_rental_pickings_enabled()` condition even if there is only moves here We need all the moves to calculate `qty_delivered` properly **Steps to reproduce:** - Create a New Product "Rental PoS" that Can be Rented - Create and confirm a New Rental Order, with any customer and your product - Open a PoS Session - Click on Quotation/Order - Choose the last Order and Settle the order - Click on Yes (to confirm import to PoS) - Click on Payment, select Cash and Pay - Go in the Backend, and to your RO - Click Return and Validate - Before the fix, the Delivered should be 2.0 opw-4877019 Forward-Port-Of: odoo/enterprise#93358 Forward-Port-Of: odoo/enterprise#90510
12 changes
Resolved issues and error corrections
This fixes an issue where selecting an afternoon time in a 12-hour clock format could save it as a morning time instead. Users working with AM/PM date and time fields can now rely on the selected time being recorded accurately.
Original PR description
Be in (or configure) a language with the 12 hour time format (i.e. such that times are displayed with am/pm). In a datetime field, open the datepicker and set the time in the afternoon (e.g. 6pm). Before this commit, the value that was actually set in the input was in the morning (6am in this case). The cause of the issue came from the date parsing. As we do not display the seconds in the input, the value was "06:00 pm", which couldn't be parsed properly. This commit fixes the issue by adding a step in parseDateTime, to try to parse with the short time format. opw~4996133 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
The POS now correctly calculates additional down payments on the same sales order by subtracting amounts already paid. This prevents customers from being charged the full down payment percentage again and keeps payment requests accurate.
Original PR description
- Create a SO of 450 with 15% tax for a total of 517.50 - Create a first down payment from the POS of 10% => you pay 51.75 - Create a second down payment from the POS of 10% => we ask you to pay 51.75 again => We should ask him to pay 10% of 517.50 - 51.75 instead --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The update adds a clear log entry when a user retries India EDI, e-waybill, or e-waybill IRN processing. This helps businesses identify who retried a government tax request, which is important because too many requests can temporarily block access for 24 hours.
Original PR description
Manual fw-port of https://github.com/odoo/odoo/pull/223957, https://github.com/odoo/odoo/pull/223886, https://github.com/odoo/odoo/pull/207184 *=edi,ewaybill,ewaybill_irn Following the implementation of [Black list request by GST](odoo/iap-apps#1039) the users are blocked for 24 hours on generating too many request. When processing through EDI there is no log when clicked on the retry button, Which is more essentially needed now to know by which user the EDI was retried and we logged the same on the move --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#224169
Hungarian electronic invoicing now classifies credit notes more accurately when invoices have already received payments. This helps ensure reports sent to NAV use the correct cancellation or modification status, reducing compliance errors.
Original PR description
Before this PR: - Previously, a credit note was marked as STORNO if the base invoice's residual amount was zero, regardless of whether any payments had been made. This led to incorrect STORNO reports being sent to NAV in cases where the invoice had been partially or fully paid before reversal. After this PR: - If any payment was made, the credit note is marked as MODIFY instead of STORNO. Example: - Case 1: No payments before reversal Invoice: 1000 Credit Note 1: -100 Credit Note 2: -900 => Credit Note 1 should be sent as a Modification, Credit Note 2 as STORNO. - Case 2: Payments before reversal Invoice: 1000 Payment: -100 Credit Note: -900 => The Credit Note should be sent as a Modification. task-4818762 Forward-Port-Of: odoo/odoo#224861 Forward-Port-Of: odoo/odoo#211831
Point of Sale now calculates combo child item prices using the currency's rounding precision instead of product price precision. This prevents small rounding discrepancies, ensuring POS order totals match expected sale totals such as 31.00 instead of 31.01.
Original PR description
Currently, when you have a difference in precision between currency and product price, there can be a discrepency in the computation of the line prices, leading to a difference in the price total…
Currently, when you have a difference in precision between currency and product price, there can be a discrepency in the computation of the line prices, leading to a difference in the price total between the sale and pos app. Steps to reproduce: ------------------- * Modify the product precision to have 4 digits * Modify the burger menu combo product * Sale price 26.5 * Burger choice: Cheese burger, remove taxes, change price to 10 * Drinks choice: Coca cola, remove taxes, change price to 10, extra price set to 4.5 * Add another combo choice with 1 product only, no tax, price 10 * Open pos session * Add the combo, select the product that were modified > Total is 31.01 when it should be 31.00 Why the fix: ------------ Point of sale was using the decimal precision set on the product price to compute the price unit of the child lines. We can notice that the sale app was using the currency precision. We will use the same approach as sales. The decision was driven by the fact that 1) both scenarios could make sense, 2) total should be as set, 3) child line prices are not as important as the total and don't have a big influence. opw-4769227 Forward-Port-Of: odoo/odoo#220352
Saving a form can now correctly guide users to the intended follow-up action when a validation warning includes a redirect and extra context. This helps users resolve save-blocking issues through the right screen instead of being left with a broken or incomplete error flow.
Original PR description
Have a web_save that raises a RedirectWarning which has the ID of an action and an additional context in its parameters. Trigger the warning in the form view by clicking on the save button in the form view. Before this commit, this feature did not work like at all. - The additional context was not taken into account - the path taken by clicking on the form's save button was not able to handle interacting with the main form view - The error dialog did not handle going into an action in target other than new After this commit, all this is fixed and the whole flow, that allow an error to be enriched such that the user could do the correct action to correct the error now works. opw-4742952 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#224536 Forward-Port-Of: odoo/odoo#223198
This fix ensures returned dropshipped products sent to an internal subcontracting location are recorded with the correct accounting direction. It prevents inventory value from being reduced incorrectly, improving financial accuracy for companies using subcontracting and automated stock valuation.
Original PR description
…ml internal dropship return **Problem:** when the subcontracting setting is active, the return of a dropshipped product (not necessarily subcontracted) to the internal subcontracting location will…
…ml internal dropship return **Problem:** when the subcontracting setting is active, the return of a dropshipped product (not necessarily subcontracted) to the internal subcontracting location will create an account move that credits "stock valuation" instead of debitting it **Steps to reproduce:** - enable the "Anglo-Saxon Accounting","Multi-steps routes" and "Subcontracting" settings - create a storable product with dropshipping route and a vendor - in 'general information' write a non null cost - make sure the product category's inventory valuation' is 'automated' - create a new quotation for this product, confirm it and confirm the linked purchase order - click on the dropship smart button and validate the picking - click on return and select 'Physical Locations/Subcontracting Location' as the return location - validate and click on the valuation smart button - on the only stock valuation layer for this move, click on the book shaped widget **Current behavior:** the account move credits Stock Valuation and debits stock interim (received) **Expected behavior:** As we are returning the product to stock it should increase the value of the stock valuation account. Therefore, it should debit stock valuation and credit stock interim (received) **Cause of the issue:** If the mrp_subcontracting_dropshipping module is active, and if we call _is_dropshipped_return on a stock move which is the return (to the subcontracting location) of a dropshipped move : the method will return true. https://github.com/odoo/odoo/blob/b34cebcf0c142d92affdb642525f066d431b7ca3/addons/mrp_subcontracting_dropshipping/models/stock_move.py#L29-L35 Therefore, inside _account_entry_move, _is_in will be false (contrary to if mrp_subcontracting_dropshipping is not installed or if the destination is another internal location) https://github.com/odoo/odoo/blob/b34cebcf0c142d92affdb642525f066d431b7ca3/addons/stock_account/models/stock_move.py#L580 The aml vals will be computed inside _prepare_anglosaxon_account_move_vals https://github.com/odoo/odoo/blob/b34cebcf0c142d92affdb642525f066d431b7ca3/addons/stock_account/models/stock_move.py#L596 Here the fact the destination location is internal does not change the fact that it should debit the stock valuation account (meaning it should used acc_valuation as the second parameter of _prepare_account_move_vals) if the cost is positive. https://github.com/odoo/odoo/blob/b34cebcf0c142d92affdb642525f066d431b7ca3/addons/stock_account/models/stock_move.py#L610-L614 opw-4894755 Forward-Port-Of: odoo/odoo#221771 Forward-Port-Of: odoo/odoo#221009
Razorpay payments now check whether the payment access token has expired before processing. If needed, the system automatically generates a new token, helping prevent payment failures for customers using Razorpay.
Original PR description
Version: - saas-18.2 Issue: - The refresh token method was removed in PR https://github.com/odoo/odoo/pull/188774. Because of this, the Razorpay access token expiry was no longer being checked. Fix: - When a user makes a payment, the system now checks if the Razorpay access token has expired. If it has, a new token will be generated automatically. opw-4953953 Forward-Port-Of: odoo/odoo#224233
Tax return warning checks now refresh when a user opens them, so resolved issues such as draft entries no longer appear incorrectly. This helps users see the current status of a return without slowing down the broader Tax Returns overview.
Original PR description
Before, when opening a Return that had bypassed checks such as Draft Entries, and we had deleted or confirmed those entries it wouldn't have refreshed the check number and would still display that there are draft entries. Now, we are forcing the check to be refreshed when someone wants to see them as to not crash the performances when someone opens the Tax Returns Kanban view. task-4850581
Odoo Studio now correctly keeps the “Extra rights / Technical Features” group visible when editing field visibility rules. This prevents fields from unexpectedly disappearing for users working outside debug mode and makes Studio customization more predictable.
Original PR description
Steps to reproduce ================== - In debug mode - Go to Contacts - Open any record - Open studio - Click on any field - Add the "Extra rights / Technical Features" group to "Allow visibility to…
Steps to reproduce ================== - In debug mode - Go to Contacts - Open any record - Open studio - Click on any field - Add the "Extra rights / Technical Features" group to "Allow visibility to groups" => The group is not displayed as a tag - Restore the view - Now without debug mode (?debug=0), repeat the same steps => The field disappears, we need to toggle "Show Invisible Elements" to see it again Cause of the issue ================== https://github.com/odoo/odoo/pull/179354/commits/15aeaf88c268f047b8b83a5aa66f5da246c2b675 When calling get_views, the "base.group_no_one" is removed from the groups attribute and "invisible" is set to true if we are in debug mode. Solution ======== Adding "base.group_no_one" is still the way to have the expected behavior for now. We override some ir.ui.view functions when in studio to be able to edit it. According to the docstring of _postprocess_debug_to_cache, this feature is temporary. Another solution will be needed in the future. opw-4969262 Forward-Port-Of: odoo/enterprise#91647
Credit note validation for Kenyan OSCU e-invoicing now only considers credit notes that are actually reconciled with the original invoice. This prevents cancelled or draft credit notes from incorrectly blocking valid new credit notes due to overstated quantity or value totals.
Original PR description
[FIX] l10_ke_edi_edi_oscu: ensure quantity and monetary values checks are performed on reconciled reversals only. Fixes a behavior where the checks performed on the credit notes related to their quantities and monetary values include non reconciled credit notes. Steps to reproduce: 1 - activate `l10n_ke` on some company. 2 - Create an invoice. 3 - Create a partial or full credit note ( this one will be reconciled with the invoice automatically ) 4 - cancel the credit note or reset it to draft. 5 - create another credit note where the quantities and/or monetary values exceed that of the invoice if summed up with the cancelled credit note. Following the steps will result in an error message saying that the monetary value or quantities on the credit notes exceed that of the invoice. The correct behavior is to simply not count any credit note that isn't explicitly reconciled with the invoice. opw-4779976 Forward-Port-Of: odoo/enterprise#92319
This fix ensures sales orders in the Mexican localization show the correct invoiced quantity after an invoice cancellation is completed through CFDI. It prevents sales order quantities from incorrectly dropping to zero when the original invoice has been cancelled and replaced, improving billing accuracy and follow-up.
Original PR description
How to reproduce the issue: In l10n_mx: 1. Create a sale order. 2. Create an invoice from the SO, with yesterday’s date, and send it to the CFDI. 3. Lock the period at yesterday’s date. 4. Request the invoice cancellation with the “01” method. This creates a new invoice — confirm it. 5. Create a credit note for the original invoice. 6. Retry sending the cancel request to the CFDI; the CFDI state is now cancelled for the original invoice. On the original SO, the quantity invoiced is 0 despite the CFDI state of the original invoice being cancelled. This commit forces a recompute of the quantity invoiced when the CFDI state changes. Since _compute_qty_invoiced uses _get_invoice_lines, which filters out invoices in sent state, only lines from invoices in cancelled state will be taken into account. opw-4910139 Forward-Port-Of: odoo/enterprise#93480 Forward-Port-Of: odoo/enterprise#91924
7 changes
Resolved issues and error corrections
Fixes an issue where Mexican sales orders could show zero invoiced quantity after an invoice cancellation was completed through CFDI. The sales order now updates its invoiced quantities when the CFDI status changes, helping keep order and billing records accurate.
Original PR description
How to reproduce the issue: In l10n_mx: 1. Create a sale order. 2. Create an invoice from the SO, with yesterday’s date, and send it to the CFDI. 3. Lock the period at yesterday’s date. 4. Request the invoice cancellation with the “01” method. This creates a new invoice — confirm it. 5. Create a credit note for the original invoice. 6. Retry sending the cancel request to the CFDI; the CFDI state is now cancelled for the original invoice. On the original SO, the quantity invoiced is 0 despite the CFDI state of the original invoice being cancelled. This commit forces a recompute of the quantity invoiced when the CFDI state changes. Since _compute_qty_invoiced uses _get_invoice_lines, which filters out invoices in sent state, only lines from invoices in cancelled state will be taken into account. opw-4910139 Forward-Port-Of: odoo/enterprise#93480 Forward-Port-Of: odoo/enterprise#91924
Replacing work entries in the Gantt view now correctly creates a new entry using the selected type and the appropriate duration. This helps HR users avoid incorrect work entry totals when updating employee schedules, including empty days where expected working hours are used.
Original PR description
task-5043872
This fixes Italian POS receipts so change given back to customers is not sent to fiscal printers as a negative payment. This helps ensure orders are accepted by fiscal printers and properly reported to the authorities.
Original PR description
Before this commit, specifying the payment method used to give back the change in a POS order would lead to the fiscal printer receiving a negative payment as input, which is not supported, thus leading to the order not being treated by the fiscal printer (so not reported to the government). Only the payments with is_change=true where filtered out. I am now adding a filter to only keep the positive payments in the receipt, as the fiscal printer is computing the change itself. opw-4931671 Forward-Port-Of: odoo/enterprise#91794
Fixes an issue that could block users from deleting a generated bank statement line when the related journal entry used multiple reconciliation rules. This helps accounting users correct bank reconciliations without encountering an unexpected error.
Original PR description
Currently, an error occurs when trying to remove a move line from a bank statement line if the journal entry contains lines with different reconciliation models. **Steps to Reproduce:** 1. Install…
Currently, an error occurs when trying to remove a move line from a bank statement line if the journal entry contains lines with different reconciliation models. **Steps to Reproduce:** 1. Install the Accounting module. 2. Duplicate the "Internal Transfer" reconciliation model. 3. Accounting dashboard > click on Bank > create new record. 4. Add the invoice, apply "Internal Transfer" reconciliation model. 5. Edit the balance of the line to lower, apply duplicated model(Internal Transfers (copy)). 6. Try deleting the generated Liquidity Transfer line. (Refer [this video](https://drive.google.com/file/d/1cz80Q5325x3rqYUlGahVzFIXH2iqrbRF/view?usp=drive_link) for steps to reproduce.) **Error:** ValueError - Expected singleton: account.reconcile.model(8, 6) **Cause:** In the method `delete_reconciled_line` at [1], the `reco_model_id` is fetched from `self.move_id.line_ids.reconcile_model_id`. If the move contains lines linked to multiple reconcile models, this causes a singleton error during subsequent processing. **Fix:** This commit uses the already computed `move_lines_to_remove` to retrieve `reconcile_model_id` instead of accessing it from `self.move_id.line_ids`, which may result in a multi-recordset. [1] - https://github.com/odoo/enterprise/blob/89aa58029a79928788277489414f8192aa5353e4/account_accountant/models/account_bank_statement.py#L1041-L1049 sentry-6781788260 Forward-Port-Of: odoo/enterprise#91619
Kenyan e-invoicing checks now ignore cancelled or draft credit notes when validating quantities and amounts against the original invoice. This prevents incorrect blocking errors when businesses create replacement credit notes after cancelling earlier ones.
Original PR description
[FIX] l10_ke_edi_edi_oscu: ensure quantity and monetary values checks are performed on reconciled reversals only. Fixes a behavior where the checks performed on the credit notes related to their quantities and monetary values include non reconciled credit notes. Steps to reproduce: 1 - activate `l10n_ke` on some company. 2 - Create an invoice. 3 - Create a partial or full credit note ( this one will be reconciled with the invoice automatically ) 4 - cancel the credit note or reset it to draft. 5 - create another credit note where the quantities and/or monetary values exceed that of the invoice if summed up with the cancelled credit note. Following the steps will result in an error message saying that the monetary value or quantities on the credit notes exceed that of the invoice. The correct behavior is to simply not count any credit note that isn't explicitly reconciled with the invoice. opw-4779976 Forward-Port-Of: odoo/enterprise#92319
Default values for tax return types are now applied when companies and return types are created, rather than only during initial chart setup. This prevents missing or incorrect defaults when country-specific reporting modules are installed later, improving consistency for accounting compliance setups.
Original PR description
Before the company dependent default values for the return types were set only during the ```_post_load_data``` of the chart template. The issue with this way is that when we install a l10n for instance 10n_be_reports which add new return types, l10n_be would create a new company then trigger the _post_load_data function on return types that existed at that time. The only problem is that return types from l10n_be_reports are still not installed. The change here is that we set the default value on the creation of the company and return type.
Fixed an issue where returning a rental order linked to a Point of Sale picking could incorrectly increase the delivered quantity. This helps keep rental order records accurate after PoS settlement and return workflows.
Original PR description
**Issue:** Before this commit, the qty_delivered was wrong when using the Return button when a Picking was made in PoS **Cause:** The `_compute_qty_delivered` method in `pos_sale` adds `pos_line.qty`…
**Issue:** Before this commit, the qty_delivered was wrong when using the Return button when a Picking was made in PoS **Cause:** The `_compute_qty_delivered` method in `pos_sale` adds `pos_line.qty` to the related `sale_line` each time it runs When there is no PoS order, the method add 0 to the line, so the expected behavior work But when you have a PoS Picking, a quantity was added to `qty_delivered` each time the `rental.order.wizard` is used The issue also occured earlier when the `flush_all()` is called in `_process_order()` **Fix:** There is already a `_compute_qty_delivered` method in `pos_sale_stock_renting` that override the `qty_delivered` But it's restricted by `_are_rental_pickings_enabled()` That's not necessary because we don't use any `stock.picking` in the `_compute_qty_delivered` function, only `stock.move` so we removed that verification To make the code working, we also need to extend the _get_outgoing_incoming_moves() results Because there were also block by a `_are_rental_pickings_enabled()` condition even if there is only moves here We need all the moves to calculate `qty_delivered` properly **Steps to reproduce:** - Create a New Product "Rental PoS" that Can be Rented - Create and confirm a New Rental Order, with any customer and your product - Open a PoS Session - Click on Quotation/Order - Choose the last Order and Settle the order - Click on Yes (to confirm import to PoS) - Click on Payment, select Cash and Pay - Go in the Backend, and to your RO - Click Return and Validate - Before the fix, the Delivered should be 2.0 opw-4877019 Forward-Port-Of: odoo/enterprise#93406 Forward-Port-Of: odoo/enterprise#90510
18 changes
Resolved issues and error corrections
This fix ensures employee time-off timesheets are recreated correctly when a related public holiday is deleted or its working calendar changes. It prevents missing or duplicated timesheet entries, helping payroll and project reporting remain accurate after holiday schedule updates.
Original PR description
…ay change **Steps to reproduce** - Create a public holiday without a calendar during a work day. - Create a leave for an employee overlapping the public holiday for a time off type generating…
…ay change **Steps to reproduce** - Create a public holiday without a calendar during a work day. - Create a leave for an employee overlapping the public holiday for a time off type generating Timesheets. Validate it. - Expected: on the day of the public holiday, no timesheet is generated for the `hr.leave` to avoid duplication. - Either delete the public holiday, or set a calendar on it different than the one defined on the employee. - Issue: the public holiday timesheet has been deleted, but its deletion should've lead to the creation of the `hr.leave` timesheet that we didn't create at the time the public holiday existed. - Second issue: after that, change the calendar of the public holiday to the same as the employee's. Still a missing timesheet. **Solution** We can use `_reevaluate_leaves` to find the leaves affected by changes in public holidays. `_generate_timesheets` then re-generates the timesheets as if the leave was just validated (the call to `list_work_time_per_day` ignores the already present resource.calendar.leave). We also check missing public holidays timesheets to fix the second issue. opw-4819697 Forward-Port-Of: odoo/odoo#216901
This change restores the ability to find products in purchase orders using a vendor's product code or name. It reverses a previous display change that showed extra vendor information but unintentionally made supplier-based product searches fail.
Original PR description
This reverts commit 28d53e0e565e266ca3fa2b67e359b4383fa42c36. The commit displayed both product name and vendor name in a purchase order form. However, it breaks the search using the vendor code/name. https://github.com/odoo/odoo/pull/223250 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Hungarian electronic invoicing now classifies credit notes more accurately when an invoice has already received a payment. This prevents incorrect STORNO submissions to NAV and helps businesses keep tax reporting aligned with the actual payment history.
Original PR description
Before this PR: - Previously, a credit note was marked as STORNO if the base invoice's residual amount was zero, regardless of whether any payments had been made. This led to incorrect STORNO reports being sent to NAV in cases where the invoice had been partially or fully paid before reversal. After this PR: - If any payment was made, the credit note is marked as MODIFY instead of STORNO. Example: - Case 1: No payments before reversal Invoice: 1000 Credit Note 1: -100 Credit Note 2: -900 => Credit Note 1 should be sent as a Modification, Credit Note 2 as STORNO. - Case 2: Payments before reversal Invoice: 1000 Payment: -100 Credit Note: -900 => The Credit Note should be sent as a Modification. task-4818762 Forward-Port-Of: odoo/odoo#211831
This fix prevents projects from failing to open when a saved embedded action points to a module that has since been uninstalled. It cleans up those saved actions properly, so users are not blocked by outdated Timesheets-related filters after uninstalling the app.
Original PR description
The system failed to evaluate the embedded action, which refers to the Uninstalled module. Steps to produce: 1. Install `Project` and `Timesheets`. 2. Go to Project and open any project. 3. Click on…
The system failed to evaluate the embedded action, which refers to the Uninstalled module.
Steps to produce:
1. Install `Project` and `Timesheets`.
2. Go to Project and open any project.
3. Click on the embedded action icon and select `Timesheets`.
4. Save the view from the embedded action's icon.
5. Now, Uninstall `Timesheets`.
6. Now, go to that Project and try to open it.
Error:-
`KeyError: 'allow_timesheets'`
`ValueError: Invalid field in filter of project.project:
[('allow_timesheets', '=', True)]`
Solution:-
- Here,
https://github.com/odoo/odoo/blob/e7efc2c3ad70aa9273412b089a71a9ade75ad525/odoo/addons/base/models/ir_embedded_actions.py#L19
- Also, use `ondelete="cascade"`. but `ondelete="cascade"` not works on `ir.actions.actions`.
https://github.com/odoo/odoo/blob/e7efc2c3ad70aa9273412b089a71a9ade75ad525/odoo/addons/base/models/ir_actions.py#L117-L127
We should remove `ondelete="cascade"` from the `action_id` field and add explicit unlink logic for `ir.embedded.actions`in the unlink method.
Sentry - 6495174314
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prThis fix prevents an error when sales teams use lead assignment filters based on custom CRM lead properties. Businesses can now use property-based rules reliably to route leads to the right salespeople.
Original PR description
The system gives an error if we set the filter in the relation of lead_properties. Steps to Produce: 1. Install the `CRM` module. 2. CRM > Configuration > Settings. 3. Enable the `Rule-Based…
The system gives an error if we set the filter in the relation of lead_properties. Steps to Produce: 1. Install the `CRM` module. 2. CRM > Configuration > Settings. 3. Enable the `Rule-Based Assignment` and save the changes. 4. CRM > Reporting > Leads, then go to list view. 5. Click on NEW and add the required values. 6. From the gear icon, click on Add properties, set a random value, and then save. 7. CRM > Sales > Teams. 8. Click on the 3 dots of any team and click on Configuration. 9. Add the new salesperson and set the Lead Assignment Filter like Properties > Property 1(name of the property you added in lead form view) - is equal - demo (values of that property that you gave previously) and then save. 10. Click the gear icon and select the CRM: Lead Assignment. Error: `AttributeError: ' dict ' object has no attribute '_fields'` Solution: The code filters records based on complex domain conditions and combines matching IDs using logical operators. It also supports special fields like properties. Sentry - 6544761414
This fixes a mismatch where quality checks could remain linked to the original receipt after part of a transfer was moved into a new wave. Users will now see and process the right quality checks on the correct picking, reducing errors during receipt and wave operations.
Original PR description
*{quality_control,stock}_picking_batch ### Steps to reproduce: - Got to Quality > Quality control > Control Point - Create a quality control point: - Operation: receipt - Control per quantity or…
*{quality_control,stock}_picking_batch
### Steps to reproduce:
- Got to Quality > Quality control > Control Point
- Create a quality control point:
- Operation: receipt
- Control per quantity or product
- Create a and confirm a receipt transfer with 2 products
- Go to the receipt list view > select your receipt > Wheel action > Add to wave > Add to a new wave > Add only one of the move line to the wave
#### > A new picking is created and the move line reassigned to it but the related quality check picking_id is not updated.
> In particular, there is no "quality check" button on the new picking and the "quality check" button of the first picking allows you to process a QC related to the wave transfer.
### Cause of the issue:
While the move lines or move are can be moved to a new picking during the `_add_to_wave` call:
https://github.com/odoo/odoo/blob/605e47a85561614c17fe2e6f59618610f87c69bb/addons/stock_picking_batch/models/stock_move_line.py#L69-L90 Nothing is done with respect to the quality check which pciking_id field is not computed:
https://github.com/odoo/enterprise/blob/d73f7ef6fe61ccddbe1fe4e32c1670611ba3c5d2/quality/models/quality.py#L185
### Fix:
While the quality check measured on move_line are linked to a move line, the quality checks measured on products and operation are not. For the first kind, we rely on an override of the write method of stock move lines to reassign the check to the apporpiate picking. For the other kinds, we add a post batch hook to unlink the obsolete checks and recreate the appropiate one. Note that since operation and product types are created during the action confirm of moves and since certain moves will be created and auto confirm during the new picking creation here: https://github.com/odoo/odoo/blob/73fd3af560c967f41339bfc4c71a51dc5baba4a8/addons/stock_picking_batch/models/stock_move_line.py#L90 https://github.com/odoo/odoo/blob/73fd3af560c967f41339bfc4c71a51dc5baba4a8/addons/stock/models/stock_picking.py#L857 https://github.com/odoo/odoo/blob/73fd3af560c967f41339bfc4c71a51dc5baba4a8/addons/stock/models/stock_picking.py#L1263-L1267 https://github.com/odoo/enterprise/blob/b99d7073a34b24d4d3b863278e68f292fdd3c0b0/quality_control/models/stock_move.py#L12-L15 we rely on the `extra_move_mode` to avoid quality check creation during this step (as they will be created in the hook).
Enterprise: https://github.com/odoo/enterprise/pull/92951
opw-5009635
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#223852This fix prevents Odoo from crashing when a user saves a report or view with empty source content. Instead of failing with an error, the system now handles the empty content safely, improving stability for users working with Studio and reports.
Original PR description
The system will crash when they get the view where the arch is null. Steps to Produce: 1. Install `Sales` and `Studio`. 2. Sales > Toggle studio > Reports. 3. Click on New > External. 4. `Add a separator` to the page after `Expression` and save the report. 5. On the right side, click on `Edit Source`. 6. Remove all content and save the report. Error: `lxml.etree.XMLSyntaxError: Document is empty, line 1, column 1` Solution: - I used the try-except block to prevent the application from crashing when `view.arch` is empty. Sentry - 6288795955 Related Enterprise PR-https://github.com/odoo/enterprise/pull/84503 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Sales orders now correctly remove all nested combo product lines when a parent combo product is deleted. This prevents an error that could block users from saving orders after replacing combo items with another combo product.
Original PR description
Currently, an error occurs when a combo product is added to a sales order, and one of its combo items is replaced with another combo product, then the original parent combo product is deleted. Steps…
Currently, an error occurs when a combo product is added to a sales order, and one of its combo items is replaced with another combo product, then the original parent combo product is deleted. Steps to reproduce: - Create a sales order and add a combo product to it. - Modify one of the combo items by replacing it with another combo product. - Delete the original parent combo product from the order lines and save. Error: `ValueError: Expected singleton: sale.order.line()` The error occurs because the parent combo item is deleted, which causes `line.virtual_id` to become False. As a result, the filter [1] returns no matching records, and ensure_one() fails by raising a singleton error due to receiving zero records. This happens because the function [2] called from onchange in `sales_order` [3] that performs all the changes only checks the first level of combo items and doesn’t handle cases where those items are also combo products with their own linked items. This commit fixes the error by properly deleting all nested combo items in the sales order, ensuring no leftover items from nested combos remain that could cause errors. [1] - https://github.com/odoo/odoo/blob/7bb84621b773cdd7e9984222d61d70d622f8ac43/addons/sale/models/sale_order_line.py#L1567-L1569 [2] - https://github.com/odoo/odoo/blob/57b4056798b9a380027fd3da1c4f3965249a4509/addons/sale/models/sale_order_line.py#L1572-L1591 [3] - https://github.com/odoo/odoo/blob/7bb84621b773cdd7e9984222d61d70d622f8ac43/addons/sale/models/sale_order.py#L922 sentry-6653847384 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Manufacturing setup now requires a reference sequence, preventing users from saving an incomplete operation type that can later break sample loading or manufacturing order creation. This avoids a confusing system error and makes the manufacturing workflow more reliable when demo data is not installed.
Original PR description
The error was caused by missing `sequence_id` during Manufacturing Order creation. This led to an invalid SQL query where `id = False`. Steps to Replicate: - Install `MRP` without any demo data (--without-demo=1). - Go to `Inventory > Configuration > Operation Types`, click on `Manufacturing`. - Remove the value from the field `Reference Sequence` and Save. - Go to Shop Floor and then click on `Load Samples` and the error should occur. Error: `UndefinedFunction: operator does not exist: integer = boolean LINE 1: SELECT number_next FROM ir_sequence WHERE id=false FOR UPDAT...` Solution: - Made the `Reference Sequence` field required to prevent errors caused by leaving it empty during record creation. sentry-6589772561 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Editing a reordering rule linked to an existing manufacturing order no longer triggers an unexpected error. This keeps inventory planning updates working smoothly when businesses adjust replenishment settings for manufactured products.
Original PR description
Currently, an error is encountered while editing a Reordering Rule which is already related to some confirmed MO. **Setup:** - Install mrp and sale_management. - Create a storable product with the…
Currently, an error is encountered while editing a Reordering Rule which is already related to some confirmed MO. **Setup:** - Install mrp and sale_management. - Create a storable product with the Manufacture route enabled and its on-hand quantity set to 0. - Create a Bill of Materials (BoM) for the product and also add at least 1 component. - Create a Reordering Rule for the product with Min Quantity 0 and Max Quantity 0. **steps to reproduce:** - Create and confirm a Sales Order for 40 units of the product. This generates a Manufacturing Order (MO). - Navigate to the generated MO and add a line for Work Order(set Expected Duration: 1000min). - Edit the product's Reordering Rule (e.g., change the min Quantity). for steps reference you can use [this video](https://drive.google.com/file/d/120srSySVHI0FzaWCruz0LVIBKCjK4oOL/view?usp=sharing) **Error:** `KeyError: 1` **Root Cause:** - The KeyError is triggered when a reordering rule is edited. At this moment, the system calls the `_quantity_in_progress` method to update the forecast. This method prepares a results dictionary (res) that only knows about the ID of the record currently being edited (which might be a new, unsaved record with a temporary ID). - The issue arises in the loop that processes confirmed Manufacturing Orders, at [1], the value of orderpoint.id is still `<NewId origin=2>` and on trying to access it at [1] causing an error [1]- https://github.com/odoo/odoo/blob/f1e11af050aa4d7be40e5179dc67a74ff81de076/addons/mrp/models/stock_orderpoint.py#L138 **Solution:** This commit ensures that only valid orderpoint IDs are processed at [1] Sentry-**6135193468**
This fix stops spreadsheet pivots from offering JSON-based fields, such as Analytic Distribution, as grouping columns. Users can build Sales Order Line pivots without hitting a crash caused by unsupported field types.
Original PR description
Steps to reproduce: - Create a spreadsheet with a pivot on Sales Order Lines - Add "Analytic Distribution" as column => Boom Note that the test for this fix is add in the enterprise codebase Task-5055300 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
Uploading a file to a request or replacing a file through the manage versions dialog now shows progress on the existing document instead of creating a duplicate card or row. This reduces confusion for users and keeps the document list accurate during uploads.
Original PR description
Step to reproduce: 1. Upload a file to a request: - Create a Request. - Upload a file for that request. - Another Kanban card / List row is created showing the upload progression. 2. Upload a file into the manage version dialog. - Manage version for an existing document. - Upload a new document. - Another Kanban card / List row is created showing the upload progression. The upload progression should be shown on the existing document. Task-4863051
The XML export for Belgium’s EC Sales List now includes the expected month or quarter when opened from the VAT Return, even if the user did not manually choose a period. This prevents incomplete tax report exports and reduces the risk of filing issues caused by missing period information.
Original PR description
**Issue** When accessing the EC Sales List report via the smart button from the VAT Return page, downloading the XML without explicitly selecting a period omits the <Month> element—even though a…
**Issue** When accessing the EC Sales List report via the smart button from the VAT Return page, downloading the XML without explicitly selecting a period omits the <Month> element—even though a month is visibly preselected. **Steps to Reproduce** 1. Install the Accounting module and Belgium localization. 2. Go to the Accounting dashboard. 3. Open the VAT Return via the "Miscellaneous Operations" section. 4. Click the smart button to access the EC Sales List report. 5. Use the gear icon to export the XML. 6. Observe that the XML <Period> section only includes the <Year>—the <Month> is missing. **Root Cause** If no period is explicitly selected, the report uses a period_type of "tax_period". However, this value was not handled when generating the XML, so the logic to include the \<Month> or \<Quarter> elements skipped it. As a result, only the \<Year>, which is always included, was rendered. **Fix** Extend the handling of tax_period to derive the period from the company’s tax periodicity settings and adjust the filter accordingly. This ensures that the generated XML always includes the \<Month> or \<Quarter> element, in addition to \<Year>, whenever the report is based on a tax period. Opw-4702613
The tax report no longer fails with a server error after changing its root report configuration. This keeps accounting users from being blocked when opening tax reports and improves reliability of financial reporting workflows.
Original PR description
**[FIX] account_reports: ensure join on account_move for tax report base amount calculation** Fixes a server error in the generic tax report where `account_move_line__move_id` was referenced without an explicit join. The fix adds a conditional join on `account_move` to make fields like `always_tax_exigible` available, preventing `UndefinedTable` during SQL execution. Steps to reproduce: 1 - in a fresh db or runbot go to `Accounting > Config > Accounting Reports`. 2 - Open the Tax Report and change the `Root Report` to Balance Sheet. 3 - Save and try to open the tax report. opw-4990771
Fixes an issue where a website form configured through Studio to send an email could fail during submission. This helps prevent lost customer inquiries and avoids error logs when businesses customize website forms for outgoing emails.
Original PR description
Currently, an error occurs when submitting the 'Send Email' form. Steps to Reproduce: - Install the `website` and `web_studio` modules. - Go to `website` > `Click on Edit` > `Drag and drop form`. -…
Currently, an error occurs when submitting the 'Send Email' form. Steps to Reproduce: - Install the `website` and `web_studio` modules. - Go to `website` > `Click on Edit` > `Drag and drop form`. - click the form and in actions select the `more models`, and select `outgoing mails(mail.mail)` model and `save`. - `Submit` the form, and the error appears in the `logs`. **Error:** `KeyError: 'website_form_signature'` **Cause:** This error occurs when submitting the "Send Email" form from the website. By default, the form action is `"Send an E-mail"`, and when the user `changes` the form’s model to outgoing mails (mail.mail), which also has the action "Send an E-mail," the system checks the existing model [1] and retrieves it. Since `shouldRerender` is set to false, [2] is not executed, and as a result, the `email_to(hidden field)` is not present in the form. And the website_form_signature is added from [3], but due to the condition at [4], the code at [3] is not executed. When it is accessed at [5], KeyError is raised. **Fix:** This commit ensures that when the user changes the model, `rerenderXml` is executed so that the `hidden field` is also added. [1]: https://github.com/odoo/enterprise/blob/359a1c546fc9e4bc113517bf6ea912a70a9ea123/website_studio/static/src/website_form_editor.js#L155-L156 [2]: https://github.com/odoo/enterprise/blob/359a1c546fc9e4bc113517bf6ea912a70a9ea123/website_studio/static/src/website_form_editor.js#L174-L178 [3]: https://github.com/odoo/odoo/blob/82639728f2bcb4e7786f120de2aeba3f5fbab209/addons/website/tools.py#L252 [4]: https://github.com/odoo/odoo/blob/82639728f2bcb4e7786f120de2aeba3f5fbab209/addons/website/tools.py#L236 [5]: https://github.com/odoo/odoo/blob/82639728f2bcb4e7786f120de2aeba3f5fbab209/addons/website/controllers/form.py#L88 sentry-6746753251
When items from a receipt are moved into a new wave transfer, their related quality checks are now moved or recreated on the correct transfer. This prevents staff from missing required checks on the new transfer or completing checks from the wrong receipt.
Original PR description
*{quality_control,stock}_picking_batch ### Steps to reproduce: - Got to Quality > Quality control > Control Point - Create a quality control point: - Operation: receipt - Control per quantity or…
*{quality_control,stock}_picking_batch
### Steps to reproduce:
- Got to Quality > Quality control > Control Point
- Create a quality control point:
- Operation: receipt
- Control per quantity or product
- Create a and confirm a receipt transfer with 2 products
- Go to the receipt list view > select your receipt > Wheel action > Add to wave > Add to a new wave > Add only one of the move line to the wave
#### > A new picking is created and the move line reassigned to it but the related quality check picking_id is not updated.
> In particular, there is no "quality check" button on the new picking and the "quality check" button of the first picking allows you to process a QC related to the wave transfer.
### Cause of the issue:
While the move lines or move are can be moved to a new picking during the `_add_to_wave` call:
https://github.com/odoo/odoo/blob/605e47a85561614c17fe2e6f59618610f87c69bb/addons/stock_picking_batch/models/stock_move_line.py#L69-L90 Nothing is done with respect to the quality check which pciking_id field is not computed:
https://github.com/odoo/enterprise/blob/d73f7ef6fe61ccddbe1fe4e32c1670611ba3c5d2/quality/models/quality.py#L185
### Fix:
While the quality check measured on move_line are linked to a move line, the quality checks measured on products and operation are not. For the first kind, we rely on an override of the write method of stock move lines to reassign the check to the apporpiate picking. For the other kinds, we add a post batch hook to unlink the obsolete checks and recreate the appropiate one. Note that since operation and product types are created during the action confirm of moves and since certain moves will be created and auto confirm during the new picking creation here: https://github.com/odoo/odoo/blob/73fd3af560c967f41339bfc4c71a51dc5baba4a8/addons/stock_picking_batch/models/stock_move_line.py#L90 https://github.com/odoo/odoo/blob/73fd3af560c967f41339bfc4c71a51dc5baba4a8/addons/stock/models/stock_picking.py#L857 https://github.com/odoo/odoo/blob/73fd3af560c967f41339bfc4c71a51dc5baba4a8/addons/stock/models/stock_picking.py#L1263-L1267 https://github.com/odoo/enterprise/blob/b99d7073a34b24d4d3b863278e68f292fdd3c0b0/quality_control/models/stock_move.py#L12-L15 we rely on the `extra_move_mode` to avoid quality check creation during this step (as they will be created in the hook).
Community: https://github.com/odoo/odoo/pull/223852
opw-5009635
Forward-Port-Of: odoo/enterprise#92951Odoo Studio now avoids crashing when a report's source content is accidentally left empty. This helps users continue working safely instead of hitting an error page when editing custom reports.
Original PR description
The system will crash when they get the view where the arch is null. Steps to Produce: 1. Install `Sales` and `Studio`. 2. Sales > Toggle studio > Reports. 3. Click on New > External. 4. `Add a separator` to the page after `Expression` and save the report. 5. On the right side, click on `Edit Source`. 6. Remove all content and save the report. Error: `lxml.etree.XMLSyntaxError: Document is empty, line 1, column 1` Solution: - I used the try-except block to prevent the application from crashing when `arch` is empty. Sentry - 6288795955
Fixes an issue where a reconnected blackbox could be treated as a new device if the Raspberry Pi assigned it a different serial port. Existing blackbox configurations are now preserved by matching the device name and updating its identifier instead of creating a duplicate.
Original PR description
Before this commit, if a blackbox was unplugged and re-plugged, and it was assigned a different serial port by the Raspberry Pi, it would show up as a new device in the database meaning the existing…
Before this commit, if a blackbox was unplugged and re-plugged, and it was assigned a different serial port by the Raspberry Pi, it would show up as a new device in the database meaning the existing configuration wouldn't work. After this commit, we handle the blackbox as a special case, and if the name of the device matches exactly with our existing blackbox, we update its identifier instead of creating a new device. This does require a new device specific check in the controller which is quite ugly. Another approach would have been to make the identifier of the blackbox equal its FDM ID instead of the serial port, but this was not done for the following reasons: - Changing the identifier format in stable would cause all existing clients' blackboxes to become unconfigured once their IoT box restarts. - Making the identifier different to the serial port would require a hack in the blackbox driver to change its own identifier and update the devices dictionary, since the serial interface assumes all devices use the port as their identifier. task-5055027