Daily updates from Odoo
Tuesday, March 31, 2026
147 changes
17 changes
Resolved issues and error corrections
This update addresses a sporadic validation error that occasionally occurred when managing users within the settings. The issue stemmed from a conflict in how employee data was linked, preventing users from being added correctly. This fix ensures a stable and reliable user management experience.
Original PR description
## Short functional explanation of the error When in settings, we click on Manage users, we sometimes get a validation error. ## Reproduction Steps 1. Go to settings. 2. Click on Manage Users. ###…
## Short functional explanation of the error When in settings, we click on Manage users, we sometimes get a validation error. ## Reproduction Steps 1. Go to settings. 2. Click on Manage Users. ### Expected behavior The list of users is displayed. ### Unexpected behavior Sometimes (around 20% of the time), we get the error: ``` Validation Error The operation cannot be completed: A user cannot be linked to multiple employees in the same company. ``` ## Origin of the issue This validation error is triggered due to a psycopg2 constraint error. Indeed, it occurs because the code tries to create an employee for the current user, when an employee for this user already exists: https://github.com/odoo/odoo/blob/35da8c4d8e86a752cc76d275463a752039465984/addons/pos_hr/models/pos_config.py#L27-L30 In our case, the `group_users` only contains the admin user. This user has an existing corresponding employee in the field `employee_ids`, but not in `employee_id`. __ opw-6066533 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
We've been experiencing an increase in failed payments due to an issue with Flutterwave. This update corrects the way phone numbers are sent to Flutterwave, aligning with a recent change in their API requirements. This resolves the 'invalid billToPhone' error and ensures smoother payment processing.
Original PR description
With are recently seeing an increasing number of payments that fail with an `invalid billToPhone` error. It's unclear if it's a recent change of flutterwave API or of any intermediary payment processor, but the flutterwave v4.0.0-beta API now state to send the phone number "unformatted" - even if there is no such statement for the v3.0.0 API (that we are using), based on testing, sending the phone number "unformatted" do so seems do solve the issue. So this commit, sanitize the phone number to send it unformatted. opw-6074825 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#256478 Forward-Port-Of: odoo/odoo#256315
This update prevents a critical error that occurred when users attempted to create scrap orders without specifying a scrap location. The issue stemmed from accessing an empty dictionary after a scrap location was deleted, leading to a traceback. This fix ensures the scrap order creation process remains stable and reliable.
Original PR description
When user tries to create a scrap order without scrap location, A traceback is raised. Steps to reproduce the error: - Install ``stock`` module - Go to Inventory > Configuration > Settings > Enable Storage Locations > Save - Go to Configuration > Locations > Delete Virtual Locations/Scrap > Delete - Go to Operations > Scrap > New Traceback: ```py KeyError: 1 ``` https://github.com/odoo/odoo/blob/7d89c092ac25ffe149fb38fb52863fdaa3b6ed5f/addons/stock/models/stock_scrap.py#L93 When the Scrap location is deleted, ``locations_per_company`` becomes an empty dictionary. Accessing a key from this empty dictionary lead to the above traceback. sentry-7307394327 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#252192
This pull request focuses on optimizing the way Odoo calculates stock valuations, particularly within our inventory management modules. The changes improve the speed and efficiency of these calculations, leading to faster reporting and a smoother user experience. This enhancement addresses a known performance bottleneck and ensures accurate and timely stock valuation data.
Original PR description
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#252635 Forward-Port-Of: odoo/odoo#249790
This update fixes a memory issue that could occur when generating the inventory valuation report for companies with a large number of products and stock movements. By processing data in smaller batches, the system now avoids running out of memory, ensuring faster and more reliable report generation.
Original PR description
Related Ticket: https://www.odoo.com/odoo/project/49/tasks/5416006 Issue: If a database has products that use the average cost method, and those products have millions of stock moves, a memory error…
Related Ticket: https://www.odoo.com/odoo/project/49/tasks/5416006 Issue: If a database has products that use the average cost method, and those products have millions of stock moves, a memory error can occur when the inventory valuation report is opened. Explanation: When the inventory valuation report is opened, the `_run_average_batch` method is invoked on batches of up to 1000 AVCO products at a time. Previously, all matching stock moves for those products were fetched in a single query and kept in cache for the duration of the computation. For large databases, even a single invocation of `_run_average_batch` can exhaust available memory if the products involved have enough stock moves. Solution: Moves are now fetched and processed in batches of 50,000 records, with the cache for `stock.move` and `stock.move.line` invalidated between each batch. For memory: | # Input data | Before PR | After PR | |:-------------:|:----------:|:---------:| | 100 products with 61,024 moves | 280 MB | 274 MB | | 500 products with 535,250 moves | 983 MB | 301 MB | | 500 products with 912,405 moves | 1.7 GB | 337 MB | | 1000 products with 1,447,655 moves | Mem error | 393 MB | For speed (in m:ss): | # Input data | Before PR | After PR | |:-------------:|:----------:|:---------:| | 100 products with 61,024 moves | 0:15 | 0:16 | | 500 products with 535,250 moves | 1:12 | 1:17 | | 500 products with 912,405 moves | 2:02 | 2:10 | | 1000 products with 1,447,655 moves | N/A | 3:53 | opw-5416006 Co-authored by Cooper Spinelli (spco) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#250526
This update enhances the process for managing demo transactions in the l10n_jo_edi_pos module. Previously, users were blocked indefinitely with demo orders. Now, users can either delete the demo transaction or sync it to the live system, providing greater control and flexibility.
Original PR description
Before this commit:
- The fields `l10n_jo_edi_pos_{state, return_reason}` were readonly when
`l10n_jo_edi_pos_qr` was set. However, we did not take into account the fact
that `pos.order` cannot be reset once `done/paid/invoiced`; thereby blocking
the user with a demo transaction forever without any alternative.
After this commit:
- The fields `l10n_jo_edi_pos_{state, return_reason}` are readonly when
`l10n_jo_edi_pos_qr and l10n_jo_edi_state == 'sent'`. Additionally, an
onchange is introduced on `l10n_jo_edi_pos_state` to clear
`l10n_jo_edi_pos_qr`. This gives back flexibility to the user to either delete
the demo mode transaction or sync them to the production endpoint.
task-5958427
Forward-Port-Of: odoo/odoo#250808This update strengthens a key test for Odoo's editing functionality. The test now explicitly verifies the correct behavior of the right-click context menu, making it less reliant on timing. This ensures more reliable test results and improves the overall stability of the editing experience.
Original PR description
This PR is a follow up of https://github.com/odoo/odoo/pull/256063 Use `expect.waitForSteps()` in the right-click editing test to assert the message context-menu flow more explicitly instead of relying only on `animationFrame()`. The test now verifies that: - `onContextMenu()` is triggered - `showRightClickMessageActions()` is not triggered while editing This makes the test less timing-dependent. Forward-Port-Of: odoo/odoo#256670
This update fixes an issue where custom invoice headers provided by the `l10n_cl` module were not appearing in Odoo 19.2. The change restores the correct display of these custom headers, ensuring invoices generated for the Chilean market accurately reflect the required formatting. This resolves a prior display problem.
Original PR description
### Issue: In 19.2, the custom header defined by `l10n_cl` was not displayed on invoices The standard layout was used instead ### Cause: This change: https://github.com/odoo/odoo/commit/eb6e88a25050fff2bd09317739dd51ba451450df modified the `t-call` behavior to ignore `t-set` inside the call Since the `o` variable is defined within the `t-call` in the invoice report: https://github.com/odoo/odoo/blob/a08e84e84aa26e86a291ef0de5bdd4ac20f6274e/addons/account/views/report_invoice.xml#L110-L115 the custom parameter header was ignored ### Steps to reproduce: - Install `l10n_cl` and switch to the CL company - Create and confirm an invoice - Open the preview ### Before the fix: The default header is used ### After the fix: The custom header are correctly applied (as in 19.1) opw-6057122
This update resolves an issue in Odoo 19.2 where custom header and footer designs from the `l10n_ar` localization module were not displayed on invoices. The fix corrects a technical detail related to how Odoo reports handle parameters, ensuring the correct localized invoice layouts are used as in previous versions.
Original PR description
### Issue: In 19.2, the custom header and footer defined by `l10n_ar` were not displayed on invoices The standard layout was used instead ### Cause: This change: https://github.com/odoo/odoo/commit/eb6e88a25050fff2bd09317739dd51ba451450df modified the `t-call` behavior to ignore `t-set` inside the call Since the `o` variable is defined within the `t-call` in the invoice report: https://github.com/odoo/odoo/blob/a08e84e84aa26e86a291ef0de5bdd4ac20f6274e/addons/account/views/report_invoice.xml#L110-L115 the custom parameters (header and footer) were ignored ### Steps to reproduce: - Install `l10n_ar` and switch to the AR company - Create an invoice - Open the preview ### Before the fix: The default header and footer are used ### After the fix: The custom header and footer are correctly applied (as in 19.1) ### Fix: This PR also fix the delivery guide document opw-6046454
This update corrects an issue where QR codes generated for self-ordering pickup orders included incorrect URLs with table information. The fix ensures QR codes are generated correctly for pickup zones, preventing errors in downloaded PDFs and improving the customer ordering experience. This resolves a previous problem impacting order accuracy.
Original PR description
Step to reproduce: - setup Restaurant and do the following config - set "self-ordering" -> "Qr Menu + Ordering" - set "service At" -> "pickup zone" - save and print the qr-code ( option is right…
Step to reproduce: - setup Restaurant and do the following config - set "self-ordering" -> "Qr Menu + Ordering" - set "service At" -> "pickup zone" - save and print the qr-code ( option is right there below these configs) Observation: - in downloaded pdf, we see a wrong url, which includes table_id, which shouldn't be. - QRs do not have table_id Cause: - there is issue in `generate_qr_codes_page` method, which uses table_id even if ordering mode is "pickup zone" Fix: - we only use table_id when ordering_mode = 'table'. **Before:** <img width="1002" height="397" alt="image" src="https://github.com/user-attachments/assets/e6dc50e5-6384-45b8-8ee5-817526769dc2" /> **After** <img width="1021" height="405" alt="image" src="https://github.com/user-attachments/assets/0be9b902-3870-4fc7-a409-e01265b7a1b3" /> opw-5095607 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#254897 Forward-Port-Of: odoo/odoo#247184
This update resolves an issue where right-clicking while editing a message in the Odoo messaging system incorrectly opened a custom context menu instead of the standard browser menu. Now, right-clicking during message editing correctly displays the browser's default context menu, improving the user experience.
Original PR description
Before this commit, right-clicking while editing a message opened the message context menu instead of the browser's default menu. After this commit, right-clicking while editing a message opens the browser's default context menu, and the message context menu is no longer triggered. task-6065753 Forward-Port-Of: odoo/odoo#256063
This update corrects a bug where kit valuations were incorrectly calculated after vendor bills were processed. The system was failing to properly account for the individual components within a kit, leading to inaccurate cost reporting. This fix ensures accurate valuation of kits and their components during billing.
Original PR description
**Issue**: Billing a PO containing kit with several components can lead to incorrect valuation of its components **Steps to reproduce**: - Create a kit product (by creating a BOM with 2 components)…
**Issue**: Billing a PO containing kit with several components can lead to incorrect valuation of its components **Steps to reproduce**: - Create a kit product (by creating a BOM with 2 components) with AVCO valuation - Create a PO for 1 unit at unit price 10 - Confirm PO and validate the receipt - Go to the BOM of the kit product and check BOM overview -> The cost of the two components are 5, which is correct - Go to Accounting > Vendors > Bill - Create a new bill by indicating the PO in "Auto-Complete" field and validate - Go back to the BOM of the kit product and check BOM overview -> The cost of the two components are 10, which is correct This also occurs with FIFO valuation **Cause**: While computing the value of the move: https://github.com/odoo/odoo/blob/2e4a4f2d063f9b09263e6c137e1c04358020c668/addons/stock_account/models/stock_move.py#L282 https://github.com/odoo/odoo/blob/2e4a4f2d063f9b09263e6c137e1c04358020c668/addons/stock_account/models/stock_move.py#L313-L314 It checks the value of the Bill: https://github.com/odoo/odoo/blob/2e4a4f2d063f9b09263e6c137e1c04358020c668/addons/stock_account/models/stock_move.py#L357-L358 Which relies directly on the AML price of the kit: https://github.com/odoo/odoo/blob/a2b3a10255dba290ea462b9193ae11c54d8dd5e0/addons/purchase_stock/models/stock_move.py#L170 This ignores the `cost_share` of each BOM component. As a result, each component receives the full kit value instead of its proportional share This means that the value of the move is 10 instead of 10/2=5, which makes the valuation computation wrong: https://github.com/odoo/odoo/blob/2e4a4f2d063f9b09263e6c137e1c04358020c668/addons/stock_account/models/product.py#L393 **Aditionnal note** The computation of the quantity is also incorrect: https://github.com/odoo/odoo/blob/a2b3a10255dba290ea462b9193ae11c54d8dd5e0/addons/purchase_stock/models/stock_move.py#L169 since it assumes the quantity of component of the kit is the same than the quantity of the kit itself, which is not true in the general case. opw-5924940 Forward-Port-Of: odoo/odoo#252246 Forward-Port-Of: odoo/odoo#249264
This update resolves a technical issue within the IoT drivers module that prevented proper communication with serial devices. The change ensures the necessary connection object is passed to a key function, restoring functionality and stability. This fix is important for ensuring reliable data collection from connected devices.
Original PR description
The `_get_raw_response` method was refactored to be static, but a fw port broke its use by missing to provide the serial connection object as parameter.
This update corrects a visual inconsistency in the 'muted' call action within discuss calls. The icon's background color was previously pink instead of red, which has now been fixed to match the standard 'disconnect' button. Maintaining the `.active` class ensures consistent styling across discuss actions.
Original PR description
Before this commit, when in discuss call and current user has microphone muted, the icon has light red / pink background color on muted instead of red. The color should be the same as the one from…
Before this commit, when in discuss call and current user has microphone muted, the icon has light red / pink background color on muted instead of red. The color should be the same as the one from "disconnect", but the difference comes from `btn-danger` with or without `.active` that has different shade of red for background: the `.active` version is lighter like in the mute button when active. `.active` classname is preferred to keep so that the visual is consistent for most discuss actions, including the ones without success / danger which a majority of these buttons have. However, the buttons with danger / success style are intended to preserve their color unchanged as the `.active` aspect is meant to tell whether the button is active or not and the slight change of color shade is not desirable in the context of discuss action list. This commit uses the same background color for danger / success / primary inline button. Other styles line dropdown and inline buttons without background had already the same colors, so this commit fixes the only case that was missing. Task-5436990 Before / After <img width="283" height="38" alt="Screenshot 2026-03-13 at 15 21 22" src="https://github.com/user-attachments/assets/3ebba48c-5b22-43e9-a915-e18a5531e660" /> <img width="270" height="41" alt="Screenshot 2026-03-13 at 15 21 45" src="https://github.com/user-attachments/assets/586d05a4-2a6c-48e0-89c6-bffa85a86e59" /> Forward-Port-Of: odoo/odoo#255282 Forward-Port-Of: odoo/odoo#253923
This update corrects a problem where newly added billing addresses were incorrectly displayed in both the delivery and billing sections of the customer portal. The fix removes a technical setting that caused the address type to be misconfigured, ensuring addresses are now correctly associated with billing information.
Original PR description
Versions -------- - 19.0+ Steps ----- - Log in on the portal - Go to "My Account" - Go to "Addresses" - In the billing section uncheck "Same as delivery address" - In the billing section click "Add…
Versions -------- - 19.0+ Steps ----- - Log in on the portal - Go to "My Account" - Go to "Addresses" - In the billing section uncheck "Same as delivery address" - In the billing section click "Add Address" - Fill in address details - Click "Save Address" Issue ----- The newly added address is visible in both the delivery and billing sections, and in the backend the address has type "other" instead of "invoice". Cause ----- This happens because the "Add Address" url in the billing section contains the parameter `use_delivery_as_billing=True`, which supersedes the parameter `address_type=billing`, creating an address with type "other". This is because the "Add Address" url in the billing section is not dynamically updated when the "Same as delivery address" toggle is toggled like with the url in the delivery section. Solution -------- The `use_delivery_as_billing` is completely removed from the url in the billing section, because the button only appears when the toggle is unchecked (i.e. when `use_delivery_as_billing=false`). And by not sending the parameter, it defaults to false in the backend. opw-5880430 Forward-Port-Of: odoo/odoo#256326
This update resolves an issue where the system incorrectly flagged duplicate account codes, even when accounts were archived. Specifically, it ensures that archived accounts are now checked during the creation of 'unaffected earnings' accounts, preventing validation errors and ensuring smooth upgrades, particularly with the `l10n_sa` module.
Original PR description
Archived accounts are also searched when looking for duplicate codes since https://github.com/odoo/odoo/commit/cd8d9718427e48aaa79be21f9a08e89b79b573f9 We need to check archived accounts as well when creating the unaffected earnings account, to avoid triggering the validation if an archived account has the same code. This is failing on upgrades with `l10n_sa` installed where the account `sa_account_999999` has been archived. Forward-Port-Of: odoo/odoo#256112
Features or functions removed from Odoo
This update removes a confusing tooltip from the account tax scope field. The tooltip provided unnecessary detail, which was deemed not needed at this time. This simplifies the user experience and streamlines the account tax configuration.
Original PR description
Remove the misleading tooltip entirely. No need to have more details on that field right now. Task [link](https://www.odoo.com/odoo/project.task/5946889) task-5946889 Forward-Port-Of: odoo/odoo#256573
18 changes
Resolved issues and error corrections
This update automatically checks out employees from attendance records when they are archived. Previously, archived employees remained checked in, leading to data inconsistencies. This change ensures accurate attendance tracking and simplifies the process of managing archived staff.
Original PR description
Before: - When an employee was archived, their attendance was not updated. After: - When an employee is archived, if they are currently checked in, they will be automatically checked out at the current timestamp. task-5916700 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#256083 Forward-Port-Of: odoo/odoo#255524
This update optimizes how the system loads partner data for self-ordering, addressing previous performance issues. By only loading essential information, the system now operates more efficiently, particularly when dealing with partners with extensive data. This results in a smoother and faster self-ordering experience.
Original PR description
Partner data loading for self-ordering was not optimized, leading to performance issues when the partner had a lot of data. This commit optimizes the partner data loading by only loading the necessary fields for self-ordering. Forward-Port-Of: odoo/odoo#256158 Forward-Port-Of: odoo/odoo#253563
This update resolves a potential instability in the testing of one2many fields within the Odoo web application. Specifically, a test was occasionally failing due to an unintended record creation. This fix prevents a second record creation, ensuring the test is more reliable and consistent.
Original PR description
This commit fixes a non deterministic one2many field test by ensuring that we don't quick create the record twice.
Before this commit, it might sometimes happen that the validation of the input ("Enter", by default) produced a second name_create. Note that in practice this is highly unlikely to happen as if the user presses Enter, the "Quick create" item in the dropdown only appears during a single frame, thus making impossible for the user to click on it.
runbot error~242204
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#256582This update significantly speeds up the Inventory Valuation report by correctly handling date comparisons across timezones. Previously, the report would slow down when the user's local time wasn't aligned with the report's UTC date. The change ensures faster report generation, especially for large inventories.
Original PR description
When accessing the Inventory Valuation report, we check if the selected date correspond to the current day:…
When accessing the Inventory Valuation report, we check if the selected date correspond to the current day: https://github.com/odoo/odoo/blob/3610d16ae47e53860e6e047b98de6a60733a5408/addons/stock_account/report/stock_valuation_report.py#L33-L34 If the date is today, the method _run_average_batch() simply computes the value as qty_available * standard_price. But if it is not, it will replay the whole AVCO history which can be heavy. https://github.com/odoo/odoo/blob/3610d16ae47e53860e6e047b98de6a60733a5408/addons/stock_account/models/product.py#L394-L397 The "date" variable used in the comparison is the local date obtained from the browser while fields.Date.today() returns the UTC date. In certain case, when the local timezone is not on the same day as UTC anymore, this causes the report to be very slow to load because it replays the full history when it should not. We propose to use the context_today() method instead to get the date from the user's timezone. Benchmark: | No AVCO Products | Before PR | After PR | |------------------|-----------|----------| | 12000 | > 40 s | 3 s | opw-6050007 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#255841
This update enhances the process for managing demo transactions in the Point of Sale system. Previously, users were permanently blocked with demo orders. Now, users can easily delete the demo transaction or sync it to the live production environment, providing greater control and flexibility.
Original PR description
Before this commit:
- The fields `l10n_jo_edi_pos_{state, return_reason}` were readonly when
`l10n_jo_edi_pos_qr` was set. However, we did not take into account the fact
that `pos.order` cannot be reset once `done/paid/invoiced`; thereby blocking
the user with a demo transaction forever without any alternative.
After this commit:
- The fields `l10n_jo_edi_pos_{state, return_reason}` are readonly when
`l10n_jo_edi_pos_qr and l10n_jo_edi_state == 'sent'`. Additionally, an
onchange is introduced on `l10n_jo_edi_pos_state` to clear
`l10n_jo_edi_pos_qr`. This gives back flexibility to the user to either delete
the demo mode transaction or sync them to the production endpoint.
task-5958427
Forward-Port-Of: odoo/odoo#250808This update fixes a bug in the production process that was causing consumption warnings to appear unexpectedly. The issue stemmed from an incorrect order of operations when setting production quantities, leading to inaccurate tracking of materials. The fix ensures that production quantities are correctly validated, eliminating these warnings.
Original PR description
Usecase to reproduce: - Create a BoM with a finished product and a component - Create a MO for 10 units - Produce all Expected behavior: 10 units produced Current behavior: Consumption warning It happens because the code use this order: - Set the moves raw to picked base on their quantity producing - Set the quantity producing for production without quantity. So it just don't work and the consumption warning is trigger. The fix just invert the order task: 5068382 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#245176
This update corrects an issue where QR codes generated for self-ordering pickup orders included incorrect URLs with table information. The fix ensures QR codes are generated correctly for 'pickup zone' ordering modes, preventing errors in downloaded PDFs and improving the customer experience. This resolves a previous problem with incorrect URL formatting.
Original PR description
Step to reproduce: - setup Restaurant and do the following config - set "self-ordering" -> "Qr Menu + Ordering" - set "service At" -> "pickup zone" - save and print the qr-code ( option is right…
Step to reproduce: - setup Restaurant and do the following config - set "self-ordering" -> "Qr Menu + Ordering" - set "service At" -> "pickup zone" - save and print the qr-code ( option is right there below these configs) Observation: - in downloaded pdf, we see a wrong url, which includes table_id, which shouldn't be. - QRs do not have table_id Cause: - there is issue in `generate_qr_codes_page` method, which uses table_id even if ordering mode is "pickup zone" Fix: - we only use table_id when ordering_mode = 'table'. **Before:** <img width="1002" height="397" alt="image" src="https://github.com/user-attachments/assets/e6dc50e5-6384-45b8-8ee5-817526769dc2" /> **After** <img width="1021" height="405" alt="image" src="https://github.com/user-attachments/assets/0be9b902-3870-4fc7-a409-e01265b7a1b3" /> opw-5095607 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#254897 Forward-Port-Of: odoo/odoo#247184
This update fixes a problem where PoS orders with additional products would prevent successful settlement from the PoS. The system now correctly calculates the unpaid amount based on the total PoS order amount, ensuring orders with multiple items can be properly settled. This resolves a previous issue preventing users from completing transactions.
Original PR description
The following commit introduced a change in compute_unpaid_amount. https://github.com/odoo/odoo/commit/b8b50a797cdc0053643f959eb2d04800163fe005 The unpaid_amount is now computed from the PoS order total instead of the settle payment order line. This causes an issue when the PoS order contains additional product lines besides the settle payment line. In such cases, the total amount may exceed the sale order amount, preventing the sale order from being settled again from the PoS. How to reproduce: - Create a sale order. - Apply a down payment in the PoS. - Add other products before validating the payment. - Ensure the total exceeds the sale order amount. - Pay the order. - Try to settle the same sale order from PoS, cannot find it. opw-5821232 Forward-Port-Of: odoo/odoo#256590 Forward-Port-Of: odoo/odoo#251387
This update corrects a problem where Odoo couldn't properly validate production orders when lots were consumed during operations, specifically in the Opera browser. The fix ensures that production orders are accurately validated, preventing potential errors in inventory tracking and order fulfillment. This resolves a previously reported issue impacting order processing accuracy.
Original PR description
…tion POC 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#253924
This update strengthens the testing process for right-click editing in the Odoo email module. The test now verifies key actions, making it less reliant on timing and more reliable. This ensures the editing functionality works consistently and reduces the risk of unexpected issues.
Original PR description
This PR is a follow up of https://github.com/odoo/odoo/pull/256063 Use `expect.waitForSteps()` in the right-click editing test to assert the message context-menu flow more explicitly instead of relying only on `animationFrame()`. The test now verifies that: - `onContextMenu()` is triggered - `showRightClickMessageActions()` is not triggered while editing This makes the test less timing-dependent.
This update ensures that sales order sequences correctly use the intended month when generating numbers, resolving an issue where the sequence number was based on the wrong date. The fix addresses a discrepancy between the sequence's prefix/suffix and the actual order date, preventing incorrect sequence numbering. This improves data accuracy and consistency in sales order processing.
Original PR description
## Issue When using date_range in a `ir.sequence`, the placeholders `%(...)s` would be based on a different date than the sequence number. ## Steps to reproduce This is one example among other use…
## Issue
When using date_range in a `ir.sequence`, the placeholders `%(...)s` would be based on a different date than the sequence number.
## Steps to reproduce
This is one example among other use cases causing this issue.
1. Install *Sales* (`sale_management`)
2. In Settings > Technical > Sequences, select the `sale.order` sequence
- Set the Prefix to something containing the current month (e.g. `S%(y)s/%(month)s/`)
- Enable *Use subsequences per date_range* (`ir.sequence.use_date_range`)
- Add a row for the current month, with *Next Number* set to 1
- Add a row for the next month, with *Next Number* set to 5
3. Create a Sales Order:
- Any Customer
- Any Product
- Set the *Quotation Date* to next month
- Confirm
4. **The resulting Sales Order uses the sequence from next month (= its name ends with 5), but replace the `%(month)s` placeholder by the current month.**
<img width="541" height="130" alt="image" src="https://github.com/user-attachments/assets/6ace81f9-1ce2-4401-a9ba-383673a20981" />
The original issue reported by ticket 5950028 showed a similar issue with dropshipped Purchase Orders, which would use the date of delivery for the sequence number, and the current month for the placeholder in the prefix/suffix.
## Cause
When interpolating the prefix/suffix of a sequence, the date used by default is `datetime.now(self.env.tz)`. If provided, the context keys `ir_sequence_date` and `ir_sequence_date_range` are used instead.
https://github.com/odoo/odoo/blob/877289cf4d9725e12b355f482308150fe170e816/odoo/addons/base/models/ir_sequence.py#L211-L216
In the `IrSequence._next` method, the correct `ir.sequence.date_range` is chosen, based on the sequence date provided (which is the *Quotation Date* in our steps to reproduce) and the `ir_sequence_date_range` is passed as a context key to be used in the `_interpolation_dict` function later.
https://github.com/odoo/odoo/blob/98e6e929bf8e0c34ec77fb9d07ef253e0abf681c/odoo/addons/base/models/ir_sequence.py#L261-L270
**The `ir_sequence_date` is not passed as a context key, which will make `_interpolation_dict` use `datetime.now(...)` to interpolate the placeholders in the prefix/suffix.**
opw-5950028
Forward-Port-Of: odoo/odoo#256320This update corrects a problem where newly added billing addresses were incorrectly appearing in both the delivery and billing sections of the customer portal. The fix removes a technical element that caused the address type to be misconfigured, ensuring accurate address display and management for users.
Original PR description
Versions -------- - 19.0+ Steps ----- - Log in on the portal - Go to "My Account" - Go to "Addresses" - In the billing section uncheck "Same as delivery address" - In the billing section click "Add…
Versions -------- - 19.0+ Steps ----- - Log in on the portal - Go to "My Account" - Go to "Addresses" - In the billing section uncheck "Same as delivery address" - In the billing section click "Add Address" - Fill in address details - Click "Save Address" Issue ----- The newly added address is visible in both the delivery and billing sections, and in the backend the address has type "other" instead of "invoice". Cause ----- This happens because the "Add Address" url in the billing section contains the parameter `use_delivery_as_billing=True`, which supersedes the parameter `address_type=billing`, creating an address with type "other". This is because the "Add Address" url in the billing section is not dynamically updated when the "Same as delivery address" toggle is toggled like with the url in the delivery section. Solution -------- The `use_delivery_as_billing` is completely removed from the url in the billing section, because the button only appears when the toggle is unchecked (i.e. when `use_delivery_as_billing=false`). And by not sending the parameter, it defaults to false in the backend. opw-5880430 Forward-Port-Of: odoo/odoo#256326
This update resolves an issue where Odoo displayed a misleading warning message when users didn't set a password during file uploads. Now, the system correctly checks for a password during saving, eliminating the unnecessary warning and improving the user experience. This ensures consistent behavior and avoids potential confusion for users.
Original PR description
Before the change, when the user uploads a file, Odoo automatically shown a warning message saying that the content of the file or the password are incorrect. Now the system does not show the warning when a password is not set and checks if the password is set when saving task-6036219 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#256759 Forward-Port-Of: odoo/odoo#253834
This update resolves an issue where a key method was missing in several Odoo stock modules (purchase, sale, and point-of-sale). The fix ensures proper inheritance from parent modules, which is crucial for accurate stock management and reporting. This change improves the stability and reliability of these core Odoo functions.
Original PR description
**Description of the issue/feature this PR addresses:** A new method name was introduced but not fixed in the inherited modules which leads to a missing method in their related super call. **Current behavior before PR:** Missing super method in related super calls in these modules **Desired behavior after PR is merged:** Proper inheritance based on a method removed by accident Info: @wt-io-it --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#252757
This update fixes a technical issue where syncing cancelled events from Microsoft Calendar would cause an error. Now, when a cancelled event is initially synced, it's correctly handled, preventing errors and ensuring accurate event synchronization within Odoo. This improves the reliability of our calendar integration.
Original PR description
Before this commit, when syncing events from Microsoft, if there was a cancelled event that was not yet synchronized with Odoo, calling browse on event.odoo_id would raise an error as it would be None. opw-5917677 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update fixes a display issue where tax names were shown in English for Spanish users. Now, all tax names are correctly displayed in Spanish, improving the user experience and ensuring accurate reporting for our Spanish-speaking customers. This change was made to comply with local regulations and provide a seamless experience.
Original PR description
It was a previous dev in which the fw-port failed. Here is the old [PR](https://github.com/odoo/odoo/pull/238857) The tax names were displayed in English, and it's confusing for the Spanish users. Now, the taxes are displayed in spanish task-6041023 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#256182 Forward-Port-Of: odoo/odoo#255074
Features or functions removed from Odoo
This update removes a misleading tooltip from the account tax scope field. The tooltip provided unnecessary detail that wasn't helpful to users. This simplifies the interface and improves the overall user experience.
Original PR description
Remove the misleading tooltip entirely. No need to have more details on that field right now. Task [link](https://www.odoo.com/odoo/project.task/5946889) task-5946889 Forward-Port-Of: odoo/odoo#256573
Documentation and clarification updates
This update corrects a minor detail in the Optesis documentation by updating the contributor list. Specifically, the name of Ibrahima NIASSE EXT has been added to reflect the most current information. This ensures accurate representation of those involved in the project.
Original PR description
Replaced Mame Abdoul Aziz SY with Ibrahima NIASSE EXT in the contributors list. 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#256563
10 changes
Enhancements to existing features
This update allows salespersons to personalize the messages they send through the Odoo portal. Previously, new leads were automatically excluded from receiving these messages due to a system restriction. This change improves communication and engagement between sales teams and potential customers.
Original PR description
Because PRG whitelists email addresses able to send emails to their salespersons and new leads are typically not whitelisted.
Resolved issues and error corrections
This update resolves a technical issue that could cause tests to fail when dealing with email messages that are empty. The change adds a safety check to ensure the system doesn't attempt to access data from a null mail message, preventing errors and improving test stability. This ensures consistent and reliable email functionality.
Original PR description
This changes https://github.com/odoo/odoo/pull/230766/changes cause the issue. I fix `AttributeError` when `mail_message` is None in `assertNoMail` method. The method was accessing `mail_message.message_id `without checking if `mail_message` is `None` first, causing a potential crash in test cases. Added a conditional check to safely handle None values before accessing the message_id attribute. @qrtl
This update resolves a memory issue that caused server crashes when calculating cumulated balances for large accounting systems. By optimizing the query to process only relevant move lines, the fix significantly reduces memory usage and processing time, leading to improved system stability and performance. This change enhances the overall efficiency of the accounting module.
Original PR description
The _compute_cumulated_balance() method performs a query over every existing move lines to get a dict associating the record id with the cumulated sum at this point. When there is a lot of move…
The _compute_cumulated_balance() method performs a query over every existing move lines to get a dict associating the record id with the cumulated sum at this point. When there is a lot of move lines, the result returned by fetchall() hits the memory limit and the server crashes. We propose to encapsulate the original query to only return the result for the account move lines present in self. Benchmarks --------------- The following benchmarks were generated with a customization of the account.move.line list view to display the cumulated_balance field. Memory usage during the self.env.cr.execute and the dictionary population: | Operation | Before the fix | After the fix | |---------------|----------------|---------------| | populate dict | 1.5 GB | 17.1 MB | | execute query | 430 MB | 8.3 MB | 100 000 lines were displayed at the same time to get a significant size. So the number of records in self is more than 7 000 000 without the fix and 100 000 with the fix. Time spent in the _compute_cumulated_balance method: | No of AML | Before the fix | After the fix | |-----------|----------------|---------------| | 7 000 000 | 10.4 s | 6.8 s | opw-6053720 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#255780
This update resolves a technical issue preventing users from validating pickings or viewing on-hand quantities when using valuation and managing large, complex inventory databases. The problem stemmed from a memory exhaustion error during calculations, impacting performance and functionality. This change reverts a previous attempt to address the issue.
Original PR description
This reverts [1] With enabled valuation and in case of a DB with many locations, it is currently impossible to validate a picking or open the on hand quantity smart button: it will lead to a…
This reverts [1]
With enabled valuation and in case of a DB with many locations, it is currently
impossible to validate a picking or open the on hand quantity smart button:
it will lead to a traceback, for instance:
```
Traceback (most recent call last):
[...]
File "/home/odoo/src/odoo/addons/stock/models/stock_picking.py", line 1432, in button_validate
pickings_to_backorder.with_context(cancel_backorder=False)._action_done()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[...]
File "/home/odoo/src/odoo/addons/stock_account/models/product.py", line 205, in _prepare_valuation_layer_field_values
"total_value": avg_cost * self.sudo(False)._with_valuation_context().qty_available if avg_cost else 0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[...]
File "/home/odoo/src/odoo/addons/stock/models/product.py", line 172, in _compute_quantities_dict
moves_in_res = {product.id: product_qty for product, product_qty in Move._read_group(domain_move_in_todo, ['product_id'], ['product_qty:sum'])}
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[...]
File "/home/odoo/src/odoo/odoo/sql_db.py", line 371, in execute
res = self._obj.execute(query, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
psycopg2.errors.SyntaxError: memory exhausted at or near "("
LINE 1: ...((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((...
```
[1] https://github.com/odoo/odoo/commit/c71c21647d468bd1f2e3261b6b612a060c4b6461
OPW-6083436This update corrects a bug where employees with upcoming contracts were incorrectly generating negative overtime calculations in the Absence Management system. The fix ensures that absences are only detected for employees with active contracts, preventing inaccurate overtime reporting. This improves the accuracy of attendance tracking.
Original PR description
### Steps to reproduce: - Create an employee with contract starts in the future - Activate the Absence Management from attendance settings - Run the cron of Absence Detection - Notice an absence attendance got created for the emp with the future contract ### Cause: We don't check for contracts start dates when fetching absent employees and we get expected attendance for them from their working schedule so we create -ve overtime for them. ### Fix: We filter the absent employees on their running contracts. It has been fixed in since 18.4 in this commit https://github.com/odoo/odoo/commit/5db242416522524849a20eb83df3937c193c98d3 opw-5942239
This update fixes an issue where credit note refunds weren't correctly matching invoice lines, leading to potential errors. The new algorithm now prioritizes accurate matching based on product, price, and quantity, preventing redundant matches and ensuring refunds process correctly. This impacts the handling of multiple identical invoice lines when creating refunds.
Original PR description
In some cases, the users may have invoices with the same product, price unit, and discount on multiple lines. When they create refunds from such invoices, the lines ids matching algorithm would fail…
In some cases, the users may have invoices with the same product, price unit, and discount on multiple lines. When they create refunds from such invoices, the lines ids matching algorithm would fail because it would match the first matching line over and over again. Also, lines should not match based on line label, as it can be modified in the refund. This commit solves these 2 issues by 1) Preventing matching an invoice line more than once with refund lines 2) Preventing matching based on line label The new algorithm finds the best match for a refund line from the invoice lines with the following criteria: 1) same product 2) same unit price 3) same discount 4) invoiced quantity should be at least equal to the refunded quantity 5) invoice line should not be matched before 6) from the lines that match previous criteria, we pick the one with the minium quantity This commit introduces this algorithm for both account.move and pos.order task-6004207 Forward-Port-Of: odoo/odoo#252200
This update fixes a flaw in the website user leaderboard that incorrectly ranked users based on their recent activity. The change ensures users are ordered accurately by their current karma points within specified time periods (week/month), improving the user experience and data integrity. This was a critical fix impacting how users are displayed on the profile page.
Original PR description
[FIX] website_profile, gamification: fix weekly/monthly leaderboards Prior to this commit, the leaderboard pagination logic was flawed when filtering by specific time periods (e.g., "This Week" or…
[FIX] website_profile, gamification: fix weekly/monthly leaderboards Prior to this commit, the leaderboard pagination logic was flawed when filtering by specific time periods (e.g., "This Week" or "This Month"). The system would first retrieve users sorted by their *all-time* global karma, apply pagination (taking the top X users), and only then calculate the karma gain for the specific period for those few users. This caused users with high recent activity but low all-time karma to only be displayed much later in the page order than they should. This commit fixes the issue by introducing a pre-search step that calculates the karma gain for the requested period at the database level. Pagination is now applied to this specific result set, ensuring users are correctly ranked by their actual performance during that week or month. Note: A new method `_get_users_by_tracking_karma_gain` was added to `res.users` to handle this logic. This approach was chosen to strictly preserve the signature of existing methods for the stable version. A distinct refactor to unify these calculation methods is planned for the master branch. Steps to reproduce: - Install the eLearning module. - Create a few users with different karma_points (more than 25 to have 2 pages). - Go to /profile/users. - Group by week. - Paginate, and you will notice that the order is wrong; the first user on the second page might have more points than users on the first page. Also, when the logged-in user is not on that page, they do not appear at the bottom. task-5344657 opw-3979785 Forward-Port-Of: odoo/odoo#176626
This update corrects a visual inconsistency in the optional product table within the sale management module. The fix ensures the table receives the correct report styling, previously missing due to a difference in the underlying code structure. This improves the user experience and presentation of reports.
Original PR description
Issue: In sale_management the optional product table doesn't get the report table styling. This is due to a different DOM and missing classes. This fix applies the styling to match the optional product table structure. While the table is in `sale_management` the change is applied in `web` to avoid having to update the module for customers. Note: the color applied in `report_templates.xml` requires that the user change is layout in the document layout configurator then save again for it to apply. task-6009941 opw-5960426 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Documentation and clarification updates
This pull request updates the contributor list in the Optesis documentation to reflect the most current information. Specifically, the name of Ibrahima NIASSE EXT has been added, replacing Mame Abdoul Aziz SY. This ensures accurate and up-to-date records of project contributors.
Original PR description
Replaced Mame Abdoul Aziz SY with Ibrahima NIASSE EXT in the contributors list. 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 incorporates the individual contributor license agreement (CLA) for Eric Rieve, a developer contributing to Odoo. This ensures compliance with Odoo's open-source licensing requirements and allows RieveFireProt to contribute code under the appropriate terms. It's a standard legal step for external contributors.
Original PR description
Adds the individual contributor license agreement signature file for GitHub user `RieveFireProt` as described in Odoo's CLA contribution process. Contributor details: - Name: Eric Rieve - Email: eric@rievefire.com - GitHub: https://github.com/RieveFireProt
2 changes
Resolved issues and error corrections
This update fixes a technical issue where syncing cancelled events from Microsoft Calendar would cause an error in Odoo. Now, when a cancelled event is synced, Odoo correctly handles the situation, preventing errors and ensuring data consistency. This improves the reliability of event synchronization.
Original PR description
Before this commit, when syncing events from Microsoft, if there was a cancelled event that was not yet synchronized with Odoo, calling browse on event.odoo_id would raise an error as it would be None. opw-5917677 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update corrects a flaw in the website user leaderboard, ensuring users are ranked accurately based on their recent activity (karma gain) within specified time periods like 'This Week' or 'This Month'. Previously, the system incorrectly sorted users, leading to inaccurate rankings. This fix improves the user experience by presenting a more reliable and relevant leaderboard.
Original PR description
[FIX] website_profile, gamification: fix weekly/monthly leaderboards Prior to this commit, the leaderboard pagination logic was flawed when filtering by specific time periods (e.g., "This Week" or…
[FIX] website_profile, gamification: fix weekly/monthly leaderboards Prior to this commit, the leaderboard pagination logic was flawed when filtering by specific time periods (e.g., "This Week" or "This Month"). The system would first retrieve users sorted by their *all-time* global karma, apply pagination (taking the top X users), and only then calculate the karma gain for the specific period for those few users. This caused users with high recent activity but low all-time karma to only be displayed much later in the page order than they should. This commit fixes the issue by introducing a pre-search step that calculates the karma gain for the requested period at the database level. Pagination is now applied to this specific result set, ensuring users are correctly ranked by their actual performance during that week or month. Note: A new method `_get_users_by_tracking_karma_gain` was added to `res.users` to handle this logic. This approach was chosen to strictly preserve the signature of existing methods for the stable version. A distinct refactor to unify these calculation methods is planned for the master branch. Steps to reproduce: - Install the eLearning module. - Create a few users with different karma_points (more than 25 to have 2 pages). - Go to /profile/users. - Group by week. - Paginate, and you will notice that the order is wrong; the first user on the second page might have more points than users on the first page. Also, when the logged-in user is not on that page, they do not appear at the bottom. task-5344657 opw-3979785