Monday, April 27, 2026
11 changes · 18.0
New functionality added to Odoo
This update introduces automated deposit management for rental products within Odoo Enterprise. It allows businesses to automatically calculate and track deposits on rental orders, and now extends this functionality to Website Sale rentals. The system prevents manual quantity changes to rental products when a deposit is present, ensuring accurate deposit tracking.
Original PR description
After this commit: - Added default deposit product setting. - Enabled deposit requirement and amount on the product form. - Automatically calculates and adds deposit to order line. - Deposit line is created dynamically for single or multiple rental products. - Deposit line updates automatically when the rental product is modified. - If the main product exists => Users cannot manually update the quantity or remove the deposit line. - if the rental product quantity is set to 0 => The corresponding deposit line is removed automatically. - Extended deposit feature to Website Sale.
Enhancements to existing features
This update introduces a new option within the Point of Sale (POS) settings that allows users to automatically calculate quantity based on product price, particularly for products with weight or volume measurements. Enabling this feature changes the behavior of the price button to set quantity instead, streamlining order entry for relevant products.
Original PR description
After this commit : - `Quantity Set By Prices` option in POS settings. - Applicable UoM Categories: Works for products with **_Weight or Volume_** units of measurement. - Toggle Option in POS Interface: An action button is used to enable/disable the feature during a session. - Modified Price Button Behavior: When enabled, the Price button sets quantity instead of price.
Resolved issues and error corrections
This update fixes an issue where the overtime indicator displayed incorrect values for employees with flexible working hours. The root cause was a timezone conversion error that incorrectly shifted the end-of-day boundary, leading to inaccurate hour calculations. This change ensures the overtime indicator accurately reflects actual working hours for all employee schedules.
Original PR description
Steps to reproduce: --------------------------- 1. Install Timesheets 2. Open Timesheets > All Timesheets and observe the overtime indicator for an employee with a fully fixed working schedule (e.g.…
This update improves the process of receiving bills from the Polish tax authority (KSEF). Previously, XML files containing move data were automatically discarded after being processed. Now, these XML files are saved as attachments to the corresponding move records, allowing accountants to retain and manage them locally as required.
Original PR description
Description of the issue this commit addresses: When fetching the bills from ksef, the xml with the data about the move is received, parsed and then discarded but the XML can be required to be kept for longer than ksef keeps it so we are lacking a way for an accountant to download it and store it locally. --- Desired behavior after this commit is merged: When a move is fetched from ksef via an xml file, that file is put as an attachment on the move created with its data. --- task-6076505 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Steps to reproduce: --------------------------- 1. Install Timesheets 2. Open Timesheets > All Timesheets and observe the overtime indicator for an employee with a fully fixed working schedule (e.g. Mitchell Admin). (Click on the left arrow to see the overtime indicator) 3. Enable flexible hours on the employee’s working schedule. 4. Go back to Timesheets and observe the overtime indicator. Issue: -------- The overtime indicator displays incorrect values for employees with flexible working schedule Cause: --------- https://github.com/odoo/enterprise/blob/8b00363e5e461f11b9736354d94e520e21932e71/timesheet_grid/models/hr_employee.py#L21-L24 In `_get_employees_working_hours`, date strings are converted to naive datetimes and day boundaries (`start_datetime` and `end_datetime`) are created using a full-day range (00:00:00 to 23:59:59.999) before being assigned UTC via `.replace(tzinfo=UTC)`. When these boundaries are later processed by [_attendance_intervals_batch](https://github.com/odoo/odoo/blob/42ea101c80c0c593ff85b9c06e34fbf1161d0387/addons/resource/models/resource_calendar.py#L370-L371) method using [resource timezone](https://github.com/odoo/odoo/blob/42ea101c80c0c593ff85b9c06e34fbf1161d0387/addons/resource/models/resource_calendar.py#L304-L305), the end-of-day boundary (23:59:59 UTC) shifts into the next day for positive offset time zones (e.g., IST). **Example:** 2026-02-07 23:59:59 UTC becomes 2026-02-08 05:29:59 IST, causing the calculation to include hours from an unintended additional day. Solution: ----------- Localize the naive datetimes using the resource timezone before converting them to UTC. Before(Flexible 40 hours/week): <img width="1910" height="271" alt="image" src="https://github.com/user-attachments/assets/77f9a66b-670c-444b-9165-bcc6f4301737" /> After(Flexible 40 hours/week): <img width="1920" height="254" alt="image" src="https://github.com/user-attachments/assets/3671bbf9-1425-48e6-a654-45753274872c" /> opw-5899109
This update resolves a bug where quickly creating a product variant within the Bill of Materials form incorrectly created a new, unrelated product template instead of a variant. To ensure correct variant creation, the 'Create' and 'Create and Edit' options have been disabled, requiring users to create variants directly on the product template.
Original PR description
Steps to produce: --- - Install `mrp`. - Go to Manufacturing > Products > Bills of Materials. - Click Create, select a product. - In the Product Variant field, type any value and click "Create".…
Steps to produce: --- - Install `mrp`. - Go to Manufacturing > Products > Bills of Materials. - Click Create, select a product. - In the Product Variant field, type any value and click "Create". Issue: --- Using quick create on the Product Variant field does not create a variant of the selected product template. Instead, it creates a completely new, unrelated `product.template`. This is because the `create()` method on `product.product` is overridden to call super() with context `create_product_product=False`, which suppresses direct variant creation and forces creation through `product.template` instead, see [1]. **Why passing `default_product_tmpl_id` does not help:** One might expect that passing `default_product_tmpl_id` in the field context would cause the newly quick-created `product.product` to be linked to the already-selected `product.template`. However, because of the `create()` override above (introduced in [commit]), the variant creation is always redirected to `product.template`, ignoring any `default_product_tmpl_id` passed in context. It is therefore not possible in any case to quick-create a `product.product` that is correctly and directly linked to the currently selected `product.template`. Fix: --- Disable the "Create" and "Create and Edit" options. Since there is no way to quick-create a `product.product` that is correctly linked to the currently selected `product.template`, the user must create the variant directly on the product template first. [1]https://github.com/odoo/odoo/blob/f04d79d44873d0f1c35303a1a892f3a3a394ea17/addons/product/models/product_product.py#L364-L368 [commit]: https://github.com/odoo/odoo/commit/7389345696720255a9d3c72ca1d9c2f4e4ecd7b8 opw-6127738 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#259776
This update resolves an issue where incorrect tax information was being imported into Odoo when processing UBL invoices with similar tax codes. The fix ensures that taxes are only applied if they match the fiscal position of the invoice, improving data accuracy and preventing potential financial discrepancies. This change was made as part of a standard bug fix process.
Original PR description
Before this commit, when we tried to import xmls with similar taxes, but we never review if they are in the same fiscal position as the invoice. To fix this, we add to the domain the fiscal position OPW-6022540 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update fixes an issue where emails with specific attachments were misinterpreting data, leading to lost information. The change ensures the system correctly handles emails with embedded messages, preventing data loss and improving email processing accuracy. This ensures emails are parsed correctly, particularly those with attachments.
Original PR description
Prior to this fix, the parser walked through message parts that should have been ignored. Emails utilize the MIME mechanism (RFC 2045), where the structure of an email is defined by boundaries that…
Prior to this fix, the parser walked through message parts that should have been ignored. Emails utilize the MIME mechanism (RFC 2045), where the structure of an email is defined by boundaries that delineate different parts. Each part contains its own Content-Type (RFC 2045) and an optional Content-Disposition (RFC 2183). The Content-Type header describes the body content so the receiving user agent can select the appropriate mechanism to present the data. The Content-Disposition header defines whether the content should be displayed inline (in Odoo, understand this has "add it in the body") or treated as an attachment (in Odoo, create an ir.attachment and attach it to this mail.message). See `_message_parse_extract_payload` in https://github.com/odoo/odoo/blob/9218d302b0fd56c1854d95d3756c0f5e9c9c8700/addons/mail/models/mail_thread.py#L1547-L1549 The Issue: When an email has a `Content-Type: message/rfc822`, it contains the body of a previously sent EML as an attachment. This embedded message possesses its own internal boundaries and parts. These sub-parts should not be processed as part of the top-level email’s primary structure. In the case of opw-5892642, the email contained two text/html parts: one in the main email and one within the message/rfc822 attachment. The parser incorrectly reached into the attachment, allowing the second text/html part to override the first, leading to significant data loss. This override occurred within the _message_parse_extract_payload function: https://github.com/odoo/odoo/blob/9218d302b0fd56c1854d95d3756c0f5e9c9c8700/addons/mail/models/mail_thread.py#L1615-L1618 The Fix: The new implementation adopts the logic used in the CPython email library iterator (cpython/Lib/email/iterators.py), specifically the _structure function. The updated logic ensures the parser walks through the mail structure without descending into nested levels it should ignore, staying focused only on the relevant part. RFC1341 - 7.3.1: A Content-Type of "message/rfc822" indicates that the body contains an encapsulated message, with the syntax of an RFC 822 message. opw-5892642
This update resolves an issue where stock reservations weren't always fully completed when using the 'Smallest number of packages' removal strategy. The fix ensures that all available quantities are correctly reserved, preventing incomplete stock movements. This improves the accuracy of stock tracking and fulfillment.
Original PR description
Issue ----- When there is a packaged quant in stock, the `least package` removal strategy has unexpected behaviour. Steps to reproduce ----- - Enable packages - Create a product AAA tracked by SN -…
Issue ----- When there is a packaged quant in stock, the `least package` removal strategy has unexpected behaviour. Steps to reproduce ----- - Enable packages - Create a product AAA tracked by SN - product category removal strategy set to "Smallest number of packages" - Create a reception for 5 units - Generate serials - Put last line in pack - Confirm reception - Create delivery for 2 units of AAA - Mark as Todo - Change the quants taken: instead of SN 5, take SN 3 (so take SN 3 & 4) - Create a delivery for 3 units of AAA - Mark as Todo > Quantity reserved is one, it only reserved SN 5 Cause ----- The problem arises in `_run_least_packages_removal_strategy_astar`. Because there is an available quant inside a package, we continue past https://github.com/odoo/odoo/blob/c359e21457ca3adf5ca713b7aa30e198d0b08f7c/addons/stock/models/stock_quant.py#L675-L676 We end up at https://github.com/odoo/odoo/blob/c359e21457ca3adf5ca713b7aa30e198d0b08f7c/addons/stock/models/stock_quant.py#L724 The `generate_domain` function has a problem: if there sin't enough products inside packages to satisfy the demand, it searches for items not in packages to take from. https://github.com/odoo/odoo/blob/c359e21457ca3adf5ca713b7aa30e198d0b08f7c/addons/stock/models/stock_quant.py#L701-L705 This search is flawed, because it does not take into account the fact that the quant might already be reserved. So it expands the domain with an `AND` on quant ids that are not available. This leads to `quants` in `_get_reserve_quantity` containing unavailable quants https://github.com/odoo/odoo/blob/c359e21457ca3adf5ca713b7aa30e198d0b08f7c/addons/stock/models/stock_quant.py#L866 This later gets "caught" in `available_quantity` https://github.com/odoo/odoo/blob/c359e21457ca3adf5ca713b7aa30e198d0b08f7c/addons/stock/models/stock_quant.py#L897 and the quants don't get reserved a second time thanks to https://github.com/odoo/odoo/blob/c359e21457ca3adf5ca713b7aa30e198d0b08f7c/addons/stock/models/stock_quant.py#L912-L914 but this also means the reservation is incomplete. Note that calling `action_assign` a second time will correctly reserve the remaining quantities, as there is no package left to reserve in stock, so we do go in https://github.com/odoo/odoo/blob/c359e21457ca3adf5ca713b7aa30e198d0b08f7c/addons/stock/models/stock_quant.py#L675-L676 and avoid the faulty logic. Solution ----- Ideally, we would use the value of `available_quantity` in our search domain. However, the field is not stored https://github.com/odoo/odoo/blob/c359e21457ca3adf5ca713b7aa30e198d0b08f7c/addons/stock/models/stock_quant.py#L88-L91 Our options are: - make the field stored (not stable) - add a search function - filter reserved quants out of `single_item_ids` First option is not stable. Second option requires subqueries to compare `quantity` and `reserved_quantity`. Third option is the least bad one, with only a very situational performance loss. ----- Ticket: opw-5972350
This update strengthens the security of Xendit payments by requiring a valid transaction token alongside the transaction reference. Previously, payments could be processed without this verification, creating a potential risk. Now, payments are restricted to the correct transaction, improving security and preventing unauthorized payments.
Original PR description
**Description of the issue/feature this PR addresses:** The `/payment/xendit/payment` endpoint did not enforce validation of an access token tied to the transaction when processing direct payment requests. **Current behavior before PR:** The endpoint accepted public requests using only the transaction reference, allowing payment execution without verifying that the request was linked to the intended transaction. **Desired behavior after PR is merged:** The endpoint now requires a valid access_token associated with the transaction (reference) before processing. This ensures that payment execution is restricted to the correct transaction. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update fixes a critical issue where gift cards and e-wallets could be repeatedly refunded, leading to potential misuse. It also prevents the merging of order lines when products are linked to multiple loyalty programs, ensuring accurate tracking and reporting. This improves the reliability and integrity of our point-of-sale loyalty programs.
Original PR description
Previously, it was possible to refund a gift card or e-wallet after creation. However, the associated code remained usable, allowing the gift card or e-wallet to be reused, which is not the expected behavior. To address this, refunds for gift cards and e-wallets are now prevented. Additionally, when a product is part of the trigger products for multiple gift card or e-wallet programs, it was not possible to create separate order lines for the same product with different programs selected. The second line was merged into the first. A condition has been added to prevent merging when different programs are selected. --- Task: https://www.odoo.com/odoo/project/1737/tasks/6052281
This update fixes a discrepancy in the sale details report by accurately reflecting cash rounding adjustments. Now, the report displays the total cash rounding applied during a session, aligning the displayed total with actual payment amounts. This ensures greater accuracy and transparency in sales reporting.
Original PR description
The sale details report total_paid was computed from sum(order.amount_total), which does not include the cash rounding adjustment. This caused a discrepancy between the displayed total and the sum of individual payment lines when cash rounding is enabled. Use the sum of actual payment amounts instead, which naturally includes cash rounding since payments are recorded with their rounded values. opw-5253018 Forward-Port-Of: odoo/odoo#254401