Daily updates from Odoo
Tuesday, June 16, 2026
117 changes
16 changes
New functionality added to Odoo
This update expands the information sent to Pricer, including price before taxes, tax details, supplier product codes, and units of measure. This addition addresses critical use cases and ensures accurate pricing data is provided to Pricer, improving integration and functionality. The update also includes minor code cleanup and automated updates to pricer tags based on related model changes.
Original PR description
We are currently missing some fields which must be sent to Pricer for some basic use-case scenarios This PR adds - Price before taxes - Taxes name (ex: 21%) - Supplier product code - Supplier reference - Units of measure of the product The PR also triggers the update of the pricer tags when the models indirectly related to Pricer are modified (taxes name / supplier reference / supplier product code) + cleans up the code a bit task-4506260 Forward-Port-Of: odoo/enterprise#118814 Forward-Port-Of: odoo/enterprise#78009
Enhancements to existing features
This update streamlines the synchronization of point-of-sale (POS) transactions with Fiskaly for both retail and restaurant orders. It optimizes the flow by sending complete transaction data only upon order validation, reducing unnecessary updates and improving efficiency. This change ensures accurate and timely reporting of sales data to Fiskaly.
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#120529 Forward-Port-Of: odoo/enterprise#117526
Resolved issues and error corrections
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 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 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
This update fixes a problem that occurred when restoring Odoo databases to older versions. Previously, client notifications wouldn't deliver correctly if the client's stored notification ID was higher than the server's current maximum. Now, the server automatically sends the correct last ID, ensuring notifications are delivered reliably after a database restore.
Original PR description
When a database is restored to an earlier state, the client's stored last notification id may be higher than the server's effective max. This blocks delivery until the server reaches the client's last id. The server now sends the effective last id as the payload of the `bus/last_id_reset` message so the worker resets `lastNotificationId` and prunes `seenNotificationIds` to a consistent state before the next subscription. Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update fixes an issue where sale order references were incorrectly linked to the user's company instead of the sale order's company. Now, the system correctly uses the company associated with the sale order or payment transaction, ensuring accurate reference generation and preventing errors in multi-company setups. This improves the reliability of our sales processes.
Original PR description
Description of the issue/feature this PR addresses: Fixes an issue where the sale order reference computation was fetching the invoice journal based on the logged-in user's current company instead of…
Description of the issue/feature this PR addresses: Fixes an issue where the sale order reference computation was fetching the invoice journal based on the logged-in user's current company instead of the company associated with the specific payment provider or transaction context. This caused incorrect reference processing or errors in multi-company environments when a user was logged into one company but processing an order from another. Current behavior before PR: The function searches for the account.journal using self.company_id.id. Since self in this context (likely a payment provider or transaction record) might be evaluated under the active user's environment context, it fetched the journal from the user's currently active company (allowed_company_ids), disregarding the actual company related to the sale order or the transaction. Desired behavior after PR is merged: The invoice journal search uses the correct company context (e.g., order.company_id.id or the specific company linked to the payment record), ensuring that the sale order reference is processed using the appropriate journal from the correct company, regardless of which company the logged-in user is currently switched into. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#269558
This update corrects an issue where stock relocation incorrectly swapped the order of reservations for deliveries. After moving stock, reservations were being reassigned in the wrong sequence, leading to incorrect quantity assignments. This fix ensures reservations are maintained in the original order after internal stock movements, improving inventory accuracy.
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#270061 Forward-Port-Of: odoo/odoo#265169
This update ensures that data associated with an IoT box isn't lost when it's removed from the system. Previously, deleting an IoT box could result in the loss of linked fiscal data. This change safeguards business data and maintains accurate POS reporting.
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 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 accurate counts to be performed. This prevents errors during physical 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#120065 Forward-Port-Of: odoo/enterprise#118813
This update significantly speeds up the process of validating field deletions within website forms. Previously, this check took several minutes, causing delays. Now, it completes in just milliseconds by focusing only on fields that actually contain website form markup, 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 enhances the security of our AI integrations by moving the API key from a URL parameter to a header. This change reduces the risk of exposing sensitive information and aligns with best practices for API key management. The update primarily affects the AI module.
Original PR description
Task-6306377
This update fixes an issue where salary distribution calculations weren't automatically updated when bank accounts were archived or restored. Previously, this could lead to incorrect salary payments. Now, the system correctly recomputes the salary distribution map after these account changes, ensuring accurate payroll processing.
Original PR description
When archiving or unarchiving bank accounts, salary distribution map is not recomputed. Task-6180142 Forward-Port-Of: odoo/odoo#269646 Forward-Port-Of: odoo/odoo#262255
This update ensures that regenerating overtime only affects the selected overtime ruleset, preventing unintended changes to other periods. A confirmation message is now displayed to alert users about resetting manual edits linked to the selected ruleset, increasing data accuracy 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
18 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 enhances the payment confirmation screen in the Point of Sale (POS) system. Now, customers see a 'Processing...' indicator during payment finalization and a visual checkmark with the amount paid upon successful completion. This provides clearer feedback and a more polished user experience.
Original PR description
In this commit : - Show "Processing..." text while payment finalization is running - Show animated success checkmark and "Amount Paid" once processing completes - Remove warning notification when clicking during processing - Extract shared checkmark animation into reusable template - Update tour tests to verify the success state Task:6246377 Forward-Port-Of: odoo/odoo#269428 Forward-Port-Of: odoo/odoo#267635
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 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 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 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 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
This update corrects a potential error in the holiday payroll calculation. Previously, the base amount could exceed an employee's wage when calculating holiday pay. This change ensures that the base amount is always capped at the employee's regular wage, aligning with payroll regulations and improving accuracy.
Original PR description
The base amount should never be more than the employee's wage.
This update corrects a bug in the stock account closing entry that incorrectly calculated inventory values when multiple companies were involved. The fix ensures that the closing entry accurately reflects the inventory value for each company, resolving discrepancies in initial balances and stock valuations. This ensures accurate accounting reporting across multiple company setups.
Original PR description
**Steps to reproduce on a new db:** (bug also reproducable on runbot but the impact is less easy to compute because of influence of other existing companies) - create a new company as company 2 and…
**Steps to reproduce on a new db:** (bug also reproducable on runbot but the impact is less easy to compute because of influence of other existing companies) - create a new company as company 2 and use the existing default company as company 1. - create a warehouse for both company - for both comp, in settings for the 'fiscal localization' set Package : Generic Chart of account, if not already set (to have account journals). - for both comp, in settings for inventory valuation set 'periodic' and for periodic valuation set 'daily' From company 1 : - create a storable product with standard price method and set a cost of 30 - set an onhand quantity of 1 if you navigate to 'inventory valuation' you'll see that : - initial balance is 0 - ending stock is 30 - the variation lines have a balance of 30 - all of this is expected From company 2 : - change the cost of the product to 10 - set an onhand quantity of 1 if you navigate to 'inventory valuation' you'll see that : - initial balance is 0 - ending stock is 10 - the variation lines have a balance of 10 - all of this is expected From any company : - navigate to 'scheduled actions' and select the action 'Stock Account: Inventory Valuation Closing' - click on 'Run Manually' - navigate to 'inventory valuation' **Current behavior:** with company 1 selected : - the initial balance is now 30 - ending stock still 30 - no variation lines - the initial balance was correctly increased by the closing entry with company 2 selected: - the initial balance is now 40 - the ending stock is still 10 - the variation lines credit 30 in stock valuation In company 2 the closing entry debitted 40 in stock valuation instead of 10 which increased the initial balance to 40 instead of 10 If you open the journal items you'll find the closing amls have a balance of 40 instead of 10 **Cause of the issue:** The _cron_post_stock_valuation() method calls action_close_stock_valuation() on both companies https://github.com/odoo/odoo/blob/bfa39854e56da4bf23295d62f63d66973ad0d78e/addons/stock_account/models/res_company.py#L143-L144 This methods calls _action_close_stock_valuation with a context modified with only self.env.company.ids in 'allowed_company_ids' https://github.com/odoo/odoo/blob/bfa39854e56da4bf23295d62f63d66973ad0d78e/addons/stock_account/models/res_company.py#L56 This is needed because inside stock_value() we use the total value of the product https://github.com/odoo/odoo/blob/bfa39854e56da4bf23295d62f63d66973ad0d78e/addons/stock_account/models/res_company.py#L92 which will be the sum of the values of the product for each company inside allowed_company_id https://github.com/odoo/odoo/blob/bfa39854e56da4bf23295d62f63d66973ad0d78e/addons/stock_account/models/product.py#L274 So in case action_close_stock_valuation() was called from the 'generate entry' button from the inventory valuation view we need only the main company selected to be in the 'allowed_company_ids' so that the inventory value is computed based only on this company (as is the accounting value). The problem is that this does not work when calling the method from _cron_post_stock_valuation because then there is no 'allowed_company_ids' in the context (because it was called from _process_job() with a new env). so self.env.company will be the company of the user which will be company 1. https://github.com/odoo/odoo/blob/bfa39854e56da4bf23295d62f63d66973ad0d78e/odoo/orm/environments.py#L243 Therefore when _action_close_stock_valuation will be called on company 2, in the context, allowed_company_ids will be company 1. Then, when computing 'products', with_company() will add self (company 2) to the context. https://github.com/odoo/odoo/blob/616e82d7b3a53b1facf481e783baed3e99393d3c/addons/stock_account/models/res_company.py#L151-L152 So stock_value will return the sum of the total_value of each product for company 1 and company 2 which is 40 (instead of 10 for just company 2) https://github.com/odoo/odoo/blob/616e82d7b3a53b1facf481e783baed3e99393d3c/addons/stock_account/models/res_company.py#L242 We then create the closing accounting entry to match the accounting value with the stock value, which explains why the new initial accounting balance of company 2 is 40. **fix:** We set the context using self instead of self.env.companies This makes more sense as both in the cron use case and the generate entry use case the stock value we want is the one of the company in self. - In cron use case, it's obvious as the method is called in a for loop on each company - In the generate entry use case, self will also be the main company, because it's called, in actionGenerateEntry, on this.companyId https://github.com/odoo/odoo/blob/616e82d7b3a53b1facf481e783baed3e99393d3c/addons/stock_account/static/src/stock_valuation/controller.js#L75 which is computed based on the get_report_values https://github.com/odoo/odoo/blob/616e82d7b3a53b1facf481e783baed3e99393d3c/addons/stock_account/static/src/stock_valuation/controller.js#L21 https://github.com/odoo/odoo/blob/616e82d7b3a53b1facf481e783baed3e99393d3c/addons/stock_account/static/src/stock_valuation/controller.js#L28-L30 Which returns the main company https://github.com/odoo/odoo/blob/616e82d7b3a53b1facf481e783baed3e99393d3c/addons/stock_account/report/stock_valuation_report.py#L29 Most importantly, this is also aligned with how the accounting values are computed. https://github.com/odoo/odoo/blob/616e82d7b3a53b1facf481e783baed3e99393d3c/addons/stock_account/models/res_company.py#L103-L105 opw-6237402 Forward-Port-Of: odoo/odoo#269152 Forward-Port-Of: odoo/odoo#266932
This update ensures accurate product pricing when selling large quantities of items like boxes of screws. Previously, the system rounded base unit counts, leading to incorrect reference prices. Now, the system preserves high-precision values, allowing for correct calculations when selling in bulk packs.
Original PR description
**Description of the issue/feature this PR addresses:** The `Product Reference Price` feature in `website_sale` cannot correctly handle products sold in large packs when the reference quantity…
**Description of the issue/feature this PR addresses:** The `Product Reference Price` feature in `website_sale` cannot correctly handle products sold in large packs when the reference quantity requires a very small `base_unit_count`. For example, a product sold as a `box of 10000` screws should be able to use `0.0001` as its `Base Unit Count`, so the reference price can be computed against the box quantity correctly. **Current behavior before PR:** `base_unit_count` uses the default float precision, so values with more than two decimal places are rounded in the product form. When trying to set `Base Unit Count` to `0.0001`, the value is rounded to `0.00` / `0.01`, which makes the Product Reference Price computation incorrect. Steps to reproduce: 1. Go to Settings > Website and enable Product Reference Price. 2. Create or open a product named `Screws`. 3. Set Sales Price to `$ 1.00`. 4. On the product form, set Base Unit Count to `0.0001`. 5. In Custom Unit of Measure, type `box of 10000` and press Create. <img width="1374" height="740" alt="1" src="https://github.com/user-attachments/assets/2d4f7863-b2cd-4c7c-87e1-11526dc50551" /> **Desired behavior after PR is merged:** `base_unit_count` keeps high-precision values such as `0.0001`. This allows `Product Reference Price` to correctly support large-pack scenarios, such as selling screws in a `box of 10000`, by storing `base_unit_count` with unlimited numeric precision. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#262579
The Budget Report was previously timing out on large customer databases due to how it processed data. This update significantly improves performance, allowing users to run the report without delays, even with extensive data. This enhancement ensures the Budget Report remains a reliable tool for financial analysis.
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#119728
Forward-Port-Of: odoo/enterprise#114692This update resolves an issue where automatic payment terminal integration blocked users from splitting bills. Now, users can manually set the payment amount or use the original 'Send' button, providing greater flexibility for handling various payment scenarios. This change enhances the user experience for point-of-sale transactions.
Original PR description
Using payment terminals, we automatically send the transaction to the terminal to avoid a click on "Send", but this prevents from setting an amount to send for split bills. We now let the user set an amount, or directly click on "Send". see odoo/enterprise#120672 task-6303855
This 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 prevents errors during physical inventory processes.
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#120065 Forward-Port-Of: odoo/enterprise#118813
This update optimizes how Odoo retrieves related mailings for testing, addressing a performance bottleneck that occurred when processing large campaigns. The change prevents crashes and significantly improves the speed of mass mailing operations, particularly for campaigns with many mailings. This ensures smoother and more reliable email sending.
Original PR description
**Description of the issue/feature this PR addresses:** The method _get_ab_testing_siblings_mailings currently scans all mailings in a campaign to apply a simple filter, which becomes expensive on databases with many large mailings. **Steps to reproduce bug:** 1) Run this script to get [enough sufficiently large mailings](https://gist.github.com/brcut-odoo/bb0d6d334bfe110afe16021d17d1b443) 2) Open one of the mailings and recieve a crash from the _get_ab_testing_siblings_mailings **Current behavior before PR** https://drive.google.com/file/d/19xftvzsGSQ9DxB67LNiLkKApzsD192ax/view?usp=drive_link **Current behavior after PR** https://drive.google.com/file/d/1apTJ0rWTKaATYa67ZmmN-7bKhrw4KuTx/view?usp=drive_link opw-6245908 Forward-Port-Of: odoo/odoo#268283
15 changes
Enhancements to existing features
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
This update ensures that all user-provided descriptions for invoice lines are accurately exported in UBL format. Previously, the system only supported a single description tag, but this change now correctly handles multiple descriptions, preventing data loss and improving the accuracy of UBL invoices.
Original PR description
1) Previously, we were supposing that only one <cbc:Description> tag could be found on InvoiceLine item. After checking the UBL XSD, I found we could have multiple Description tags for one item. 2) The import order of <cbc:Name> and <cbc:Description> on the invoice line now has been changed to be more accurate and prevent loss of information. The export has been adapted to this change too. Now, we export the actual description written by the user. task-6153895 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#261949
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
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 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 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 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
This update prevents a crash during the installation of the Saudi Arabia E-invoicing module (l10n_sa_edi) in Odoo 19.1 and above. The issue occurred when required taxes were missing, and a code change disrupted the previous workaround. The fix ensures a smoother installation process.
Original PR description
Issue: Installing the `l10_sa_edi` E-invoicing module causes an error in versions 19.1 and above if any of the taxes in the `account.tax-sa.csv` are missing. This behavior was previously avoided via the post init function `_l10n_sa_edi_post_init()`, which no longer works due to the change made to ir_module.py fetching the template data during the module installation. Reproduction Steps: - Install Accounting - Configuration > Settings > Change "Fiscal Localization" to Saudi Arabia - Configuration > Taxes > Delete 0% "Not Subject to VAT" tax - Try to install `l10n_sa_edi` Saudi Arabia - E-invoicing Fix: Updated '_get_sa_edi_account_tax()` to filter out taxes that don't already exist on the database. Removed the `_l10n_sa_edi_post_init()` function since it should now be obsolete. Related ticket: opw-6293740
This update fixes a security vulnerability where users without approval rights could incorrectly interact with approval requests, leading to errors. The change restricts access to 'Accept' and 'Refuse' options within approval activities to only the designated approvers, ensuring proper workflow control.
Original PR description
Currently when a user submits an approval request, an activity is created for the approver who can validate or refuse the request directly from the activity, however these options are also visible to other users who will trigger an error if interacting with the options. This commit removes these options for users who are not the approver. **Steps to reproduce:** - Log in as admin - Go to approvals - Select dropdown menu of General Approval and Edit - Change documents to optionnal - Make sure admin is in the approvers list - Log in as demo - Go to approvals -> General Approval -> New Request - Submit the request - You'll see an activity be created for admin, with Accept and Refuse options - If you select any of these options you will get an access error opw-5423528 Forward-Port-Of: odoo/enterprise#109047
This update corrects a validation error that previously prevented the import of Polish VAT invoices (KSeF) when certain required fields (`P_9A` and `P_11`) were missing or had zero values. The fix allows invoices with these fields absent to be processed correctly, ensuring accurate VAT reporting and avoiding disruptions to the invoice import workflow.
Original PR description
When importing bills, if `P_9A` and `P_11` are absent or zero, a `UserError` is raised: `No net or gross unit price found in the FA (3) for the line with the product.` **Steps to reproduce:** - Upload the problematic XML file as an attachment via `Settings -> Technical -> Attachments` - Create a `validator` server action with the code provided in the referenced ticket, with the `Add Contextual Action` flag set - Reload the page - Select the attachment in list view - Click the gear icon - Run the newly created server action KSeF FA(3) schema documentation: https://ksef.podatki.gov.pl/media/4u1bmhx4/information-sheet-on-the-fa-3-logical-structure.pdf Ticket [link](https://www.odoo.com/odoo/project.task/6211065) opw-6211065 Forward-Port-Of: odoo/odoo#265228
This update fixes an issue where the pricing calculation for products sold in large quantities (like boxes of screws) was inaccurate. By allowing higher precision for the ‘Base Unit Count,’ the system now correctly calculates reference prices for these products, ensuring accurate sales pricing. This improves the overall reliability of product pricing in the website sale module.
Original PR description
**Description of the issue/feature this PR addresses:** The `Product Reference Price` feature in `website_sale` cannot correctly handle products sold in large packs when the reference quantity…
**Description of the issue/feature this PR addresses:** The `Product Reference Price` feature in `website_sale` cannot correctly handle products sold in large packs when the reference quantity requires a very small `base_unit_count`. For example, a product sold as a `box of 10000` screws should be able to use `0.0001` as its `Base Unit Count`, so the reference price can be computed against the box quantity correctly. **Current behavior before PR:** `base_unit_count` uses the default float precision, so values with more than two decimal places are rounded in the product form. When trying to set `Base Unit Count` to `0.0001`, the value is rounded to `0.00` / `0.01`, which makes the Product Reference Price computation incorrect. Steps to reproduce: 1. Go to Settings > Website and enable Product Reference Price. 2. Create or open a product named `Screws`. 3. Set Sales Price to `$ 1.00`. 4. On the product form, set Base Unit Count to `0.0001`. 5. In Custom Unit of Measure, type `box of 10000` and press Create. <img width="1374" height="740" alt="1" src="https://github.com/user-attachments/assets/2d4f7863-b2cd-4c7c-87e1-11526dc50551" /> **Desired behavior after PR is merged:** `base_unit_count` keeps high-precision values such as `0.0001`. This allows `Product Reference Price` to correctly support large-pack scenarios, such as selling screws in a `box of 10000`, by storing `base_unit_count` with unlimited numeric precision. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#262579
This update resolves a bug that occurred when propagating delivery carriers from sale orders to purchase order receipts. Specifically, a shared receipt was causing a conflict when different carriers were assigned to sale orders. This fix ensures that carrier assignments are handled correctly, preventing errors and improving the reliability of purchase order creation.
Original PR description
Steps to reproduce 1. Set warehouse to 2-step incoming (Input → Stock) 2. Enable "Propagation of carrier" on the push rule (Input → Stock) 3. On the vendor, set "Purchase Orders Grouping" to "Always"…
Steps to reproduce 1. Set warehouse to 2-step incoming (Input → Stock) 2. Enable "Propagation of carrier" on the push rule (Input → Stock) 3. On the vendor, set "Purchase Orders Grouping" to "Always" 4. Create a storable product with the Buy route and that vendor 5. Create two sale orders for that product, each with a different delivery carrier 6. Confirm both sale orders → a single merged purchase order is created 7. Confirm the purchase order → a receipt (Vendors → Input) is created 8. Validate the receipt → ValueError: Expected singleton: delivery.carrier(1, 3) Issue In `_get_new_picking_values`, when the push rule fires to create the internal transfer (Input → Stock), the carrier is fetched from the referenced sale orders: carrier_id = self.reference_ids.sale_ids.carrier_id.id https://github.com/odoo/odoo/blob/5fb0c1f1460949043aa23ddbed09bdbfdc4a8482/addons/stock_delivery/models/stock_move.py#L45 Because both sale orders share the same merged receipt, the receipt move references both. When those SOs have different carriers, `self.reference_ids.sale_ids.carrier_id` returns a multi-record recordset and calling `.id` raises `ValueError: Expected singleton: delivery.carrier(1, 3)`. opw-6126760 Forward-Port-Of: odoo/odoo#262671
This update resolves an issue where changing a company's country caused errors in Time Off functionality due to linked leaves and allocations. The change restricts company country updates unless there are no related Time Off records, ensuring smoother operation after a country modification. This improves data consistency and prevents disruptions to Time Off processes.
Original PR description
When a Time Off Type is created, it inherits the country of the current company. If there are leaves or allocations created from this Time Off Type and the company's country is then changed, various…
When a Time Off Type is created, it inherits the country of the current company. If there are leaves or allocations created from this Time Off Type and the company's country is then changed, various parts of Time Off will throw access errors as the leaves and allocations are still tied to the former country. The goal of this PR is to constrain the company country from being changed unless there are no such leaves or allocations. **Steps to Reproduce on Runbot:** 1. Ensure the current company has a `country` set, e.g. "My Company (San Fransisco)" has country set to "United States". 2. Access Time Off as Mitchell Admin. 3. Create a new Time Off Type, for simplicity's sake without a need for allocation or approval, ex: "Gone Fishing". Note this Time Off Type will have the `country` set to the company country by default. 4. Take "Gone Fishing" time off. 5. Change or set blank the company's `country` value. 6. Ensure the record rules cache is flushed. 7. Try to access Time Off. opw-6206359, opw-6140496 closes #263950 Forward-Port-Of: odoo/odoo#263950
4 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 ensures that the correct employee is displayed in order chatter logs when tracking order edits. Previously, the system incorrectly used the original cashier, regardless of the currently logged-in employee. This fix improves order tracking accuracy and provides a more reliable record of changes made to orders.
Original PR description
**Steps to reproduce:** - Enable "Track orders edits" in the settings - Enable "Log in with Employees" - Go to the Restaurant, log in with employee A - Go to a table, order 3 Sushis - Go back to the…
**Steps to reproduce:** - Enable "Track orders edits" in the settings - Enable "Log in with Employees" - Go to the Restaurant, log in with employee A - Go to a table, order 3 Sushis - Go back to the floor plan and change to employee B - Go back to the table and change the qty of 3 Sushis to 2 Sushis - Go to the order in the backend and check the chatter - It will indicate that employee A did the change, but it was employee B **Why the fix:** We always used the cashier set on the order to determine who should be put in the chatter, regardless of who is actually connected at that point. We now use the session's current employee to write who did the change in the chatter. We do not change the order's employee, because it will be done once the order has been paid. In the case where we are not logged in but pos_hr is installed, the employee_id might be the id of a res.user, and browsing it might return the wrong value. To avoid this, we check if the value exists as a hr.employee before assigning the name. The way we return the value has been changed because the linter wasn't happy about it. opw-6213504
This update fixes an issue where refund calculations in the Point of Sale (PoS) system were inaccurate when multiple refunds were applied to a partially paid order. Previously, the total and line amounts incorrectly reflected the entire original order total. This change ensures accurate refund processing, preventing financial discrepancies and improving the reliability of PoS transactions.
Original PR description
When refunding an order that has already been partially refunded, the line amount and total amount where incorrect. They would be the total amount of the original order. Steps to reproduce: ------------------- * Open PoS and make an order with 3 quantity of a product. * Close the session * In the backend, refund 1 quantity of the order and validate the refund * Refund again the same order with the 2 remaining quantities > Observation: The total amount and line amount are not correct opw-6215019 Forward-Port-Of: odoo/odoo#269605 Forward-Port-Of: odoo/odoo#265322
This update resolves an issue where validating rental orders for kit products (specifically when using rented components) would trigger a 'record not found' error. The fix ensures that the system correctly handles the explosion of bills when a rental order involves a kit, preventing this validation error and ensuring proper rental tracking.
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#1200511 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#12005131 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 allows users with appropriate permissions to easily create reusable quotation templates directly from existing sales orders or quotations. This streamlines the process, reducing the number of steps and improving efficiency for creating and reusing templates. Related changes also align with a recent update to the Community version of Odoo.
Original PR description
Currently, there is no option to convert a quotation or sales order into a reusable template. In https://github.com/odoo/odoo/pull/252541, we introduce this option for users with rights to create a quotation template. This enhancement reduces extra clicks and navigation, making it easier and faster for users to create and reuse quotation templates directly from the quotation. In this commit, we add the extra fields added to quotation templates by enterprise modules. Additionally, following the removal of the `sales_management.group_sale_order_template` group in Community, we have updated the relevant Enterprise views and tests to align with this change. - Community: https://github.com/odoo/odoo/pull/252541 - Upgrade: https://github.com/odoo/upgrade/pull/10415 --- task-5260606
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 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 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 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 enhances the timesheet and attendance app's systray by allowing users to access both check-in options based on their permissions. A new user role has been added to control access, and the systray now dynamically displays relevant check-in options depending on the user's rights, improving usability.
Original PR description
1 - Normally, when the timesheet app is installed systray was always only including the timesheet, it was hiding attendance lines
1.1 - Now, it can include timesheet, attendance and both
2 - New right "User" is added to attendance (check-in and access are both okay but cannot modify anything in attendance)
3 - Check-in separation
3.1 - If no right for timesheet + attendance check in, no systray in the app
3.2 - If no right for attendance but at least User: own timesheets only right for timesheet, timesheet check-in is possible
3.3 - If no right for timesheet but at least User right for attendance, only attendance check-in possible from systray
3.4 - Else, both check-in options are put into the systray UI.
task - 5942545This update enhances the softphone's call reporting feature by now displaying records from all partners within the same 'family' (defined by the same commercial partner ID). Previously, it only showed calls related to the individual partner. This change provides a more complete view of customer interactions.
Original PR description
voip_* = voip_crm, voip_helpdesk, voip_project, voip_sale, voip_sale_subscription In this commit, we call all partners with same commercial_partner_id are from the same partner family. In softphone "Go to" button, we now count and show records from all its family instead of only the records from itself. Task-[5437327](https://www.odoo.com/odoo/5778/tasks/5437327)
This update enhances the Odoo Enterprise payroll system to better comply with Hong Kong regulations regarding employee continuous status. New warnings are now triggered when employees approach key milestones (3 or 4 qualifying weeks) to ensure accurate reporting to eMPF and avoid legal issues. The warning color has also been updated for increased visibility.
Original PR description
Improve the 'Validated Payslip Not Reported To eMPF' by fixing the deadline to the 10th of the month, allowing a more accurate warning. Also change the color class of the warning to 'warning', as it is quite an important deadline to meet for legal compliancy. --- Under HK law, an employee earns continuous status if they maintain an unbroken streak of 4 "qualifying weeks". A week legally qualifies if the employee worked: - 17+ hours in that specific week, OR - 68+ hours in total across that week and the 3 preceding weeks. We are adding two new warnings to notify users about non-continuous employees that are approaching the continuous status: - One when the streak of "qualifying weeks" reach 3 - One when the streak reached 4 or more
This update enhances the accuracy of salary calculations for Belgian employees, specifically addressing potential negative net pay issues. It includes a new input for salary adjustments and ensures that salary rules correctly consider maximum seizable amounts, providing a more reliable payroll process.
Original PR description
- added a new input for salary adjustment of type Assignment of Salary (Prior) - reordered the rules for salary adjustments and changed the calculation to ensure that it doesn't result in a negative net - for Attachment and Assignment of salary, the amount now follows the Seizable Amount Percentages salary rule parameter (the max seizable amount is considered in the salary rules instead of showing a warning) - added a link to the payslip in the salary attachment chatter when a payment is recorded task-id: 5478677
This update now automatically logs the reasons why orders aren't synchronized with Lazada. Previously, determining the cause required manual investigation of order details. This enhanced logging provides clearer insights into synchronization issues, streamlining troubleshooting and improving overall order processing efficiency.
Original PR description
Before this commit, the only way to know why an order was not synchronized was to inspect the order details and infer the reason from the code. This commit now logs those reasons. Forward-Port-Of: odoo/enterprise#120511 Forward-Port-Of: odoo/enterprise#120212
Resolved issues and error corrections
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 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 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 resolves a previous installation problem that caused a compulsory logout. It also restores the functionality to generate payruns through the module's initialization process, ensuring accurate payroll calculations. The fix includes safeguards to prevent long-running processes and maintain system stability.
Original PR description
This commit fixes the compulsory logout that was happening when trying to install the module and also brings back the payrun generation through the init hook. It was previously commented due to an error and now it's back and working perfectly, while respecting the runbot limits so the execution don't timeout. task-6259077
This update prevents users from sending receipts directly from the Ticket Screen when the Blackbox BE feature is active. This change ensures data consistency and accuracy, particularly in scenarios where Blackbox BE is used for enhanced transaction tracking. It addresses a potential issue related to redundant receipt generation.
Original PR description
In this commit: ------------------- - Restrict the send-receipt functionality on the Ticket Screen when Blackbox BE is enabled. Task- 6139558 Related PR - https://github.com/odoo/odoo/pull/260596
This update fixes an issue where removing a BoM operation left behind unnecessary data in manufacturing quality checks. By automatically deleting related quality points and ECO changes, the system now provides cleaner, more accurate manufacturing data. This improves the reliability of production reporting and reduces data clutter.
Original PR description
Deleting a BoM operation removes the linked `mrp.routing.workcenter` record, but its instruction steps could remain in the database. Those steps are stored as `quality.point` records linked through `operation_id`. Since that relation did not cascade on deletion, removing an operation left orphaned quality points behind, creating unnecessary noise in manufacturing quality checks. This commit's change: - Set the `quality.point`'s operation_id relation to cascade on delete - Set the `mrp.eco.routing.change`'s operation_id relation to cascade on delete - Set the `mrp.eco.routing.change`'s quality_point_id to cascade on delete task-6079838
This update fixes an issue where long-term sick leave payments weren't correctly calculated for existing employee data. The change ensures that legacy sick leave records are handled properly, preventing incorrect unpaid sick leave payouts. This maintains accurate payroll processing for Belgian employees.
Original PR description
Following this task: https://www.odoo.com/odoo/project/1251/tasks/5942163, sick time offs are automatically split between paid/unpaid when the leave is created. However, existing data was not upgraded, and might result on sick leaves not being unpaid when they should. This commit re-introduces the method to ensure legacy compatibility with existing sick leaves. Upgrading the data by splitting/creating new sick leaves would be too heavy. task-6297274 Forward-Port-Of: odoo/enterprise#120546
This update resolves an issue where demo leave allocations wouldn't correctly validate during an Odoo upgrade from 17.0 to 18.0. The fix ensures that the approval process is executed during upgrades, preventing data inconsistencies and ensuring accurate leave tracking.
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 ensures that changes made to leave requests within the popover form are now correctly saved. Previously, modifications weren't persisted, leading to data inconsistencies. The fix automatically saves changes with a slight delay to handle rapid input, while maintaining accessibility to key actions like 'Refuse' and 'Delete'.
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#120634 Forward-Port-Of: odoo/enterprise#114445
Features or functions removed from Odoo
This change removes a recent update that allowed non-manager users to see a list of individuals receiving feedback requests. This reversion addresses privacy concerns and restores the original system where only managers could view this information. The change involves reverting a security rule and updating related views.
Original PR description
With the following PR (https://github.com/odoo/enterprise/pull/102487) we made it possible for non-manager users to see the list of people to whom a feedback was requested. Here, we want to revert this for privacy reasons. Since we are removing an ir.rule, which has noupdate=1, we need to unlink the record. To do this, we create a local upgrade script that runs following the bump in minor version of the module. Task: 6159748
Code cleanup and technical improvements
This update introduces a new 'card' view type to standardize the display of records across different Odoo views like kanban, gantt, and calendars. This improves consistency and simplifies development by creating a single, reusable template for compact record representations, ultimately enhancing the user experience.
Original PR description
This PR is the first part of a larger effort to unify the API and appearance of cards across view types (kanban records, gantt popovers, calendar popovers, map popovers, activity records, hierarchy…
This PR is the first part of a larger effort to unify the API and appearance of cards across view types (kanban records, gantt popovers, calendar popovers, map popovers, activity records, hierarchy records). All of these views share the same need: displaying a compact representation of a record. Until now, each of these cases had its own implementation, resulting in inconsistent arch APIs (poor developer experience) and an inconsistent look across the UI (poor user experience). As a first step toward this goal, this PR introduces the card view type and allows it to be referenced from other views via the card_id attribute. When this attribute is set on the root node of an arch, the corresponding card view is automatically inlined into the arch. The kanban view has been refactored: its core card rendering logic has been extracted into a dedicated view/component. The gantt popover API has been updated to use the new card API. The kanban_view_id attribute has been removed in favor of card_id, so it is no longer possible to reference a kanban view inside a popover. The popover template API has also been reworked to align with the card API (which is basically the well-known old kanban templates API). Concretely, one can now either reference a card view via the card_id attribute, or directly inline the popover-header, popover-body, and popover-footer templates, which follow the same API as cards. Part of task~5262907
This update simplifies access to AI tools within the AI App by introducing a dedicated 'Tools' menu. Previously, users had to manually filter AI tools from other server actions. This change clarifies the distinction between 'Executable' and 'Guidance' skills, improving the overall AI experience.
Original PR description
The previous naming implied a divergence from the standard, and the old type field distinction wasn't expressive enough. Skills are now differentiated as: **Executable** - a skill that relies on tools to perform its action **Guidance** - a skill that provides reusable instructions or logic without tool invocation Alongside this, a dedicated Tools menu is introduced in the AI App, replacing the need for manual custom filters to isolate AI tools from other server actions. This gives a clearer entry point for viewing and creating AI tools.
6 changes
Resolved issues and error corrections
This update resolves an error that prevented Manufacturing Administrators from canceling Manufacturing Orders (MOs) due to access restrictions. The fix adds sudo privileges to allow cancellation, streamlining the process for administrators without requiring full accounting permissions. This improves efficiency and reduces potential disruptions.
Original PR description
Currently, when a user without accounting permissions attempts to cancel a Manufacturing Order (MO), an Access Error is raised. ## Steps to produce: - Install Manufacturing and Accounting with demo…
Currently, when a user without accounting permissions attempts to cancel a Manufacturing Order (MO), an Access Error is raised. ## Steps to produce: - Install Manufacturing and Accounting with demo data. - Users > Marc Demo > Remove Accounting Permissions and give Admin permissions for Manufacturing - Login as Marc Demo - Create an MO for` [D_0045_G] Stool (Green) `and try to cancel it. ## Observed Behavior: Failed to read field mrp.workorder.employee_analytic_account_line_ids ## Root cause: After PR [1], version 19.0 introduced access checks when reading many2many fields. As a result, if a user lacks read access to a model field, an access error is raised. During cancellation, `action_cancel` [2] is called, and the error occurs when unlinking, since the user does not have read access to the account.analytic.line records the system throws an access error. **Why does this error not occur in 19.3+?** Commit [3] added `sudo` to allow cancellation of workorder [2]: https://github.com/odoo/enterprise/blob/d7ab7ee1287342638006e290ede20b955aae8370/mrp_workorder_hr_account/models/mrp_workorder.py#L24-L26 ## Solution: Manufacturing Administrators often need to cancel MOs and WOs, but granting them accounting rights solely for this purpose is not always necessary. A practical solution is to allow MO cancellation through sudo privileges, which can be achieved by backporting [3]. [1]: https://github.com/odoo/odoo/pull/217277 [3]: https://github.com/odoo/enterprise/commit/31cf5f014c48b97158042e64ad0b8e9827a6c0d5 Related Community PR: https://github.com/odoo/odoo/pull/264925 opw-6204049
This update resolves an error preventing users from accessing the 'Due' report within the account reports module. The issue stemmed from a missing configuration setting ('cellIndex') in a key component. This fix ensures the 'Due' button now functions correctly, allowing users to generate the report as intended.
Original PR description
**Steps to reproduce:** - Install the `account_reports` module and enable developer mode. - Navigate to Invoicing > Customers > Customers. - Open the `Acme Corporation` record. - Click the `Due`…
**Steps to reproduce:** - Install the `account_reports` module and enable developer mode. - Navigate to Invoicing > Customers > Customers. - Open the `Acme Corporation` record. - Click the `Due` smart button. **Error:** `OwlError: Invalid props for component 'PartnerLedgerFollowupLineCell': 'cellIndex' is missing (should be a number)` **Root Cause:** In commit [1], `cellIndex` was added as a required props to `AccountReportLineCell`. However, `PartnerLedgerFollowupLineCell` at [2] was not updated to pass this props, causing an error. **Fix:** This commit prevents the error and ensures that users can open the `Follow-up` Report. [1]: https://github.com/odoo/enterprise/commit/ae3e71164bea8883417793bad0bfa5ef72db758f [2]: https://github.com/odoo/enterprise/blob/3c4e2259ec8fb67d799806d94ffe40ab6a40f25e/account_reports/static/src/components/partner_ledger_followup/line/line.xml#L7 opw-6296374 opw-6299717 opw-6300704 opw-6301870 opw-6245448 opw-6302816 opw-6298215 opw-6303774 opw-6301046 opw-6304518 opw-6305071 opw-6306193 opw-6306219 opw-6308514 opw-6308957 opw-6312342 opw-6312746 opw-6313506 opw-6314075 opw-6315101
This update fixes a critical issue where leave schedules were incorrectly preventing resource allocation, now only applying to resources with matching calendars. Additionally, tests have been reorganized and improved to ensure accurate functionality, particularly related to shift rental planning.
Original PR description
## [FIX] sale_renting_planning: check global leaves working schedule Before this commit: any `resource.calendar.leaves` with no `resource_id` created would prevent all resources from being allocated…
## [FIX] sale_renting_planning: check global leaves working schedule
Before this commit: any `resource.calendar.leaves` with no `resource_id` created would prevent all resources from being allocated during the leave date.
After this commit: any `resource.calendar.leaves` with `no resource_id` would be applied only to resources with the same `calendar_id` as the leave.
if the leave has no `calendar_id` then the leave applies to all `resource.calendars`
if a resource has no `calendar_id` then leaves with no `calendar_id` apply to it as well
## [IMP] {website_}sale_renting_planning: move tests from industry and fix existing ones
This commit moves the tests from [odoo/industry#1980](vscode-file://vscode-app/snap/code/237/usr/share/code/resources/app/out/vs/code/electron-browser/workbench/workbench.html) to their respective standard modules.
It also fixes the logic behind some tests as they weren't testing a `planning.role` with `sync_shift_rental` enabled.
task-6179505This update corrects a rounding issue in overtime calculations, ensuring accurate payment for fractional hours. Previously, overtime durations were rounded to 3 decimal places, leading to potential inaccuracies in payroll. The fix now maintains 4 decimal place precision for overtime durations, guaranteeing correct monetary calculations.
Original PR description
Overtime duration computed as fractional hours was rounded to 3 decimal places before being stored on the overtime line. Since 1 decimal hour = 3600 seconds, this gives only 3.6 seconds of precision and the rounding can go in the wrong direction due to floating-point representation. The fix consists in replacing the duration rounding to 4 decimals when building overtime work entries so stored durations keep sub-second precision needed for money computation. task-6212231
This update resolves an issue where Intrastat CSV exports were failing due to incorrect formatting of numerical data. The fix ensures that data is properly converted to a standard numeric format before calculations, preventing errors and improving the reliability of export reports. This ensures accurate reporting for Dutch Intrastat data.
Original PR description
During Intrastat CSV export, fields `supplementary_units` formatted using [formatLang](https://github.com/odoo/enterprise/pull/81711/changes), which converts numeric values into strings (e.g.,…
During Intrastat CSV export, fields `supplementary_units` formatted using [formatLang](https://github.com/odoo/enterprise/pull/81711/changes), which converts numeric values into strings (e.g., '84,0'). These string values are later reused in computations, leading to errors like:
```.py
File "/home/odoo/src/enterprise/19.0/l10n_nl_intrastat/models/account_intrastat_report.py", line 163, in l10n_nl_export_to_csv
supp_unit = str(round(res['supplementary_units'])).zfill(10) if res['supplementary_units'] else '0000000000'
TypeError: type str doesn't define __round__ method
```
https://github.com/odoo/enterprise/blob/2bfe0f32c0cec426fc7345ef716395146cc569ca/l10n_nl_intrastat/models/account_intrastat_report.py#L164 This occurs because the export logic expects numeric values, but receives localized strings or None.
Cause:
`formatLang` is applied at the report data level, converting floats into locale-formatted strings. These values are then used directly in arithmetic operations without normalization.
Fix:
Normalize values before computation by:
- Converting input to string
- Replacing locale-specific decimal separators (',' -> '.')
- Casting to float
- Falling back to 0 when value is None or empty
opw-6182286This update adjusts how the product list appears on tablets. Previously, it was always displayed in a smaller format. Now, it will display at its full size on tablets with screens between 768px and 991px, providing a better user experience on these devices. This ensures a more consistent and user-friendly product browsing experience.
Original PR description
Previously, the product list was rendered in "small display" mode for all screen sizes below the medium breakpoint (< 992px). However, some small tablets are able to fully display the product list at the medium breakpoint (≥ 768px and ≤ 991px). After this fix, "small display" mode is only applied when the screen width is below 768px. Task.6251934 Community: https://github.com/odoo/odoo/pull/266704
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 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 fixes a bug that prevented receipts from printing correctly for Italian POS systems. The issue stemmed from a race condition when printing receipts, causing a printer deadlock. Now, receipt printing is tied to the 'Skip Preview Screen' option, ensuring reliable receipt generation.
Original PR description
Module: l10n_it_pos Steps to reproduce: - In the POS settings, enable "Automatic Receipt Printing"; - Enable "ePos Printer" to make the "Skip Preview Screen" option appear; - Disable "Skip Preview…
Module: l10n_it_pos Steps to reproduce: - In the POS settings, enable "Automatic Receipt Printing"; - Enable "ePos Printer" to make the "Skip Preview Screen" option appear; - Disable "Skip Preview Screen"; - Disable "ePos Printer"; - Set up an Italian Fiscal Printer; - Open a POS session and process a first order. Issue: After the first receipt, no other messages (price display, receipt, open register) are sent to the fiscal printer. A page reload is required. Issue: After the first receipt, no other messages (price display, receipt, open register) are sent to the fiscal printer. A page reload is required. Cause: When "Automatic Receipt Printing" is true but "Skip Preview Screen" is false, a race condition occurs. `afterOrderValidation` triggers a print job while simultaneously transitioning to the `ReceiptScreen`. When the `ReceiptScreen` mounts, it triggers a second fiscal print job before the first has resolved. This creates a deadlock in `toHtml` of `renderService`, permanently blocking the printer queue. Solution: Since the italian localisation sending the receipt to the fiscal printer is mandatory, the printing route is now tied to the "Skip Preview Screen" option. Enterprise PR: https://github.com/odoo/enterprise/pull/112654 [opw-5979212](https://www.odoo.com/odoo/project/49/tasks/5979212) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves a bug that prevented receipt printing after the initial order in the Italian POS module. The fix ensures that receipts are consistently printed via the payment screen, eliminating a printer deadlock caused by conflicting print triggers. The UI has also been updated to simplify settings for Italian fiscal printers.
Original PR description
Module: l10n_it_pos Steps to reproduce: - In the POS settings, enable "Automatic Receipt Printing"; - Enable "ePos Printer" to make the "Skip Preview Screen" option appear; - Disable "Skip Preview…
Module: l10n_it_pos Steps to reproduce: - In the POS settings, enable "Automatic Receipt Printing"; - Enable "ePos Printer" to make the "Skip Preview Screen" option appear; - Disable "Skip Preview Screen"; - Disable "ePos Printer"; - Set up an Italian Fiscal Printer; - Open a POS session and process a first order. Issue: After the first receipt, no other messages (price display, receipt, open register) are sent to the fiscal printer. A page reload is required. Cause: When "Automatic Receipt Printing" is true but "Skip Preview Screen" is false, a race condition occurs. `afterOrderValidation` triggers a print job while simultaneously transitioning to the `ReceiptScreen`. When the `ReceiptScreen` mounts, it triggers a second fiscal print job before the first has resolved. This creates a deadlock in `toHtml` of `renderService`, permanently blocking the printer queue. Solution: Since the italian localisation sending the receipt to the fiscal printer is mandatory, the printing route is now tied to the "Skip Preview Screen" option. UI settings are adjusted to hide the redundant auto-print checkbox when an IT fiscal printer is configured. Community PR: https://github.com/odoo/odoo/pull/256932 [opw-5979212](https://www.odoo.com/odoo/project/49/tasks/5979212)
This update resolves an error in point-of-sale cash handling when a default tax is applied to the 'Cash Difference Gain' account. The fix ensures accurate journal entries by pre-calculating the tax split, preventing unbalanced entries and subsequent errors during session closure. This improves the reliability of cash reconciliation in supported countries.
Original PR description
Steps to reproduce ------------------ 1. Set a default tax on the "Cash Difference Gain" account (e.g. a 25% sales tax) -- required in some countries like Denmark (cf 5972690). 2. Open a PoS session,…
Steps to reproduce ------------------ 1. Set a default tax on the "Cash Difference Gain" account (e.g. a 25% sales tax) -- required in some countries like Denmark (cf 5972690). 2. Open a PoS session, count more cash than expected at closing. 3. Try to close the session. -> Error message shows up "The journal entry reached an invalid state..." ... "The journal entry must always have exactly one journal item involving the bank/cash account" What's happening ---------------- PoS creates a bank statement line with the gain account as counterpart, resulting in 2 lines: cash +10, gain -10. Since the gain account has a default tax, `_sync_tax_lines` adds a tax line of -2.5 on top, which makes the move unbalanced by 2.5. Then `_sync_unbalanced_lines` adds a 4th line to fix it, on the line returned by `_get_automatic_balancing_account`, which is `journal.default_account_id`, i.e. the cash account itself for a cash journal. So we end up with 2 lines on that same cash account, which a bank statement line move doesn't allow -> Error. The fix ------- In `_post_statement_difference`, precompute the base and tax split ourselves and build the statement line's `line_ids` directly (e.g. for +10 and a 25% tax: cash +10, gain -8, tax -2). The move is balanced from creation, so `_sync_tax_lines` and `_sync_unbalanced_lines` don't have to touch it. Note that we force the tax computation to be in 'force_price_include' mode, as the counted cash difference is a gross amount (physical money in the drawer). This way the tax is always extracted from the cash amount, regardless of how the tax is configured (included or excluded in price). Same pattern is already used by `hr_expense` (cf `hr_expense.models.account_move_line._compute_totals`). opw-5972690
This update significantly speeds up inventory adjustments when processing large delivery orders with reserved packages. Previously, adjustments were slow and could freeze the user interface. Now, inventory adjustments are much faster and more responsive, improving warehouse efficiency.
Original PR description
Behavior before: Adjusting physical inventory quantities for reserved packages takes time when linked to large delivery orders (e.g., 400+ lines). The user interface freezes, causing a poor warehouse…
Behavior before: Adjusting physical inventory quantities for reserved packages takes time when linked to large delivery orders (e.g., 400+ lines). The user interface freezes, causing a poor warehouse user experience during stock counts. Behavior after: Inventory adjustments on reserved packages process faster. The UI remains responsive, and package records are updated instantly without performance degradation. Root Cause: When an inventory adjustment triggers '_free_reservation', it processes move lines sequentially. Inside this loop, Odoo recursively runs '_check_entire_pack()', forcing a full database evaluation of all 400+ delivery lines for every single line adjusted. This results in heavy, redundant processing. Fix: Used a context flag `bypass_entire_pack=True` to silence the '_check_entire_pack()' validation while looping through individual line adjustments. Once the loop completes, the package validation is called exactly once in batch for all affected pickings, preserving data integrity while eliminating redundant database queries. Steps to Reproduce: 1. Have a product tracked by Lot and Package. 2. Have an open delivery order in Ready state (stock reserved) containing 400 or more lines of this product, one package per line. 3. Go to Inventory → Physical Inventory. 4. Set the counted quantity of any reserved bag to 0. 5. Click Apply. 6. Observe that the system takes time to process this single change. 7. Unreserve the delivery order. 8. Perform the same steps as mentioned above. 9. Inventory adjustment is much faster. opw-6234885 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update significantly speeds up how Odoo groups email messages, particularly when dealing with large volumes of data. The change optimized a key process that was slowing down email operations, resulting in a dramatic performance improvement. The database now processes these groupings much faster, enhancing overall system responsiveness.
Original PR description
## The Problem When grouping messages, the code was accumulating recordsets using the `|=` union operator inside a loop. Since each union call internally builds an `OrderedSet` over all previously…
## The Problem When grouping messages, the code was accumulating recordsets using the `|=` union operator inside a loop. Since each union call internally builds an `OrderedSet` over all previously accumulated IDs, the performance degraded quadratically relative to the number of document records. This caused bottlenecks on databases with large message volumes. ## The Solution * Replaced the `|=` recordset accumulation with a plain Python dictionary of ordered sets to store IDs per operation, while keeping same behavior. * Deferred the `browse()` call until after the loop is complete. * Reduced the overall complexity from **$O(N^2)$** to **$O(N)$**. --- ## Benchmarks *Tested on a customer database grouping by "Created By" and "Created On":* | Record Count | Before | After | Improvement | | :--- | :--- | :--- | :--- | | **300k records** | 83.00s | **1.00s** | **-99%** | | **30k records** | 0.60s | 0.25s | (Minor) | **Note:** The performance gains become exponentially more significant as the record count grows. **OPW-6123758** Forward-Port-Of: odoo/odoo#260147
2 changes
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
This update fixes an issue where manufacturing orders weren't being displayed correctly when viewed through the statsbutton. Previously, users wouldn't see the full details of manufactured orders. Now, the statsbutton will accurately show all manufactured manufacturing orders, improving reporting and order tracking accuracy.
Original PR description
* Following https://github.com/odoo/odoo/pull/261438/ we also need to show correct MOs when view from statsbutton 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