Daily updates from Odoo
Friday, May 22, 2026
26 changes · 19.0
Enhancements to existing features
This update improves the accuracy of Indian Profit & Loss reports by incorporating 'Other Expenses' into the calculations. This ensures the net profit figure reflects all overhead costs, aligning with standard accounting rules and providing a more complete financial picture.
Original PR description
Update the Indian P&L report structure to capture accounts categorised under 'Other Expenses'. This ensures that the net profit calculation accounts for all overheads, aligning with standard accounting practices. task-6166626
Resolved issues and error corrections
This update resolves an error that occurred when automatically checking out employees with no defined check-out date, particularly when using the hr_work_entry_attendance module. The fix corrects a timezone calculation issue that was creating duplicate overtime entries, preventing the scheduled checkout action from functioning correctly. This ensures accurate overtime calculations for employees.
Original PR description
__ ## Short functional explanation of the error While investigating for bug reported on ticket 6036064, I found this other bug. It only occurs when hr_attendance and hr_work_entry_attendance are both…
__ ## Short functional explanation of the error While investigating for bug reported on ticket 6036064, I found this other bug. It only occurs when hr_attendance and hr_work_entry_attendance are both installed. When setting an attendance for an employee that has a check-in date but no check-out date, and running the scheduled action `Automatically check-out employees`, an `expected singleton` error occurs. ## Reproduction Steps 1. Install hr_work_entry_attendance. 2. Create an Employee. In the Payroll tab, set a start date for the contract. In the Settings tab, make sure their timezone is set to Brussels, and set the Overtime Ruleset field to Default Ruleset. 3. In Settings, check the Automatic Check-out box. 4. Go to Attendances. Create an attendance for the employee you just created. Set a Check-in date to 8 am on April 17th, for example, and leave the check-out field empty. 5. Open Scheduled Actions. Search the action Automatically check-out employees and click Run Manually. ### Expected behavior The attendance check-out should be set at the end of April 17th. ### Unexpected behavior An error occurs: `Expected singleton: hr.attendance.overtime.line(39, 40)` ## Origin of the issue When the attendance goes over several days, we set the check-out date to: https://github.com/odoo/odoo/blob/b293ce50e0fc9355ffd233557f079916b514eac7/addons/hr_attendance/models/hr_attendance.py#L618 This is a Naive date. However, it will later be considered as a UTC date. Because the employee's timezone is Brussels, this time will be transformed to 2 am next day when we retrieve attendance intervals. This will result in the creation of overtime entries for both days, causing the Expected Singleton error. https://github.com/odoo/odoo/blob/b293ce50e0fc9355ffd233557f079916b514eac7/addons/hr_attendance/models/hr_attendance.py#L687 https://github.com/odoo/odoo/blob/b293ce50e0fc9355ffd233557f079916b514eac7/addons/hr_attendance/models/hr_attendance.py#L667-L672 In our case, `self.check_in` = April 17th at 06:02:00 and `self.check_out` = April 17th at 23:59:59. Converted, we will obtain April 17th at 08:02:00 and April 18th at 1:59:59. Because of that, at the return: https://github.com/odoo/odoo/blob/b293ce50e0fc9355ffd233557f079916b514eac7/addons/hr_attendance/models/hr_attendance.py#L706 We will return a dict containing 2 intervals: one for 17th April and one for 18th April. We will then create overtime entries with such attendances: https://github.com/odoo/odoo/blob/b293ce50e0fc9355ffd233557f079916b514eac7/addons/hr_attendance/models/hr_attendance.py#L333 leading to the creation of 2 different overtimes for the same attendance. So, when we retrieve the overtime for that attendance: https://github.com/odoo/enterprise/blob/2d2056766441157dc45ebc37b677841c44e5c513/hr_work_entry_attendance/models/hr_version.py#L185, We get the 2. Thus when trying to access their status with: https://github.com/odoo/enterprise/blob/2d2056766441157dc45ebc37b677841c44e5c513/hr_work_entry_attendance/models/hr_version.py#L191 An Expected Singleton Occurs. __ opw-6036064
This update fixes a visual issue where long text in m2m tags' avatar fields would overflow and be cut off. The change adds a 'truncate' class to the spans, ensuring text is neatly cut off with an ellipsis when it exceeds the available space, improving the overall user experience.
Original PR description
Currently, the m2m tags avatar field does not have the truncate class for the spans. When the text is too long, it overflows and the rest is cut off. This commit adds the truncate class to the spans of the m2m tags so that the text is truncated with an ellipsis when it exceeds the available space. task-4809319 https://github.com/odoo/odoo/pull/256817
This update resolves an issue where branch VAT settings were incorrectly inheriting from the parent company, causing confusion and manual VAT adjustments. The change defaults branches to no VAT, ensuring the parent company remains the key provider and simplifies operations. Key settings are now restricted to the base group system.
Original PR description
Branches copied the parent's VAT, which made them their own signing entity and forced users to clear the VAT so the branch would reuse the parent's keys. Default branches to no VAT so the parent remains the key provider. Setting a VAT on a branch still exposes the key settings for the rare case separate keys are needed. Also restrict the key settings to base.group_system task_id - 6087168
This update fixes an issue preventing rental orders from being confirmed during public holidays. The original code incorrectly blocked resources due to overlapping holiday leaves, even when those leaves were specific to a resource's calendar. The fix ensures that holiday leaves are handled accurately, allowing rental orders to proceed smoothly during these times.
Original PR description
### **Steps to Reproduce:** 1) Install sale_renting_planning, hr_holidays with demo data. 2) Create a public holiday for Standard 40 hours/week 3) Create a service product with below configuration: -…
### **Steps to Reproduce:** 1) Install sale_renting_planning, hr_holidays with demo data. 2) Create a public holiday for Standard 40 hours/week 3) Create a service product with below configuration: - check Plan Service as Projector click on internal link and check `Sync Shifts and Rental Orders`. 4) Planning>Configuration>Materials for projector 1 and 2 remove working time. 5) create a rental order for this product during public holiday and click on confirm. ### **Error:** ``` ValidationError: This Sales Order can't be confirmed. No resources are available for the shifts in: Test. ``` ### **Root Cause:** while evaluating resource availability during a rental confirmation from [_planning_slot_vals_list_per_sol](https://github.com/odoo/enterprise/blob/a65723cae215495f0d18cb64b3da36ae6f06affd/sale_renting_planning/models/sale_order_line.py#L30-L117), it retrieved all leaves overlapping the rental period. If any of those leaves were global leaves(`resource_id=False`), then `all_resource_leave` is set to `True` at [1]. This forcefully marked all available resources as unavailable. It failed to check if the global leave actually belonged to the specific `calendar_id` of the available resources. which leads to blocking fully flexible resources or resource with different working calendar. [1]- https://github.com/odoo/enterprise/blob/a65723cae215495f0d18cb64b3da36ae6f06affd/sale_renting_planning/models/sale_order_line.py#L57-L60 ### **Fix:** - Update the `resource.calendar.leaves` search domain to explicitly filter for global leaves that have no `calendar_id` or that share a `calendar_id` with the available resources. - Modify the leave processing loop so that calendar-specific global leaves are only applied to resources operating on that exact calendar, rather than indiscriminately blocking all resources. **opw-6166749**
This update simplifies the process of creating intercompany sale and purchase documents by removing a redundant step. Previously, the system explicitly generated document sequences, which was causing issues with extensibility. Now, the system relies on the standard sequence assignment process, ensuring greater flexibility and ease of customization.
Original PR description
The intercompany sale and purchase document creation explicitly calls next_by_code to generate document names, even though sequence assignment is already handled in create(). This explicit sequence generation is redundant and reduces the extensibility of the sequence flow. Remove the redundant next_by_code calls and rely on the standard create() flow for sequence assignment. e.g. in custom implementations with separate Quotation and Sale Order sequences, the inter-company flow directly calls next_by_code, bypassing the standard sequence handling. Removing this call has no functional impact since `create()` already generates the sequence.
This update resolves an issue where the check-out cron process was generating duplicate overtime records, leading to errors. The fix ensures accurate overtime calculations, preventing disruptions to employee time tracking and improving system stability. It addresses a technical bug related to timezone handling.
Original PR description
Steps to reproduce: **Setup** 1. Install Work Entries (which will install the other necessary modules) 2. Create a new employee with a fully fixed working schedule 3. Make sure their contract date is…
Steps to reproduce: **Setup** 1. Install Work Entries (which will install the other necessary modules) 2. Create a new employee with a fully fixed working schedule 3. Make sure their contract date is set (preferably in the past) 4. Ensure that the employee and working schedule are in a timezone that has a positive UTC offset 5. Ensure that "Automatic Check-Out" is enabled in Attendances **Reproduction** 1. Create an attendance for your employee that falls right before a non-working day a. Make sure you do this so it spills over into the next day and will be picked up by the cron. I did this by going to the previous Friday and having the attendance start that morning. b. The date has to be after the employee's contract has begun 3. Remove the check-out time so the attendance is still running 4. Go into "Scheduled Actions" and manually run the cron 5. Observe the traceback In the "Automatic Check-Out" scheduled action for Attendances, we attempt to calculate the correct check-out time for attendances that are over the set hour tolerance. To do this, we temporarily set the check-out time of the attendance to 11:59PM of the date of check-in. When we set this, in timezones with a positive UTC offset, the time will spill over into the next day. This causes two overtime records to be temporarily generated when normally, only one is generated. Ths causes issues when a function in teh Work Entries module is ran, as it checks the status of the overtime lines. Since there are two, we get a singleton error here, as it only expects one overtime line. This fix corrects this by ensuring that the write method is not called on the attendance record, utilizing a temporary variable instead, and preventing the multiple overtimes from ever being generated. [opw-6198323](https://www.odoo.com/odoo/project/49/tasks/6198323?debug=assets)
This update corrects a restriction in the MPF account validation process, allowing employers to manage multiple accounts under the same registration number – a common business practice. Previously, the system incorrectly blocked valid multi-account configurations. This change ensures accurate tracking of employer MPF accounts and simplifies payroll processing.
Original PR description
An employer can legitimately hold multiple employer account numbers under the same MPF registration number. The previous constraint rejected any two MPF schemes sharing the same registration number, blocking valid multi-account configurations. Fix the validation to only restrict the duplicate based on the combination of registration number and employer account number. task-6232561
This update corrects a previous issue where Avatax fiscal positions weren't being created correctly for specific countries, particularly the US. With the US now having its own CoA, the system now automatically generates the appropriate Avatax fiscal positions based on localization, and also includes Canada for broader coverage. This ensures accurate financial reporting.
Original PR description
The fiscal position was being created specifically for countries using the Generic CoA. This stems from before the US had its own CoA [1]. Because of this, US companies no longer had an Avatax fiscal position created for them. Now that the US has its own CoA, we move to a simpler `@template()` approach and take the opportunity to add Canada as well. [1] odoo/odoo#223745 task-6228639
This update resolves an issue preventing users from unreconciling SEPA CT batch payments with a 'pending' online status. Previously, the system incorrectly blocked this process, causing errors. The fix allows for proper bank statement reconciliation, ensuring accurate financial reporting.
Original PR description
**Issue:** The account_online_payment module overrides `action_draft` to raise a UserError for sepa_ct payments belonging to a batch with a `payment_online_status` = 'pending' or 'accepted'. This…
**Issue:** The account_online_payment module overrides `action_draft` to raise a UserError for sepa_ct payments belonging to a batch with a `payment_online_status` = 'pending' or 'accepted'. This blocks the bank statement unreconciliation process. When `delete_reconciled_line` is called, it tries to set payments to draft and re-post them, despite it being an internal process not a manual user modification. **Steps to reproduce:** - Setup a 'sepa_ct' payment method on a bank journal. - Create a bill with a vendor with a trusted bank account. - Create a payment for that bill with a 'sepa_ct' payment method. - Add the payment to a batch. - Manually set the `payment_online_status` = 'pending'. - Create a bank transaction and reconcile it with the batch. - Try to unreconcile the lines on the transaction - Result: UserError 'You cannot modify a payment that has already been sent to the bank.' **Fix:** Pass a context flag to `action_draft` during the unreconciliation flow so that the validation is skipped when the call originates from the internal unreconcile flow. OPW-6080464
This update resolves a bug that caused errors during rental order confirmation in versions 17 and 18, and a subsequent division-by-zero error in newer versions. The fix skips unnecessary calculations when a Bill of Materials (BoM) isn't found, ensuring the order can be confirmed smoothly. This improves the reliability of the rental order process.
Original PR description
**Steps to produce:** - Install `sale_mrp_renting`. - Enable `Rental Transfers` from settings. - Create a rental product. - Create two variants of the product. - Create a BoM for one variant and set…
**Steps to produce:** - Install `sale_mrp_renting`. - Enable `Rental Transfers` from settings. - Create a rental product. - Create two variants of the product. - Create a BoM for one variant and set its type to `Kit`. - Create a rental order using the other variant. - Try to confirm the order. **Issue:** In versions 17 and 18, a UserError is raised- ``` The unit of measure Units defined on the order line doesn't belong to the same category as the unit of measure False defined on the product. Please correct the unit of measure defined on the order line or on the product, they should belong to the same category. ``` From version 18.2 onward, a different error occurs ``` ZeroDivisionError: float division by zero ``` **Root cause:** In versions 17 and 18: At [1], since the BoM is created for a different variant , no BoM is found for the selected variant. As a result, when `_compute_quantity` is called at [2], the `bom.product_uom_id` is empty, which leads to the `UserError` from `_compute_quantity` method. In version 18.2+: At [1], as the BoM is empty. Then at [3], `_compute_kit_quantities` is called with an empty BoM, and at [4], this results in a division by zero error. **Solution:** Skip the computation when no BoM is found and directly return the quantity to avoid both the `UserError` and the `ZeroDivisionError`. [1]https://github.com/odoo/enterprise/blob/eaa70dcab2b49eadca1cf36008dd80cfccbb8e4e/sale_mrp_renting/models/sale_order_line.py#L13 [2]https://github.com/odoo/enterprise/blob/eaa70dcab2b49eadca1cf36008dd80cfccbb8e4e/sale_mrp_renting/models/sale_order_line.py#L20 [3]https://github.com/odoo/enterprise/blob/eaa70dcab2b49eadca1cf36008dd80cfccbb8e4e/sale_mrp_renting/models/sale_order_line.py#L21 [4] https://github.com/odoo/odoo/blob/91b09dbea5c8a306b5e9d2120466777f0248b360/addons/mrp/models/stock_move.py#L676 **opw-6082434**
This update resolves an issue where the VIES validation process incorrectly flagged invoices without VAT as problematic during tax return creation. The fix ensures VIES validation only applies to tax returns where a fiscal position with VAT requirements is present, improving accuracy and preventing unnecessary errors. This ensures proper compliance with VAT regulations.
Original PR description
Vies validation should only occurs with moves having fiscal position with vat required Steps: - With base_vat, and european l10n like BE installed - Make a bill for a partner with no vat or invalid vat - Create a tax return - Open the return -> the 'check_partner_vies' fails opw-6200246
This update resolves an issue where generating a lot in a manufacturing order would reset the intended production quantity back to zero. The fix ensures the quantity is saved before lot generation, preventing this unexpected reset and maintaining accurate production tracking. This improves the reliability of the manufacturing process.
Original PR description
Step to reproduce: - Create a MO with a lot tracked product (enable it in settings) and a work center - Put the quantity to produce to more than 1 - Confirm the MO - Use the smart button to go to the Shop floor - Click on the three dots and click on "Register production / serial" - Put the quantity to produce to 1 and click on "Generate lot" - The quantity to produce is updated to 0, which is not correct, it should stay to 1 Cause: The quantity to produce was not saved before generating the lot, so after the reload triggered by the generation of the lot, the quantity to produce was reset to the last saved value, which is 0. Task-6158833
This update fixes an issue where the Point of Sale system incorrectly applied AvaTax fiscal positions to customers even when AvaTax wasn't activated in the POS. The change ensures that if a customer doesn't have a configured fiscal position, the system correctly defaults to AvaTax, preventing incorrect tax calculations. This improves the accuracy and reliability of POS transactions.
Original PR description
**Steps to reproduce:** - Install Accounting and Point of Sale - In Accounting settings, activate "AvaTax" - Configure the AvaTax fiscal position and activate "Detect Automatically" option - Make…
**Steps to reproduce:** - Install Accounting and Point of Sale - In Accounting settings, activate "AvaTax" - Configure the AvaTax fiscal position and activate "Detect Automatically" option - Make sure that the other fiscal positions don't have that option set or that they are ordered after the AvaTax one - Go to the settings of a point of Sale - Activate "Flexible Taxes" and configure "Default" and "Allowed" - Make sure that AvaTax fiscal position is not allowed - Do not activate "AvaTax PoS Integration" - Open a POS session - Select a customer with an address in the US and without fiscal position - Check the fiscal position **Issue:** The selected fiscal position is the AvaTax one even though AvaTax is not activated in the POS. **Cause:** We force the use of a fiscal position if it is configured on a customer. In this case, as no fiscal position is configured on the customer, we try to retrieve one that matches the condition and the AvaTax one is selected. **Solution:** When searching for the fiscal position of a customer, if AvaTax is not configured in the POS and if its fiscal positions are not allowed in POS, we ignore the fiscal positions using AvaTax. opw-6154089 Forward-Port-Of: odoo/enterprise#116626
This update fixes an issue where users couldn't undo the insertion of a prompt banner. The fix ensures that undo functionality correctly removes prompt banners, improving user experience and data consistency. It addresses a bug preventing proper history management within the AI editor.
Original PR description
Problem: After inserting a prompt banner, undo does not remove it. Cause: History commands were ignored when the selection was inside the prompt banner, preventing undo from handling banner insertion. Solution: Handle history commands even when the selection is inside the prompt banner. Steps to reproduce: - Insert a prompt banner using `/prompt` + Enter. - Press Ctrl + Z. - Observe that the banner is not removed. task-6230530
This update addresses an issue causing incorrect balances in the French Balance Sheet reports, specifically related to accounts 119 and 129. The change reverts a previous update that introduced this problem, ensuring accurate financial reporting for French businesses using Odoo Enterprise.
Original PR description
This reverts commit 4ce40ed3be6981b32292d98621f1071d4a431e21, after problems have been reported in the display of accounts 119/129, which leaded to an unbalanced Balance Sheet. See opw-6229773
This update fixes a previous issue where weekly subscription revenue wasn't accurately reflected on the project dashboard. The change ensures that revenue from weekly subscriptions is now correctly calculated and displayed, improving the accuracy of financial reporting for projects using this subscription type.
Original PR description
…plan Before this commit, the #113918 corrects the project dashboard revenue when a yearly subscription is linked to that project. The problem is the fix does not take into account the weekly subscription. This commit handles the subscriptions with plan unit set to week and linked to the project to correclty set the right revenue in to invoice column. opw-5916688
The original query was inefficiently re-querying account statements for partner name matching, leading to significant performance overhead. This change eliminates redundant statement lookups, drastically reducing query execution time and improving partner search responsiveness. The fix focuses on efficient data retrieval based on the initial statement match.
Original PR description
Various improvements related to performance for `<account.bank.statement.line>._retrieve_partner`
This update resolves an issue where downloading signed documents through the Sign app was failing due to a compatibility problem with the pypdf library. The fix moves the document compression step to the correct object, ensuring compatibility with newer versions of pypdf and preventing errors. This ensures reliable document downloads for users.
Original PR description
This [related PR] introduced a compression pass after calls to mergePage(). However in newer versions of pypdf (>=3.5.2), compress_content_streams() can only be called on pages of PdfWriter. An error would be raised when called on pages of a PdfReader. Steps to reproduce ----- 1. Run Odoo with pypdf>=3.5.2 2. Sign and download a document in the Sign app 3. Traceback occurs Fix ---- This commit moves the compression to the writer object, after the merged page has been added. Related pr: https://github.com/odoo/odoo/pull/261879 runbot-937761 Forward-Port-Of: odoo/enterprise#118111 Forward-Port-Of: odoo/enterprise#117756
This update corrects a visual issue in comparison reports (Balance Sheet, P&L) where total values were incorrectly duplicated in both the line and header sections when 'Add total below sections' was enabled. The change ensures that totals are only displayed when a section is expanded, improving report clarity and accuracy.
Original PR description
Right now when you expland a section in comparison mode like in the Balance Sheet and P&L, if "Add total below sections" is enabled in the report then it shows in both the header and totals sections. This commit clears up that by only showing the value in the line when it's unexpanded, but once it is expanded it is hidden. task-6190986
This update fixes a potential error in the generic tax report that prevented error messages from appearing when dealing with negative net values. The change ensures that the report accurately checks for tax discrepancies, regardless of whether the net amount is positive or negative, improving report reliability.
Original PR description
**Issue:** In the generic tax report, a check is performed on the report lines to ensure that the declared tax amount is consistent with the expected amount. If the difference between the declared tax amount and the expected one is higher than 0.1% of the declared net amount, then a error message is displayed. If the net amount is negative, the error message is never displayed because the computed percentage of the tax difference is negative and therefore lower than 0.1% (i.e. 0.001). opw-6014350 Forward-Port-Of: odoo/enterprise#117990
This update resolves an issue where removing a general note from a restaurant orderline caused the preparation display to incorrectly mark the line as cancelled and create a new one. The fix ensures that note history is recorded regardless of whether the note is confirmed, allowing the system to update existing orderlines instead of creating duplicates.
Original PR description
Steps to reproduce: --------- 1. Create an order with an orderline general note. 2. Send the order to the preparation display. 3. Remove the note from orderline. 4. Resend the order Issue: --------------- Removing the note changes the preparation line key, so the preparation display marks the old line as cancelled and creates a new one instead of updating the existing line. Cause: ----------- The note history was only recorded when the note was confirmed. If the user simply removes/clears the note, no note history entry is generated, so the backend cannot match the previous key with the updated key. Fix: ---------- Record note history even when the note is discarded (not only when confirmed. This allows the backend to match the old and new keys and update the line instead of cancelling it. Task-6101501 Related PR - https://github.com/odoo/odoo/pull/258632 Forward-Port-Of: odoo/enterprise#117943 Forward-Port-Of: odoo/enterprise#113514
This update removes a redundant step in creating embedded actions within Odoo. Previously, a separate translation was required, but now that embedded actions automatically inherit their display names, this manual process is no longer necessary. This streamlines the action creation workflow and ensures consistent translations.
Original PR description
Now that `ir.embedded.actions` delegates its display name to the linked action, the manual translation copy on embedded action creation is no longer needed. Related: https://github.com/odoo/odoo/pull/262981 Forward-Port-Of: odoo/enterprise#116793 Forward-Port-Of: odoo/enterprise#116369
This update corrects a translation error in the Odoo Enterprise Gantt view. The button used to toggle display modes was not properly translated, preventing users from seeing the view in their preferred language. This fix ensures all users can consistently access and understand the Gantt view's options.
Original PR description
The title of the button allowing to toggle the display mode in the Gantt view was not translated. This commit adds a getter to compute the title based on the current display mode, and uses it in the template. Issue reported by translator. Forward-Port-Of: odoo/enterprise#117807 Forward-Port-Of: odoo/enterprise#117739
This update resolves an issue where product variant prices didn't automatically update when the cost price was modified. The fix ensures that changes to the cost price immediately trigger an update to the 'On Sale Price,' eliminating the need for manual price list adjustments. This improves accuracy and efficiency in managing product pricing.
Original PR description
When we create a product variant and have a pricelist which is based on the cost price, and change the cost price, the on_sale_price doesn't update. You have the change the price list to other and back to the one you want for it to trigger change because the _onchange_compute_pricing only gets triggered if there's change on pricelist (pricer_sale_pricelist_id), and sales price (lst_price). Steps to Reproduce: 1.Create a pricelist and add a line with "formula" price type, and based on "cost", 2.Create a product variant, and add the pricelist just created. 3.Change the "Cost". The "On Sale Price" doesn't update. 4.You have to change the price list to some other and back to the one you want for the "On Sale Price" to update. To fix the issue, we add the field Cost (standard_price) on api.onchange, so when we change the cost it'll update the "On Sale Price" right away. opw-5947995 Forward-Port-Of: odoo/enterprise#111892
Miscellaneous changes