Daily updates from Odoo
Friday, November 14, 2025
46 changes · saas-18.4
Enhancements to existing features
Product names and descriptions sent in India e-invoicing and e-waybill documents are now automatically shortened when they exceed the required character limits. This helps prevent submission errors and ensures generated JSON stays compliant with local rules.
Original PR description
Product descriptions in invoice lines must comply with character limits: - E-invoicing: maximum 300 characters - E-waybill: maximum 100 characters for both product names and descriptions Descriptions exceeding these limits are automatically truncated in the generated JSON. task-5061450 Forward-Port-Of: odoo/odoo#228549
The point-of-sale now shows clearer messages when the fiscal device is disconnected or when a social security number is required but missing. It also tells the user what to do next, reducing confusion and helping staff resolve payment issues faster.
Original PR description
We now display an error when the FDM is disconnected, or when the user needs to fill in the social security number. We also advise what to do in such cases. Forward-Port-Of: odoo/enterprise#99285
This change makes stock availability calculations much faster for pickings with many linked incoming and outgoing moves. As a result, users should see product availability information update more quickly, especially on large transfers.
Original PR description
Before this commit, computing `product_availability` and `product_availability_state` required calling the `get_report_lines` method from the `stock.forecasted_product_product` model. In pickings…
Before this commit, computing `product_availability` and `product_availability_state` required calling the `get_report_lines` method from the `stock.forecasted_product_product` model. In pickings containing moves linked to many incoming and outgoing moves, the `reconcile_out_with_ins` function caused performance issues. The reconciliation logic worked as follows: 1. For each `out_move`, attempt to match it with an `in_move` if the `in_move` references the `out_move` in its `move_dests`. 2. If the demand of the `out_move` is not fully satisfied, add it to `unreconciled_outs`. 3. Loop over `unreconciled_outs` (after attempting to reconcile them using the initial prodcedure) to reconcile against the remaining `in_moves`. The performance bottleneck was that even when an `in_move` directly referenced an `out_move`, the code would unnecessarily loop over **all** `in_moves` to filter out the `in_moves` that has the `out_move` in its `move_dest`. --- To improve performance, an **inverse mapping** from `out_move` IDs to their corresponding `in_moves` is introduced. - Reconciliation now starts by iterating only over the relevant `in_moves`. - If the demand is still unmet, the algorithm attempts reconciliation against the remaining `in_moves`. - This reduces the time complexity to **O(N + M)**, since `in_moves` with zero quantities are removed and never revisited. **Implementation details:** - An `OrderedSet` is used for the inverse mapping to preserve the original query order. - Benefits of `OrderedSet`: - **O(1)** removal (assuming no collisions) - Maintains insertion order, ensuring the same order as the query result. --- | Metric | Before PR | After PR | |---------------|-----------|----------| | Execution Time| ~90 sec | ~10 sec | The benchmark above is done on a `stock.picking` record that queried in the `_get_report_lines` method **5331** `out_moves` and **8922** `in_moves`. opw-4951469 Forward-Port-Of: odoo/odoo#233967 Forward-Port-Of: odoo/odoo#224002
This change makes several Blackbox JavaScript utilities, services, and constants available for import by other files in the future. It does not change the current user experience, but it improves the codebase structure and makes future enhancements easier to build.
Original PR description
This commit puts export in front of some of the blackbox js utils/services/constants to make them importable from other files in the future. Forward-Port-Of: odoo/enterprise#99391
Resolved issues and error corrections
This update corrects how shipping data is rounded before being sent to DHL. It prevents validation failures caused by tiny floating-point precision differences, so shipments with prices or weights like 11.43 or 0.3 are accepted reliably.
Original PR description
Multiple rounding issues could cause DHL validation errors. Example with product price: - Create a storable product - Create a quotation with quantity 7, price 11.43 - Validate the SO - Go to delivery, use DHL carrier, validate - DHL traceback: 11.429999999999998 not multiple of 0.001 Example with product weight: - Create 3 products, each 0.1 kg - Create a SO with these products - Validate the SO - Go to delivery, use DHL carrier, validate - DHL traceback: 0.30000000000000004 not multiple of 0.001 See official DHL API documentation: https://developer.dhl.com/api-reference/dhl-express-mydhl-api and check the POST /shipments data schema opw-5000193 Forward-Port-Of: odoo/enterprise#98913 Forward-Port-Of: odoo/enterprise#96012
This update ensures the first line of a bank statement is always identified correctly, even when certain values are set during creation or later updated. This prevents incorrect bank journal balances from appearing, improving the reliability of account balances.
Original PR description
Ensure proper computation of first_line_index when line.internal_index or line.state changes. Previously, the computation of first_line_index was grouped with the date computation. However, due to a specific ORM behavior, the compute method is not triggered when one of the computed fields (in this case, the date) is provided in the create values. As a result, first_line_index could remain falsy, leading to an incorrect balance in the bank journal. no task id --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#235561
This change fixes a crash that could happen when checking which message was last seen by everyone in a discussion. It now uses a more reliable way to identify the current user’s member record, which prevents the error and makes the calculation more robust.
Original PR description
The `lastMessageSeenByAllId` compute function sometimes crashes when the persona linked to a member is unknown. This occurs because the compute function compares the member's persona to determine if it belongs to the current user. However, members are not always sent along with their persona. The compute function should instead compare the member directly to the current user's member. This fixes the issue and makes more sense. 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#235338 Forward-Port-Of: odoo/odoo#235253
This change ensures the system always sends the expected reconnecting and reconnect events when a websocket connection is lost unexpectedly, even if the closing handshake was incomplete. It improves the consistency of connection status updates and helps avoid intermittent failures in automated tests and live sessions.
Original PR description
The websocket worker broadcasts events that track connection state changes (connect, disconnect, reconnecting, reconnect). Sometimes a WebSocket can close without the client noticing, leaving it…
The websocket worker broadcasts events that track connection state changes (connect, disconnect, reconnecting, reconnect). Sometimes a WebSocket can close without the client noticing, leaving it stuck in the `CLOSING` state. If the client starts the worker during this period, the worker detects the issue and triggers a disconnect event, but neither reconnecting nor reconnect is emitted. Conceptually, reconnecting/reconnect should fire on any unexpected loss of connection. This patch ensures those events are properly triggered in this case. This also fixes a runbot error ([1]) where a test simulates the loss of the connection. The test sometimes runs before another service's call to `bus_service.start`, reproducing this exact scenario. [1]: https://runbot.odoo.com/odoo/runbot.build.error/223185 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#235319
This update removes the requirement to enter share capital for Italian companies that are not limited liability companies. It prevents unnecessary validation issues when setting up or updating company details, making the registration process smoother.
Original PR description
Share capital should not be mandatory for non limited liability company. [Ticket link](https://www.odoo.com/odoo/project.task/5131029) opw-5131029 Forward-Port-Of: odoo/odoo#235498
This fix allows users to generate a debit note from an existing credit note in the Argentine localization. Before this change, the process failed with an error, which made it harder to correct invoicing mistakes after a credit note had been issued.
Original PR description
Co-authored-by: Katherine Zaoral <zaoral@users.noreply.github.com> THE FIX COMES FROM: 37faec2f38c9658a0f491c72f284908dc929fa17 ORIGINAL PR: https://github.com/odoo/odoo/pull/205430 Description of…
Co-authored-by: Katherine Zaoral <zaoral@users.noreply.github.com> THE FIX COMES FROM: 37faec2f38c9658a0f491c72f284908dc929fa17 ORIGINAL PR: https://github.com/odoo/odoo/pull/205430 Description of the issue/feature this PR addresses: - In debit notes wizards: If we make a wrong credit note and we want to correct it we must generate a debit note related to it. Currently odoo only allows to generate debit notes from an invoice. Steps to reproduce the error. - Install the Argentine localization - Create an invoice and post it - From the invoice using the wizard create a credit note and post it. From the credit note open the wizard to create a debit note. On submit the wizard we obtain an exception "You can not use a credit_note document type with a invoice" This happens because the debit note wizard use copy method without change the l10n_latam_document_type_id value. Current behavior before PR: When creating a debit note from a credit note get an error. Desired behavior after PR is merged: We can create a debit memo from a credit note. opw-4304256 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#233875 Forward-Port-Of: odoo/odoo#225501
This fix ensures submenu items in the hamburger menu automatically use the same font size as the header. As a result, when the header style is changed, the menu labels stay visually consistent and update correctly.
Original PR description
Steps to reproduce: =================== - Create a menu and a submenu - Change the header template to the hamburger menu - Update the navbar format ->The format of the submenu's parent is not updated. Cause: ====== The menu in the hamburger layout uses the `.accordion-button` class, which applies a fixed base font size defined here: https://github.com/odoo/odoo/blob/ebb250d3b56970c09ffb5ebefef38f97c622c33d/addons/web/static/lib/bootstrap/scss/_accordion.scss#L37 This prevents the submenu text from inheriting the updated header font-size. Solution: ========= Allow the `.accordion-button` font size to inherit from its parent. This ensures that submenu text correctly follows the header's font-size setting. opw-5223664 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#234276
This change fixes an issue where creating multiple journals of the same type could trigger a duplicate alias error. Odoo now checks all relevant aliases, even when no alias domain is configured, so journal creation works consistently.
Original PR description
**Issue** When creating two new journals and selecting the *type* before the *name*, Odoo generates an alias using the type (e.g. `sale--...`). When saving a second journal with the same type, the…
**Issue** When creating two new journals and selecting the *type* before the *name*, Odoo generates an alias using the type (e.g. `sale--...`). When saving a second journal with the same type, the alias conflicts and raises a "This alias already exists" error. **Steps to Reproduce** 1. Navigate to Accounting > Configuration > Journals. 2. Create a new journal. 3. Set the Type to Sales before entering the Name. 4. Save the journal. 5. Repeat the process to create another journal of the same type. 6. Observe that an error occurs: alias name is already used. **Root Cause** The uniqueness check in _ensure_unique_alias only compares alias_name against existing aliases with the same alias_domain. However, many aliases are created with alias_domain = False. Since those were excluded from the domain, the check failed to detect duplicates correctly. **Fix** Update the domain in _ensure_unique_alias to also include aliases where alias_domain is unset. This ensures that aliases are always unique regardless of whether a domain is configured. Opw-5028713 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#233101 Forward-Port-Of: odoo/odoo#225537
The self-order IoT component now correctly reads newer image version numbers that use a full date format. This prevents version checks from failing and helps keep the device software update flow working smoothly.
Original PR description
New image versions are formatted as YYYY.MM.DD instead of YY.MM. The previous can be casted to float, but not the new one. We then only take the year and month to before casting. Forward-Port-Of: odoo/enterprise#99416
This update corrects how scheduling intervals are combined so they are consistently normalized before use. It prevents mismatches and errors when different interval types are merged, improving the reliability of planning-related operations.
Original PR description
Note: >The `WorkIntervals` class has been removed, and the `keep_distinct` flag has been introduced in `18.4` to simplify its logic. For the following explanation, we will refer to an `Intervals`…
Note: >The `WorkIntervals` class has been removed, and the `keep_distinct` flag has been introduced in `18.4` to simplify its logic. For the following explanation, we will refer to an `Intervals` class with `keep_distinct = False` as 'Intervals', and to one with `keep_distinct = True` as 'WorkIntervals'. ## The issue Prior to this commit, the `other` parameter in the `_merge` method could belong to a different class, not necessarily an instance of `Intervals`. https://github.com/odoo/odoo/blob/8c737601327acec1d83e1e5e3c6e66c9fd226339/addons/resource/models/utils.py#L158-L165 The comment indicates that normalization should be enforced; however, there is no corresponding reference to it within the `_boundaries` method. https://github.com/odoo/odoo/blob/8c737601327acec1d83e1e5e3c6e66c9fd226339/addons/resource/models/utils.py#L48-L53 That normalization just happens in the `__init__`. https://github.com/odoo/odoo/blob/8c737601327acec1d83e1e5e3c6e66c9fd226339/addons/resource/models/utils.py#L117-L132 ## Example For example, in Planning module, we perform operations between `Intervals` and `WorkIntervals`. The `WorkIntervals` class behaves differently from `Intervals`: while `Intervals` uses disjoint closed intervals, `WorkIntervals` uses disjoint semi-closed intervals. ## Side effects During these operations, the `_merge` method was not normalizing the `_items`, which caused inconsistencies and errors (when we are merging two unormalized intervals `([0, 10], [10, 20])` with an empty `others`). ## The fix This commit ensures that the `other` parameter is normalized before processing the `_merge` operation. The fix ensures that normalized intervals are always produced after `_merge`, even when unnormalized intervals are provided as input. ## Real case That issue has been found in that ticket: 5184291 Forward-Port-Of: odoo/odoo#235133 Forward-Port-Of: odoo/odoo#234352
This fix restores employee selection for users who do not have full Employees access, especially in mobile and Studio-created fields. It ensures public employee information can be read correctly so search results appear instead of showing no records.
Original PR description
**Steps to reproduce** - With Studio, create a many2one field in relation to the Employee model. - Have a user with no "Employees" rights. - With this user and in mobile view, click on the field to…
**Steps to reproduce** - With Studio, create a many2one field in relation to the Employee model. - Have a user with no "Employees" rights. - With this user and in mobile view, click on the field to select an employee. -> No records found. Note: the many2one_avatar_employee widget used in HR apps avoid this problem. **Cause** Issue since https://github.com/odoo/odoo/commit/e962860c6f0d8ec9e50bb376e1faab5c7bc69374 The `web_search_read` on the private employee model returns no records when an `image_*` or `avatar_*` field is part of the requested fields. This is because we try to fetch these fields https://github.com/odoo/odoo/blob/188a3fe45fb41463ff86d1fa5e930ab43fb70d0e/addons/hr/models/hr_employee.py#L240 but they are not stored on the public employee model, and will not be put in cache. When performing a read after that, these fields are missing from cache. We try to fetch them from the db https://github.com/odoo/odoo/blob/e962860c6f0d8ec9e50bb376e1faab5c7bc69374/odoo/models.py#L3185 but this fetch is again done using the public employee. This results in missing values and is interpreted as an access error, no data is returned in `web_search_read`. **Solution** Read the problematic fields to make them present in cache when the cache of the public employee is copied to the one of the private employee. opw-4297115 Forward-Port-Of: odoo/odoo#234456 Forward-Port-Of: odoo/odoo#197575
When a shape is already applied to a background or image, it is now clearly highlighted in the selector. This makes it easier for users to see the current choice, while also improving keyboard navigation and closing behavior for a smoother editing experience.
Original PR description
Before this commit, when a shape was applied to a background or an image, that shape was not highlighted in the shape selector. After this commit, active shapes are highlighted with a border in the shape selector. task-5187272
This change restores rounding calculations to the correct place in accounting scenarios and updates incorrect comments in the tests. It helps ensure invoices, refunds, and reconciliation behave consistently and are validated more accurately.
Original PR description
Also fixes the comments that were wrong. Change some values to better test things 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#235392 Forward-Port-Of: odoo/odoo#234213
The website now updates the displayed price without national taxes when a quantity-based fixed pricelist price applies. This ensures Argentinian customers see the correct price as they change quantities on product pages.
Original PR description
Versions -------- - saas-18.4+ Steps ----- 1. Have a company with Argentinian localization; 2. in Website settings, enable "Display Price without National Taxes"; 3. add a quantity-based fixed price on the website's pricelist; 4. go to a product page where the fixed price can be applied; 5. increase quantity so the fixed price should apply. Issue ----- The price without national taxes isn't getting updated. Cause ----- In the `_get_additional_combination_info` override, the given `quantity` gets ignored, as well as the pricelist price for product variants, instead defaulting to their `lst_price`. Solution -------- Pass the quantity to `_compute_price_rule`, and use the result for both templates & variants. opw-5040056
The Wave document layout now keeps multi-line footers from overlapping invoice content when viewed in the portal on mobile devices. This improves readability and prevents important information from being hidden in customer-facing previews.
Original PR description
In the Wave layout, a multi-line footer overlaps document information when the portal view is opened from a mobile interface. Steps to reproduce: - Open Settings > General settings > Configure Document Layout - Select Wave layout and add a multi-line footer - Open an invoice, go to portal preview, switch to mobile view Issue: The footer overlaps invoice information. This occurs because the boundaries of the SVG drawing are not well defined and it will unexpectedly shrink. opw-5023032 Forward-Port-Of: odoo/odoo#230230
This change makes the web editor test suite more reliable by giving each test its own time allowance instead of sharing one timer across all of them. It matters because slower test environments were causing occasional false failures, even though the product itself was working correctly.
Original PR description
Split the test timer between the four tests rather than applying
a single timer over all of them, for when the runbot is slower.
runbot-233975
Forward-Port-Of: odoo/odoo#235313This fix prevents a page error when an empty row is edited in the website builder. It adds a safety check so the system no longer tries to inspect columns that do not exist, improving stability for users working with empty layout blocks.
Original PR description
When a .row div was empty, the _areColsCustomized function was called with an empty HTMLCollection. This caused a traceback when the function tried to access columnEls[0]. This commit adds a safety check to _getNbColumns for avoiding extra calls to _areColsCustomized when columnEls is empty. And we also add a similar check to _areColsCustomized for safety, since it's also being called through the _computeWidgetVisibility. opw-5121738 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#235555
Saudi invoices could lose their taxes when a customer was assigned a Saudi fiscal position. This update corrects the tax setup so the expected tax remains visible and applied on invoice lines.
Original PR description
Steps to reproduce: - With a SA company setup - Create an invoice - Set a Saudi Arabia partner - Add a product with 15% tax defined on it Issue: No tax shows up on the invoice line Analysis: This occurs because the default fiscal positions are all empty and empty fiscal positions remove all taxes. opw-5166882 Forward-Port-Of: odoo/odoo#234387
Warnings attached to products will only appear on sales, purchase, and stock documents when the warning feature is enabled in settings. This fixes the issue where old warnings could still show up even after the feature was turned off, reducing confusion for users.
Original PR description
Step to reproduce:
- install purchase
- go to setting -> (enable) warning
- create a new products and add purchase warning
- now disable the warning from setting
- create a PO with that product
Observation:
- warning is visible, even though we disabled the setting
Cause:
- After commit [1] , once a warning is set on a product, it is displayed on
document regardless of the warning setting.
[1]:https://github.com/odoo/odoo/commit/1e13520ca9bb18deba85110ce9362ac2adb55904
Fix:
- Fix the computes of warning message to run only,
when the warning setting is enabled
opw-5156107
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#231393This update fixes a configuration access issue in the bank transfer setup so the system can correctly read needed settings. It helps avoid errors when users prepare or send payments using ISO 20022 formats.
Original PR description
Forward-Port-Of: odoo/enterprise#99359
The receipt will now display the cashier/server name even when a preset like Eat In is used. This ensures customers and staff can always see who handled the order, making receipts more consistent and easier to review.
Original PR description
Currently cashier name is only shown if no preset is shown or if the present identification is set on name. Steps tot reproduce: -------------------- * Open restaurant * Make sure you use the Eat in preset * Place an order and pay it > Observation: On the receipt the "Served by:" indication is not shown. Why the fix: ------------ The cashier/server information should not depend on the preset used. opw-5154347 Forward-Port-Of: odoo/odoo#234767 Forward-Port-Of: odoo/odoo#231930
This update makes guided tours skip warning steps properly when moving backward. It prevents the interface from briefly jumping to a step that should not be shown, making tour navigation more reliable and less confusing for users.
Original PR description
Before this commit, the backward wasn't ignoring the warn steps. So, if the backward go to the previous step (warn's one) and the trigger is on the page, the tour interactive put the cursor there. But the step is then ignored and go back the step you came from. Now, the warn's steps are ignored. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#235511
This update improves how fixed taxes are represented in electronic invoices, especially when some taxes must be excluded from the original line and shown separately. It also corrects rounding and grouping behavior so invoice totals and tax breakdowns are more accurate and consistent.
Original PR description
This commit contains 2 things: - an helper to extract any tax_data and move it to another base_line - the usage of this helper in UBL to turn emptying taxes into additional base_lines == Add helpers…
This commit contains 2 things: - an helper to extract any tax_data and move it to another base_line - the usage of this helper in UBL to turn emptying taxes into additional base_lines == Add helpers to turn tax_data into new base_lines easily == With this helper, you can now exclude any tax from any base line and turn them into new base lines. Also, I changed a bit the smooth distribution of rounding because the math.ceil is sometimes too greedy and make the whole results to be less accurate. == Make a different behavior between recycling contribution taxes / emptying taxes == In UBL, all fixed taxes are treated as allowances/charges. In this commit, we make a clear distinction between recycling contribution taxes that are treated as allowances/charges and emptying taxes that are exempted of tax and are treated as addition invoice lines in the document. == Fix a small issue with aggregate_function passed to reduce_base_lines_with_grouping_function == The aggregator wasn't called when setting the 'target_base_line' at the very first time. task_id: 5182783 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#234489
This update fixes an issue that could prevent pending transactions from displaying correctly in bank reconciliation screens. It also corrects how journal totals are retrieved, so the amounts shown to users are computed properly instead of being left unresolved.
Original PR description
In this commit: https://github.com/odoo/enterprise/commit/1691a9d6ec426566b81537544cafe09d9c62ad78 We added a template to inherit BankRecKanbanRenderer, but we forgot to add the extension. By doing that it broke the pending transaction template override. Also this: https://github.com/odoo/enterprise/commit/5d5a7aca4f0abb4492314324631e8b5463a35332 change the getJournalTotalAmount to use a super instead, but it was missing an await otherwise we just have a promise no task id Forward-Port-Of: odoo/enterprise#99066
This fix allows vendor bills and invoices with deferred amounts to be reset to draft multiple times, even when audit trail rules are involved. It removes a blocker that could prevent users from correcting and reprocessing these documents after a previous reset.
Original PR description
Resetting a vendor bill or invoice with deferred amounts will unlink or reset all existing deferred entries. If the audit trail is enabled, some of these entries must be cancelled instead. [AccountMove.button_draft()](https://github.com/odoo/enterprise/blob/a3f461040cb3443fbcb190c28fddae7044bbd1e7/account_accountant/models/account_move.py#L80-L88) If a protected entry is already cancelled, `AccountMove._unlink_or_reverse()` will still attempt to cancel it. This prevents entries from being Reset to Draft more than once. The current commit removes this restriction. opw-5187737 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#235223
When a customer requests a partial refund through Helpdesk, the credit note now includes only the product chosen in the refund wizard. This prevents unrelated products from being added to the credit note and makes the refund flow match the user’s selection.
Original PR description
_ ## Short functional explanation of the error Let's say a customer buys 2 products. An SO is created. This customer wants to refund only one of the 2 products. He sends a ticket to helpdesk and we…
_ ## Short functional explanation of the error Let's say a customer buys 2 products. An SO is created. This customer wants to refund only one of the 2 products. He sends a ticket to helpdesk and we click on refund. Even if we specify the product to refund, this action creates a credit note containing both products (previously present on the SO) instead of only the one to refund. Additionally, when selecting the product, we could see in the dropdown of suggestions all the existing products, instead of only the ones related to the SO. ## Reproduction Steps 1. Create a SO containing 2 different products and confirm it. 2. Create a regular invoice and confirm. 3. Go to Helpdesk. Click on the configuration tab, and helpdesk teams. 4. Click on your helpdesk team, scroll down. In After-Sales, check "Refunds". 5. Create a ticket and specify the customer who wants to refund. Make sure the correct helpdesk team is assigned. 6. Click on refund. It opens the wizard. Specify the product to refund and the Invoices to Refund. 7. Click on reverse. ### Expected behavior A credit note containing only the specified product to refund should be created. ### Unexpected behavior The created credit note contains both products originally present on the SO. ## Origin of the issue When issuing a refund from helpdesk_stock_account, this piece of code is called: https://github.com/odoo/enterprise/blob/2051e84c55618c64179c4b9f3e99f4e795bacd32/helpdesk_stock_account/wizard/account_move_reversal.py#L16-L17 which calls the ```reverse_moves``` method in the helpdesk_account.py file, which itself calls the ```reverse_moves``` method in the account_move_reversal.py file, in the account module, and so on. Finally, we arrive in the account_move.py file. In the ```_reverse_moves``` of this file, we can see the code: https://github.com/odoo/odoo/blob/bee7fc1f955c52a88b527ad9a2ddf0021529bbc7/addons/account/models/account_move.py#L4937-L4947 where we simply copy all the lines of the move in the SO without filtering them. As a result, we get the lines of the product we don't want to refund __ opw-5148789 Forward-Port-Of: odoo/enterprise#98771
This change fixes an intermittent test failure in the web interface by waiting for the error dialog to actually appear before checking it. It makes automated testing more stable and reduces false failures without changing the user experience.
Original PR description
Before this commit, the test sometimes failed because we didn't wait enough before checking the presence of the error dialog. The `unhandledrejection` event being thrown asynchronously, simply waiting for an animation frame isn't enough. We can only wait for the dialog to be displayed. runbot error~234017 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#235464
The Website app’s “Optimize SEO” dialog has been adjusted so it waits for the page preview to finish loading before opening. This prevents occasional crashes when users try to open SEO tools immediately after reloading a page on a slow connection.
Original PR description
Steps to reproduce: - Open Website app and enter edit mode on any page. - Reload the page with a slow connection. - Immediately open "Optimize SEO" from the navbar menu. Before this commit, the dialog accessed the preview document while the iframe was reloading, so reading location.origin raised a TypeError. After this commit, the dialog waits for the iframe to finish loading or returns immediately when it is already complete, preventing crashes. task-5104033 Forward-Port-Of: odoo/odoo#235231 Forward-Port-Of: odoo/odoo#230820
This change prevents an error that could happen when a user opened Edit Configuration on a configurable product after its name had been removed from the order line. It ensures the edit option only appears when it is valid to use, avoiding a confusing interruption in the sales flow.
Original PR description
Currently, when a user adds a configurable product to an order line, and remove the name of product and click on `Edit Configuration` (pencil icon) error is encountered. **Steps to Reproduce:** -…
Currently, when a user adds a configurable product to an order line, and remove the name of product and click on `Edit Configuration` (pencil icon) error is encountered. **Steps to Reproduce:** - Install Sales module - Create a Quotation - Add a product(e.g Acoustic Bloc Screen), then only remove the name from the orderline and click on **edit button(pencil Icon)**. **Error:** `TypeError: SaleProductConfiguratorController.sale_product_configurator_get_values()` `missing 1 required positional argument: 'product_template_id'` **Root Cause:** When a user clicks on Edit configuration, the client-side JavaScript makes an RPC call to the server, targeting the `sale_product_configurator_get_values`. which expects product_template_id at [1] and since it is removed from order line the error is encountered. [1]- https://github.com/odoo/odoo/blob/1b657cf1e1ce43874a3ede307b2f8ad68216aa56/addons/sale/controllers/product_configurator.py#L11-L13 **Solution:** This commit prevents the error by correcting `depends` on the field `is_configurable_product`, which will ensure that edit button will be only present if the configurable product is selected. Sentry-5741581459, 6925770690 Forward-Port-Of: odoo/odoo#217464
This change fixes an issue where certain images, such as SVG or GIF files, could cause the loading spinner in Masonry-style website blocks to stay visible indefinitely. Users can now replace images in these blocks without the editor getting stuck, improving reliability when working with website content.
Original PR description
Steps to reproduce: ==================== 1. Add a snippet with Masonry blocks (e.g., Punchy Image). 2. Edit an image and select an SVG or GIF file. 3. The loading spinner will appear and never disappear. Cause: ======= Certain image types like SVG and GIF are not processed by `onImageInfoLoaded`. So the _imageProcess call will be canceled https://github.com/odoo/odoo/blob/3dadb15555b96ad22dfd2799c05415f07b03d027/addons/html_editor/static/src/main/media/image_post_process_plugin.js#L27-L28 The code would then try to add a `load` event listener, but the event had already fired. This caused an unresolved promise. Solution: ========= Before attaching the `load` event listener, add a check for the `imageEl.complete` property. If the image is already loaded, we can bypass the listener entirely. opw-5167545 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This change ensures invoices sent to ZATCA use the correct API when the customer is part of a company hierarchy. Previously, some invoices were incorrectly treated as simplified invoices; now they are routed through the clearance process when appropriate, helping avoid submission errors and compliance issues.
Original PR description
…earance or reporting api When sending an invoice to ZATCA, if the contact is an individual, the invoice is sent through the reporting API, and if the contact is a company, the invoice is sent through the clearance API. As of now, if the contact has a parent company, the invoice is sent through the report api. However, we need to make sure that in this case, the invoice goes through the clearance api. The fix introduced simply checks the partner_id.commercial_partner_id to decide whether the invoice is a simplified invoice (i.e. through the reporting api) or not. Task-5085142 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#234691
This change corrects how barcode scans are processed in batch picking so the system properly waits for each step to finish. It helps prevent occasional scan failures and makes batch operations more reliable for warehouse users.
Original PR description
Commit bc9247d46225c696842bc7b0e3c883320231ab1b has introduced an override of the `processBarcode` method. However, it does not return nor await the super call. In particular, in the case where the super call should be done the overrides returns "undefine" rather than a promess to await and hence that call is not awaited anymore. Note: This error has been noticed from the fact that the test `test_barcode_batch_scan_lots` sometimes fails on step 29/31. runbot-233631 Forward-Port-Of: odoo/enterprise#99303
This fix adds explicit cache rules so the browser does not reuse an outdated spreadsheet view when a tab is duplicated. As a result, duplicated tabs will open with the most recent spreadsheet content instead of sometimes showing stale data.
Original PR description
It happens that browser may use a cache if there's no explicit cache control/expiration time: https://httpwg.org/specs/rfc9111.html#heuristic.freshness Steps to reproduce (non-deterministic): - create a new spreadsheet - do some changes, edit a few cells - right click on the tab and hit "Duplicate" => the spreadsheet is not up-to-date on the duplicated tab. The browser loaded the response from "disk cache" instead of fetching the latest data from the server. I'm using Chrom Version 142.0.7444.162 (Official Build) (64-bit) We add an explicit cache control. Forward-Port-Of: odoo/enterprise#99426
The OEE value shown on a workcenter card now matches the detailed OEE report. This fixes a rounding-related mismatch that could show slightly different results in different places, giving users a more consistent and accurate view of production efficiency.
Original PR description
**Current behavior:** The form view for a workcenter has an OEE smart button which can display a different value from the real OEE displayed by the `mrp_workcenter_productivity_report_oee` displayed…
**Current behavior:** The form view for a workcenter has an OEE smart button which can display a different value from the real OEE displayed by the `mrp_workcenter_productivity_report_oee` displayed when actually clicking the button and looking at the report. **Expected behavior:** Same values **Steps to reproduce:** 1. Make a workcenter and a BoM with an operation performed at the workcenter 2. Use the BoM in an MO such that there is some un-productive time (e.g., recorded production duration takes longer than expected duration) * example: 0:20 expected, 1:01 actual 3. Go to the workcenter list view -> click on the created workcenter -> look at OEE smart button display value -> click on it to see report -> report values are different **Cause of the issue:** the `oee` field on the workcenter is computed with rounded intermediary `blocked_time` and `productive_time` values, the actual report uses the raw values. **Fix:** Don't use the rounded intermediary values in computing `oee`. Post-this-diff, we actually do one less `_read_group` (along with computing a more accurate field value). opw-4795463 Forward-Port-Of: odoo/odoo#232730 Forward-Port-Of: odoo/odoo#218310
This fix removes duplicate country codes from partner tax-related settings. It prevents display issues on partner forms and keeps the data clean without changing the intended behavior.
Original PR description
Recently we started considering `country_code` as part of the `fiscal_country_codes` [1]. Because of this, the field can now contain duplicates. If your active company is a US one, and you set United States as the country on the partner you end up with `US,US`. It breaks some (admittedly fragile) invisible conditions on the `res.partner` form view [2]. Although we could fix those conditions, it would require everyone to update the module, and having duplicate country codes in `fiscal_country_codes` field doesn't serve any purpose anyway. [1] https://github.com/odoo/odoo/pull/229584 [2] https://github.com/odoo/enterprise/pull/62615 opw-5248844 opw-5241556 Forward-Port-Of: odoo/odoo#235652
When someone receives an event registration email for a ticket that was fully discounted, the message will now confirm the registration without displaying a zero-value price. This avoids confusion for attendees who might otherwise think they still need to pay the amount shown in the email.
Original PR description
Steps to reproduce: 1. Create a new sale order with an event ticket line 2. Apply a 100% discount on the ticket line 3. Confirm the sale order 4. Check on the new attendee created, the mail sent to the attendee. Current behavior: The email shows the unit price without the discount applied which can be confusing for the customer as it might look like they need to pay that amount. After this commit: The email will just show the confirmation of the registration to the event withouth mentioning the price when the total price is 0. opw-5122776 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#235482
The top-bar messaging menu now includes inbox messages that were previously hidden when they were not linked to a specific record. This makes notifications like signature requests easier to find and read directly from the menu, reducing confusion for users.
Original PR description
**Steps to reproduce:** - Set handle notifications in Odoo for one user - Go to `Sign` app with another user - Create a signature request for the first user - The first user is properly notified of…
**Steps to reproduce:** - Set handle notifications in Odoo for one user - Go to `Sign` app with another user - Create a signature request for the first user - The first user is properly notified of the signature request, as the counter badge is updated. - When clicking on the badge, no new message is shown. **Issue:** Inbox messages are not considered in the `MessagingMenu` when they are not linked to any record. It's the case when a signature request is sent and while the notification counter is updated, the message can't be seen in the top bar menu, it's only visible in the `Discuss` app > Inbox which is quite confusing for the users. In previous versions the behavior was different as the signature request was either considered as an activity or no notification was sent. Also if the inbox message is linked to a record, it only appears in the `all` filter of the menu. **Fix:** Added the inbox explicitly to the top `MessagingMenu` to be able to read the corresponding messages. We could also link the signature to its record when sending the message instead of `self.env['sign.request']._message_send_mail()` but it might cause access rights issues. Also ensured that a category `others` was used for such messages, and prevented an error caused by clicking on the conversation when the `Discuss` app was opened. Unfortunatly doing this will show duplicates in the notifications of the menu for messages which are in the inbox but which have a record set. (e.g. when such message appears, it will have one line in the inbox and one for the record itself) So we need to filter out the messages which have a thread from their record in the views to avoid it. related: https://github.com/odoo/enterprise/commit/463d6a2aae536356e6dee6b902f2e881dbc4fbda opw-4969005 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#235052 Forward-Port-Of: odoo/odoo#228740
This change prevents users from cancelling purchase orders that have been locked. If someone needs to cancel one, they must first unlock it, which better protects confirmed orders from accidental changes.
Original PR description
Issue before this commit: ========================== Locked purchase orders could still be cancelled, which defeats the purpose of locking them. Steps to reproduce: ========================== 1. Install the `purchase` module. 2. Enable "Lock Confirmed Orders" in the configuration. 3. Create and confirm a purchase order. 4. Lock the purchase order. 5. Try to cancel it → the PO still gets cancelled despite being locked. After this commit: =========================== Cancelling a locked purchase order is no longer allowed. If a user tries to cancel a locked PO, a UserError will be raised instructing them to unlock it first. Locking a purchase order is intended to prevent accidental changes, including edits and cancellations, once the order is confirmed. With this change, users must explicitly unlock a purchase order before cancelling it, ensuring better control and data integrity. TaskId: 4760864 Forward-Port-Of: odoo/odoo#208716
This change fixes an issue that could block users from adding attachments after saving an invoice email as a template. It keeps the email wizard linked to the correct document, preventing an error and making the sending flow work as expected.
Original PR description
Currently, an error occurs when trying to add an attachment after saving an invoice email as a template in the `Send wizard`. **Steps to produce:** - Install the `account` module. - Create a new…
Currently, an error occurs when trying to add an attachment after saving an invoice email as a template in the `Send wizard`. **Steps to produce:** - Install the `account` module. - Create a new invoice, fill in all required details, then `confirm` and click `Send`. - Click the `three-dot (⋮)` menu and select `Save as Template`, enter a name, and save the template. - Try to add an attachment. **Error:** `AttributeError: 'account.move.send.wizard' object has no attribute '_mail_post_access'` `AttributeError: 'account.move.send.wizard' object has no attribute '_get_thread_with_access'` Root **cause:** At [1], the code sets a new `template_id` when the template is saved. This triggers `_compute_model()` at [2], which updates the model field to `account.move.send.wizard` instead of `account.move`, using the `active_model` context, causing the `error`. **Fix:** This commit ensures that after saving a mail template, the wizard retains the correct model, same as [3], and prevents the attachment upload error. [1]: https://github.com/odoo/odoo/blob/5c6afcbffb49803a03e3a384ed60de68093dca04/addons/account/wizard/account_move_send_wizard.py#L296 [2]: https://github.com/odoo/odoo/blob/5c6afcbffb49803a03e3a384ed60de68093dca04/addons/account/wizard/account_move_send_wizard.py#L244-L248 [3]: https://github.com/odoo/odoo/blob/5c6afcbffb49803a03e3a384ed60de68093dca04/addons/mail/wizard/mail_compose_message.py#L380-L389 sentry-6987172677 Forward-Port-Of: odoo/odoo#234268
Follow-up payment reminder emails now send any attachments and dynamic reports that were configured on the email template. This ensures customers receive the full intended reminder message instead of only the basic email content.
Original PR description
### Issue: We can add attachments and dynamic report to the email templates, but they are not sent with follow-ups. ### Steps to reproduce: - Go to the "Payment reminder" email template - Under the…
### Issue: We can add attachments and dynamic report to the email templates, but they are not sent with follow-ups. ### Steps to reproduce: - Go to the "Payment reminder" email template - Under the page "Content", add an attachment by clicking the "Attachments" button - Under the page "Settings", add a dynamic report - Create an overdue invoice for a partner - Go on the form view of the partner, "Accounting" page - Click "Send", make sure the template used is the one with the attachments - Send - The attachments on the template and the dynamic report are not sent ### Cause: The mail template to send the follow-ups is only used to prefill the wizard. ### Solution: Add the template in `_get_wizard_options()` to add the template in the option and later use it to add/generate its attachments. This commit also refactors how the attachments are computed: The previous code was adding the invoices PDFs then removing them. The whole process was confusing. Now `options['attachment_ids']` is appended in `_get_followup_attachments()` with the desired attachments depending on the options. opw-5147736 Forward-Port-Of: odoo/enterprise#99458 Forward-Port-Of: odoo/enterprise#98454
Miscellaneous changes
In order to put the localization translations on Weblate, we did some cleanup of the POT and PO files for them: - Re-exported all POT files - Removed POT files for countries that don't need other languages than English - Removed all `i18n_extra` folders and moved any existing translations over to the `i18n` folder - Updated PO file names by removing superfluous country codes, or simply correcting wrong ones - Removed PO files for irrelevant languages in a localization - Updated the PO file
Original PR description
In order to put the localization translations on Weblate, we did some cleanup of the POT and PO files for them: - Re-exported all POT files - Removed POT files for countries that don't need other languages than English - Removed all `i18n_extra` folders and moved any existing translations over to the `i18n` folder - Updated PO file names by removing superfluous country codes, or simply correcting wrong ones - Removed PO files for irrelevant languages in a localization - Updated the PO files according to the POT files using `msgmerge` - Added new PO files for missing languages We also updated the `.weblate.json` file to add all the localizations in a separate Weblate project, limited to the languages they support. task-5169642 Related: https://github.com/odoo/enterprise/pull/99189 saas-18.3: https://github.com/odoo/odoo/pull/235503 19.0: https://github.com/odoo/odoo/pull/235726
In order to put the localization translations on Weblate, we did some cleanup of the POT and PO files for them: - Re-exported all POT files - Removed POT files for countries that don't need other languages than English - Removed all `i18n_extra` folders and moved any existing translations over to the `i18n` folder - Updated PO file names by removing superfluous country codes, or simply correcting wrong ones - Removed PO files for irrelevant languages in a localization - Updated the PO file
Original PR description
In order to put the localization translations on Weblate, we did some cleanup of the POT and PO files for them: - Re-exported all POT files - Removed POT files for countries that don't need other languages than English - Removed all `i18n_extra` folders and moved any existing translations over to the `i18n` folder - Updated PO file names by removing superfluous country codes, or simply correcting wrong ones - Removed PO files for irrelevant languages in a localization - Updated the PO files according to the POT files using `msgmerge` - Added new PO files for missing languages We also updated the `.weblate.json` file to add all the localizations in a separate Weblate project, limited to the languages they support. task-5169642 Related: https://github.com/odoo/odoo/pull/235120 saas-18.3: https://github.com/odoo/enterprise/pull/99389 19.0: https://github.com/odoo/enterprise/pull/99506