Daily updates from Odoo
Monday, April 27, 2026
22 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.
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
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.…
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 streamlines the process of linking vendor bills to purchase orders. Previously, the search and linking were combined within a single method, leading to inefficiencies. Now, the search for purchase orders is separated, improving performance and reliability when importing vendor bills.
Original PR description
[FIX] account, *: split find and set purchase order modules: account, account_edi_ubl_cii, purchase When importing a vendor bill, we try to link it with a potential purchase order. The current logic tries to find and link a purhase order in the same method, this commit split the 'finding PO' logic and 'line matching/linking' in two separate methods. The finding PO is now @api.model. no-task
This update addresses a technical issue related to how Odoo processes incoming emails. The fix ensures more reliable parsing and extraction of data from email payloads, preventing potential disruptions in email-based workflows. This improves the overall stability and performance of Odoo's email functionality.
Original PR description
(not to do in 18.0 obviously) linked to https://github.com/odoo/odoo/pull/258425
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 addresses a minor issue with how Odoo processes incoming emails. The fix ensures more consistent and reliable parsing of email payloads, preventing potential disruptions in email-related workflows. This improves the overall stability and performance of Odoo's email functionality.
Original PR description
(not to do in 18.0 obviously)
This update fixes an issue where date-based sorting in financial reports was inconsistent, particularly when using the 'From the very start' period. The change ensures that string-type external values are now correctly ordered by date, improving the accuracy and reliability of report data.
Original PR description
Ensure string-type external values are correctly sorted by date when using the "most_recent" formula. This resolves an issue where values appeared unordered, especially for expressions using the "From the very start" period. task-5951888 Forward-Port-Of: odoo/enterprise#113837
This update fixes a bug that prevented users from correctly scraping component information from manufacturing orders created by others. The issue stemmed from incorrect access rights, specifically related to analytic account lines. This ensures accurate reporting and data retrieval for timesheet-related tasks.
Original PR description
When scraping the component of a MO created by another user you could get an access error saying you don't have write access on account analytic lines. Steps to reproduce: ------------------- * Install timesheet_grid and project_mrp_account * Create product A, storable * Create product B with a cost of 20 and also storable * Update the available quantity of product B * Create a BoM for product A, it should only require one product B * Update Marc Demo access right and make sure he doesn't have access to any accounting stuff and he has atleast timesheet approver * Create a first MO for 1 product A and produce it * Create a second MO for 1 prodcuct A but just confirm it * Login as Marc Demo and try to scrap the component of the second MO > Observation: You get an access error here https://github.com/odoo/odoo/blob/d98afdc08b46bf458eaa287ea882cc7663286a59/addons/stock_account/models/analytic_account.py#L95 opw-5954989
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 fixes an issue where closed Helpdesk tickets were sending out emails with the database ticket ID instead of the customer-facing ticket reference. The change ensures all email communications consistently use the correct ticket reference, improving clarity and accuracy for customers. This was a simple fix to a configuration error.
Original PR description
Steps to reproduce: ------------------------ 1. Install the Helpdesk. 2. Go to Settings → Technical → Sequences and set the next number to 100. 3. Create a ticket and send a message using the…
Steps to reproduce: ------------------------ 1. Install the Helpdesk. 2. Go to Settings → Technical → Sequences and set the next number to 100. 3. Create a ticket and send a message using the "Helpdesk: Ticket Received" mail template; Observe that the correct reference (100) is used. (Open the full composer to use "Load template") 4. Now send a message using the "Helpdesk: Ticket Closed" mail template and Observe that it displays the database ID (e.g., 1) instead of the reference. Cause: ------ `new_ticket_request_email_template` uses the ticket reference(`object.ticket_ref`) correctly. https://github.com/odoo/enterprise/blob/d39e291ba89ad018ba6f5f9591d280a834822f27/helpdesk/data/mail_template_data.xml#L18-L19 However, the `solved_ticket_request_email_template` uses the database ID (`object.id`) instead of the actual ticket reference (`object.ticket_ref`), leading to inconsistent references in customer communications. related commit: 3ed5273 Solution: --------- Update `solved_ticket_request_email_template` to use `object.ticket_ref` instead of `object.id` opw-6087466 Forward-Port-Of: odoo/enterprise#113932
This update ensures the o_spreadsheet component within Odoo is running the most recent version. This resolves a bug related to data validation, specifically preserving spaces in spreadsheet values, and improves the overall stability of the spreadsheet functionality. This change impacts users who utilize the spreadsheet module.
Original PR description
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/1cc3da19f3 [REL] 18.0.65 [Task: 0](https://www.odoo.com/odoo/2328/tasks/0) https://github.com/odoo/o-spreadsheet/commit/4359debd7e [FIX] data_validation: preserve spaces in dv values [Task: 5418098](https://www.odoo.com/odoo/2328/tasks/5418098) Co-authored-by: Florian Damhaut (flda) <flda@odoo.com> Co-authored-by: Anthony Hendrickx (anhe) <anhe@odoo.com> Co-authored-by: Alexis Lacroix (laa) <laa@odoo.com> Co-authored-by: Lucas Lefèvre (lul) <lul@odoo.com> Co-authored-by: Adrien Minne (adrm) <adrm@odoo.com> Co-authored-by: Ronak Mukeshbhai Bharadiya (rmbh) <rmbh@odoo.com> Co-authored-by: Dhrutik Patel (dhrp) <dhrp@odoo.com> Co-authored-by: Rémi Rahir (rar) <rar@odoo.com> Co-authored-by: Pierre Rousseau (pro) <pro@odoo.com> Co-authored-by: Vincent Schippefilt (vsc) <vsc@odoo.com> Co-authored-by: Marceline Thomas (matho) <matho@odoo.com>
This update fixes a bug that prevented users from correctly accessing and scraping component information from purchase orders created by other users. The issue stemmed from incorrect access rights, specifically related to analytic account lines. This ensures accurate data retrieval and reporting for project management workflows.
Original PR description
When scraping the component of a MO created by another user you could get an access error saying you don't have write access on account analytic lines. Steps to reproduce: ------------------- * Install timesheet_grid and project_mrp_account * Create product A, storable * Create product B with a cost of 20 and also storable * Update the available quantity of product B * Create a BoM for product A, it should only require one product B * Update Marc Demo access right and make sure he doesn't have access to any accounting stuff and he has atleast timesheet approver * Create a first MO for 1 product A and produce it * Create a second MO for 1 prodcuct A but just confirm it * Login as Marc Demo and try to scrap the component of the second MO > Observation: You get an access error here https://github.com/odoo/odoo/blob/d98afdc08b46bf458eaa287ea882cc7663286a59/addons/stock_account/models/analytic_account.py#L95 opw-5954989
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 resolves a technical issue preventing the posting of vendor bills in LATAM purchase journals. The system's hashing logic requires sequential document numbers, which conflicts with vendor-assigned numbers. By hiding the 'Secure Posted Entries with Hash' option for these journals, we ensure data integrity and avoid misleading security indicators.
Original PR description
Steps to reproduce 1. Install l10n_ar (or any LATAM localization). 2. Go to Accounting > Configuration > Journals and open a Purchase journal that has "Use Documents?" enabled. 3. Enable "Secure…
Steps to reproduce 1. Install l10n_ar (or any LATAM localization). 2. Go to Accounting > Configuration > Journals and open a Purchase journal that has "Use Documents?" enabled. 3. Enable "Secure Posted Entries with Hash". 4. Create and post a vendor bill with a high document number (e.g. 00001-00009999). 5. Create another vendor bill with a lower document number (e.g. 00001-00000100) and try to post it. Issue Posting the second vendor bill fails with: "This move could not be locked either because some move with the same sequence prefix has a higher number. You may need to resequence it." The hashing logic in account_journal.py enforces a strict continuous sequential chain per journal: https://github.com/odoo/odoo/blob/89993885823f7309b921145eacc7bbe2c3c1e427/addons/account/models/account_journal.py#L671-L678 In LATAM countries, vendor bill document numbers are assigned by the vendor, not by Odoo. A bill with a lower number can legitimately be entered after one with a higher number, which breaks the sequential assumption the hash chain relies on. Allowing it would produce a hash that no longer represents a proper chain, giving users a false sense of security. Sales journals are unaffected because Odoo controls their sequence. Solution Hide the "Secure Posted Entries with Hash" field on purchase journals that have "Use Documents?" enabled, preventing users from enabling an option that cannot work correctly for vendor-assigned document numbers. Sales journals keep the option available since Odoo controls their sequence. opw-6076673
This update fixes an issue where incorrect test tags were being used in Odoo 18, potentially causing the entire Hoost suite to fail. It backports a fix from a previous release to ensure the correct tag is applied, guaranteeing consistent test results across supported versions. This improves stability and reliability of the testing process.
Original PR description
When an error is parsed during the nightly, the default test tag is not correct in 18 and 19, what could lead to disabling the complete hoot suite if not taking enough care when disabling a test. This backports part of #234937 to ensure with have the correct tag in all version supporting hoot tests.
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 prevents the state of tasks from being reset when their project is changed, specifically when the task is in a 'done' or 'canceled' state. This ensures that tasks are not unnecessarily re-evaluated after completion or cancellation, improving efficiency and reducing potential processing delays. It corrects a previous behavior where project changes would reset task states, even when the task was already marked as finished.
Original PR description
Before this commit, when the project of a task is changed, even if the state of that task is done or cancelled, the state is reset (except if the task is blocked by another one). This behavior is not expected for a task done/cancelled, we should not reconsider that task since it has been done/cancelled and so there is no reason to re-consider it once the project changed. This commit makes sure the state of the task is not reset when the project changed only if the state is a closed state or Waiting state. task-5361864
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