Thursday, April 16, 2026
13 changes · 18.0
New functionality added to Odoo
This update introduces a new module to handle electronic ‘e-Resguardos’ documents in Uruguay, a key requirement for businesses operating in that region. It allows the system to correctly process these documents, ensuring compliance and accurate accounting. This addition supports the latest regulations and improves the functionality for users in Uruguay.
Original PR description
Add support to issue e-Resguardo documents
Enhancements to existing features
This update switches from a problematic VIES check to a more reliable IAP server for validating EU Tax IDs. This resolves frequent errors, particularly for French partners, and ensures accurate intra-com status updates. Security measures, including HMACs and cron polling, are implemented for secure data transfer.
Original PR description
Currently, when changing the Tax ID of a partner that is another EU country, we perform a VIES check to know whether it is valid (i.e. can do intra-com). However, it is often the case that the VIES check fails because of an internal error on their side (timeout, max concurrent update, ...), especially for France. Instead, we will now use the IAP server which stores the validity of a Tax ID for some time. If the IAP server does not have the info (because VIES is down), we will not actively wait. Instead, IAP will perform a push to a webhook on the client database once it has the information. For security purposes, an HMAC is generated and sent to IAP so that only IAP can contact the db with the up-to-date info, and not anyone on the internet that calls this new webhook. There is also a cron for polling for OnPrem instances that cannot be contacted via the webhook. task-5977584 Forward-Port-Of: odoo/odoo#258155
Resolved issues and error corrections
This update ensures that raw component moves in manufacturing orders consume the correct quantities of materials. Previously, the system incorrectly added all available stock to the production, even when manually adjusting quantities on the move line. This fix now prioritizes the quantities specified on the move line, ensuring accurate material consumption and reducing potential overstocking issues.
Original PR description
Commit https://github.com/odoo-dev/odoo/commit/63e44737fe469ab56b8e8e96c1ad47205ead1094 force `picked` to `True` when editing the stock move line in mrp module. The issue is, having Manufacturing installed, writing on any stock move (even in a picking) will go throughout this code and mark the move as picked. This commit adds a contrains to only update raw component moves. 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 fixes an issue where manually set lot quantities during manufacturing order production were not being applied correctly. The change ensures that the specified lot quantity is used first, resolving discrepancies in consumed lot amounts. This improves accuracy in tracking materials used in production.
Original PR description
**Issue** Lots manually indicated on stock move lines can be overridden when producing a Manufacturing Order. **Steps to reproduce** - Create a storable product P tracked by lot - Create two lots for…
**Issue** Lots manually indicated on stock move lines can be overridden when producing a Manufacturing Order. **Steps to reproduce** - Create a storable product P tracked by lot - Create two lots for product P with 2 units each - Create a MO for a product consuming two units P and confirm it - On the raw move, manually set 1 unit for each lot - Click on "Produce All" - Check the move line associated to the product P -> 2 units associated to the first lot consumed instead of 1 unit each **Cause** While producing: https://github.com/odoo/odoo/blob/0fe2023dc57b6cc02bd399d3c8fc5d6c8ed6e833/addons/mrp/models/mrp_production.py#L2109-L2110 It sets the quantities: https://github.com/odoo/odoo/blob/0fe2023dc57b6cc02bd399d3c8fc5d6c8ed6e833/addons/mrp/models/mrp_production.py#L2246 This calls `_set_quantity_done_prepare_vals` with a qty of 2: https://github.com/odoo/odoo/blob/0fe2023dc57b6cc02bd399d3c8fc5d6c8ed6e833/addons/stock/models/stock_move.py#L2264 which will, for each move line: - Take the quantity indicated by move line: https://github.com/odoo/odoo/blob/0fe2023dc57b6cc02bd399d3c8fc5d6c8ed6e833/addons/stock/models/stock_move.py#L2274 https://github.com/odoo/odoo/blob/0fe2023dc57b6cc02bd399d3c8fc5d6c8ed6e833/addons/stock/models/stock_move.py#L2296-L2297 - Then take all the available quantity left for the lot associated to the move line: https://github.com/odoo/odoo/blob/0fe2023dc57b6cc02bd399d3c8fc5d6c8ed6e833/addons/stock/models/stock_move.py#L2302-L2309 https://github.com/odoo/odoo/blob/0fe2023dc57b6cc02bd399d3c8fc5d6c8ed6e833/addons/stock/models/stock_move.py#L2326-L2327 Instead of first taking all the quantity indicated by the move line, before checking available quantity **Solution** Assume that raw move lines being created in mrp without changing the producing quantity are manually created opw-5946439
This update fixes an issue where the system incorrectly consumed all components from the first lot when producing a product, even when multiple lots were selected. The fix ensures that components are accurately distributed across the specified lots, preventing stock discrepancies and improving traceability. This ensures accurate inventory management during manufacturing.
Original PR description
Currently, when the user takes a component product from different lots for manufacturing, after producing the product, the stock moves are modified in such a way that only the first lot is used for…
Currently, when the user takes a component product from different lots for manufacturing, after producing the product, the stock moves are modified in such a way that only the first lot is used for consumption, ignoring the intended selection across multiple lots. ## Steps to replicate: - Install mrp without demo data - Enable Lots and Serial Numbers - Create two products: Car and Bolt, and set Bolt to be tracked by lots - Update the on-hand quantity of Bolt by creating two lots with 10 units each - Create a BoM for Car with Bolt as a component and quantity set to 4 - Create and confirm a Manufacturing Order for Car, see Components and open More Details - Assign Lot 1 with quantity 2 and Lot 2 with quantity 2, then save the MO - Click on Produce All ## Observed Behavior: Even though the user manually selected 2 units from lot 2 and 2 units from lot 1 , after producing the product, all 4 units are taken from lot 1 instead of being split evenly. This can also be verified in the traceability report. ## Root cause: This issue was introduced after commit [1], which added support for considering physical inventory (stock quants) when updating quantities on stock moves and automatically creating or adjusting stock move lines. When the `Produce All` button is pressed, the `button_mark_done` method is triggered This calls `pre_button_mark_done`, which in turn invokes `_set_quantities` [2]. That method calls `_set_qty_producing`, eventually leading to `_set_quantity_done` [3], which marks the move as done. During this process, `_set_quantity_done_prepare_vals` is executed. Inside `_set_quantity_done_prepare_vals` [4], the system assigns quantities to move lines based on the move and its reservations. In this scenario, the stock move has a total quantity of 4. The first move line has a quantity of 2, which is subtracted as the consumed (taken) quantity. At this point, the reserved (available) quantity is also 2, so the final condition is satisfied. This condition subtracts the available quantity from the remaining required quantity for the move, which is 2 for the next move line. As a result, the remaining required quantity becomes 0. Because of this, the next move line ends up with a required quantity of 0 and is removed at [5], effectively prioritizing the first move line. [1]: https://github.com/odoo/odoo/commit/eed96007f9032d1a9e30211c8bdcf53f8ce96a49 [2]: https://github.com/odoo/odoo/blob/a9a63976372d3b5411fd798a48cc5302c2de8af0/addons/mrp/models/mrp_production.py#L2821-L2830 [3]: https://github.com/odoo/odoo/blob/a9a63976372d3b5411fd798a48cc5302c2de8af0/addons/mrp/models/mrp_production.py#L1342-L1343 [4]: https://github.com/odoo/odoo/blob/a9a63976372d3b5411fd798a48cc5302c2de8af0/addons/stock/models/stock_move.py#L2301-L2322 [5]: https://github.com/odoo/odoo/blob/a9a63976372d3b5411fd798a48cc5302c2de8af0/addons/stock/models/stock_move.py#L2286-L2288 ## Solution: Since manual selection of lots is possible, the total available quantity across all lots should be checked before prioritizing any specific move line for updates. Updates should only occur when lots are not being used and the maximum possible quantity has already been reserved from the total available inventory. This prevents all quantities from being assigned to the first stock move line associated with a lot and ensures manually added lots remain on the move lines. opw-6058908
This update fixes an issue where inter-company delivery returns were incorrectly creating credit entries to stock input accounts instead of reversing the original delivery. By including transit locations as valid locations, the system now correctly debits the stock output account for returns, aligning with standard return behavior. This ensures accurate accounting for inter-company transactions.
Original PR description
### Problem: When returning a delivery or receipt for an inter-company transaction, the journal entry created for the return will account on the opposite stock interim account. That is, a delivery to…
### Problem:
When returning a delivery or receipt for an inter-company transaction, the journal entry created for the return will account on the opposite stock interim account. That is, a delivery to another company will debit the stock output account, but returning the delivery will create an account move that credits the stock input account. Compare this to normal return behavior which will credit the stock output account to reverse the original delivery's entry.
### Solution:
When deciding whether a stock move is a return, we will include transit locations as valid locations.
### Steps to reproduce (Runbot v18)
- Automatic accounting
1. Create a SO for the automatically accounted product, selling to another company in the system
2. Validate the delivery, check the valuation and note there is a debit on the stock output account
3. Create a return for the delivery and validate it, check the valuation and note the credit on the stock input account
To clarify, this differs from when the customer on the SO is anything other than a res.company, where we will see a credit on the stock output account when the return is validated.
Also, this flow is the same for POs, and the same bug is addressed by this fix.
### Before
<table>
<th>Move type</th>
<th>Account</th>
<th>Debit</th>
<th>Credit</th>
<tr>
<td>Delivery</td>
<td>Stock output</td>
<td>100</td>
<td>0</td>
</tr>
<tr>
<td>Delivery Return</td>
<td style="{color: red}">Stock input</td>
<td>0</td>
<td>100</td>
</tr>
</table>
### After
(Or normal behavior without inter-company transfer)
<table>
<th>Move type</th>
<th>Account</th>
<th>Debit</th>
<th>Credit</th>
<tr>
<td>Delivery</td>
<td>Stock output</td>
<td>100</td>
<td>0</td>
</tr>
<tr>
<td>Delivery Return</td>
<td>Stock output</td>
<td>0</td>
<td>100</td>
</tr>
</table>
opw-5993147This update clarifies invoices generated for ECpay transactions. The system now includes a 'Unit of Measure' description in the invoice details, resolving confusion caused by the ECpay API's lack of measurement information. This ensures accurate and understandable invoices for customers.
Original PR description
Issue: -- The documents returned by the ECpay API can be confusing as it does not include the measurement (UOM). The make it clearer a description is provided to ECpay through the json with the Key "ItemRemark" Current behavior: -- displayed data in PDF 品名 數量 單價 金額 備註 test 1 5 5 Expected behavior: -- displayed data in PDF 品名 數量 單價 金額 備註 test 1 5 5 商品單位: Units opw-6070269 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves an issue preventing credit notes with currency exchange differences from being posted correctly. The fix bypasses a validation error that occurred when automatic exchange moves didn't include the required analytic plan distribution. This ensures credit notes with exchange moves can now be successfully processed.
Original PR description
**Issue:** When a user posts a credit note with a currency exchange difference relative to the reversed move, the resulting exchange move lines lack the mandatory analytic distribution. This triggers…
**Issue:** When a user posts a credit note with a currency exchange difference relative to the reversed move, the resulting exchange move lines lack the mandatory analytic distribution. This triggers a validation error, preventing the credit note from being posted. **Steps to reproduce:** - Set "mandatory" applicability on any analytic plan. - Set two different currency rates on two different dates for any foreign currency. - Create and post an invoice on the first date (ensure the mandatory analytic distribution is set). - Create a credit note from that invoice using the second date. - Click on the post button on the credit note. Result: A validation error occurs even though the credit note itself has the mandatory analytic plan set, because the auto-generated exchange move does not. **Fix:** Since the context key validate_analytic is set to True by the post button action, it must be manually set to False during the automatic creation of exchange difference moves to bypass the mandatory plan check. OPW-6081632 Forward-Port-Of: odoo/odoo#259381
This update resolves an issue where Polish KSeF invoices were being rejected due to empty email and phone number fields in the XML format. The fix adds checks to ensure these fields are only included when a value is actually present, ensuring compliance with KSeF requirements.
Original PR description
Before this commit: Steps 1. Create a Polish company 2. Create and send an invoice to KSeF where the buyer has no email or no phone number 3. KSeF rejects the invoice with error code 450 (semantic verification error) This happens because `Email` and `Telefon` elements are always rendered inside `DaneKontaktowe`, even when their values are empty, producing invalid empty tags. After this commit: Add `t-if="buyer.email"` and `t-if="buyer.phone"` guards on each field so that `Email` and `Telefon` are only rendered when a value is present. opw-6124187
This update resolves an issue where managers without Time Off access rights couldn't approve leave requests from the overview. The change removes a restriction on data access, allowing managers to fulfill their approval role while maintaining security controls for Time Off officers. This ensures all employees can utilize the leave approval process effectively.
Original PR description
Steps to reproduce: ------------------- 1. Install Time Off. 2. Create a user and employee without Time Off access rights. 3. Create another employee and set the first employee as the manager. (This…
Steps to reproduce: ------------------- 1. Install Time Off. 2. Create a user and employee without Time Off access rights. 3. Create another employee and set the first employee as the manager. (This automatically sets them as the Time Off approver.) 4. Create a time off request for the second employee from Time Off > Management. 5. Ensure that "Employee's Manager" is set as the approver in the corresponding Time Off type. 6. Log in with the first user, go to Overview and try to approve the leave. Issue: ------ An AccessError occurs when approving the leave from the overview: ```python You do not have enough rights to access the fields 'leave_id' on Time Off Calendar (hr.leave.report.calendar) ``` Cause: ------ In `hr_leave_report_calendar`, the `leave_id` field is restricted to `hr_holidays.group_hr_holidays_user`. When a leave manager without Time Off user rights tries to approve a leave from the overview, the field access restriction triggers an AccessError. related commit: https://github.com/odoo/odoo/commit/b5c9420543bdaae52b191e518c5e0f31ba925e46 Solution: --------- Remove the group restriction on the `leave_id` field and introduce record rules on `hr.leave.report.calendar` to control access. - Leave managers can read records related to their employees. - Time Off officers retain full read access. This prevents the AccessError while still restricting the visibility of leave information for unauthorized users. opw-5921263 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fix resolves a problem where users couldn't create WhatsApp event templates. The issue stemmed from a restriction in how templates were created, preventing users from saving changes to the event form. Removing a direct creation method in the template setup process now allows users to successfully create and save WhatsApp event templates.
Original PR description
Issue: User goes to Event.event Form -> communication tab -> add line 2) Select whatsapp -> type something -> create and edit -> create new template with any model except event.registration -> save ( all the way including the event form) 3) reload page -> whatsapp event.mail displays "User does not have access to this record". Fix: Remove direct creation in the "get m2oProps()". opw-6037488
This update fixes an issue where manually set lot quantities during manufacturing order production were not accurately reflected. The change ensures that the specified lot quantity is correctly consumed, preventing discrepancies in finished goods tracking. This improves the reliability of inventory management within the manufacturing process.
Original PR description
**Issue** Lots manually indicated on stock move lines can be overridden when producing a Manufacturing Order. **Steps to reproduce** - Create a storable product P tracked by lot - Create two lots for…
**Issue** Lots manually indicated on stock move lines can be overridden when producing a Manufacturing Order. **Steps to reproduce** - Create a storable product P tracked by lot - Create two lots for product P with 2 units each - Create a MO for a product consuming two units P and confirm it - On the raw move, manually set 1 unit for each lot - Click on "Produce All" - Check the move line associated to the product P -> 2 units associated to the first lot consumed instead of 1 unit each **Cause** While producing: https://github.com/odoo/odoo/blob/0fe2023dc57b6cc02bd399d3c8fc5d6c8ed6e833/addons/mrp/models/mrp_production.py#L2109-L2110 It sets the quantities: https://github.com/odoo/odoo/blob/0fe2023dc57b6cc02bd399d3c8fc5d6c8ed6e833/addons/mrp/models/mrp_production.py#L2246 This calls `_set_quantity_done_prepare_vals` with a qty of 2: https://github.com/odoo/odoo/blob/0fe2023dc57b6cc02bd399d3c8fc5d6c8ed6e833/addons/stock/models/stock_move.py#L2264 which will, for each move line: - Take the quantity indicated by move line: https://github.com/odoo/odoo/blob/0fe2023dc57b6cc02bd399d3c8fc5d6c8ed6e833/addons/stock/models/stock_move.py#L2274 https://github.com/odoo/odoo/blob/0fe2023dc57b6cc02bd399d3c8fc5d6c8ed6e833/addons/stock/models/stock_move.py#L2296-L2297 - Then take all the available quantity left for the lot associated to the move line: https://github.com/odoo/odoo/blob/0fe2023dc57b6cc02bd399d3c8fc5d6c8ed6e833/addons/stock/models/stock_move.py#L2302-L2309 https://github.com/odoo/odoo/blob/0fe2023dc57b6cc02bd399d3c8fc5d6c8ed6e833/addons/stock/models/stock_move.py#L2326-L2327 Instead of first taking all the quantity indicated by the move line, before checking available quantity **Solution** Assume that raw move lines being created in mrp without changing the producing quantity are manually created opw-5946439
This update fixes an issue where web forms could incorrectly access data due to cached records. The change ensures that data accessed through web forms is always filtered based on the user's permissions, preventing errors and improving data security. This enhances the reliability of web-based applications.
Original PR description
**Description of the issue/feature this PR addresses**: web_read on x2many fields can reuse cached ids after write/web_save. Some of these cached ids may be inaccessible with the current record…
**Description of the issue/feature this PR addresses**:
web_read on x2many fields can reuse cached ids after write/web_save. Some of these cached ids may be inaccessible with the current record rules/context (cache pollution).
**Example**:
- **Context**:
- Two companies exist: Company A and Company B.
- Two users exist: User A and User B.
- User A can only access Company A (company_ids=[A], company_id=A).
- User B is linked to both companies (company_ids=[A, B], company_id=A).
- The "res.company" record rule is the standard one: [('id', 'in', company_ids)] (company_ids comes from allowed_company_ids).
- User A edits User B and saves the form.
- **Steps**:
- User A performs a web_read to load User B: company_ids contains only Company A.
- User A performs web_save (write + internal web_read in the same request): cached ids [A, B] are reused and the code attempts to read Company B.
**Current behavior before PR (without fix)**:
After saving a form with an x2many field, web_save calls write and then web_read. In this flow, web_read can include inaccessible x2many ids from cache and raise an AccessError.
**Desired behavior after PR is merged**:
x2many records are re-filtered with current read rules before formatting, and inaccessible ids are removed from values_list.
Forward-Port-Of: odoo/odoo#250904