Daily updates from Odoo
Wednesday, July 8, 2026
14 changes · 18.0
Resolved issues and error corrections
The Peru Profit and Loss report now includes Other Operating Income when calculating gross profit and related totals. This ensures key profitability figures such as operating profit, result before taxes, and net profit reflect all relevant income accurately.
Original PR description
**Steps to reproduce:** 1. Install `l10n_pe` and switching to the Peru company. 2. Create and post a journal entry with a line on account 7520000 (Other Operating Income). 3. Open the Profit and Loss report (PE). 4. The amount appears correctly under "Other operating income" (`PE_PNL_A_5`). 5. "Gross profit", "Operating profit" , "Result before taxes" and "Net Profit" do not change when this amount is added or removed. **Issue:** The "Other operating income" line is excluded from the Gross Profit calculation, and consequently from Operating Profit and every downstream total in the PE Profit and Loss report. **Why this happens:** Gross Profit (`PE_PNL_A_4`) balance expression uses the aggregation with formula `PE_PNL_A.balance - PE_PNL_A_3.balance`, which doesn't include `PE_PNL_A_5.balance` as a term opw-6283907 Forward-Port-Of: odoo/enterprise#123063
This fix prevents delivery tracking from failing when EasyPost returns an empty tracker value. Users can continue working without seeing an error when tracking information is incomplete or unavailable.
Original PR description
The PR https://github.com/odoo/enterprise/pull/111833 handled the specific case when the tracker data is missing from the EasyPost response, however in certain cases `tracker` key exists, but it has a `None` value, which leads to a traceback when trying to access the stock move:
```
File "/home/odoo/src/enterprise/18.0/delivery_easypost/models/easypost_request.py", line 392, in get_tracking_link
public_url = shipment.get('tracker', {}).get('public_url')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get'
```
This commit provides a fallback to avoid getting the error from the side of the user.
opw-6270242
Forward-Port-Of: odoo/enterprise#119400Field Service users can now create and design a worksheet template from a task without losing the selected template afterward. This prevents extra manual re-selection and makes the worksheet setup flow more reliable.
Original PR description
[REF] worksheet: changes to widget to be made extendable Made changes to OpenStudioWidget to be made extensible across multiple modules. --- [FIX] industry_fsm_report: fixed onthe fly creation of worksheet not linked Steps to reproduce: - Open Field Service - Go to any task and create a work sheet on the fly - In the wizard click on Design Template - Close the studio and go back to task Issue: - You can see that the newly created worksheet is not set Cause: - The reason for not getting set is due to fact that worksheet template is created after we click on Design Template which is a widget of view_widgets. - Therefore the field doesn't get dirty and doesn't get saved. Solution: - Using bus to save the worksheet changes in Project record. task-3871593
This fix prevents an error when users propose adding a step from the Shop Floor for manufacturing orders whose bill of materials contains very similar operations. It helps production teams submit improvement suggestions reliably without being blocked by a system traceback.
Original PR description
[FIX] mrp_workorder_plm: avoid singleton traceback when matching BOM operations **Issue** Adding a step in a manufacturing order with two operations that are too similar could lead to a traceback…
[FIX] mrp_workorder_plm: avoid singleton traceback when matching BOM operations **Issue** Adding a step in a manufacturing order with two operations that are too similar could lead to a traceback when proposing an improvement from the Shop Floor. **Steps to reproduce** - Install the Product Lifecycle Management app. - Create a BOM for any product with two operations that: - Have the same name and work center - Have no variant - Create and confirm a Manufacturing Order for that product. - Open the Shop Floor view. - Click the gear icon -> Update Instructions -> Improvement Suggestion -> Add a Step -> Propose a Change. -> A traceback occurs **Cause** When adding a step: https://github.com/odoo/enterprise/blob/1c02615b73a2b4fb9f1ab91167a3c8d7c9ac824c/mrp_workorder_plm/models/mrp_workorder.py#L10 It tries to find the corresponding operation in the ECO's new BoM. This relies on `_get_sync_values()`: https://github.com/odoo/enterprise/blob/1c02615b73a2b4fb9f1ab91167a3c8d7c9ac824c/mrp_plm/models/mrp_routing.py#L9-L13 Because two operations share the same name, work center, and no variant, both match the filter: https://github.com/odoo/enterprise/blob/1c02615b73a2b4fb9f1ab91167a3c8d7c9ac824c/mrp_workorder_plm/models/mrp_workorder.py#L39 This results in a singleton error when accessing `operation.id`: https://github.com/odoo/enterprise/blob/1c02615b73a2b4fb9f1ab91167a3c8d7c9ac824c/mrp_workorder_plm/models/mrp_workorder.py#L42 opw-6241880
This change updates an automated stock valuation test so it includes the country information required for a tax record. It helps the test suite run correctly and prevents a known runbot failure, improving build reliability.
Original PR description
Fixes runbot error [243677](https://runbot.odoo.com/odoo/error/243677)
This change avoids a rare timing issue where the same successful payment could be processed twice. It makes sure Odoo checks again before acting on a transaction, reducing the risk of duplicate order or payment handling when multiple background actions happen at the same time.
Original PR description
The following use case has been observed: 0. Customer start a payment from /shop/payment. 1. We received the webhook that notifies that the payment succeeded. 2. The payment post-processing cron…
The following use case has been observed: 0. Customer start a payment from /shop/payment. 1. We received the webhook that notifies that the payment succeeded. 2. The payment post-processing cron start (it gather all the transactions that need to be processed, including the customer new transaction) 3. Meanwhile, the customer is redirected back by the payment provider to Odoo, which then redirect to /payment/status and start the payment post-processing for that specific transaction 4. The customer initiated payment processing finishes, he is redirected back to /my/orders/... page. 5. The payment post-processing cron finally start processing the same customer transaction and process it (a second time). In that case, as the transactions to be post-processed backlog was quite high, there is consequent time between the time we gather all the TXs to post-process and actually process the customer transaction. Also we don't end up with a `SerializationError` as the cron do commit after each transaction post-processing. This commit force invalidate individual transaction cache values and recheck if it effectively still need to be post-processed before doing it. opw-6332192 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#274010
This fix prevents an extra leave accrual from being added when a carryover period starts, so leave balances now grow only at the intended accrual dates. It makes employee leave balances easier to understand and avoids unexpected day increases at year boundaries.
Original PR description
## Issue Currently, an extra accrual happens on carryover date, but it shouldn't. Indeed, accrual only happened at the start - end of a period, or on level transition. ## Reproducing steps Let's take an accrual plan with a level that adds 2 days/month on the 15th of the month. The carryover takes place at the beginning of the year. So we will have this: - 2025-11-01 -> creation of the allowance, 0 days available - 2025-11-15 -> 1 day (only 15 days are counted, so only half of the days are added) - 2025-12-15 -> 3 days (1 full month elapsed) - 2026-01-01 -> 4 days (as the carryover triggers an accrual) -> this event causes confusion as the accrual seems to “come out of nowhere” - 2026-01-15 -> 5 days - 2026-02-15 -> 7 days task-5432188 Forward-Port-Of: odoo/odoo#245201
This update fixes an issue where thread messages weren't displaying properly. The change ensures that the system correctly updates the display of messages within threads, resolving a visual glitch. This improves the user experience for communication within the Odoo platform.
Original PR description
The Thread component mirrors `thread.isLoaded` into the `state.mountedAndLoaded` flag that gates, in the template, whether the real messages are rendered. That mirroring effect both read…
The Thread component mirrors `thread.isLoaded` into the `state.mountedAndLoaded` flag that gates, in the template, whether the real messages are rendered. That mirroring effect both read `mountedAndLoaded` as one of its dependencies and wrote it. `useEffect` records its dependency array before running the body, so right after the effect sets `mountedAndLoaded` to true the recorded dependencies still hold the pre-write `[isLoaded=true, mountedAndLoaded=false]` pair; that update only settles on a later, microtask-deferred patch. When a second reload runs `reset()` in that window it drives `mountedAndLoaded` back to false while `isLoaded` stays true, and the settling patch then computes the very `[true, false]` pair already recorded. The effect never re-runs, so `mountedAndLoaded` is stranded at false and no message is rendered. Depend on a monotonic `resetCount` instead. Reading it in the effect dependency array subscribes the render to it (OWL subscribes a `useState` proxy's render callback on every read, wherever it happens), so a `reset()` bump re-renders and re-runs the mirror to re-sync `mountedAndLoaded` with `isLoaded`. Bump it only when `isLoaded`: while loading, `applyScroll` resets on every patch, so an unconditional bump would spin the render loop; the guard re-arms only in the case that heals. `reset()` still clears `mountedAndLoaded` (the false dip is needed for the reload scroll handshake), so behaviour is otherwise unchanged. The race is not deterministically reproducible with this version's test tooling, which cannot advance the render loop a single frame, so no test is added here; the fix is covered by tests on later versions. https://runbot.odoo.com/odoo/error/940032 Forward-Port-Of: odoo/odoo#274059
This update resolves an issue where users were denied access to edit website events when previewing them. The fix ensures the correct company ID is used during website preview, granting access to the intended company's data. This improves the website editing experience for users managing multiple company websites.
Original PR description
THIS IS A WIP Scenario: - have two companies: A is default company, B is another company - create website for B company with a domain you are logged out of - create an event with company B, website of company B - click on "Go to Website" of the event - login the company B website and edit the event page Result: get access error because you don't have access to company B Cause: when you log on a website, the default company_id is used for the backend. So in the example you are logged in company A in backend, and you are showing company B in frontend (inside the iframe). So when saving you are using company A that has no access to the event. Fix: when previewing the website for edition, switch to the website company. opw-5998454
This update fixes a reporting issue where MTO products incorrectly displayed delivered quantities instead of the total ordered amount. The fix ensures the delivery report accurately calculates the total ordered quantity for MTO products by correctly accounting for unreserved backorders and split moves. This improves the accuracy of sales order reporting.
Original PR description
Steps To Reproduce ------------------ 1- Create a product (Goods): - Select track inventory in General Information - Go to inventory and set Routes to Replenish on Order (MTO) 2- Create an Sales…
Steps To Reproduce ------------------ 1- Create a product (Goods): - Select track inventory in General Information - Go to inventory and set Routes to Replenish on Order (MTO) 2- Create an Sales Order for 10 units of the product and confirm. 3- Deliver 5 on the first picking, validate, and create the backorder. 4- Print the delivery slip. Issue ----- 1- MTO: Ordered = 5, Delivered = 5, Remaining = 5. 2- Normal product: Ordered = 10, Delivered = 5, Remaining = 5. The ordered quantity for MTO products is wrong, it shows the delivered amount instead of the original order total. Cause ----- The delivery report calculates the "Ordered" quantity by adding what we just delivered to what is left in the backorders. I found that the code was looking for move lines in the backorders to count what is left. When I checked a backorder that is waiting for stock (like MTO), there is no reserved stock yet, so no move lines exist. Because of this, the report thought the backorder was empty and ignored the remaining quantity. Fix --- I changed the calculation of `qty_ordered` to correctly handle split moves and unreserved backorders. 1. In the main loop, `qty_ordered` is now the sum of the done quantity and the demand of any linked backorders. This correctly reconstructs the total order for split moves and MTO scenarios by using `move_ids` to include unreserved moves. 2. In the secondary loop for empty moves, I added a check to skip backorders if they were already counted in the main loop. This avoids double-counting while still catching any items that were missed by the main loop. opw-5112467 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves an issue where closing Point of Sale sessions could result in data imbalances. The fix, mirroring a previous backend change, ensures accurate session management during order validation and invoice generation, particularly when taxes and loyalty programs are involved. This improves the reliability of the POS system.
Original PR description
This fix is the same as this one https://github.com/odoo/odoo/pull/271577 but for the backend part of the code. After the fix, if you followed the same steps to reproduce and tried to close the session you would have an unbalanced entry for the session. Steps to reproduce: ------------------- * Create a 21% tax not included in price * Create a product with a price of 76.01 and the tax created above * Create a loyalty program with a 10% discount * Create a POS order with the product above and apply the loyalty program * Validate the order and generate the invoice * Close the session > Observation: You need to force close the session because of unbalanced entry Why the fix: ------------ Apply the same fix for backend code. opw-6052112
This pull request addresses an issue with the Brazilian accounting (l10n_br) module, specifically related to reporting. It corrects a discrepancy in how certain financial data is processed, ensuring accurate reporting for Brazilian businesses using Odoo. This update improves the reliability of financial data for our Brazilian clients.
Original PR description
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
This update streamlines the verification of EU VAT numbers during company creation. Previously, a redundant check was performed twice, impacting performance. This change reduces the number of verification calls, optimizing the process and potentially preventing issues with external service limitations.
Original PR description
When we create a company with a EU VAT, we used to do 2 IAP call to verify the VAT number. One was on the create() and the other one on the write(). For performance reason and because the vies check service may limit ip address, the verification was already disable when importing files (in both create and write). This commit remove the compute on the create one (and keep the one on write), so that it only do 1 IAP call to verify the VAT. Task-6139346
This update corrects a bug where orderpoint failure activities incorrectly attributed the user ID to a portal user instead of the system (OdooBot). This prevented proper logging and caused access issues. The fix ensures activities are consistently authored by the system, maintaining data integrity and security.
Original PR description
When an orderpoint fails during a portal user's transaction (e.g., eCommerce checkout), the system catches the `Procurement Exception` and logs a warning activity on the product template. The…
When an orderpoint fails during a portal user's transaction (e.g., eCommerce checkout), the system catches the `Procurement Exception` and logs a warning activity on the product template. The exception handler uses `.sudo().activity_schedule()`, which bypasses the write access restriction but leaves `env.uid` as the portal user. Therefore, the restricted portal user permanently becomes the `create_uid` (Author) of the activity. System exception activities should always be authored by the system (OdooBot), never by a portal or public user. This context leak corrupts the activity metadata by injecting an external user ID into internal backend logs. Chain `.with_user(SUPERUSER_ID)` to the `.sudo()` call in `stock_orderpoint.py` when scheduling the exception activity. This ensures the environment context is stable and the activity is authored by OdooBot, which transcends multi-company record rules. Steps to Reproduce on Runbot/Fresh Database on version 17.0: 1. Enable Multi-Company with Company A and Company B. Set Company B as the active company for the website. 2. Restrict the main Admin (Runbot) user strictly to Company A. 3. Create a Shared Product (Company field left blank). 4. Set a Reordering Rule (Orderpoint) for the product that is guaranteed to fail routing. 5. Navigate to the frontend website and sign up as a new user (this creates a Portal User in Company B). 6. As the newly signed-up Portal User, complete an eCommerce checkout for the shared product. 7. The checkout succeeds, but the backend triggers the orderpoint failure and logs the exception activity on the product template. 8. Check the chatter for this product: the `create_uid` is incorrectly set to the Portal User instead of OdooBot (1). 9. (In 19.0 Upgrade) Log in as the Admin user (set strictly to view Company A), navigate to the product, and the AccessError for reading will appear due to this leaked id. [opw-6253978](https://www.odoo.com/odoo/my-support-tasks/6253978?debug=assets) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#269395