Daily updates from Odoo
Navigate
Branch
Tuesday, June 16, 2026
260 changes
12 changes
Resolved issues and error corrections
This update fixes an issue where multiple taxes on Brazilian sales orders were displayed on a single line, making them difficult to read. The change adds a line break to display each tax detail on its own line, improving clarity and usability for users.
Original PR description
Upon creating a SO in the Brazilian localization and computing taxes, tax details are displayed on the SO lines. However, when multiple taxes are applied, all tax details are shown on a single line, making them difficult to read. Add a line break between tax details so that each tax is displayed on a separate line. Before: https://www.awesomescreenshot.com/image/61178015?key=703ceba935bbf0b97f4b45c649722827 After: https://www.awesomescreenshot.com/image/61178078?key=3b980b91b7657aa48dec9b825549ebeb opw-6234768 Forward-Port-Of: odoo/enterprise#120527
This update corrects a bug that caused errors when date calculations used a missing or `None` offset value. The fix ensures that date movements are avoided when an offset isn't explicitly provided, preventing unexpected behavior in AI-powered features. This improves the reliability of date-based computations.
Original PR description
Currently, an exception is raised when `offset` is `None` and is compared
with `MIN_OFFSET` or `MAX_OFFSET`.
Currently `offset = op.get("offset", 1)` to assign a default value of `1` when
the `offset` key was missing from `op`. However, this does not handle cases
where the `offset` key is present but its value is `None`.
This commit fixes the issue by defaulting `offset` to `0` when it is missing or
`None` in `op`. Using the default value ensures no date movement occurs
when `offset` is not explicitly provided.
Sentry-7448086997
Forward-Port-Of: odoo/enterprise#118466This update corrects a bug where inactive or archived taxes were incorrectly displayed within the bank reconciliation process. The fix ensures that users can only select active taxes, improving data accuracy and preventing potential errors during reconciliation reporting. This resolves issue OPW-6245641.
Original PR description
### Issue:
When editing a line within the bank reconciliation widget, inactive and archived taxes are incorrectly available for selection
### Cause:
The bank reconciliation edit line form view carried the `{'active_test': False}` context on the `tax_ids` field
This context allowed archived taxes to be loaded and selected during creation and manual edition
### Fix:
Explicitly force `active_test: True` in the view context for the tax field to ensure only active taxes can be searched and selected by the user
### Steps to reproduce:
- Install `account_accountant`
- Create a new tax and set it to inactive
- Go to the Bank Reconciliation widget
- Create a bank statement line
- Set the account to 600000 Expenses
- Edit the line by clicking on the pencil icon
- Open the Taxes selection dropdown
Before the fix, the inactive tax is visible and available for selection by default
opw-6245641
Forward-Port-Of: odoo/enterprise#119522This update improves the accuracy of the reconciliation process by ensuring the matching dialog displays both draft and posted journal items. Previously, the dialog was limited, showing fewer items due to a default filter. This change provides a more complete view for users to reconcile transactions.
Original PR description
The reconcile badge counts draft and posted journal items, but the matching dialog forces a posted filter by default, this makes the dialog show fewer lines than count as it discards the draft ones. Remove the default posted search filter so the dialog displays all matching items. task-6234801 Forward-Port-Of: odoo/enterprise#118146
This update adjusts the format of unit prices in Polish tax invoices (FA3) to ensure accurate calculations and alignment with tax regulations. While the current system technically complies with KSEF requirements, this change improves invoice accuracy by using the maximum allowed decimal places. This resolves a potential discrepancy between unit price and total without tax.
Original PR description
**STEP TO REPRODUCE** 1. Create an invoice with a unit price of 10.005 and qty of 2. 2. Send the invoice to ksef. 3. Open the xml and notice P_9A (unit price) is 10.00 and P_11 (total without tax) is 20.01 Which is inconsistent (10.00 * 2 =/= 20.01). This PR increase the decimal places of P_9A to 8 digits which is the maximum allowed by the FA(3) format. Note that Ksef doesn't verify the untaxed unit price * quantity = total without tax, so the invoice we send are technically valid. However, it's best to generate invoice where the numbers add-up. opw-6203896 Forward-Port-Of: odoo/odoo#263812
This update optimizes the process of validating purchase orders by preventing unnecessary calculations of location weights. By reordering checks, the system avoids computing weights when other conditions already rule out a location, significantly speeding up validation times, especially with large numbers of locations. This improves overall system performance and responsiveness.
Original PR description
When checking if a stock.move.line can use a location as destination with the method `_check_can_be_used()`, we start by checking if the incoming products can be stored without exceeding the maximal…
When checking if a stock.move.line can use a location as destination with the method `_check_can_be_used()`, we start by checking if the incoming products can be stored without exceeding the maximal weight of the location. This needs to call the `_get_weight()` method to compute the forecasted weight for the location. This method relies on heavy computations and can become a bottleneck when we need to loop over a high number of locations. In some cases, we can rule out the location based on less expensive conditions that are verified after the weight one. We propose to invert the conditions check order to avoid computing the location weight when other conditions are not met. Steps to reproduce --------------- - Install stock and purchase modules; - Enable storage locations and categories in the settings; - Create a storage category: allow_new_product = same, max_weight=10.0 kg; - Create N locations using this category, parent_id=WH/stock; - Create a putaway rule to each location from WH/stock, for the new storage category and using a product A with a weight of 2 kg; - Create a stock.quant per location to store a product B, weight=2kg; - Create a purchase order with X lines for 1 unit of product A; - Validate the purchase order. The validation should take several seconds to execute as every locations will be rejected due to the storage category, but it will call _get_weight() first. Benchmark --------------- This improvement is very data specific and will be most useful when a lot of locations are using a storage category of type "empty" or "same". In addition, it also relies on the order in which we are treating the locations, if the acceptable locations are the first to be received in the method, it won't need to loop over all of them. The following benchmark was established in a production database in which every 6068 locations are using a category of type "same". | No stock.move.lines | Before PR | After PR | |---------------------|-----------|----------| | 40 | 168 s | 7.3 s | | 72 | 264 s | 12.33 s | When the only condition that can reject locations is the exceeding weight, this modification will slow down the process. However, the time loss in this case is smaller than the gain in the first case. The following benchmark was obtained by validating a purchase 1 line order with only fully filled locations. | No locations | Before PR | After PR | |--------------|-----------|----------| | 500 | 2.02s | 2.37 s | | 2000 | 7.85s | 9.76 s | | 10000 | 39.16 s | 48.86 s | opw-5949370 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#270125 Forward-Port-Of: odoo/odoo#266872
This update ensures that changes made to leave requests within the popover form are now automatically saved. Previously, edits weren't persisting, causing data inconsistencies. The fix adds a delay and automated saving mechanism to prevent rapid changes and maintain accurate leave records.
Original PR description
Steps:- - Navigate Payroll > Time Offs. - Create a leave of any type (STO, PTO etc...) - Click on the pill after creating leave. - Try to change values on popover. - Changed values are not saved!! Cause:- There is no save action trigger on popover form. Fix:- - Hooked `debounceAutoSave` method on every field value changes. - `debounceAutoSave` will save record with 500ms debounce to batch rapid changes. - Set popover form to readonly mode for validated leaves (validate/validate1 states) - Remove readonly condition from action buttons footer to keep Refuse/Delete accessible task-[6117310](https://www.odoo.com/odoo/project/1251/tasks/6117310) Forward-Port-Of: odoo/enterprise#114445
This update resolves an issue where the VoIP softphone would throw errors when receiving calls from numbers not linked to a contact. The fix ensures that a task can be created from a contactless call and prevents the 'Tasks' button from appearing when no contact is associated with the call, improving usability.
Original PR description
**Problem:** Two linked errors occur in the Phone (VoIP) softphone when a call is made to or received from a number that is not linked to any contact. **Steps to reproduce:** 1. Receive or make a…
**Problem:** Two linked errors occur in the Phone (VoIP) softphone when a call is made to or received from a number that is not linked to any contact. **Steps to reproduce:** 1. Receive or make a call from the softphone using a phone number that is not linked to any existing contact. 2. Open the call's actions and click "Create" > "Task". -> A client error appears and the task is not created. 3. On a voip.call form whose Contact has been removed, click the "Tasks" smart button. -> A server error is raised. **Current behavior:** Step 2 raises "Cannot read properties of undefined (reading 'id')" and step 3 raises "ValueError: not enough values to unpack (expected 1, got 0)". **Expected behavior:** Creating a task from a contactless call should open the task form without a default contact, and the Tasks smart button should not be reachable when the call has no contact. **Cause of the issue:** Both code paths assume a call always has a linked partner. In `action_list_patch.js`, `getCreateTaskAction` only checks `shouldShowTaskButton` in its predicate but reads `this.contact.id` in its `onClick`; for a contactless call `this.contact` is undefined. In `voip_call.py`, `action_view_tasks` delegates to `self.partner_id.action_view_tasks()`, whose `ensure_one()` fails on the empty partner recordset. Unlike the softphone "view tasks" action, which is gated by `this.contact?.task_count`, the form stat button had no visibility guard. **Fix:** The create-task action now mirrors the existing contact and lead actions, which already build their context conditionally on `this.contact`, so a contactless call simply opens the task form with no default partner. The Tasks stat button is hidden when there are no tasks, matching the softphone predicate and ensuring the partner-less code path is never reached. opw-6246641 Forward-Port-Of: odoo/enterprise#119412
This update resolves an issue where demo leave allocations wouldn't properly validate during an upgrade from Odoo 17 to 18. The fix ensures that the approval process is executed correctly, preventing data inconsistencies and ensuring accurate leave tracking after upgrades. This improves the stability of the Indian Payroll module.
Original PR description
Steps: - Install an Odoo 17.0 database with the Indian Payroll module and demo data. - Upgrade the database to 18.0. Issue: - The Indian payroll demo data creates leave allocations and approves them…
Steps: - Install an Odoo 17.0 database with the Indian Payroll module and demo data. - Upgrade the database to 18.0. Issue: - The Indian payroll demo data creates leave allocations and approves them through an XML function call. - During a fresh installation, demo files are loaded in 'init' mode, so the approval function is executed and the allocations move from 'confirm' to 'validate'. - However, during a 17.0 >>> 18.0 upgrade, demo files are loaded in 'update' mode. Odoo automatically loads demo files with 'noupdate=True' from the load_demo() >> load_data() function: - This value is passed to the XML importer and becomes the default noupdate state for the file. Since the demo XML file does not explicitly override this value, the function tag uses 'noupdate=True'. - When the XML parser reaches the approval function, _tag_function() skips its execution because of noupdate = 'True' and mode = 'update' condition. - As a result, the approval function is not executed during the upgrade and the leave allocations remain in 'confirm' state. Subsequent demo payroll data expects validated allocations and fails during loading. Fix: - Explicitly set 'noupdate=0' on the demo XML file. This overrides the default 'noupdate=True' value applied to demo files, making the parser evaluate the section with 'noupdate=False'. - As a result, '_tag_function()' executes the approval method during upgrades, the demo leave allocations are validated in both fresh/new db installations and 17.0 >>> 18.0 upgrade scenarios. runbot error-https://runbot.odoo.com/odoo/error/230430 task-6268381 Forward-Port-Of: odoo/enterprise#119217
This update fixes a technical issue that could cause errors when comparing history differences in the web editor. The fix ensures the system handles empty history data gracefully, preventing a potential error and improving stability. This change ensures the web editor functions reliably for all users.
Original PR description
If, for whatever reason, the history we try to compare is an empty string, we might get a value error thrown. We guard the code to avoid the error. see :https://github.com/odoo/odoo/issues/269149 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#269722
This update enhances Odoo's compliance with French VAT regulations by ensuring accurate data is submitted to the PEPPOL endpoint. Previously, completing additional information fields didn't properly populate the PEPPOL data. Now, the system checks for siret, siren, and company registry identifiers in that order, significantly improving VAT reporting accuracy.
Original PR description
Before this commit, completing the additional information would not fill the peppol endpoint. Now, we will first check the siret in the addional information, then the siren and then the company registry. task-6272171 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update fixes an issue where customers using the 'Pick up in store' delivery method weren't receiving email confirmations after placing orders. The root cause was that pickup addresses were being automatically archived, preventing notifications. The fix disables archiving of pickup addresses to ensure customers receive timely updates.
Original PR description
Customers placing an order without logging in and with the "Pick up in store" delivery method are not notified when the delivery is confirmed Steps to reproduce: 1. Install eCommerce and Sales 2. Go…
Customers placing an order without logging in and with the "Pick up in store" delivery method are not notified when the delivery is confirmed Steps to reproduce: 1. Install eCommerce and Sales 2. Go to Settings > Website > Delivery and enable "Click & Collect" 3. Go to Settings > Inventory > Shipping and enable "Email Confirmation" 4. Go to Website > Configuration > Payment Providers and Install Demo 5. Go to Website > Configuration > Delivery Methods and open "Pick up in store", set YourCompany as warehouse and publish it 6. Go to Sales > Products, open product "Office Lamp", click on "Update Quantity" in the status bar and add 5 units 7. Log out 8. Go to the shop, add product "Office Lamp" to the cart and checkout 9. Fill in the address form and continue checkout 10. Select "Pick up in store" as delivery method and select a location 11. Confirm the order and pay with Demo 12. As user Mitchell Admin, go to Sales, remove the default filter and open the newly created sale order 13. Open the related delivery with the smart button and validate it 14. No delivery order confirmation was sent to the customer (check emails) Issue: Pickup addresses are always inactive, preventing the partner from receiving email confirmation Solution: Disable archiving of pickup addresses opw-6095396 Forward-Port-Of: odoo/odoo#265392 Forward-Port-Of: odoo/odoo#263005
20 changes
Enhancements to existing features
This update enhances the synchronization of financial transactions with Fiskaly for both retail and restaurant orders. It streamlines the process by sending complete transaction data only upon order validation, improving efficiency and accuracy. This change ensures smoother integration with Fiskaly's systems.
Original PR description
In this commit: ------------------ - Maintain separate Fiskaly transaction flows for retail (short tx) and restaurant (long tx) orders as discussed with the Fiskaly team. - `Initialize order…
In this commit: ------------------ - Maintain separate Fiskaly transaction flows for retail (short tx) and restaurant (long tx) orders as discussed with the Fiskaly team. - `Initialize order transactions` with an empty payload when the `first product` is added. - Start `receipt transactions` with an empty payload when the `first payment line` is added. - For retail flows, no intermediate order updates are sent to Fiskaly before finalization. - For restaurant flows, create additional transaction updates during kitchen synchronization. Ensure already synchronized products are not resent, and only newly added or updated quantities are included in the payload. - `Finalize order and receipt transactions` with complete order lines and payment details when we validate the order. task: 6208963 Reference: <img width="1863" height="1285" alt="de_tss_flow" src="https://github.com/user-attachments/assets/9140788e-7948-4a08-9f11-27197b22ca8b" /> Forward-Port-Of: odoo/enterprise#120218 Forward-Port-Of: odoo/enterprise#117526
This update automatically populates the company registry information in Odoo for Swedish businesses based on their VAT number. Swedish VAT numbers always start with 'SE' followed by digits, and this change uses that pattern to accurately identify and fill in the company registry. This improves data accuracy and streamlines accounting processes for Swedish customers.
Original PR description
Organization number is part of the VAT number Official reference: https://www.skatteverket.se/foretag/moms/kopavarorochtjanster/inkopfranandraeulander/kopavarorfranandraeulander.4.3a7aab801183dd6bfd380005738.html > I Sverige börjar alla VAT-nummer med bokstäverna SE (landskoden) och avslutas med siffrorna 01. Om du har en enskild firma följs landskoden av de 10 siffrorna i ditt personnummer. Om du har ett bolag eller en förening följs landskoden av de 10 siffrorna i organisationsnumret. VAT-numret skrivs utan bindestreck. which translates to > In Sweden, all VAT numbers begin with the letters SE (the country code) and end with the digits 01. If you are a sole proprietor, the country code is followed by the 10 digits of your personal identification number. If you are a corporation or an association, the country code is followed by the 10 digits of your organization number. The VAT number is written without a hyphen. Forward-Port-Of: odoo/odoo#269590
Resolved issues and error corrections
This update resolves an issue where the car simulation wasn't appearing for Belgian employees with a car order. The fix ensures the car information and simulation button are correctly displayed by addressing a race condition in the salary calculation process. This improves the user experience for employees using the salary configuration tool.
Original PR description
- Step to reproduce: open the salary configurator for a belgian employee with only a car to order linked to its version. Car info and simulation button are not appearing and the page reactivity is broken
- Cause:
- Broken page reactivity is due to a promise that never resolve in willStart super call because of race condition caused by overlapping calls to a debounced function
- Car model description is computed and displayed only when a new value is passed
- Simulation button is rendered only on select value change
- Solution:
- Execute `updateGross()` and `setUpBenefits()` sequentially in parent willStart to prevent overlapping salary recomputations during startup
- Implementing a condition that handle the case of the new car value being already set in the description computation function
- Triggering the new car change function in willStart so that the simulation button is rendered on page load
Task: 6241194
Forward-Port-Of: odoo/enterprise#118647This update resolves an issue where inactive or archived taxes were incorrectly displayed in the bank reconciliation widget. The fix ensures that users only see active taxes during reconciliation, improving data accuracy and preventing potential errors in financial reporting. This change enhances the reliability of the reconciliation process.
Original PR description
### Issue:
When editing a line within the bank reconciliation widget, inactive and archived taxes are incorrectly available for selection
### Cause:
The bank reconciliation edit line form view carried the `{'active_test': False}` context on the `tax_ids` field
This context allowed archived taxes to be loaded and selected during creation and manual edition
### Fix:
Explicitly force `active_test: True` in the view context for the tax field to ensure only active taxes can be searched and selected by the user
### Steps to reproduce:
- Install `account_accountant`
- Create a new tax and set it to inactive
- Go to the Bank Reconciliation widget
- Create a bank statement line
- Set the account to 600000 Expenses
- Edit the line by clicking on the pencil icon
- Open the Taxes selection dropdown
Before the fix, the inactive tax is visible and available for selection by default
opw-6245641
Forward-Port-Of: odoo/enterprise#119522This update fixes an issue where the reconciliation dialog in the Enterprise accounting module only displayed posted journal items. By removing a default filter, the dialog now shows all matching items – both draft and posted – providing a more complete and accurate reconciliation view. This improves the user's ability to resolve discrepancies.
Original PR description
The reconcile badge counts draft and posted journal items, but the matching dialog forces a posted filter by default, this makes the dialog show fewer lines than count as it discards the draft ones. Remove the default posted search filter so the dialog displays all matching items. task-6234801 Forward-Port-Of: odoo/enterprise#118146
This update resolves an issue where stock relocation incorrectly swapped the order of reservations for deliveries. After moving stock internally, reservations were being reassigned in the wrong order, leading to incorrect quantities. This fix ensures that reservations are maintained in the correct priority after stock relocation, preventing delivery discrepancies.
Original PR description
Version: ---------- - 18.0+ Steps to reproduce: ------------------- - Install `stock` module - Enable `Storage Locations` from Inventory settings - Create a tracked storable product with on-hand 8…
Version: ---------- - 18.0+ Steps to reproduce: ------------------- - Install `stock` module - Enable `Storage Locations` from Inventory settings - Create a tracked storable product with on-hand 8 units in `Shelf 1` - Create Delivery 1 for 5 units and click `Mark as To Do` - Create Delivery 2 for 5 units and click `Mark as To Do` - Verify reservations: - Delivery 1 reserves 5 units - Delivery 2 reserves remaining 3 units - Relocate all 8 units from `Shelf 1` to `Shelf 2` using the `Relocate` action from `stock quant` - Reopen both deliveries Issue: ------ After relocating stock between internal locations, reservations are reassigned in the wrong order: - Delivery 2 becomes fully reserved with 5 units - Delivery 1 is reduced to 3 reserved units This incorrectly swaps the original reservation priority between deliveries. Cause: ------ The relocation wizard starts from: `stock.quant.relocate.action_relocate_quants()` which calls `move_quants()`: https://github.com/odoo/odoo/blob/d3eebbd1c27e8a039bb55cdf2a82d464e06ffa8c/addons/stock/wizard/stock_quant_relocate.py#L70 `move_quants()` validates an internal stock move through `_action_done()`: https://github.com/odoo/odoo/blob/d3eebbd1c27e8a039bb55cdf2a82d464e06ffa8c/addons/stock/models/stock_quant.py#L1572 During validation, `_synchronize_quant()` moves the stock quantity from `Shelf 1` to `Shelf 2`. However, the already reserved delivery move lines still reference `Shelf 1`. This temporarily makes the source quant negative (`available_qty < 0`), triggering `_free_reservation()`: https://github.com/odoo/odoo/blob/d3eebbd1c27e8a039bb55cdf2a82d464e06ffa8c/addons/stock/models/stock_move_line.py#L695-L700 Inside `_free_reservation()`, move lines are ordered using `current_picking_first`: https://github.com/odoo/odoo/blob/d3eebbd1c27e8a039bb55cdf2a82d464e06ffa8c/addons/stock/models/stock_move_line.py#L816-L821 Since both deliveries share the same scheduled date, the fallback ordering uses `-cand.id`, causing Delivery 2 (higher id) to be processed before Delivery 1 (lower id). The reservation cleanup therefore happens in this order: - Remove Delivery 2 reservation (3 qty) - Remove Delivery 1 reservation (5 qty) The corresponding moves are then added to `move_to_reassign` in the same order: `[Delivery 2, Delivery 1]` https://github.com/odoo/odoo/blob/d3eebbd1c27e8a039bb55cdf2a82d464e06ffa8c/addons/stock/models/stock_move_line.py#L849 Later, `move_to_reassign._action_assign()` processes the moves in recordset order: - Delivery 2 reserves 5 units first - Delivery 1 only gets the remaining 3 units As a result, reservation priority is unintentionally reversed after relocation. Fix: ---- Before calling `_action_assign()`, reverse `move_to_reassign` This ensures reassignment preserves the original reservation order: - Delivery 1 is reassigned first and recovers 5 units - Delivery 2 receives the remaining 3 units The reservation state therefore remains consistent before and after internal stock relocation. --- opw-6218256 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#269973 Forward-Port-Of: odoo/odoo#265169
This update adjusts the format of unit prices in Polish VAT invoices (l10n_pl_edi) to ensure accurate calculations and alignment with FA(3) standards. While the current system technically complies with KSEF requirements, this change improves invoice consistency and avoids potential discrepancies. This ensures proper reporting for Polish tax purposes.
Original PR description
**STEP TO REPRODUCE** 1. Create an invoice with a unit price of 10.005 and qty of 2. 2. Send the invoice to ksef. 3. Open the xml and notice P_9A (unit price) is 10.00 and P_11 (total without tax) is 20.01 Which is inconsistent (10.00 * 2 =/= 20.01). This PR increase the decimal places of P_9A to 8 digits which is the maximum allowed by the FA(3) format. Note that Ksef doesn't verify the untaxed unit price * quantity = total without tax, so the invoice we send are technically valid. However, it's best to generate invoice where the numbers add-up. opw-6203896 Forward-Port-Of: odoo/odoo#263812
This update optimizes the process of validating purchase orders by preventing unnecessary calculations of location weights. By reordering checks, the system avoids computing weights when other conditions already rule out a location, leading to significantly faster validation times, especially with large numbers of locations. This improves overall system performance and responsiveness.
Original PR description
When checking if a stock.move.line can use a location as destination with the method `_check_can_be_used()`, we start by checking if the incoming products can be stored without exceeding the maximal…
When checking if a stock.move.line can use a location as destination with the method `_check_can_be_used()`, we start by checking if the incoming products can be stored without exceeding the maximal weight of the location. This needs to call the `_get_weight()` method to compute the forecasted weight for the location. This method relies on heavy computations and can become a bottleneck when we need to loop over a high number of locations. In some cases, we can rule out the location based on less expensive conditions that are verified after the weight one. We propose to invert the conditions check order to avoid computing the location weight when other conditions are not met. Steps to reproduce --------------- - Install stock and purchase modules; - Enable storage locations and categories in the settings; - Create a storage category: allow_new_product = same, max_weight=10.0 kg; - Create N locations using this category, parent_id=WH/stock; - Create a putaway rule to each location from WH/stock, for the new storage category and using a product A with a weight of 2 kg; - Create a stock.quant per location to store a product B, weight=2kg; - Create a purchase order with X lines for 1 unit of product A; - Validate the purchase order. The validation should take several seconds to execute as every locations will be rejected due to the storage category, but it will call _get_weight() first. Benchmark --------------- This improvement is very data specific and will be most useful when a lot of locations are using a storage category of type "empty" or "same". In addition, it also relies on the order in which we are treating the locations, if the acceptable locations are the first to be received in the method, it won't need to loop over all of them. The following benchmark was established in a production database in which every 6068 locations are using a category of type "same". | No stock.move.lines | Before PR | After PR | |---------------------|-----------|----------| | 40 | 168 s | 7.3 s | | 72 | 264 s | 12.33 s | When the only condition that can reject locations is the exceeding weight, this modification will slow down the process. However, the time loss in this case is smaller than the gain in the first case. The following benchmark was obtained by validating a purchase 1 line order with only fully filled locations. | No locations | Before PR | After PR | |--------------|-----------|----------| | 500 | 2.02s | 2.37 s | | 2000 | 7.85s | 9.76 s | | 10000 | 39.16 s | 48.86 s | opw-5949370 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#270125 Forward-Port-Of: odoo/odoo#266872
This update resolves a bug where using composite actions with certain website options could cause errors. The fix ensures that actions within these composites are properly bound, preventing crashes and improving the stability of website functionality. This change enhances the reliability of our website experience.
Original PR description
In 18.4 the composite action isn't used extensively, so the problem was unnoticed. However, if you use it with an action that has a `getValue` set, you may get issues, since the action will not be bound. Possible way to reproduce the issue: - Create an option that uses the `composite` action - Set `customizeWebsiteVariable` as a first action in the `actionParam` - Click on an element that has that option => You'll get an error. Note, that testing just this would be useless, so I added a test that tests that the action uses the first `getValue`. Without this fix the test would crash since in `getValue` `this` is unbound. Forward-Port-Of: odoo/odoo#269873
This update resolves a bug that prevented financial reports from correctly sorting when account codes contained 'None' values. The fix converts account codes to integers to ensure accurate sorting and prevent crashes, improving the reliability of financial reporting data.
Original PR description
If you're grouping by account_code on a line using an account_code
engine, and there's a None value, it will crash.
To get that, you can (with demo data):
- install l10n_be
- set "BE Company COA" as the main, keeping "My Company (San Francisco)"
activated
- go to the profit and loss "Profit and Loss (Abbr) (BE)", set the date
as the current year
- set "Consolidation" filter
- Unfold "60/61 - Goods for Resale,..."
```
Traceback (most recent call last):
...
File "... in _compute_formula_batch_with_engine_account_codes
results_list.sort(key=lambda x: math.inf if x[0] is None else x[0])
TypeError: '<' not supported between instances of 'float' and 'str'
```
Because in case of `None`, we compare with `math.inf` but the account
codes are string.
no-task
Forward-Port-Of: odoo/enterprise#120531This update resolves an issue where demo leave allocations wouldn't properly validate during an Odoo upgrade from 17.0 to 18.0. The fix ensures that the approval process is executed correctly, allowing leave allocations to be accurately created and managed across different installation scenarios.
Original PR description
Steps: - Install an Odoo 17.0 database with the Indian Payroll module and demo data. - Upgrade the database to 18.0. Issue: - The Indian payroll demo data creates leave allocations and approves them…
Steps: - Install an Odoo 17.0 database with the Indian Payroll module and demo data. - Upgrade the database to 18.0. Issue: - The Indian payroll demo data creates leave allocations and approves them through an XML function call. - During a fresh installation, demo files are loaded in 'init' mode, so the approval function is executed and the allocations move from 'confirm' to 'validate'. - However, during a 17.0 >>> 18.0 upgrade, demo files are loaded in 'update' mode. Odoo automatically loads demo files with 'noupdate=True' from the load_demo() >> load_data() function: - This value is passed to the XML importer and becomes the default noupdate state for the file. Since the demo XML file does not explicitly override this value, the function tag uses 'noupdate=True'. - When the XML parser reaches the approval function, _tag_function() skips its execution because of noupdate = 'True' and mode = 'update' condition. - As a result, the approval function is not executed during the upgrade and the leave allocations remain in 'confirm' state. Subsequent demo payroll data expects validated allocations and fails during loading. Fix: - Explicitly set 'noupdate=0' on the demo XML file. This overrides the default 'noupdate=True' value applied to demo files, making the parser evaluate the section with 'noupdate=False'. - As a result, '_tag_function()' executes the approval method during upgrades, the demo leave allocations are validated in both fresh/new db installations and 17.0 >>> 18.0 upgrade scenarios. runbot error-https://runbot.odoo.com/odoo/error/230430 task-6268381 Forward-Port-Of: odoo/enterprise#119217
This update introduces a time limit for profiling queries within Odoo. Previously, profiling could run indefinitely, consuming resources. Now, queries are automatically tracked and timed, ensuring efficient resource usage and preventing performance issues.
Original PR description
Modify the query collector so that it add an entry before the query runs and updates the time after it runs. use the async collector periodic sampling to commit the profiler after a time limit. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#268750 Forward-Port-Of: odoo/odoo#215034
This update resolves an issue where employee profile images were appearing stretched in the Odoo system. The fix involved adjusting image sizing within the employee form view to ensure consistent and proper display. This improves the visual presentation of employee profiles.
Original PR description
Vertical images were stretched due to changes made during the form view's redesign (a58ed7d) and after adding a fixed size (6d40ab9). We've added an `.object-fit-contain` class to fix this issue and a rounded border to make the image's aligned with other similar views. task-5418517 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#269171 Forward-Port-Of: odoo/odoo#262033
This update addresses a technical issue that could cause errors when comparing history differences in the web editor. The fix prevents a value error from occurring if the history data is empty, ensuring smoother operation for users. This improves the stability and reliability of the web editor functionality.
Original PR description
If, for whatever reason, the history we try to compare is an empty string, we might get a value error thrown. We guard the code to avoid the error. see :https://github.com/odoo/odoo/issues/269149 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#269722
This update fixes a bug where 401K matching contributions were incorrectly calculated for hourly employees with a fixed wage of zero. The change ensures that matching contributions are accurately determined based on the employee's actual earnings, providing correct retirement savings calculations. This improves payroll accuracy and compliance.
Original PR description
*= test_l10n_us_hr_payroll_account The employer matching cap for pre-retirement plans (401KMATCHING) evaluates to zero for hourly wage employees if wage is set to zero. ### **Steps to Reproduce:** 1)…
*= test_l10n_us_hr_payroll_account The employer matching cap for pre-retirement plans (401KMATCHING) evaluates to zero for hourly wage employees if wage is set to zero. ### **Steps to Reproduce:** 1) Install l10n_us_hr_payroll. 2) Create an employee with an hourly wage and set the fixed wage to 0. 3) Configure the retirement plan parameters as follows: - 401(k) = 3% - Matching Amount = 100% - Matching Yearly Cap = 100% 4) Generate a payslip for this employee and compute the sheet. ### **Observed Behavior:** The "Benefits Matching to Retirement Plans" line computes as zero for the hourly employee. ### **Expected Behavior:** The employer matching contribution should dynamically scale based on the actual gross pay period earnings instead of evaluating to zero. ### **Root Cause:** The calculation of `partial_cap` uses `version.wage` directly at [1]. For hourly employees, the fixed 'wage' field defaults to zero, causing the entire multiplication to cancel out. [1]- https://github.com/odoo/enterprise/blob/4c540f450d4de8b59b871662123f85ed54cca2a9/l10n_us_hr_payroll/data/hr_salary_rule_data.xml#L167 ### **Fix:** This commit computes the retirement matching eligibility cap from `gross annualized wages` and applies the employer matching percentage on the eligible contribution amount. This ensures retirement matching is calculated consistently regardless of the employee's contract type. **opw-6181024** Forward-Port-Of: odoo/enterprise#120483 Forward-Port-Of: odoo/enterprise#119370
This update corrects a technical issue preventing accurate calculation of leave durations within the holiday reporting feature. The fix ensures the system correctly identifies the appropriate resource calendar, resolving a singleton error that was causing incorrect leave calculations. This improves the reliability of leave reports.
Original PR description
resource_calendar was not being when calculting virtual leaves, it leads to a singleton error here:…
resource_calendar was not being when calculting virtual leaves, it leads to a singleton error here:
https://github.com/odoo/odoo/blob/11b0195dddad5055fc33fa3e28b2d2ca60f24935/addons/l10n_fr_hr_holidays/models/hr_leave.py#L163
```
File "/home/odoo/src/odoo/saas-19.2/odoo/orm/models.py", line 519, in _table_sql
table_query = self._table_query
^^^^^^^^^^^^^^^^^
File "/home/odoo/src/odoo/saas-19.2/addons/hr_holidays/report/hr_leave_employee_report.py", line 40, in _table_query
self._compute_leave_duration(report_records)
File "/home/odoo/src/odoo/saas-19.2/addons/hr_holidays/report/hr_leave_employee_report.py", line 94, in _compute_leave_duration
leaves_durations = virtual_leaves._get_durations(additional_domain=[('holiday_id', 'not in', leave_ids)])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/odoo/src/odoo/saas-19.2/addons/l10n_fr_hr_holidays/models/hr_leave.py", line 160, in _get_durations
while not leave.resource_calendar_id._works_on_date(date_start):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/odoo/src/odoo/saas-19.2/addons/resource/models/resource_calendar.py", line 877, in _works_on_date
self.ensure_one()
File "/home/odoo/src/odoo/saas-19.2/odoo/orm/models.py", line 5253, in ensure_one
raise ValueError("Expected singleton: %s" % self)
ValueError: Expected singleton: resource.calendar()
```
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-prThis update fixes an issue where the salary distribution map wasn't being recalculated when bank accounts were archived or unarchived. This ensures accurate salary calculations are consistently applied, preventing potential discrepancies in payroll processing. The fix improves the reliability of our HR financial data.
Original PR description
When archiving or unarchiving bank accounts, salary distribution map is not recomputed. Task-6180142 Forward-Port-Of: odoo/odoo#262255
This update ensures that 'regenerate overtime' only affects the selected overtime ruleset, preventing unintended changes to other rules. A confirmation message is now displayed to alert users about resetting manual edits linked to the selected ruleset, improving data integrity and reducing potential errors.
Original PR description
When you click on "regenerate overtime", currently, it reset all overtimes of all overtime ruleset, it should only act on the selected one. Second, it should display a confirmation message: "This will reset all manual edit on overtime period linked to those rules. Do you confirm ?" Task-6095714 Forward-Port-Of: odoo/odoo#258103
This update significantly speeds up the process of checking if a field can be deleted within website forms. Previously, this check took several minutes, causing delays. Now, it completes in just milliseconds by focusing only on the fields that actually need to be validated, improving user experience and system performance.
Original PR description
Summary ======= `_check_if_used_in_website_form`, the ondelete hook on `ir.model.fields` that guards against deleting a field referenced by a website form, performs poorly on realistic databases. It…
Summary
=======
`_check_if_used_in_website_form`, the ondelete hook on
`ir.model.fields` that guards against deleting a field referenced by
a website form, performs poorly on realistic databases. It can take
multiple minutes to validate a single field deletion, blocking user
actions such as removing a Studio field.
This commit restricts the scan to columns that can actually contain
website form markup, bringing the hook from multi-minute to
sub-second without any loss of coverage.
The Problem
===========
Deleting any `ir.model.fields` record triggers this validation hook,
which must ensure the field is not referenced inside any website
form. The implementation iterates every stored HTML column returned
by `website._get_html_fields()` and runs one case-insensitive
`ILIKE '%data-model_name="<model>"%'` search per column against
`<model>.<html_field>`, then parses each match with `lxml` and
validates it with XPath.
Two root issues cause the multi-minute cost:
- **Unbounded scan surface**: all stored HTML columns are scanned
(~95 on realistic databases), even though the vast majority of them
declare `sanitize=True` and `sanitize_form=True` (the defaults).
When both flags are True, `<form>` tags are stripped on write and
the column can never physically contain website form markup.
- **Per-column `ILIKE` cost**: `ILIKE` on large TEXT/JSONB columns
performs a sequential scan. A single large HTML column is enough
to make the hook run for several minutes on its own.
Improvements
============
- Scan only columns that can actually contain forms:
- `ir.ui.view.arch_db` , primary target; all website forms are
stored there.
- HTML fields whose sanitization either is disabled
(`sanitize=False`, e.g. `blog.post.content`,
`website.custom_code_head`) or explicitly allows forms
(`sanitize_form=False`, e.g.
`product.template.website_description`, `hr.job.description`,
`event.event.description`). Any other HTML field strips `<form>`
on write and will never contain a form.
- Batch searches: group the deleted fields by model once and emit a
single `OR`-domain search per candidate column, instead of one
search per (field, column) pair.
- Parse each returned record with `lxml` and validate with XPath
directly. The `ILIKE` domain already filters out non-matching rows
DB-side.
Benchmarks
==========
Profiled on a database containing ~95 stored HTML columns and ~5.2k
views. The hook was invoked read-only via
`field._check_if_used_in_website_form()` on a custom field.
| Metric | Before | After |
| :----------------------------- | ---------: | ---------: |
| Hook wall time | ~444 s | ~173 ms |
| HTML columns scanned | 95 | 5 |
| SQL queries issued | 96 | 6 |
Key results:
- Hook wall time reduced from multi-minute to sub-second
(~2,570× faster on the profiled database).
- Scan surface reduced from ~95 columns to a handful (1 +
the form-capable HTML fields installed on the database, typically
under 10).
opw-6086536
Forward-Port-Of: odoo/odoo#268666
Forward-Port-Of: odoo/odoo#259846This update ensures that financial data associated with an IoT box is properly handled before it's removed from the system. Previously, deleting an IoT box could lead to data loss related to point-of-sale transactions. This change prevents this issue, maintaining data integrity for POS operations.
Original PR description
Before unlinking an iot.box from the database, we must ensure that its fiscal data module is not currently used in any pos.config. task-id: 5144489 Forward-Port-Of: odoo/enterprise#110099
18 changes
Enhancements to existing features
This update automatically populates the company registry information in Odoo for Swedish businesses using their VAT number. Swedish VAT numbers always start with 'SE' followed by digits, and this change leverages this pattern to streamline data entry. This improves accuracy and reduces manual effort for users operating in the Swedish market.
Original PR description
Organization number is part of the VAT number Official reference: https://www.skatteverket.se/foretag/moms/kopavarorochtjanster/inkopfranandraeulander/kopavarorfranandraeulander.4.3a7aab801183dd6bfd380005738.html > I Sverige börjar alla VAT-nummer med bokstäverna SE (landskoden) och avslutas med siffrorna 01. Om du har en enskild firma följs landskoden av de 10 siffrorna i ditt personnummer. Om du har ett bolag eller en förening följs landskoden av de 10 siffrorna i organisationsnumret. VAT-numret skrivs utan bindestreck. which translates to > In Sweden, all VAT numbers begin with the letters SE (the country code) and end with the digits 01. If you are a sole proprietor, the country code is followed by the 10 digits of your personal identification number. If you are a corporation or an association, the country code is followed by the 10 digits of your organization number. The VAT number is written without a hyphen. Forward-Port-Of: odoo/odoo#269590
This update integrates with the new Gmail Chrome and Firefox extension to automatically capture email data (sender, recipients, etc.) related to timesheet activity. Odoo then uses this information to provide more relevant suggestions and tracking for timesheets, improving project management insights.
Original PR description
[IMP] timesheet_grid: Gmail watcher In this commit, Odoo now consumes data from the new Gmail Chrome and Firefox web extension, which captures the from, to, cc, and bcc fields of read and composed emails and sends them to Activity Watch. Odoo retrieves these events, extracts the emails, searches for partners linked to projects and/or tasks, and adds them to suggestions as keyEvents. task-5956040
Resolved issues and error corrections
This update corrects a bug where submitting the Contact Us form incorrectly updated both the task and project customer records. The fix ensures that task customer information is correctly linked to the newly created project, preventing unintended data duplication and maintaining accurate customer relationships. This improves data consistency and reliability.
Original PR description
Steps to reproduce: -------------------------------------------- 1. Install `website_project` module 2. Create a new project 3. Add a customer to the project 4. Go to customer > add email and phone…
Steps to reproduce:
--------------------------------------------
1. Install `website_project` module
2. Create a new project
3. Add a customer to the project
4. Go to customer > add email and phone
5. Create a new task in that project:
* Observe that the customer is the same as the project
6. Go to Website > Contact Us > Edit > Click on submit button
7. Set action to 'Create a Task' and select the created project in 'Project'
8. Click on Save and Open the URL in Incognito Mode
9. Go to the Contact Us page > Fill in the details > Submit
10. Comeback to our window and open tasks of the created project
Observation:
--------------------------------------------
1. A new task is created using the customer details entered in the form.
2. The existing task’s customer and the project’s customer are also incorrectly updated to this new customer.
Issue:
--------------------------------------------
The bug is in the `extract_data` method of the website form controller for projects.
A non-logged-in user submits the Contact Us form with name and an email that doesn't match any existing partner. The old code's `else` branch would set `partner_name` in the task record values without setting a `partner_id` https://github.com/odoo/odoo/blob/cd080047578b9992811608a5af73a982a414da39/addons/website_project/controllers/main.py#L65-L66
During task creation, the computed field `_compute_partner_id` automatically sets `partner_id` to the project's partner
https://github.com/odoo/odoo/blob/cd080047578b9992811608a5af73a982a414da39/addons/project/models/project_task.py#L1440-L1441
`partner_name` is defined as
https://github.com/odoo/odoo/blob/cd080047578b9992811608a5af73a982a414da39/addons/website_project/models/project_task.py#L12
In Odoo, a related field is essentially a shortcut to a field on a linked record The key attribute here is `readonly=False`. This tells Odoo:
* On read: Get the value from `self.partner_id.name`
* On write: Propagate the write back to `self.partner_id.name` (this is the inverse). So writing `task.partner_name = 'TEST'` is equivalent to writing `task.partner_id.name = 'TEST'`. It modifies the partner record itself, not just the task.
So, the partner record itself was renamed. Every record that references a partner now sees the new name
Solution:
--------------------------------------------
The fix passes `False` to `partner_id`, this way:
* The existing partner is untouched
* All other tasks and the sales order keep their correct customer
opw-6206080
Forward-Port-Of: odoo/odoo#264738This update resolves an issue where the barcode inventory count feature would fail when using archived units of measure. The fix ensures that archived UOMs are correctly included in the inventory count cache, allowing users to accurately count stock even when units have been archived. This improves the reliability of inventory adjustments.
Original PR description
### Steps to reproduce: - In the settings enable: "Units of Measure & Packagings", "Storage Locations" - Create a product in units and register 1 unit in stock - Inventory > Operations > Adjustments…
### Steps to reproduce: - In the settings enable: "Units of Measure & Packagings", "Storage Locations" - Create a product in units and register 1 unit in stock - Inventory > Operations > Adjustments > Physical Inventory - Select your line and request a count > Set Current Value - Inventory > Configurations > units of measures > UOM categories - Select unit and archive it - Go to the barcode app > Click Count inventory ### > Owl error: Uncaught promise ### Cause of the issue: Since the uom used on the quant is archived, it is not found by the search used to fill the barcodeCache: https://github.com/odoo/enterprise/blob/26546bcd3beebc7f65ce08385441b6284b46598e/stock_barcode/static/src/components/main.js#L209-L213 https://github.com/odoo/enterprise/blob/26546bcd3beebc7f65ce08385441b6284b46598e/stock_barcode/models/stock_quant.py#L104-L106 https://github.com/odoo/enterprise/blob/26546bcd3beebc7f65ce08385441b6284b46598e/stock_barcode/static/src/components/main.js#L229 https://github.com/odoo/enterprise/blob/26546bcd3beebc7f65ce08385441b6284b46598e/stock_barcode/static/src/models/barcode_model.js#L37-L39 However, if the uom is not present in the barcode cache the `BarcodeQautnModel` will fail to createLinesState whihc raises a missing error: https://github.com/odoo/enterprise/blob/26546bcd3beebc7f65ce08385441b6284b46598e/stock_barcode/static/src/models/barcode_quant_model.js#L712 https://github.com/odoo/enterprise/blob/26546bcd3beebc7f65ce08385441b6284b46598e/stock_barcode/static/src/lazy_barcode_cache.js#L107-L110 opw-6250090 Forward-Port-Of: odoo/enterprise#119754 Forward-Port-Of: odoo/enterprise#118813
A technical issue prevented users with specific access rights from viewing leave information in the Attendances Gantt View. This update corrects a rare access error that occurred when calculating leave intervals, ensuring all users can accurately see approved leave on the Gantt chart. The fix adds a temporary access layer to ensure correct calculations.
Original PR description
Version: - 19.0 Steps to reproduce: - Install Attendances and Time Off - Create an internal user. - Give the user: Attendances Officer access & No Time Off Officer/Manager rights - Create an employee…
Version: - 19.0 Steps to reproduce: - Install Attendances and Time Off - Create an internal user. - Give the user: Attendances Officer access & No Time Off Officer/Manager rights - Create an employee linked to the user. - Configure the employee with a Flexible Working Schedule. - Create and approve a Time Off request for the employee. - Open: Attendances -> Gantt View - Navigate to the month containing the employee's approved leave. Issue: - An access error is raised when opening a month that contains the employee's approved leave. Cause: - In `_handle_flexible_leave_interval`, the code accesses `leave.holiday_id` to read fields such as `request_unit_half`, `request_unit_hours`, and `request_hour_from/to` on the `hr.leave` model. - When the current user has Attendances Officer rights but no Time Off access(rare cases), the ORM access check on `hr.leave` raises an AccessError, even though this read is purely for internal calendar computation and does not expose leave data to the user interface. Fix: - Added sudo() on holiday_id to access the employee's leave details and compute the work interval as expected. Task-6264510 Forward-Port-Of: odoo/enterprise#119116
This update corrects a bug where inactive or archived taxes were incorrectly displayed in the bank reconciliation process. The fix ensures that users only see active taxes when reconciling bank statements, improving data accuracy and preventing potential errors in financial reporting. This resolves issue OPW-6245641.
Original PR description
### Issue:
When editing a line within the bank reconciliation widget, inactive and archived taxes are incorrectly available for selection
### Cause:
The bank reconciliation edit line form view carried the `{'active_test': False}` context on the `tax_ids` field
This context allowed archived taxes to be loaded and selected during creation and manual edition
### Fix:
Explicitly force `active_test: True` in the view context for the tax field to ensure only active taxes can be searched and selected by the user
### Steps to reproduce:
- Install `account_accountant`
- Create a new tax and set it to inactive
- Go to the Bank Reconciliation widget
- Create a bank statement line
- Set the account to 600000 Expenses
- Edit the line by clicking on the pencil icon
- Open the Taxes selection dropdown
Before the fix, the inactive tax is visible and available for selection by default
opw-6245641
Forward-Port-Of: odoo/enterprise#119522This update simplifies the messages displayed when a new task is created in Odoo, consolidating two lines into a single, clearer message. This change was made to improve the user experience and avoid confusion, specifically targeting new Odoo 19.1 installations. The fix addresses a technical issue related to message formatting.
Original PR description
Before this commit, when a new task was created in `project.task`, its creation message spanned two lines: "task created" and "task created for project XYZ". This commit unifies them into one to avoid confusion. The first line was caused by the message template having a description attribute. Even though editing the description will not fix the issue for existing databases, we chose to target the earliest possible version that a new customer might start from. The problem does not exist in 19.0. task-5999819
The Budget Report was previously unusable on large customer databases due to a performance bottleneck. This update optimizes the report's SQL query, significantly reducing loading times – now averaging 1.63 seconds for reports with up to 14 lines of data. This improves usability for users working with extensive financial data.
Original PR description
**Description** Opening the Budget Report from any budget record times out on databases with significant data volume. The request to `budget.report/formatted_read_grouping_sets` consistently times…
**Description**
Opening the Budget Report from any budget record times out on databases
with significant data volume. The request to
`budget.report/formatted_read_grouping_sets` consistently times out,
making the Budget Report completely unusable.
**Root cause:**
`budget.report` is an SQL view that consists of 5 UNION ALL branches.
When the list view loads, the ORM translates the `budget_analytic_id`
domain into a WHERE clause on the outer query wrapping the full UNION
ALL subquery. PostgreSQL cannot push this filter through a UNION ALL as
it's a hard optimization barrier. It must fully materialize the subquery
regardless of which budget is being viewed.
**Fix:**
Override _search on budget.report to extract budget_analytic_id and
budget_line_id conditions from the incoming domain using the Domain API.
budget_line_id is rewritten as Domain('id', op, value) so _to_sql()
correctly emits bl.id in the raw SQL. The resulting domain is injected
in context under budget_line_domain and read in _get_bl_query,
_get_aal_query (base module), and _get_pol_query (purchase module) to
filter budget_line rows inside each branch's LEFT JOIN ON clause.
This also removes the budget_report_budget_line_ids context key from
budget_line._compute_all, unifying both filters under one mechanism.
---
On customer DB (568k `account_analytic_line`, 27k `budget_line`,
116k confirmed `purchase_order_line`, 114k posted vendor bill lines
with purchase link):
| Budget | Before | After |
|---|---|---|
| 8 lines, 730d span | timeout | 2.27s |
| 14 lines | timeout | 2.39s |
| 14 lines, 1095d span | timeout | 1.63s |
- Before: https://explain.dalibo.com/plan/ehed5eb8de251426
- After: https://explain.dalibo.com/plan/db8aef35cag9hg6f
opw-6098047
Forward-Port-Of: odoo/enterprise#114692This update improves the accuracy of the reconciliation process by ensuring the matching dialog displays both draft and posted journal items. Previously, the dialog was limited by a default filter, leading to a reduced number of matching results. This change provides a more complete view for users to reconcile transactions.
Original PR description
The reconcile badge counts draft and posted journal items, but the matching dialog forces a posted filter by default, this makes the dialog show fewer lines than count as it discards the draft ones. Remove the default posted search filter so the dialog displays all matching items. task-6234801 Forward-Port-Of: odoo/enterprise#118146
This update fixes a visual issue on mobile devices where an unwanted caret appeared next to the 'Expand' button in the Inbox. It also corrected the alignment of header buttons, preventing them from wrapping onto multiple lines when the messaging menu was open. This ensures a cleaner and more professional user experience on mobile.
Original PR description
On mobile, an unwanted caret was displayed next to the message 'Expand' button in the Inbox because the messaging menu itself opens a dropdown, causing any nested Dropdown to automatically display a caret. This commit also fixes the alignment of the Inbox header action buttons, which wrapped onto multiple lines when opening the messaging menu on mobile while the Inbox tab was already selected. In this case, the `AutoresizeInput` width was computed at its maximum size, leaving insufficient space for the header action buttons and causing them to wrap onto multiple lines. Task-[6244177](https://www.odoo.com/odoo/project/1519/tasks/6244177) Forward-Port-Of: odoo/odoo#266343
This update fixes a bug where follow invitations weren't appearing in user inboxes unless a comment was added. The change ensures that the notification subject is always displayed, regardless of the comment content, ensuring users receive timely follow invitation notifications. This improves the user experience and prevents missed invitations.
Original PR description
Steps to reproduce: - Configure user A to receive inbox notifications. - As user B, invite user A to follow a record with Notify recipients enabled. - Open the inbox of user A. The Invitation to follow notification is not displayed in the inbox when no additional comment is provided. This happens because the notification body is empty unless extra comments are added. This commit fixes the issue by displaying only the subject when the body is empty. Task-[5485727](https://www.odoo.com/odoo/project/1519/tasks/5485727) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#269511 Forward-Port-Of: odoo/odoo#244653
This update adjusts the format of unit prices in Polish VAT invoices (l10n_pl_edi) to ensure accurate calculations with the KSEF system. While the existing system technically works, this change aligns the unit price and total without tax, improving invoice accuracy and compliance. This resolves a minor discrepancy impacting invoice presentation.
Original PR description
**STEP TO REPRODUCE** 1. Create an invoice with a unit price of 10.005 and qty of 2. 2. Send the invoice to ksef. 3. Open the xml and notice P_9A (unit price) is 10.00 and P_11 (total without tax) is 20.01 Which is inconsistent (10.00 * 2 =/= 20.01). This PR increase the decimal places of P_9A to 8 digits which is the maximum allowed by the FA(3) format. Note that Ksef doesn't verify the untaxed unit price * quantity = total without tax, so the invoice we send are technically valid. However, it's best to generate invoice where the numbers add-up. opw-6203896 Forward-Port-Of: odoo/odoo#263812
This update optimizes the process of validating purchase orders by preventing unnecessary calculations of location weights. By reordering checks, the system avoids computing weights when other conditions already rule out a location, significantly speeding up validation times, especially with large numbers of locations. This improves overall system performance and responsiveness.
Original PR description
When checking if a stock.move.line can use a location as destination with the method `_check_can_be_used()`, we start by checking if the incoming products can be stored without exceeding the maximal…
When checking if a stock.move.line can use a location as destination with the method `_check_can_be_used()`, we start by checking if the incoming products can be stored without exceeding the maximal weight of the location. This needs to call the `_get_weight()` method to compute the forecasted weight for the location. This method relies on heavy computations and can become a bottleneck when we need to loop over a high number of locations. In some cases, we can rule out the location based on less expensive conditions that are verified after the weight one. We propose to invert the conditions check order to avoid computing the location weight when other conditions are not met. Steps to reproduce --------------- - Install stock and purchase modules; - Enable storage locations and categories in the settings; - Create a storage category: allow_new_product = same, max_weight=10.0 kg; - Create N locations using this category, parent_id=WH/stock; - Create a putaway rule to each location from WH/stock, for the new storage category and using a product A with a weight of 2 kg; - Create a stock.quant per location to store a product B, weight=2kg; - Create a purchase order with X lines for 1 unit of product A; - Validate the purchase order. The validation should take several seconds to execute as every locations will be rejected due to the storage category, but it will call _get_weight() first. Benchmark --------------- This improvement is very data specific and will be most useful when a lot of locations are using a storage category of type "empty" or "same". In addition, it also relies on the order in which we are treating the locations, if the acceptable locations are the first to be received in the method, it won't need to loop over all of them. The following benchmark was established in a production database in which every 6068 locations are using a category of type "same". | No stock.move.lines | Before PR | After PR | |---------------------|-----------|----------| | 40 | 168 s | 7.3 s | | 72 | 264 s | 12.33 s | When the only condition that can reject locations is the exceeding weight, this modification will slow down the process. However, the time loss in this case is smaller than the gain in the first case. The following benchmark was obtained by validating a purchase 1 line order with only fully filled locations. | No locations | Before PR | After PR | |--------------|-----------|----------| | 500 | 2.02s | 2.37 s | | 2000 | 7.85s | 9.76 s | | 10000 | 39.16 s | 48.86 s | opw-5949370 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#270125 Forward-Port-Of: odoo/odoo#266872
This update resolves a bug where composite actions within website options could fail when using a 'getValue' function. The fix adds a test to ensure the action is properly bound, preventing errors and improving website functionality. This ensures consistent behavior across Odoo versions.
Original PR description
In 18.4 the composite action isn't used extensively, so the problem was unnoticed. However, if you use it with an action that has a `getValue` set, you may get issues, since the action will not be bound. Possible way to reproduce the issue: - Create an option that uses the `composite` action - Set `customizeWebsiteVariable` as a first action in the `actionParam` - Click on an element that has that option => You'll get an error. Note, that testing just this would be useless, so I added a test that tests that the action uses the first `getValue`. Without this fix the test would crash since in `getValue` `this` is unbound. Forward-Port-Of: odoo/odoo#269873
This update ensures that financial data associated with IoT boxes used in point-of-sale systems is properly handled before those boxes are removed from the system. This prevents potential data loss and maintains the integrity of sales transactions. It's a critical fix to avoid disruptions to our retail partners.
Original PR description
Before unlinking an iot.box from the database, we must ensure that its fiscal data module is not currently used in any pos.config. task-id: 5144489 Forward-Port-Of: odoo/enterprise#110099
This update fixes an issue where stock replenishment wasn't working correctly with orderpoints, leading to duplicate purchase orders being created. Now, the system intelligently updates existing purchase order lines when replenishing stock through orderpoints, specifically when the replenishment is triggered automatically. This ensures more efficient and accurate stock management.
Original PR description
Replenishing the stock from an orderpoint will look for a purchase order line having the same orderpoint_id in order to update the quantity instead of creating a new one. The issue is manual orderpoint are deleted right after the replenishment. Replenishing two times the same product will always create a new purchase order line. This commit makes the orderpoint_id is pass in the procurement values only in case of `trigger == auto` orderpoint. 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 Forward-Port-Of: odoo/odoo#269725
This update addresses a technical issue that could cause a software error when comparing history differences. The fix ensures the system gracefully handles empty history data, preventing a potential crash. This improves the stability and reliability of the web editor feature.
Original PR description
If, for whatever reason, the history we try to compare is an empty string, we might get a value error thrown. We guard the code to avoid the error. see :https://github.com/odoo/odoo/issues/269149 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#269722
This update resolves an error that occurred when creating payment reports for Swiss companies. The issue stemmed from a missing module, which caused a system error when attempting to generate the report. This fix ensures that the payment report generation process works correctly regardless of whether the specific Swiss payroll module is installed.
Original PR description
*=l10n_ch_hr_payroll,hr_payroll_account_iso20022 When clicking the create payment report button on a payslip for a Swiss company, a traceback occurs if the ``hr_payroll_account_iso20022`` module is…
*=l10n_ch_hr_payroll,hr_payroll_account_iso20022 When clicking the create payment report button on a payslip for a Swiss company, a traceback occurs if the ``hr_payroll_account_iso20022`` module is not installed. Steps to reproduce the error: - Install ``l10n_ch_hr_payroll`` module - Switch to CH Company - Create an Employee and running contract for it - Go to Payroll > Payslip > All payslips > Create a new payslip > Set the employee > Confirm > Create payment report Traceback: ```py ValueError: Wrong value for hr.payroll.payment.report.wizard.export_format: 'iso20022_ch' ``` https://github.com/odoo/enterprise/blob/7792926504a823590fbbe574a96994002a92fc17/l10n_ch_hr_payroll/models/hr_payslip.py#L383 https://github.com/odoo/enterprise/blob/7792926504a823590fbbe574a96994002a92fc17/l10n_ch_hr_payroll/models/hr_payslip_run.py#L13 Here, ``iso20022_ch`` is passed as ``export_format``, However, ``iso20022_ch`` is added to the selection field in the ``hr_payroll_account_iso20022`` module at [1]. When that module is not installed, the selection value does not exist, leading to the above error. [1]: https://github.com/odoo/enterprise/blob/7792926504a823590fbbe574a96994002a92fc17/hr_payroll_account_iso20022/wizard/hr_payroll_payment_report_wizard.py#L11 sentry-7391832811 Forward-Port-Of: odoo/enterprise#120295 Forward-Port-Of: odoo/enterprise#113277
6 changes
Resolved issues and error corrections
This update fixes an issue where HR users couldn't update employee information, specifically related to generating payroll slips. The change adds a security layer to ensure HR users can modify employee records without restrictions, improving usability and data accuracy. This resolves a previous error preventing updates.
Original PR description
Steps to reproduce: -------------------------- 1. Install l10n_ch_hr_payroll_elm_transmission. 2. Switch to a Swiss company. 3. Create an employee and create a user with HR rights but without Payroll…
Steps to reproduce: -------------------------- 1. Install l10n_ch_hr_payroll_elm_transmission. 2. Switch to a Swiss company. 3. Create an employee and create a user with HR rights but without Payroll rights. 4. Log in with this new user. 5. Update any value on the employee form (e.g., marital status or add a tag). Issue: ----------- Updating the employee raises the following error: ```python You do not have enough rights to access the fields "slip_ids" on Employee (hr.employee). Please contact your system administrator. Operation: read User: 2 Fields: - slip_ids (allowed for groups 'Payroll / Officer: Manage all contracts') ``` Cause: --------- After this 4416eda, open payslips are recomputed automatically on every employee update: https://github.com/odoo/enterprise/blob/8f7a43eebdc8f7f46f9d61ab7084e036c20f778e/l10n_ch_hr_payroll_elm_transmission/models/hr_employee.py#L210-L213 `slip_ids` is restricted to payroll users: https://github.com/odoo/enterprise/blob/8f7a43eebdc8f7f46f9d61ab7084e036c20f778e/hr_payroll/models/hr_employee.py#L14 As a result, when an HR user without payroll rights updates an employee, accessing slip_ids raises an **AccessError**. Solution: ----------- Use sudo() when accessing slip_ids so HR users can update employee records without issue. **NOTE:** The issue has been resolved from version saas~18.4 with the following commits: 279f09a9587674c035c514f966788a4dddfe9794 and 75d66d8 opw-6210358 Forward-Port-Of: odoo/enterprise#120019 Forward-Port-Of: odoo/enterprise#117387
This update resolves an issue where Odoo incorrectly identified ZIP files due to a bug in the underlying library. By adapting Odoo's detection process, we ensure accurate MIME type identification for ZIP files and related formats, preventing potential errors in file handling. This maintains consistent functionality for users.
Original PR description
Libmagic version 0.46 (currently available in Debian Trixie/Forky and Ubuntu Resolute) introduced a regression regarding ZIP file detection. While it correctly identifies a ZIP file when reading…
Libmagic version 0.46 (currently available in Debian Trixie/Forky and Ubuntu Resolute) introduced a regression regarding ZIP file detection. While it correctly identifies a ZIP file when reading directly from a file path, it fails when reading the exact same content from a buffer, returning a generic 'application/octet-stream' instead. Because `guess_mimetype` primarily evaluates buffers, this upstream bug breaks MIME type detection for ZIP files (and related formats like docx, xlsx, etc.) in Odoo environments running this libmagic version. Since we cannot directly fix the library itself, this commit adapts Odoo's `guess_mimetype` to fallback to our custom implementation when libmagic returns the generic 'application/octet-stream' to workaround this library's bug. Upstream libmagic fixes: - https://github.com/file/file/commit/f1adef05b8a85be50d28965b1fd21fcceacf7a4e - https://github.com/file/file/commit/60b2032b96fc185b37fb0f2152e834efb2edad6e Upstream python-magic issue: - https://github.com/ahupp/python-magic/issues/354 runbot-938197 Forward-Port-Of: odoo/odoo#269506
This update resolves a technical issue where the Urbanpiper order information screen incorrectly displayed customer details even after the customer was removed. The fix ensures that customer information is only shown when a valid customer is associated with the order, improving the user experience and preventing error messages.
Original PR description
Steps to reproduce: ==== - Place an order through Urbanpiper. - Edit the order and remove the customer. - Open the ticket screen and click the info button. - A traceback occurs. Cause: ==== - Customer details were rendered even when no customer was linked to the order. Fix: ==== - Display customer details only when a customer is present on the order. task-6233812 Forward-Port-Of: odoo/enterprise#120290 Forward-Port-Of: odoo/enterprise#118147
This update adjusts the format of unit prices in Polish VAT invoices (l10n_pl_edi) to ensure accurate calculations and alignment with FA(3) standards. While the current system technically complies with KSEF requirements, this change improves invoice accuracy and consistency. It addresses a minor discrepancy in the unit price and total without tax calculation.
Original PR description
**STEP TO REPRODUCE** 1. Create an invoice with a unit price of 10.005 and qty of 2. 2. Send the invoice to ksef. 3. Open the xml and notice P_9A (unit price) is 10.00 and P_11 (total without tax) is 20.01 Which is inconsistent (10.00 * 2 =/= 20.01). This PR increase the decimal places of P_9A to 8 digits which is the maximum allowed by the FA(3) format. Note that Ksef doesn't verify the untaxed unit price * quantity = total without tax, so the invoice we send are technically valid. However, it's best to generate invoice where the numbers add-up. opw-6203896 Forward-Port-Of: odoo/odoo#263812
This update fixes a visual issue in Outlook Desktop where email layouts, specifically the `s_three_columns` design and button styling, were not rendering correctly. The changes ensure consistent appearance and functionality of emails when viewed in Outlook Desktop, improving the overall user experience.
Original PR description
Problem: - `s_three_columns` is not rendered correctly in Outlook Desktop when the equal-height option is enabled. - Button padding, border radius, and background color are not rendered properly in…
Problem: - `s_three_columns` is not rendered correctly in Outlook Desktop when the equal-height option is enabled. - Button padding, border radius, and background color are not rendered properly in Outlook Desktop. Solution: - Set the `height` attribute on `td.card-body` along with `valign` so columns keep the same height in Outlook Desktop. - Use `v:roundrect` to support rounded corners (`arcsize`) and background colors (`fillcolor`), making buttons render consistently with the editor in Outlook Desktop. Before: <img width="1249" height="1297" alt="image" src="https://github.com/user-attachments/assets/828bc42b-1e21-404c-a5ae-81d4ee688802" /> After: <img width="1249" height="1309" alt="image" src="https://github.com/user-attachments/assets/263a1c30-fe86-4e40-b3c2-476abc2bf84a" /> Steps to reproduce: - Add the `s_three_columns` snippet with one card containing more content than the others. - Add some buttons. - Send or preview the email in Outlook Desktop. - Observe that column heights and button styling are not rendered correctly. opw-6044725 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#269791 Forward-Port-Of: odoo/odoo#269274
This update addresses a technical issue that could cause errors when comparing history data. The fix prevents a ValueError from occurring if the history data is unexpectedly empty, ensuring smoother operation of the web editor feature. This improves the stability and reliability of the Odoo platform.
Original PR description
If, for whatever reason, the history we try to compare is an empty string, we might get a value error thrown. We guard the code to avoid the error. see :https://github.com/odoo/odoo/issues/269149 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#269722
1 change
Resolved issues and error corrections
This update resolves a bug preventing proper validation of rental transfers for products created as kits. The fix ensures that exploded moves are correctly processed during the rental transfer process, preventing errors related to deleted records. This ensures rental transfers for kit products function as intended.
Original PR description
### Steps to reproduce: - Enable rental transfer - Create a rentable product R - Create and confirm a rental order for 1 unit of R - Create a kit bom for R: 1 x COMP - Validate the delivery of your…
### Steps to reproduce:
- Enable rental transfer
- Create a rentable product R
- Create and confirm a rental order for 1 unit of R
- Create a kit bom for R: 1 x COMP
- Validate the delivery of your unit of R
#### > Missing Error: Record does not exist or has been deleted.
### Cause of the issue:
Confirming your rental order will generate a confirm moves of R. However, since at this point the product was not a kit, these will not be exploded. Now, the issue is that at validation The move will be exploded and deleted in the super call:
https://github.com/odoo/enterprise/blob/7cceddaf086d849b8e2121e1023ef3479397534f/sale_mrp_renting/models/stock_move.py#L10-L13 https://github.com/odoo/odoo/blob/0f2f222a431627a672daf10c86ec2578a27f97bb/addons/mrp/models/stock_move.py#L550-L555 https://github.com/odoo/odoo/blob/0f2f222a431627a672daf10c86ec2578a27f97bb/addons/mrp/models/stock_move.py#L591-L593 However, since the overrides of the sale_{mrp,stock}_renting modules call self rather than the result of the super call, they still expect to work with the original move rather than its exploded result: https://github.com/odoo/enterprise/blob/7cceddaf086d849b8e2121e1023ef3479397534f/sale_mrp_renting/models/stock_move.py#L10-L13 https://github.com/odoo/enterprise/blob/7cceddaf086d849b8e2121e1023ef3479397534f/sale_stock_renting/models/stock_move.py#L61-L65
opw-6191841
Forward-Port-Of: odoo/enterprise#12005134 changes
New functionality added to Odoo
This update incorporates a new rule to comply with Belgian tax regulations regarding employee omission (ONSS 863). The change utilizes updated contribution rates from a recent XML file and integrates this rule into the company's payroll management system. This ensures accurate tax calculations and reporting for employees in Belgium.
Original PR description
add ONSS OMISSION (input rule) and using Rates defined in "NOSSContributionRate_2026_1.xml" and add it to dmfa Task Id: 6259645
This update adds sample data and an interactive onboarding tour specifically for appointment types like account payments, HR recruitment, and restaurant bookings. This allows new users to quickly understand and experience the appointment functionality within Odoo Enterprise, improving the initial user experience.
Original PR description
*=appointment_account_payment,appointment_hr_recruitment,pos_restaurant_appointment This PR adds demo events for selected appointment types and introduces an onboarding tour. Task-6233604
Enhancements to existing features
This update enhances the flexibility of the Hong Kong payroll localization by streamlining salary rules based on categories. This allows for easier creation of new reporting rules and supports custom salary structures, improving accuracy and adaptability for tax reporting requirements.
Original PR description
This task aims to improve flexibility in the Hong Kong localization by reworking the salary rules and declarations so that we make full use of categories. IRD declarations are now built purely by summing categories, allowing to easily add new rules while targeting specific report cases. We also remove the hardcoded reference to specific salary structures when possible, opening support for custom structures to be reported as well if their rules use the pre-defined categories. task-6100375
This update simplifies the integration with Monster by moving the Monster ID information from employee types to contract templates. This change allows each localization to manage its own Monster settings, reducing complexity and improving flexibility. The system now reads Monster IDs from contract templates instead of employee types.
Original PR description
**Version:** - master This PR introduces improvements to **hr_recruitment_integration_monster** module, focuses on removing the dependency of this module from employee module: - Moved monster_id field from hr.employee.type to hr.version (contract template). - Removed the data file from monster integration module as no generic hr.version data files exist in base hr module. - Each localization is now responsible for setting monster_id values on their own contract templates. - Updated the job posting logic to read monster_id from contract template instead of employee type. **Task-6190560**
This update enhances the Odoo Enterprise website configuration tool, streamlining the process for businesses to customize their online presence. Specifically, it adapts the website generator hook to a new description screen and adds a welcome message for the AI assistant, improving the user experience.
Original PR description
This PR is linked to the community PR #odoo/262484 improving the website configurator. Improvements: - Added a custom first-message subtitle for the AI assistant after the configurator. - Adapted the Enterprise website generator hook to the new description screen. task-5910875
This update adds dropzones to controller pages within the Enterprise module, improving the user experience for tasks like appointments and helpdesk requests. Standardizing dropzone messages ensures a more consistent and intuitive workflow for users interacting with these features.
Original PR description
*: appointment, website_appointment, website_helpdesk This commit introduces the missing dropzones for controller pages and standardizes the dropzone messages. task-4430461 Community: https://github.com/odoo/odoo/pull/233738
This update enhances the Time Off dashboard's usability by dynamically filtering time off requests based on the user's team and department. This provides a clearer and more relevant overview of employee time off, improving efficiency for HR and managers. It also updates the Gantt and Calendar views for a better user experience.
Original PR description
Purpose: - Improve usability and clarity of the Time Off dashboard and overview by enhancing UI layout, adding meaningful data (units, statuses), and applying some default behaviors. This PR includes: - Extended the Overview SearchModel to dynamically apply 'My Team' or 'My Department' filters based on the current user's hierarchy. - Apply the behavior to both Calendar and Gantt overview views. Related Community PR: https://github.com/odoo/odoo/pull/263006 task-6132977
This update integrates the Belgian flat-rate payroll system with job categories within Odoo. Previously, flat-rate calculations were separate; now, they are linked to specific job roles, ensuring accurate payroll processing for employees in Belgium. This improves reporting and compliance with local tax regulations.
Original PR description
Task-6128111
This pull request updates the design of the frontdesk interface to ensure it looks consistently good across different devices and screen sizes. The changes focus on improving the overall user experience and responsiveness, particularly in key areas like the host selection screen. A new feature was also added to detect custom background images.
Original PR description
Follow-up of: - https://github.com/odoo/enterprise/pull/119827 - https://github.com/odoo/enterprise/pull/120380 --- This PR review the overall frontdesk design to improve responsiveness and…
Follow-up of: - https://github.com/odoo/enterprise/pull/119827 - https://github.com/odoo/enterprise/pull/120380 --- This PR review the overall frontdesk design to improve responsiveness and consistency across views. task-6022341 | master | this PR | |--------|--------| | <img width="1021" height="765" alt="image" src="https://github.com/user-attachments/assets/d981f222-e3ce-42ae-9846-8eb05378fb46" /> | <img width="1022" height="769" alt="image" src="https://github.com/user-attachments/assets/4c49206b-3022-40bc-9ce6-e8e374156c6d" /> | | <img width="1025" height="767" alt="image" src="https://github.com/user-attachments/assets/1b929595-c8fb-4863-9c02-2c4d8cd00376" /> | <img width="1023" height="766" alt="image" src="https://github.com/user-attachments/assets/750b4423-be14-4974-bdde-4a8e332e6f29" /> | | <img width="1020" height="764" alt="image" src="https://github.com/user-attachments/assets/45cdad54-0654-4d86-a844-4b004400bab9" /> | <img width="1017" height="758" alt="image" src="https://github.com/user-attachments/assets/c848e800-5b4f-4a70-a718-d1d6d48ae411" /> |
This update adjusts the number of badges displayed on shift templates to a maximum of 4. Previously, the limit was lower, which could restrict the visibility of important scheduling information. This change improves usability and ensures all relevant details are easily accessible for shift planners.
Original PR description
This commit changes the maximum visible badges limit to 4 for shift templates. task-3705263
This update introduces a new wizard that simplifies the process of splitting journal items, such as bills, into individual lines for asset creation. Previously, users had to manually split large lines, which was time-consuming. This automation streamlines workflows and improves efficiency for creating assets from multiple transactions.
Original PR description
This commit allows the user to manipulate move lines dynamically. It is often the case that when you have a bill line of 10 items you want to create assets for every single item in that line. Right now you need to split the line manually into 10 different lines and then create assets from them. The split wizard automates this flow. task-6222463
This update improves the report editor by displaying a clear warning in the sidebar if a report block is shared with another user. This helps ensure collaborators understand who is editing a report and prevents potential conflicts. It's a simple but important enhancement for team collaboration.
Original PR description
In the report editor, the sidebar show if the currently editing block is shared. If so, the name and a warning is shown in the sidebar. TASK-6144417
This update improves the timesheet timer by prioritizing recently used projects, tasks, and helpdesk tickets. This reduces the time users spend searching for relevant records and streamlines the timesheet entry process. The change maintains existing prefill functionality for a seamless experience.
Original PR description
Before this PR --- The systray timer used the default search ordering, making users repeatedly search for projects, tasks, and helpdesk tickets they had recently tracked time on. After this PR --- The systray timer now ranks projects, tasks, and helpdesk tickets according to recent timesheet activity. Frequently used records are surfaced first while preserving the existing prefill behavior, making timer selection faster and requiring fewer manual searches. task - 6216535 Forward-Port-Of: odoo/enterprise#118299
This update introduces a new boolean field in fleet vehicles to manage CO2 emission calculations. When selected, it intelligently copies CO2 values from similar vehicle models (diesel or gasoline) if available, or multiplies the default value by 2.5. This ensures more accurate tracking of vehicle emissions.
Original PR description
[IMP] l10n_be_hr_payroll: false hybrid:
1 - false hybrid boolean field is added to the fleet_vehicle_model
1.1 - I added it to fleet_vehicle as a related field
1.2 - It is displayed in fleet_vehicle_model view conditionally
2 - When Plug-in diesel is selected and false_hybrid is ticked as true
2.1 - Look to other diesel model with same name and if there are any, take its default_co2 and use it in this model
2.2 - If not, multiply the current default_co2 by 2.5
3 - When one of the Plug-in gasoline/full-hybrid is selected and false_hybrid is ticked as true
3.1 - Look to other gasoline model with the same name and if there are any, take its default_co2 and use it in this model
3.2 - If not, multiply the current default_co2 by 2.5
task - 6146410Resolved issues and error corrections
This update resolves an issue preventing printing receipts from the Odoo Mobile App. The fix allows the app to correctly print receipts, mirroring the functionality available on the desktop and web versions. This improves the mobile user experience for order review and fulfillment.
Original PR description
**Steps to reproduce:** - Go on the Odoo App, start the PoS - Go to orders, and go to paid ones - Click on review - Click on Print Receipt - It doesn't do anything but it prints correctly on browser or desktop **Why the fix:** This is a partial backport of 41e4549 that fixes the app to allow the way we created IFRAMES in PoS since 19.2, allowing us to print on the app again. Community PR: https://github.com/odoo/odoo/pull/265024 opw-6186261 Forward-Port-Of: odoo/enterprise#120043
This update fixes an issue where the Datev export incorrectly displayed currency amounts due to a mismatch between the invoice currency and the company currency. The change ensures that tax amounts are accurately reflected in the Datev export, regardless of the invoice's currency, improving financial reporting accuracy.
Original PR description
There is an issue in the Datev export functionality. In the current functionality, the code calculates a delta between the taxes in the `tax_totals` and the ones on the journal items. Issue is, the tax amounts from tax_totals were always in company currency, while the entry itself can use a foreign one. This replaces the use of company currency with the use of the invoice's currency and appropriately adjusts the test featuring foreign currency. Steps: Create a foreign currency. Create an invoice with a taxed product using the currency. Export the ledger to Datev. Inspect the resulting csv. Note that neither the final listed price, nor the rate listed for the currency align with the ones in the db. opw-6275889 Forward-Port-Of: odoo/enterprise#120293
This update resolves an issue where inventory counts weren't accurately recording products without lot numbers. The fix ensures that new units without a lot are correctly added to inventory counts, preventing miscounts and improving data accuracy. It addresses a validation error related to how the system handles lotless products during inventory adjustments.
Original PR description
### Steps to reproduce: 1. Create a product tracked by lot 2. Put 10 units in WH/Stock without lot 3. Inventory > Operations > Adjustments > Physical Inventory 4. Select the line referring to your…
### Steps to reproduce: 1. Create a product tracked by lot 2. Put 10 units in WH/Stock without lot 3. Inventory > Operations > Adjustments > Physical Inventory 4. Select the line referring to your product and request an inventory count + Show Expected Quantity 5. Open the barcode app > Count Inventory 6. Scan your product #### > The line is not selected, in particular, next scans will be re-interpreted as product scans rather than new serial creation for your product. ### Cause of the issue: Scanning your product search a line to select if any: https://github.com/odoo/enterprise/blob/bce04ce24b66fb1a2481274eb3aebdc30a62766e/stock_barcode/static/src/models/barcode_model.js#L1432-L1435 https://github.com/odoo/enterprise/blob/bce04ce24b66fb1a2481274eb3aebdc30a62766e/stock_barcode/static/src/models/barcode_model.js#L1630-L1632 However, the `findLine` will fail since this method calls the `_canOverrideTrackingNumber` to determine if the lot of the barcodData matches the one of the line: https://github.com/odoo/enterprise/blob/bce04ce24b66fb1a2481274eb3aebdc30a62766e/stock_barcode/static/src/models/barcode_model.js#L1859-L1863 But, the override of the `_canOverrideTrackingNumber` method for the `BarcodeQuantModel` does not handle the absence of lotName in the barcodeData correctly as it does not consider that a line without lot can be overridden by an empty lotName: https://github.com/odoo/enterprise/blob/bce04ce24b66fb1a2481274eb3aebdc30a62766e/stock_barcode/static/src/models/barcode_quant_model.js#L729-L731 Note however that the super call does: https://github.com/odoo/enterprise/blob/bce04ce24b66fb1a2481274eb3aebdc30a62766e/stock_barcode/static/src/models/barcode_model.js#L795-L798 ### Issue 2: ### Steps to reproduce: - Steps 1 -> 5 - Click on your product line to select it - Scan a new lot to add one new unit referring to that lot - Confirm (1) - Apply Now #### > User Error: Quant's editing is restricted, you can't do this operation Since the line is selected, you have a currentLine during the `processBarcode` and hence the existing line will be updated using the `lotName``: https://github.com/odoo/enterprise/blob/cf3c2fce8a6b7b2d7547d44a0e4423f887986d52/stock_barcode/static/src/models/barcode_model.js#L1560-L1584 However, writing on the line will then try to write on the related quant during the validation process which will be forbiden since we are not allowed to change the lot of an existing quant: https://github.com/odoo/odoo/blob/e3b0ca11d99b2ef819cdad68b169112cd73668b6/addons/stock/models/stock_quant.py#L351-L360 Now, the issue is that actually due to the nature of the line and of the barcode data, the line lot is not expected to be updated but rather a new line is expected to be created: https://github.com/odoo/enterprise/blob/cf3c2fce8a6b7b2d7547d44a0e4423f887986d52/stock_barcode/static/src/models/barcode_model.js#L795-L798 Additional issue: Fixing issue 1 and 2 highlight and other issue of the validation process: - Steps 1 -> 6 > The line gets selected - Scan a newlot > a new subline is added referring to 1 unit of your new quant - Confirm (1) > Some serials where not counted, set them as missing #### > Check your quants: the 10 unit lotless quant was not updated but a new quant for 1 units was created for your newlot ### Cause of the issue: Applying all quantities is expecting to toggle them as counted before applying to update the existing quants: https://github.com/odoo/enterprise/blob/c8535a7a0e2eae811048a34a0bae187a1fa45311/stock_barcode/static/src/models/barcode_quant_model.js#L72-L82 https://github.com/odoo/enterprise/blob/c8535a7a0e2eae811048a34a0bae187a1fa45311/stock_barcode/static/src/models/barcode_quant_model.js#L287-L296 However, only line tracked by serial numbers are set as counted: https://github.com/odoo/enterprise/blob/c8535a7a0e2eae811048a34a0bae187a1fa45311/stock_barcode/static/src/models/barcode_quant_model.js#L60-L63 opw-6212923 Forward-Port-Of: odoo/enterprise#118373
This update corrects a misleading error message that prevented new online account connections for Canadian bank accounts (which don't use IBANs). The fix skips the journal duplication check when an account number is missing, ensuring a fresh journal is created and preventing unnecessary errors. This improves the user experience for a common scenario.
Original PR description
…unt number When a provider returns an account without `account_number` (typical for Canadian banks, which do not use IBANs), the existing-journal search ran with `bank_account_number = False`.…
…unt number When a provider returns an account without `account_number` (typical for Canadian banks, which do not use IBANs), the existing-journal search ran with `bank_account_number = False`. Because `bank_account_number` is a related field on `bank_account_id.account_number`, that search matched every bank journal in the user's allowed companies whose `bank_account_id` was unset. If any of those journals was tied to a connected online link, the new sync was blocked with the misleading error "There's already a synchronized journal linked to this IBAN", even though no IBAN was involved. Skip the search entirely when `account_number` is falsy: without an identifier there is nothing meaningful to dedup against, and the downstream code already handles `existing_journals` being empty by creating a fresh journal. Note: when the provider omits `account_number`, a delete-and-recreate of the connection will now create a fresh journal rather than coincidentally reusing an unlinked empty-`bank_account_number` journal. That reuse path already failed (with a spurious "IBAN already connected" error) as soon as the user had more than one such journal, so the prior behavior was not reliable. The supported recovery path remains the reconnect button on the existing journal, which uses the `active_id` branch and is unchanged. opw-6253563 Forward-Port-Of: odoo/enterprise#119848
This update resolves a visual issue in dark mode and improves the user experience of the Gantt holiday view. Specifically, the way users select holidays has been corrected to accurately reflect the number of selected days, enhancing usability and data accuracy.
Original PR description
- changed selected value in the view to be number of selected cells instead of number of selected records - fixed a visual bug in dark mode where the create popup has ugly background task-id: 6124765 Forward-Port-Of: odoo/enterprise#119253 Forward-Port-Of: odoo/enterprise#116229
This update fixes a potential problem where users could accidentally trigger mass email campaigns bypassing intended filters. The change prevents users from directly retrying failed mailings linked to marketing automation, reducing the risk of unintended spam and ensuring targeted email delivery. The fix includes a user error message and a hidden retry button to guide users.
Original PR description
When a mailing is managed by a marketing automation campaign, its target domain is dynamically handled by the campaign's activities. If a user clicks the "Retry" button directly on the mailing…
When a mailing is managed by a marketing automation campaign, its target domain is dynamically handled by the campaign's activities. If a user clicks the "Retry" button directly on the mailing template, it bypasses the campaign filters and queues the mailing for the entire target model, causing unintended mass spam. This commit fixes the issue by: 1. Raising a UserError in `action_retry_failed` if the mailing is linked to marketing automation (`use_in_marketing_automation`). 2. Hiding the "Retry" button in the frontend view to prevent confusion. 3. Adding a unit test to ensure this edge case is caught in the future. Steps to reproduce: 1. Create a marketing campaign with a filter and an email activity. 2. Run the activity and ensure at least one email trace fails. 3. Open the mailing template via the "Templates" smart button. 4. Click the "Retry" button on the template form. 5. The mailing is placed in the standard queue, bypassing the domain and targeting all records of the underlying model. OPW-6220106 Forward-Port-Of: odoo/enterprise#119760 Forward-Port-Of: odoo/enterprise#118759
This update resolves an issue where the Balance Sheet report incorrectly displayed zero amounts when using the 'Ledger' grouping option. The fix ensures the 'Ledger' group is only applied when appropriate (multicompany or different journal groups are present), preventing incorrect calculations.
Original PR description
[FIX] account_reports: only restore horizontal group from previous_options when it's available The 'Ledger' group will only be available when in multicompany or using different journal groups. It was…
[FIX] account_reports: only restore horizontal group from previous_options when it's available
The 'Ledger' group will only be available when in multicompany or using different journal groups. It was still restored from previous options, even when it shouldn't have been available.
=============================================
[FIX] account_reports: properly compute Ledger group when there's no journal group
To reproduce the issue
1) Populate the db with some data impacting the Balance Sheet
2) Delete all the journal groups that would be created by default
3) Open the Balance Sheet, with multiple companies active.
4) Select the "Ledger" horizontal group
====> The report is displayed horizontally grouped by company, but all amounts are 0.
This happens because, when no journal group exists, the "Ledger" horizontal group creates a column group per company, applying a domain doing ('journal_id', 'in', []), so nothing matches. This is caused by the fact that, in this case, options['journals'] will require to match all journals, and will hence be an empty list. We fix it by properly searching for all journals to build the horizontal group's domain when options['journals'] is empty.
Forward-Port-Of: odoo/enterprise#119418This update corrects a potential issue in the Swiss payroll module where users could incorrectly request refunds on payslips. Swiss regulations limit employees to one payslip per month, so the system now guides users to cancel and re-create the payslip for any necessary corrections. This ensures compliance with Swiss payroll rules.
Original PR description
Prevent refunds for CH payslips since only one payslip per month is allowed for Swiss payroll. Users should cancel the payslip and create a new one to apply corrections. task-5951981 Forward-Port-Of: odoo/enterprise#107943
This update resolves an issue where bank statement imports were incorrectly multiplying amounts by 100. This was caused by a double-parsing of debit and credit values when both the bank statement extract and import modules are installed. The fix ensures the correct parsing of these values, preventing inaccurate financial data.
Original PR description
Steps to reproduce --- 1. With Accounting installed, import a bank statement CSV that has separate Debit and Credit columns using number separators (e.g. a line with "1.234,56"). 2. Map the columns…
Steps to reproduce --- 1. With Accounting installed, import a bank statement CSV that has separate Debit and Credit columns using number separators (e.g. a line with "1.234,56"). 2. Map the columns to Debit and Credit and import. The imported amounts are multiplied by 100: "1.234,56" is imported as 123,456.00. Issue --- This only happens when both `account_bank_statement_import_csv` and `account_bank_statement_extract` are installed, which is the default in any Accounting database since both modules are auto-installed. `account_bank_statement_extract` turns debit and credit into real Monetary fields on `account.bank.statement.line`: https://github.com/odoo/enterprise/blob/af863c5a53d0ab50fe67cb9ea910391d4a1979dd/account_bank_statement_extract/models/account_bank_statement_line.py#L7-L8 Because they are now real fields, the generic importer already converts those columns to floats: https://github.com/odoo/odoo/blob/bfa39854e56da4bf23295d62f63d66973ad0d78e/addons/base_import/models/base_import.py#L1281-L1285 The CSV statement wizard then parses the same columns a second time: https://github.com/odoo/enterprise/blob/d7ab7ee1287342638006e290ede20b955aae8370/account_bank_statement_import_csv/wizard/account_bank_statement_import_csv.py#L92-L93 The first pass correctly reads "1.234,56" as "1234.56", but the second pass sees a lone dot, mistakes it for the thousands separator, strips it, and produces 123456. The wizard now parses debit and credit only when they are virtual fields, so when they are real fields the values parsed by the generic importer are reused instead of being parsed twice. Without `account_bank_statement_extract`, debit and credit exist only as virtual import fields, so the generic importer skips them and the wizard parses them once. That is why the regression stays hidden until the extract module is present. opw-6227083 --- Forward-Port-Of: odoo/enterprise#118979
This update corrects a calculation error in the GOSI (Saudi Government Social Insurance) contributions for employees with unpaid leave. The fix prortions contributions based on actual worked days, ensuring accurate deductions for employees who are absent. This improves payroll accuracy and compliance for Saudi Arabia operations.
Original PR description
Task: 6279514 Forward-Port-Of: odoo/enterprise#119990
This update addresses a missing rule in the calculation of employer costs within the Odoo Enterprise HR module. Following a review, a crucial rule was added to ensure accurate employer cost computations, building upon previous fixes. This improves the reliability of payroll and HR reporting.
Original PR description
In this previous PR https://github.com/odoo/enterprise/pull/106839 the computation of the employer cost was fixed and many rules were flagged as needed in that computation. After a report, we found one of the rules was missing so we add it in this PR. Task: 6088412 Forward-Port-Of: odoo/enterprise#112681
This update fixes a potential issue where certified point-of-sale configurations could allow users to enter negative quantities on order lines. This has now been resolved across both the backend and frontend of the system, ensuring data accuracy and preventing errors in sales transactions. This change improves the reliability and stability of our POS functionality.
Original PR description
Certified pos configs should not allow to set negative quantities on order lines. We now prevent it from both backend and frontend. see odoo/odoo#269487 task-5942777 Forward-Port-Of: odoo/enterprise#120513 Forward-Port-Of: odoo/enterprise#119702
This update ensures that when users open links in new tabs or windows, the current debug mode settings are automatically carried over to the new page. Previously, this functionality was broken, causing debug information to be lost. This improvement maintains a consistent user experience and simplifies debugging workflows.
Original PR description
Before this commit, opening a link in a new tab or window via middle-click or Ctrl+click would lose the active debug state, as the query parameter was not forwarded to the new page context. This commit ensures that the debug status is copied from the current window and appended to the target URL when a user opens a link in a new window. task-6285277
This update adds a temporary mock model to the spreadsheet dashboard edition module, resolving an issue that prevented test cases from running correctly. This ensures the stability and reliability of the dashboard's testing process, allowing for continued development and quality assurance.
Original PR description
This commit introduces a mock `SpreadsheetDashboardFavoriteFilter` model in the `spreadsheet_dashboard_edition` module. It ensures that test cases relying on favorite filters can run correctly. Task: [5114625](https://www.odoo.com/odoo/2328/tasks/5114625)
This update fixes a visual issue where the 'suggestion' icons weren't appearing in the Assistant when it detected tasks. The change ensures the Assistant correctly identifies activity types, allowing the icons to display accurately and provide better guidance to users. This improves the Assistant's usability and effectiveness.
Original PR description
- When the Assistant detected activities such as 'Working on task', the suggestion icon was not displayed because the event type was not assigned. Unlike `aw.rule` matches, the Odoo URL resolver only set the label and related record information, but did not set the activity type required by `getIcon()`. - Expose the activity type through `get_assistant_data` and assign the activity type when resolving model URLs in extractWatcherActivity. task-6259793 Forward-Port-Of: odoo/enterprise#120370
This update resolves a bug where the employee field in appraisals wouldn't automatically populate when using the appraisal smart button from the employee record. The fix ensures the correct employee ID is passed through the system, regardless of the user's navigation path, improving the appraisal process flow.
Original PR description
[FIX] hr_appraisal: fix auto-fill of employee in appraisal Bug production: 1 - employee app -> department -> select employees -> select any employee -> use appraisal smart button in top ->…
[FIX] hr_appraisal: fix auto-fill of employee in appraisal
Bug production:
1 - employee app -> department -> select employees -> select any employee -> use appraisal smart button in top -> employee_id is not coming
Bug cause:
1 - When we press smart button of appraisal action_send_appraisal_request in hr_employee is called.
2 - It send the self.env.context as a context and active_model and active_id.
3 - In hr_appraisal, _get_default_employee function calculates the default employee_id by looking to context and especially by looking to active model and id.
3.1 - If active_model is hr.employee and there is active_id, it finds the employee automatically (that is the case when we are coming directly from employee -> smart button hr_appraisal)
3.2 - When we first click to department and then we click to employee and smart button, active_model is hr.department and default_employee_id cannot be calculated in default version.
Bug solution:
1 - I have passed the default_employee_id to the context in action_send_appraisal_request function. Since we know the employee in the action_send_appraisal_request function we can pass it directly.
task - 6285434
Forward-Port-Of: odoo/enterprise#119737This update fixes a bug where the 'Due' button wasn't appearing on customer forms when a balance existed, specifically for customers linked only at the journal entry line level. The fix ensures the button is always visible, regardless of how the customer is linked to accounting records, improving user experience and financial reporting accuracy.
Original PR description
Steps to Reproduce: 1. Install Accounting module (without Point of Sale). 2. Create a customer. 3. Create a journal entry with that customer set only at line level. 4. Post the journal entry. 5. Open…
Steps to Reproduce: 1. Install Accounting module (without Point of Sale). 2. Create a customer. 3. Create a journal entry with that customer set only at line level. 4. Post the journal entry. 5. Open the customer form. Issue: The Due smart button is not visible on the partner form even though an outstanding balance exists for the customer. Note: This issue does not reproduce when Point of Sale is installed, as the POS module overrides `_compute_has_moves` with its own implementation that checks the outstanding balance directly. Root Cause: The `_compute_has_moves` method queries only `account.move `for partner matching. When a partner is referenced only at the account.move.line level, the partner is never picked up by this query, resulting in `has_moves = False` and the Due button remaining hidden. Fix: Replaced the EXISTS-based implementation with a UNION-based approach as the EXISTS implementation evaluated the query per partner row, whereas UNION processes all partners in a single batch query. Additionally extended the UNION to also include account.move.line partner matching, ensuring partners referenced only at the line level, are correctly detected and has_moves is set to True. Result: The Due smart button is now correctly visible for all partners with an outstanding balance, regardless of whether the partner is set at the journal entry level or only at the line level. owp = 6243562 Forward-Port-Of: odoo/enterprise#120492 Forward-Port-Of: odoo/enterprise#119084
This update resolves an issue where account reports were displaying with incorrect styling due to a missing CSS class. The change ensures that all lines within the reports are rendered with the correct visual formatting, improving the overall presentation and readability of financial data. This ensures consistent and accurate reporting.
Original PR description
commit introducing the issue: https://github.com/odoo/enterprise/commit/6608d5c21a7fb9d57786c2a7618b878e244bd420 Forward-Port-Of: odoo/enterprise#120532
Code cleanup and technical improvements
This pull request updates the employee field in the HR module to improve data consistency and clarity. The change ensures a more standardized approach to recording employee information, which will help with reporting and data analysis. This is a refactoring effort focused on internal HR processes.
This update simplifies the bank reconciliation process within Odoo Enterprise by restructuring the core function. The changes enhance readability and maintainability, making it easier for developers to understand and update the code. This ultimately contributes to a more stable and efficient accounting system.
Original PR description
Reworked the try_auto_reconcile function to make it more readable by creating helper functions and splitting the function into multiple smaller ones. task-6171727 Forward-Port-Of: odoo/enterprise#120500 Forward-Port-Of: odoo/enterprise#116958
1 change
Resolved issues and error corrections
This update optimizes the MRP work order process by preventing unnecessary BoM explosions for non-material quality points like instructions and pass/fail checks. Previously, this process was slow, but now it's significantly faster, reducing processing time by orders of magnitude. This improves overall system responsiveness and efficiency.
Original PR description
`_compute_component_ids` unconditionally called `bom.explode()` for every product variant on the BoM, even for quality point types (`instructions`, `pass_fail`, etc.) that never use the `component_id` picker. The field is only meaningful for `register_consumed_materials` and `register_byproducts`. Restrict the expensive path to those two types with an `elif` so all other types return `component_ids = False` immediately. | # Input data | Before PR | After PR | |:---:|:---:|:---:| | 10 variants, 10 components, 2 phantom BoMs, 3 ops | 841 ms | 0.1 ms | | 30 variants, 20 components, 5 phantom BoMs, 3 ops | 1,343 ms | 0.1 ms | | 80 variants, 40 components, 12 phantom BoMs, 5 ops | 8,674 ms | 0.1 ms | OPW-6210368
7 changes
Resolved issues and error corrections
This update fixes an issue where payment reports were not reflecting the most recent company name changes. The fix ensures that all generated reports accurately display the current company information, improving data accuracy for financial reporting. This resolves a discrepancy in ISO20022 compliant payment data.
Original PR description
## **Steps to Reproduce:** 1) Install `l10n_ch_hr_payroll`, `hr_payroll_account_iso20022` with demo data. 2) Switch to the Swiss company and rename it. 3) create employee with address in switzerland…
## **Steps to Reproduce:** 1) Install `l10n_ch_hr_payroll`, `hr_payroll_account_iso20022` with demo data. 2) Switch to the Swiss company and rename it. 3) create employee with address in switzerland and setup bank details with running contract. 4) Generate a payrun, validate it, then download the Swiss payment report. #### **Note: Detailed video to generate this issue on v18 is attached on the ticket** ## **Obeserved Behavior:** The report still uses the old company name instead of the renamed one. ## **Expected Behavior:** The report should use the current company name. ## **Root Cause:** In the payment report the `iso20022_initiating_party_name`, is set using `iso20022_get_company_name` method at [1] and `iso20022_initiating_party_name` was only initialized on `create` at [2], so later company renames did not update the stored initiating party name when it matched the previous company name. [1]- https://github.com/odoo/enterprise/blob/a86b98ea4fbc060cbe2666bc87f215a680ce54e7/account_iso20022/models/account_journal.py#L442-L446 [2]- https://github.com/odoo/enterprise/blob/7df2e86541a69d3160bc7165223227bde70d7291/account_iso20022/models/res_company.py#L16-L24 ## **Fix:** Update the stored ISO20022 initiating party name on company write whenever it still matches the previous sanitized company name. **opw-6159675**
This update resolves a problem where Odoo incorrectly identified ZIP files when reading data from a buffer, leading to incorrect MIME type detection. The fix adapts Odoo's system to use a custom implementation when libmagic returns a generic response, ensuring accurate file type identification for ZIP and related formats. This prevents potential errors in handling attachments.
Original PR description
Libmagic version 0.46 (currently available in Debian Trixie/Forky and Ubuntu Resolute) introduced a regression regarding ZIP file detection. While it correctly identifies a ZIP file when reading…
Libmagic version 0.46 (currently available in Debian Trixie/Forky and Ubuntu Resolute) introduced a regression regarding ZIP file detection. While it correctly identifies a ZIP file when reading directly from a file path, it fails when reading the exact same content from a buffer, returning a generic 'application/octet-stream' instead. Because `guess_mimetype` primarily evaluates buffers, this upstream bug breaks MIME type detection for ZIP files (and related formats like docx, xlsx, etc.) in Odoo environments running this libmagic version. Since we cannot directly fix the library itself, this commit adapts Odoo's `guess_mimetype` to fallback to our custom implementation when libmagic returns the generic 'application/octet-stream' to workaround this library's bug. Upstream libmagic fixes: - https://github.com/file/file/commit/f1adef05b8a85be50d28965b1fd21fcceacf7a4e - https://github.com/file/file/commit/60b2032b96fc185b37fb0f2152e834efb2edad6e Upstream python-magic issue: - https://github.com/ahupp/python-magic/issues/354 runbot-938197 Forward-Port-Of: odoo/odoo#269506
This update fixes a rendering issue in Outlook Desktop where the layout of emails with three-column designs (`s_three_columns`) and button styling were not displaying correctly. The changes ensure consistent visual appearance of emails in Outlook Desktop, improving the overall email experience for users.
Original PR description
Problem: - `s_three_columns` is not rendered correctly in Outlook Desktop when the equal-height option is enabled. - Button padding, border radius, and background color are not rendered properly in…
Problem: - `s_three_columns` is not rendered correctly in Outlook Desktop when the equal-height option is enabled. - Button padding, border radius, and background color are not rendered properly in Outlook Desktop. Solution: - Set the `height` attribute on `td.card-body` along with `valign` so columns keep the same height in Outlook Desktop. - Use `v:roundrect` to support rounded corners (`arcsize`) and background colors (`fillcolor`), making buttons render consistently with the editor in Outlook Desktop. Before: <img width="1249" height="1297" alt="image" src="https://github.com/user-attachments/assets/828bc42b-1e21-404c-a5ae-81d4ee688802" /> After: <img width="1249" height="1309" alt="image" src="https://github.com/user-attachments/assets/263a1c30-fe86-4e40-b3c2-476abc2bf84a" /> Steps to reproduce: - Add the `s_three_columns` snippet with one card containing more content than the others. - Add some buttons. - Send or preview the email in Outlook Desktop. - Observe that column heights and button styling are not rendered correctly. opw-6044725 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#269791 Forward-Port-Of: odoo/odoo#269274
This update allows administrators to directly manage mail messages, such as stalled mass mailings, without needing to use workarounds. The change bypasses existing security rules when an administrator is in 'admin' mode, streamlining operations and reducing potential issues. This was implemented to avoid unnecessary complexity and ensure administrators have the tools they need.
Original PR description
Currently, access rights for `mail.message` rely on a set of layered rules. If an administrator attempts to manage (edit, delete, or duplicate) a message record—and fails all of these contextual…
Currently, access rights for `mail.message` rely on a set of layered rules. If an administrator attempts to manage (edit, delete, or duplicate) a message record—and fails all of these contextual evaluations, they are ultimately blocked by an AccessError. For example: - Mitchell Admin sends a mass mailing via CRM app. - The email fails to send. - Marc Demo (an administrator with no access to CRM) tries to edit, delete, or duplicate the failed email. Because he fails the specific contextual access rules for that message, he is blocked. This behavior is overly restrictive. Administrators already possess the power to elevate their privileges, grant themselves access to any app, or log in as other users. Blocking them from managing critical communications (like a stalled mass mailing queue) forces them to use unnecessary workarounds. This commit resolves the issue by short-circuiting the `_check_access` method. If the environment is in admin mode (`self.env.is_admin`), we bypass the complex rule evaluations entirely and grant immediate access. We specifically implemented this via a Python override rather than modifying `ir.rule` records in `security.xml`. This ensures the fix can be safely backported to stable versions without requiring a forced XML data update on existing databases. It also keeps this specific security bypass centralized within the mail module's existing architecture.
This update resolves an issue where users without an employee assigned to their company branch would encounter an error when creating expenses from documents. The fix ensures the system correctly handles users without a direct employee link, preventing a misleading error message and improving the user experience for all company branches.
Original PR description
Fix a bug where a traceback is displayed when a user with no employee on the parent company tries to create an expense from a document. Steps to reproduce: - install expense and documents - create a branch to the main company - create a user with access to both companies and group 'Team Approver' - create an employee for this user in the branch company - select both companies and go in Documents - select a document and in the action menu, click 'Create an Expense' -> This tracebacks before commit, and an user error is displayed after task-6237021
This update fixes an issue where the 'translate' button disappeared in the report editor when creating new reports. The fix ensures the button remains visible, allowing users to easily translate report resources regardless of whether they're editing an existing or new record. This improves usability and simplifies the report creation process.
Original PR description
The web.TranslationButton template now only renders when canTranslate is true, so the field button can hide itself on a new record still edited inside an x2many. The report editor reuses that template with its own component, which did not define the getter, so its translate button was no longer rendered. The component always edits an existing ir.ui.view, so its canTranslate returns true. Steps to reproduce: 1. Activate a second language in Settings > Translations > Languages 2. Open any report in Studio and edit its sources via the XML editor => The translate button next to the resource selector is missing Ticket [link](https://www.odoo.com/odoo/project.task/6260427) opw-6260427
This update resolves a technical issue where the web_editor module could encounter an error if it attempted to compare an empty history. The code has been updated to gracefully handle this situation, ensuring the editor continues to function correctly. This prevents potential disruptions to users when reviewing changes.
Original PR description
If, for whatever reason, the history we try to compare is an empty string, we might get a value error thrown. We guard the code to avoid the error. see :https://github.com/odoo/odoo/issues/269149 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#269722
1 change
Resolved issues and error corrections
This update corrects a previous issue where Odoo was incorrectly selecting unavailable couriers from Shiprocket. The change now filters out 'blocked' couriers, ensuring only serviceable options are considered for rate calculation and shipment selection. Additionally, the system is more robust to handle potential errors in Shiprocket's data.
Original PR description
Shiprocket provides an odablock flag in the courier serviceability response. Couriers with odablock=True are not serviceable for the requested route and should not be considered for rate calculation or selection. Before this change, Odoo selected the first courier returned by Shiprocket regardless of its ODA status. As a result, unavailable couriers could be proposed to users and selected for shipments. The fix filters out ODA-blocked couriers before evaluating available services, ensuring that only serviceable couriers are considered. Additionally, freight charge parsing is hardened to gracefully handle non-numeric values returned by Shiprocket, preventing errors during AWB assignment and price computation. FYI: Shiprocket uses odablock=False for serviceable routes and odablock=True for routes that are blocked for a given courier. opw-6288768,6152279