Daily updates from Odoo
Friday, June 12, 2026
64 changes · saas-19.3
Resolved issues and error corrections
This update streamlines the process of loading contract templates by simplifying a key component. Previously, the button's database calls were inefficient due to its reliance on a broader selection field. This change improves performance and stability.
Original PR description
It was found that the Load Contract Template button was doing database calls with no domain. This was due to it extending Selection Field, seeing that it doesn't use anything from SelectionField except the props, we've decided to make it a simple Component. task-6259618 Forward-Port-Of: odoo/odoo#268825
This update fixes a bug where timesheet totals weren't visible on the portal's task view. The issue stemmed from a naming conflict between XML templates, preventing the totals from being correctly displayed. The fix ensures that users can now see the complete timesheet totals for each task.
Original PR description
Issue: ---------------------------------------- The totals aren't displayed after the timesheet list on portal. Steps to reproduce: ---------------------------------------- - Have Timesheet and Project installed, with task having timesheet - Go on the Portal page, then "My Tasks" - Click on a task having several timesheets - The list of timesheet shows but not the totals. Cause: ---------------------------------------- This commit f84d46d8e99199c64f97b6a59247875bd32b0f91 separated the timesheet list and the timesheet totals into two different XML templates. The template with only the list of timesheet has the same name as the previous template containing both the list and the totals. So if the `t-call` aren't updated, the totals disappear from `saas-19.1` to `saas-19.2`. Solution: ---------------------------------------- Call `portal_timesheet_table_with_total` instead of `portal_timesheet_table`. opw-6247177 Forward-Port-Of: odoo/odoo#269446
This update fixes an issue where a second stock valuation entry was created when a repair order was finished and then a quotation or invoice was generated. This prevented accurate accounting records and potential discrepancies. The fix ensures that valuation entries are only created once for a product linked to a repair order.
Original PR description
When finishing a repair order a stock valuation entry is created for the product used. If you then make a quotation and invoice it another stock valuation entry would be created for the same product.…
When finishing a repair order a stock valuation entry is created for the product used. If you then make a quotation and invoice it another stock valuation entry would be created for the same product. Steps to reproduce: ------------------- * Create a category using FIFO and real time valuation * Create a product using this category and set it's cost to 5€ * Set some on hand quantity for the product * Create a repair order and add the product with the "Add" option * Finish the repair order > Observation: At this point you should have a valuation entry in the accouting app * From the repair order create a quotation and invoice it > Obesrvation: If you check the accounting entries again you will see a second valuation entry Why the fix: ------------ When checking if the line is eligible for valuation we make sure that if it is linked to a repair order, this repair order should not have any accounting entries linked to it. opw-5429996 Forward-Port-Of: odoo/odoo#254468
This update resolves an issue preventing monthly companies from generating inventory valuation journal entries. The cron job's domain was incorrectly excluding monthly companies, leading to missed valuations. Now, both daily and monthly companies are processed correctly at the end of each month, ensuring accurate inventory accounting.
Original PR description
#### Description of the issue/feature this PR addresses: The "Stock Account: Inventory Valuation Closing" cron is meant to post valuation journal entries for companies configured with periodic…
#### Description of the issue/feature this PR addresses: The "Stock Account: Inventory Valuation Closing" cron is meant to post valuation journal entries for companies configured with periodic inventory valuation. Due to a faulty domain in ResCompany._cron_post_stock_valuation, monthly companies are never processed, and on the last day of the month daily companies are also skipped. As a result, no inventory valuation journal entries are ever generated by this cron for periodic-valuation companies. #### Current behavior before PR: The cron's domain requires inventory_period = 'daily', which excludes monthly companies on every non-last day of the month. On the last day of the month, an extra AND clause is added requiring inventory_period = 'monthly'. Combined with the existing 'daily' clause, this produces a contradiction (period = 'daily' AND period = 'monthly') that matches no records, so daily companies are dropped on that day as well. Net effect: monthly companies are never processed, and daily companies are skipped on month-end. #### Desired behavior after PR is merged: On a non-last day of the month, the cron processes companies with inventory_period = 'daily'. On the last day of the month, the cron processes both 'daily' and 'monthly' companies, so monthly valuation entries are posted at month-end without dropping daily companies. opw-6115649 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#266465 Forward-Port-Of: odoo/odoo#264298
This update resolves an issue where PDF links within the Odoo viewer were not functioning correctly. The fix adjusts the layering of elements to ensure clicks are properly directed to the PDF links, improving the user experience when viewing documents with internal and external links. This ensures all links within the PDF viewer are accessible.
Original PR description
Version - 18.0 Steps to reproduce: 1. Upload a PDF document containing bookmarks and internal/external links 2. Open the document 3. Click on the links, some work and some do not Issue: `canvas_layer_0` is positioned over the PDF viewer with `z-index: 1`, intercepting clicks intended for PDF link annotations and making internal/external links unresponsive. The `.textLayer` already has `z-index: 2 !important` in iframe.css to prevent the same problem for text selection Fix: Added `z-index: 2 !important` to `.annotationLayer section` in `iframe.css` raising it above `canvas_layer_0`. Taskid = 6237688 Forward-Port-Of: odoo/enterprise#118040
A recent update removed the duplicate and delete buttons from the page properties dialog in the website settings. This change was caused by a renaming of a configuration property. This update restores these essential buttons, ensuring users can properly manage their static website pages.
Original PR description
Steps to reproduce: 1. Go to Website. 3. Open the page properties dialog of any static page. Issue: The duplicate and delete page buttons are missing from the page properties dialog, although they were available until version 19.0. Cause: After the changes introduced in [1](https://github.com/odoo/odoo/pull/220325/changes), the `buttonTemplate` prop was renamed to `buttonDialogTemplate`. However, this new prop was not handled in the page properties dialog, causing the buttons to disappear. task-6171493 Forward-Port-Of: odoo/odoo#262951
This update prevents unnecessary placeholder images from being sent during menu synchronization. By only sending actual image URLs when images are defined, we've reduced data transfer and improved the speed and efficiency of menu updates. This results in a smoother user experience.
Original PR description
This commit prevents placeholder images from being included in the menu sync payload and only sends `img_url` when an actual image is configured on the product or category. Task-6251430 Forward-Port-Of: odoo/enterprise#120075 Forward-Port-Of: odoo/enterprise#119482
This update streamlines the timesheet connection process by removing a redundant 'Close' button and automatically redirecting users to the timeline after a successful connection. This creates a smoother and more intuitive experience for users connecting to their Odoo Enterprise accounts.
Original PR description
- Remove 'Close' button from connection successful modal - Change Redirect users to http://localhost:5600/#/timeline after successful connection. task-6272843 Forward-Port-Of: odoo/enterprise#119800
This update fixes an issue where currency rates from the Bank of Mexico were incorrectly displayed. The change shifts the rate date by one day to align with the Bank of Mexico's data retrieval process, ensuring accurate currency conversions within the system. This improves the reliability of financial reporting.
Original PR description
banxico fetches the rates applied on the previous day, when we introduced using previous day's currency rate (here: https://github.com/odoo/odoo/pull/231948), we broke their logic. shift the rates date by one day to account for the change. task-6264708 Forward-Port-Of: odoo/enterprise#118999
This update resolves an issue where delivery orders for serial-tracked products could be completed without recording the necessary serial numbers. The change ensures that when a delivery order is created without serial numbers, the picking status is correctly set to 'done' and the quantity is accurately reflected, preventing discrepancies. This improves data accuracy and traceability for inventory management.
Original PR description
Writing both `quantity` and `lot_ids` on a tracked move in the same form save leaves `move.quantity` stored at the user value while `_set_lot_ids` unlinks the remaining move line; the picking can then be validated to 'done' with no serial recorded. Force `_compute_quantity` at the end of `_set_lot_ids` so the stored value stays in sync with the move lines. Steps to reproduce: - Serial-tracked product, 6 in stock - Create a delivery order for 6 units of that product - In the delivery form, on the move row: type "1" in Quantity and remove all 6 lots from the Serial Numbers widget. - Save, Validate Before: picking goes to Done with quantity=1 and no serial. After: clear UserError, quantity stays in sync with mls. opw-6192841 Forward-Port-Of: odoo/odoo#266786 Forward-Port-Of: odoo/odoo#266394
This update optimizes the way Odoo checks access rights during reconciliation processes. Previously, a performance bottleneck existed when updating multiple reconciliation lines at once, leading to slower widget loading. This change improves the speed and efficiency of the reconciliation feature, particularly when handling large numbers of transactions.
Original PR description
When assigning a value in batch, the ORM doesn't manage to batch the call to `check_access` done in `write_batch`/`write_real` because each write is done individually when setting a value in the compute function. This field is especially annoying because it is read when opening the reconciliation widget on several lines. Forward-Port-Of: odoo/odoo#269601 Forward-Port-Of: odoo/odoo#269063
A bug preventing users from submitting WhatsApp template approvals with image headers has been resolved. This update corrects a technical issue related to how image data is processed, ensuring template submissions now function correctly. This improves the WhatsApp template approval workflow.
Original PR description
Currently an error occurs when the user tries to submit a WhatsApp template for approval with a header type image. Steps to produce an Error: - Install the whatsapp module - Create a new WhatsApp…
Currently an error occurs when the user tries to submit a WhatsApp
template for approval with a header type image.
Steps to produce an Error:
- Install the whatsapp module
- Create a new WhatsApp template as below
- Header Type = `Image`
- Upload any image in `Template Static Header`
- Fill in required fields
- Error occurs when click `Submit for Approval`
Error `TypeError: object of type 'LocalBinaryFile' has no len()`
This happens because of the recently refactored changes with [1]
`attachment.raw` now contains a `LocalBinaryFile` object instead
of a raw binary value. As a result, using the object directly in the
request at code line[2] (data) causes an error.
This commit fixes the above error by using `attachment.raw.content`,
which passes the actual image binary content in the request instead
of the `LocalBinaryFile` object.
[1]: https://github.com/odoo/odoo/commit/41fe2ebdb9cc37341362d7af829c087a5f72f9f1
[2]: https://github.com/odoo/enterprise/blob/28bd32718cd147093c9d56d79dce87ff32d44508/whatsapp/tools/whatsapp_api.py#L56
Sentry-7516083183This update resolves an issue preventing users from successfully posting LinkedIn updates with images. The fix corrects a technical error related to how image data is handled, ensuring seamless image uploads and post creation. This improves the LinkedIn integration for our users.
Original PR description
Currently an exception is generated when the user tries to create a Linkedin post with an image. Error: `TypeError: object of type 'LocalBinaryFile' has no len()` This happens because the recently refactored changes with [1] `image_id.raw` now contain a `LocalBinaryFile` object instead of a raw binary value. As a result, using the object directly in the request at code line [2] (`image_data`) causes an error. This commit fixes the above error by using `image_id.raw.content`, which passes the actual image binary content in the request instead of the `LocalBinaryFile` object. [1]: https://github.com/odoo/odoo/commit/41fe2ebdb9cc37341362d7af829c087a5f72f9f1 [2]: https://github.com/odoo/enterprise/blob/f6b6039b15ba17c293dcbfb46767a75475d4ce18/social_linkedin/models/social_account.py#L434 Sentry-7491355475
This update fixes a misleading warning message displayed in Odoo Enterprise's expense settings. The issue occurred when the 'Expense Card' was unchecked, even if Stripe issuing was supported for the company's location. Now, the system correctly checks the company's fiscal country to determine Stripe issuing support, ensuring accurate messaging.
Original PR description
In the Expense settings, under 'Expense Card', the warning 'Stripe issuing is not yet supported for your localization' was displayed when the checkbox 'Expense Card' was unchecked, even if the stripe issuing is supported by the current localization. We now use the fiscal country id of the company to check if the company's country supports stripe issuing. task-6253582 Forward-Port-Of: odoo/enterprise#118654
This update resolves an issue causing tracebacks in Firefox (Gecko-based browsers) when loading assets within iframes used in mass mailing processes. The fix prevents errors from propagating when iframes are unexpectedly removed from the page, ensuring a smoother user experience for Odoo users.
Original PR description
Loading assets bundles into an iframe requires the iframe to be connected (present in the DOM) at time of insertion. However, it can happen that iframes are removed from the DOM before all their…
Loading assets bundles into an iframe requires the iframe to be connected (present in the DOM) at time of insertion. However, it can happen that iframes are removed from the DOM before all their assets have loaded in. In these instances, errors from failed bundle loads will turn into tracebacks. This is generally not an issue in Chromium-based browsers as iframes do not fire a load event if they are disconnected; however, in Gecko-based browsers, this can happen. As such, mass_mailing users using Firefox currently receive a systematic traceback, as the CSS file "mass_mailing.assets_inside_builder_iframe.css" will not load. Steps to reproduce: - Use Firefox (or a Gecko-based browser) - Open a new mailing - Select the Events theme and make an edit (add a space...) - Save the mailing - Wait for 23 seconds The bug may be non-deterministic. Fix: Errors during the iframe load process will no longer bubble up if their iframe is disconnected when the error occurs. task-6293998 Co-authored-by: Damien Abeloos <abd@odoo.com> Forward-Port-Of: odoo/odoo#269324
This update fixes an issue where the shop floor displayed component quantities with excessive decimal places, leading to inaccurate readings. The fix addresses a floating-point calculation error that occurred when combining quantities from multiple lots, ensuring more precise and reliable data display.
Original PR description
**Issue** In the shop floor, floating-point values may display excessive decimals. **Steps to reproduce** - Create a BoM for a product, with a component tracked by lots - Set the component to be…
**Issue** In the shop floor, floating-point values may display excessive decimals. **Steps to reproduce** - Create a BoM for a product, with a component tracked by lots - Set the component to be consumed in a work order operation - Create several lots for the component, per ex 2: - LOT01 with 16.528 units - LOT02 with 10,000.00 units - Create an MO for 220.800 units of the finished product - Click on the shopfloor icon - Click to register the component consumption for the component. - Choose the first lot - Then choose the remaining units from the second lot -> This will display the quantity consumed as 220.79999999999998, even if the decimal accuracy is set to only 2 digits. **Cause** Since, there are 2 `moveLines`, one for each lot, the getter `quantityDone` add 2 floating point together: https://github.com/odoo/enterprise/blob/d7ab7ee1287342638006e290ede20b955aae8370/mrp_workorder/static/src/mrp_display/mrp_record_line/stock_move.js#L63-L69 inducing a floating-point precision error. The result is rendered directly in the XML template: https://github.com/odoo/enterprise/blob/d7ab7ee1287342638006e290ede20b955aae8370/mrp_workorder/static/src/mrp_display/mrp_record_line/stock_move.xml#L8-L14 without rounding. opw-6243804 Forward-Port-Of: odoo/enterprise#118976
This update ensures that prices displayed in the self-order mobile app always match the prices shown on product pages, regardless of the selected fiscal position (like 'takeout'). Previously, prices varied, causing confusion for customers. This fix aligns self-order pricing with the correct tax calculations and pricelists, improving the overall ordering experience.
Original PR description
Self-order showed one price on product cards / product page and another after adding to the order, when a preset fiscal position (e.g. take-out) changed taxes. The UI used template-only pricing and…
Self-order showed one price on product cards / product page and another after adding to the order, when a preset fiscal position (e.g. take-out) changed taxes. The UI used template-only pricing and sometimes skipped fiscal position on tax computation. Steps to reproduce: ------------------- * Create a fiscal Position (e.g. takeout) * Create a Taxe for that Fiscal Positions replacing the default Taxe (e.g. 0%) * Create a pricelist with a formula increasing the price by the same % as default Taxe (e.g. 15%) * Enable Self-Ordering for a Restaurant * In the takeout Presets, set our Pricelist and Fiscal Positions * Open the Mobile Menu of the Restaurant and add a product that has variants (e.g Pizza VG) > Observation: Price on product selection is different from price in cart Why the fix: ------------ We now make self-order use the same rules as an actual order: default variant for template-only display, pricelist from pos.order first (what setPreset and the session already maintain), fiscal position from the order or the preset everywhere taxes are derived, and correct tax inputs on the product page (price, pricelist, fiscalPosition, variant). Order line tax preparation now uses that same order-or-preset fiscal position, so remapped taxes apply to lines the same way they apply to the prices shown while browsing. opw-6120097 Forward-Port-Of: odoo/odoo#261535
This update corrects a bug where the sale order name was inconsistently generated due to interactions between the purchase and product matrix modules. The fix ensures the correct name is passed through the system, preventing assertion errors and maintaining data integrity. This resolves a technical issue impacting order naming.
Original PR description
**Step to reproduce** Reproducible in single app The "name" field make this assertion fails: ``` self.assertRecordValues(sale_order.order_line[0], [{ "product_id":…
**Step to reproduce**
Reproducible in single app
The "name" field make this assertion fails:
```
self.assertRecordValues(sale_order.order_line[0], [{
"product_id": no_variant_product_tmpl.product_variant_id.id,
"name": 'No Variant\nAttribute: Value 1',
```
**Observation**
The name will not be the same depending which app are installed, purchase_product_matrix, changes the name of the product if there is a attribute value of a never variant: https://github.com/odoo/odoo/blob/f399f99d4e0e562d25e1de32336e8d6a55199b9b/addons/purchase_product_matrix/models/purchase.py#L168-L174 Which will be passed to the purchase_order_line:
https://github.com/odoo/odoo/blob/f399f99d4e0e562d25e1de32336e8d6a55199b9b/addons/purchase/models/purchase_order_line.py#L630-L634 that will pass the information to the sale order:
https://github.com/odoo/enterprise/blob/bce04ce24b66fb1a2481274eb3aebdc30a62766e/sale_purchase_inter_company_rules/models/purchase_order.py#L114 https://github.com/odoo/enterprise/blob/bce04ce24b66fb1a2481274eb3aebdc30a62766e/sale_purchase_inter_company_rules/models/purchase_order.py#L125-L126
**Additional information**
Since this [commit](https://github.com/odoo/odoo/commit/b8ebb26553f8170061debc7532606fd4777f0fcd#diff-5684edced9bdfc98021a85de4c6cdf691ea7add74e56ab50334a1d7db9ef4224R90) product_no_variant_attribute_value_ids was directly added in the purchase module.
breaking commit : https://github.com/odoo/enterprise/commit/bf286a0005b8e22ffa717419cd2dfacff861a265
runbot-242362
Forward-Port-Of: odoo/odoo#268016This update resolves a problem where payments with tips after payment were incorrectly marked as 'cancelled' in Stripe. The fix ensures that payment capture happens correctly after the tips are processed, preventing disruptions in the payment flow. This improves the reliability of tip processing during restaurant transactions.
Original PR description
Currently when using a stripe terminal and the tips after payment feature the transaction is marked as cancelled while the transaction is marked as uncapured on stripe. Steps to reproduce:…
Currently when using a stripe terminal and the tips after payment feature the transaction is marked as cancelled while the transaction is marked as uncapured on stripe. Steps to reproduce: ------------------- * Set up terminal payment (using SIMULATOR works) * Enable tips after payment feature * Open restaurant * Make an order * Go to payment screen, select stripe * Scan card (with simulator everything is automatic) > Payment line is marked as cancelled Why the fix: ------------ After this commit https://github.com/odoo/odoo/commit/c27deda808660dde89305d574b6d662157d99d16 if `captureAfterPayment` does not return true the status of the payment line will be set to `retry`. However when pos_restaurant_stripe is also installed `captureAfterPayment` can return `undefined` when tips after payment is enabled. https://github.com/odoo/odoo/blob/324df67c099ab18c6fe7c8f77212cf809debf383/addons/pos_restaurant_stripe/static/src/overrides/models/payment_stripe.js#L5-L11 In this case we want to capture later and we expect the pethod to not return anything. In this case we don't want to change the status of the payment line. opw-6223838 Forward-Port-Of: odoo/odoo#268802
A recent issue preventing the 'See employee progress bar' tour from running correctly has been resolved. The fix addresses a dependency on a specific module installation and ensures the necessary steps are completed before progress bars are displayed, improving tour reliability.
Original PR description
The tour relied on the chatter loading to know when the page was done loading. Unfortunately, the chatter on that model is only added if planning_field_service is installed, so the test fails in single module installs. The "See employee progress bar" then failed because some employees do not have an email adress but we do not close the employee_no_email_list_wizard modal before checking the progress bars. We now click on action_send before the failing step. runbot-938958 Forward-Port-Of: odoo/enterprise#118492
This update resolves an issue causing excessive logging in Odoo when handling attachments created by external systems. By returning 'None' when attachment data is missing, the system avoids unnecessary error handling and log spam, primarily impacting integrations like EDI connectors. This improves overall system stability and performance.
Original PR description
Return None when datas is empty alongside the existing mimetype check. Avoids unnecessary exception handling leading to logspam for URL type attachments where binary data is unavailable. This issue is only reproducible programmaticaly as the mimetype is not available with url type attachment in Odoo. Thus, it's a problem that only impact third party integrations, EDI connectors or any workflow that creates ir.attachment records directly. opw-6010528 Forward-Port-Of: odoo/enterprise#116080 Forward-Port-Of: odoo/enterprise#113396
This update prevents the deletion of Peppol invoices and bills, ensuring a complete and accurate history for all transactions. Previously, deleting these documents created traceability issues. Now, documents are marked as 'cancelled' to maintain a full audit trail, complying with regulatory requirements.
Original PR description
Before this commit, invoices and bills sent via Peppol could be deleted, making traceability difficult. Deletion is now forbidden. Documents are instead kept and marked as cancelled to preserve their history. Task-6107420 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#269352 Forward-Port-Of: odoo/odoo#258897
This update corrects a problem where test products in the Peruvian POS system were incorrectly converting prices due to a missing company setting. By assigning the correct test company, the system now displays the accurate 5.10 PEN price, resolving a failure in the refund process. This ensures accurate pricing and functionality for Peruvian users.
Original PR description
Description of the issue this commit addresses: The POS frontend converts prices using the product's currency_id. Test products created without a company_id had their currency_id fall back to the main company, causing the 5.10 PEN price to be converted unexpectedly and the l10n_pe_edi_pos refund tour to fail its orderline check. --- Desired behavior after this commit is merged: This commit sets the test product's company_id to the PE test company so its currency_id resolves to PEN. This prevents unintended currency conversion in the POS UI and restores the expected displayed price (5.10) in the refund tour. --- runbot-[242597](https://runbot.odoo.com/odoo/error/242597) Forward-Port-Of: odoo/enterprise#119834
This update resolves a visual glitch in the chatter interface where an empty rectangle appeared next to log notes during editing. The issue stemmed from a system that remembered the last position, causing problems when scrolling. This fix ensures suggestions are displayed correctly regardless of scrolling, improving the user experience.
Original PR description
# How to reproduce - Go into any form view of a model with a chatter (e.g. Quotation) - Add multiple long log notes. You need to be able to scroll enough to not see the last log note - Click edit on…
# How to reproduce - Go into any form view of a model with a chatter (e.g. Quotation) - Add multiple long log notes. You need to be able to scroll enough to not see the last log note - Click edit on the last log note - Scroll down to the bottom # The problem An empty rectangle is displayed next to the log note in edit mode. # Cause The rectangle comes from the NavigableList Component, which is the list that displays suggestions when typing things like "@" or "#" : https://github.com/odoo/odoo/blob/1fd44c3bb11a79d5b6aa72bf7de5a83e6c45be46/addons/mail/static/src/core/common/composer.xml#L137 This components uses the `usePostion()` hook, which purpose is to try to find the most appropriate place to put the element. It will try different postions (e.g. on the left, below, above, etc.) and will pick the most appropriate one. It will then adjust the element's style to position it correctly. It is possible to ask for a preferred position using the options given to the hook. This position will be prioritized over the others if it is suitable. In the case of the NavigableList of the chatter, we give it either 'bottom-fit' or the 'top-fit' positions, wich means it will prefer to be displayed above or below the message : https://github.com/odoo/odoo/blob/dd84309df7fd39e9e97ed02d135d25b211085135/addons/mail/static/src/core/common/composer.js#L449-L459 But in our case, when we scroll back up, the position of the rectangle stays on the left, even though the below space is available. That is because of this commit that introduced a memorization of the last solution : https://github.com/odoo/odoo/commit/b2b8d2dbb8396d86492a3089db9b1b1545c8f13b https://github.com/odoo/odoo/blob/f2434aac74324a65ccd81aa18c7b0e8318e59fde/addons/web/static/src/core/position/position_hook.js#L59-L61 This means that when we scroll down, the bottom positions fails and so the left one is defaulted to. Since the position is memorized, it stays on the left. The issue with this left position is that another commit introduced some logic that made it so if the position is not "top" or "bottom", then we set the element's height to some value : https://github.com/odoo/odoo/commit/702748e2c8e895d372d07f9aeff273282d1b1a99 https://github.com/odoo/odoo/blob/f2434aac74324a65ccd81aa18c7b0e8318e59fde/addons/web/static/src/core/position/utils.js#L120-L124 And setting the height of the NavigableList makes it so it displayed even when there are no suggestions inside, because the hiding mechanism of the suggestion list relies on the fact that when there are no suggestions, the div is empty and has no height, so it is hidden. # Propose solution We introduce a settings in the options that will allow to skip the memorization of the last position. Since the left position will never be set in the options, no height will be defined. opw-6172407 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#262822
This update corrects a labeling inconsistency in the Odoo purchase module. The 'incoming' button has been updated to 'purchase orders' for better clarity and user understanding. This change ensures users can easily identify and utilize the button's function.
Original PR description
Fix label on incoming purchases smart button. "sales order" -> "purchase orders" Forward-Port-Of: odoo/odoo#261254
This update resolves a bug where form updates triggered by changes in record IDs caused errors. Now, the system gracefully handles record ID changes, preventing crashes and ensuring data integrity when saving new forms. This improves the stability and reliability of the Odoo application.
Original PR description
* Open a new record form (the `onchange` RPC is cached). * Open a second new record form (it uses the cached `onchange` RPC). * Save the record before the `onchange` RPC returns. Before this commit, a race condition caused an error to be raised. When `web_save` is executed, it updates the record configuration with the new `resId` without reloading the view. When the pending `onchange` RPC finally returns, the cache callback misinterprets the data as a `web_read` result instead of an `onchange` result due to the updated ID, triggering a crash. Now, the callback safely does nothing if the resId has changed since the request was sent. runbot-243200 Forward-Port-Of: odoo/odoo#269524 Forward-Port-Of: odoo/odoo#268884
This update resolves a technical issue that caused the account reports audit tour to fail in complex Odoo environments. Specifically, the tour now waits for the correct Kanban view to be active before opening the necessary financial reports, ensuring a smoother and more reliable user experience.
Original PR description
The account_reports_audit tour was failing at the "Balances" button step due to a race condition in the preceding steps. In environments with many modules, the "Open the working file" step was triggered prematurely while still on the return checks view, because its selector was too broad. This commit narrows the selector for "Open the working file" to ensure it only triggers once the Kanban view is actually active. [runbot-938920](https://runbot.odoo.com/odoo/runbot.build.error/938920) Forward-Port-Of: odoo/enterprise#118346
This update corrects a bug that prevented French public entities in DROM regions (like Martinique) from correctly sending invoices through Chorus Pro. Previously, the system incorrectly used VAT numbers instead of SIRETs, leading to routing errors. This fix ensures invoices are properly formatted and transmitted.
Original PR description
When invoicing a French public entity through Chorus Pro, the SIRET of the recipient was written in the UBL PartyIdentification only when the partner country was France (country_code == 'FR'). Partners located in a DROM (overseas department/region) have a real French SIRET too, but their ISO country code failed the check, so the SIRET was dropped and replaced by the VAT number. This cause the invoice to not be routed correctly in Chorus Pro. Steps to reproduce: - Setup a french company and connect it to Peppol - Create a customer for a public entity located in Martinique, with its SIRET, Peppol address 0009:11000201100044 (Chorus Pro SIRET) and BIS Billing 3.0 format. - Issue and send an invoice to this customer via Peppol. - Open the generated *_ubl_bis3.xml: AccountingCustomerParty PartyIdentification/ID holds the VAT instead of the SIRET, and Chorus Pro never receives the invoice. opw-6153868 Forward-Port-Of: odoo/odoo#269364 Forward-Port-Of: odoo/odoo#268519
This update resolves an issue preventing authenticated users from completing donations on the donation page. The fix skips Turnstile integration when a donation form is detected, ensuring a smooth user experience for existing database configurations. This addresses a technical error related to form structure and prevents form submission failures.
Original PR description
Steps to reproduce: =================== 1. Configure a Cloudflare Turnstile site key on a 19.2 database. 2. Open `/donation/pay`. => Traceback. Cause: ====== On `/donation/pay` (and any page…
Steps to reproduce: =================== 1. Configure a Cloudflare Turnstile site key on a 19.2 database. 2. Open `/donation/pay`. => Traceback. Cause: ====== On `/donation/pay` (and any page embedding the donation snippet), the page crashes with `TypeError: Cannot read properties of null (reading 'classList')` in `TurnStile.disableSubmit`, breaking the form for authenticated visitors on databases with a Turnstile site key configured. The donation page wraps its editor-only custom-fields form in a `<section class="s_website_form">` (introduced by [1]) That inner form has no submit button of its own the actual donation submit happens in the surrounding `payment.form`. The `Form` interaction's selector (`.s_website_form form, form.s_website_form`) nevertheless matches it, so the cf_turnstile patch on `Form.start` runs, queries `.s_website_form_send` / `.o_website_form_send`, gets `null`, and crashes when reading `submitButton.classList`. Solution: ========== On master, we fixed this by adding `s_website_form_no_recaptcha`` to the donation section. For stable versions, since the view is noupdate, we used a JS workaround: if there is no submit button, simply skip attaching Turnstile. [1]: https://github.com/odoo/odoo/commit/dc0618014deace4757f35ee432629a2aa7ebe998 opw-6208466 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#267404
This update streamlines the ordering process in our Point of Sale system by ensuring order submissions don't block the user interface. The system now handles background syncing of orders, preventing delays and improving table management. This change enhances the overall efficiency and responsiveness of the POS experience.
Original PR description
### Before this commit: - Clicking the Order button waited for preparation-related RPC calls, delaying the transition back to the floor screen. - Tables could still be selected while their orders were syncing. - syncingOrders used order.id, which caused inconsistent tracking. ### After this commit: - Order submission no longer blocks the UI; sync runs in the background. - syncingOrders now uses order.uuid for consistent tracking. - Tables being synced are marked and cannot be selected. - Fixed course deselection to use the correct order instance. - Updated tests to ignore syncing tables. Task:6030427 Forward-Port-Of: odoo/odoo#268520 Forward-Port-Of: odoo/odoo#256883
This update corrects a previous issue where invoices generated from the Odoo website's e-commerce orders were incorrectly set to be CFDI public documents. Now, invoices for website orders will only be CFDI documents when explicitly required, ensuring compliance and streamlining the order process.
Original PR description
There is no reason why we would always cfdi to public when creating orders from the e-commerce. When the customer give all their info, the invoice should not be cfdi to public. opw-6180766 Forward-Port-Of: odoo/enterprise#119442 Forward-Port-Of: odoo/enterprise#116061
This update resolves an issue that occurred when creating payslips for employees with contracts exceeding 35 years. The fix adjusts a key calculation parameter to correctly account for Mexican labor law rules regarding holiday accrual for employees with significant tenure (over 60 years).
Original PR description
**Steps to reproduce:** 1. Install l10n_mx_hr_payroll. 2. Create an employee with a contract date over 35 years ago (e.g., 1985). 3. Create a payslip for this employee. 4. Click on "Compute Sheet".…
**Steps to reproduce:**
1. Install l10n_mx_hr_payroll.
2. Create an employee with a contract date over 35 years ago (e.g., 1985).
3. Create a payslip for this employee.
4. Click on "Compute Sheet".
```Error: KeyError(36) while evaluating```
**Cause:**
The rule parameter [rule_parameter_holiday_table](https://github.com/odoo/enterprise/blob/c02c4571bb7db7197b07539ba390d4d20fdce9fe/l10n_mx_hr_payroll/data/hr_rule_parameters_data.xml#L722-L758) defines values
only up to 35 years. Seniority exceeding this range causes a KeyError.
**Solution:**
Extended the `rule_parameter_holiday_2024` table from 35 to 60 years,
following the Mexican Federal Labor Law (LFT) reform formula
(+2 days every 5-year milestone from year 6 onwards).
**NOTE:**(Alternative approach)
```python
@staticmethod
def _get_mx_holiday_days(years_worked):
if years_worked <= 0:
return 0
if years_worked <= 5:
return 12 + (years_worked - 1) * 2
five_year_periods = (years_worked - 6) // 5
return 22 + five_year_periods * 2
```
This approach removes the need for XML data maintenance and handles
all future seniority values mathematically without any cap issues.
opw-6090590
Forward-Port-Of: odoo/enterprise#113536This update resolves a bug preventing the daily sales report from displaying its title correctly when the Colombian EDI module is active. The change ensures compatibility with a related report template, and also corrects a previous issue where the report would render without a title when the Colombian module wasn't installed.
Original PR description
The daily report template was replacing `//h2[@id='daily_report_title']` entirely, removing the node from the XML source. This caused `pos_hr.single_employee_sales_report` (a primary template that applies its own xpaths against the same patched base) to crash at compile time since its xpaths could no longer find that node. Switch from `position="replace"` to `position="attributes"` + `position="after"`: the h2 stays in the XML source at all times so pos_hr's xpaths always resolve, while the original title is hidden at render time via t-if when CO EDI is enabled and the Colombian content is inserted as a sibling after it. As a side effect, this also fixes a pre-existing bug where installing the module with DIAN disabled would render the daily report with no title at all. opw-6265637 Forward-Port-Of: odoo/enterprise#119668 Forward-Port-Of: odoo/enterprise#119003
This update resolves a visual issue in dark mode and corrects a functional error within the Gantt chart for holiday scheduling. Specifically, the selection process is now more intuitive, allowing users to select multiple holiday periods directly, improving the overall user experience.
Original PR description
- changed selected value in the view to be number of selected cells instead of number of selected records - fixed a visual bug in dark mode where the create popup has ugly background task-id: 6124765 Forward-Port-Of: odoo/enterprise#116229
This update resolves an issue where thumbnails weren't automatically generated when attaching documents to messages within the Composer. The fix ensures that thumbnails are now correctly created, improving the user experience when sharing documents. This enhancement supports seamless document management within the Odoo platform.
Original PR description
When attaching a documents to a message in the composer, the thumbnail was not generated. This commit fix this issue. Task-5096039 Forward-Port-Of: odoo/enterprise#116188
This update resolves a critical issue preventing correct receipt printing in Austria, ensuring accurate financial records. It also addresses a potential deadlock during authentication with Fiskaly and FON, improving system stability and reliability. The changes focus on ensuring proper accounting processes and secure authentication flows.
Original PR description
In this task: -------------- - Fixed Austria closing receipt printing by calculating the offset from the last closed month instead of the current month. Closing records are returned in ascending order and exist only for completed months, so the latest month must use offset 0. - Prevent a deadlock during Fiskaly and FON authentication by checking for open sessions before starting any authentication flow, instead of after the first step of authentication. - The resp was used to show error which was not in the scope. task: 5420256 Forward-Port-Of: odoo/enterprise#120033 Forward-Port-Of: odoo/enterprise#102313
This update fixes a technical issue where IoT polling requests were failing and displaying error messages. The change ensures that all listening requests are handled, preventing these failures and improving the reliability of the IoT service. This resolves a potential disruption to data collection.
Original PR description
We were not awaiting the listening request in every case, making poll requests failures display tracebacks. We now await in any case to avoid this.
This update simplifies error codes within the l10n_fr_reports module. Removing specific error messages related to subscription checks has resulted in all errors now appearing as internal errors, without detailed information. This change aims to streamline error handling internally.
Original PR description
This commit: https://github.com/odoo/enterprise/commit/23afa6f2520a676dcb4cd94867065f1be03708bc change a bit the error codes but removed the ones from the check subscription. By doing so, all the error from that wrapper will give an internal error, and no other info on the error. no task id Forward-Port-Of: odoo/enterprise#120286
This update ensures that tax details are now included in test orders sent to UrbanPiper. Previously, test orders lacked this crucial information, leading to potential issues with order processing. This change improves the accuracy of test data and ensures smoother integration with the UrbanPiper system.
Original PR description
Commit 1: ======== Before this commit: =================== - Test orders sent to UrbanPiper did not include tax details for order items. After this commit: ================== - Tax details are now included in the order item payload of test orders. Task-6013007 --- Commit 2: ======== Cause: ====== In the `without demo` environment, the discount product does not have any `taxes_id`, causing the test assertion to fail. Fix: ==== Set a tax on the discount product in the test to ensure the same behavior in both `with demo` and `without demo` environments. Error-241138 Forward-Port-Of: odoo/enterprise#120126 Forward-Port-Of: odoo/enterprise#109958
This update resolves an issue where both failed and passed quality check units were incorrectly moved to the failure location. The fix ensures that the destination of moved goods is accurately determined based on remaining demand, preventing unintended misplacement of inventory. This improves the reliability of the quality control process.
Original PR description
Version: ---------- - 18.0+ Steps to reproduce: ------------------- 1. Install *quality_control* module. 2. Go to *Settings* and enable *Storage Locations*. 3. Open Quality module go to the Quality…
Version:
----------
- 18.0+
Steps to reproduce:
-------------------
1. Install *quality_control* module.
2. Go to *Settings* and enable *Storage Locations*.
3. Open Quality module go to the Quality control -> Quality points
4. Create a *Quality Point* with:
* *Product* set.
* *Control per* set to *Quantity*.
* *Operation* set to *Receipts*.
* *Failure Location* set to *WH/Stock/Shelf1*.
5. Create a *Receipt* with demand of *2 units* for the product used in QP.
6. Mark the quality check as *To Do*.
7. Update the *Done Quantity* to *1*.
8. Open the quality check and click *Fail*.
9. Update the *Done Quantity* back to *2* and save.
10. Open the quality check again, click *Pass*, and validate the receipt.
11. Open the *Detailed Operations* to inspect move lines.
Issue:
------
* Both units (failed and passed) are moved to the *failure location*.
Cause:
------
When a user fails a move line via the QC wizard, the flow is:
do_fail() → show_failure_message() → confirm_fail()
→ check._move_to_failure_location(failure_location_id, failed_qty)
Inside `_move_to_failure_location`, when `failed_qty == move_line.quantity`,
the condition:
https://github.com/odoo/enterprise/blob/a33f580455a54a81d89a848f7b493d9dcc9ba2b2/quality_control/models/quality.py#L458
e.g. 1 == 1
was True even when `move.product_uom_qty = 2` (demand still 2). It only
compared the done quantities, ignoring that unfulfilled demand remained.
As a result, `move.location_dest_id` was set to the failure location.
Later, when the user increases the quantity from 1 to 2 on the move form,
the flow is:
_set_quantity → process_increase → _set_quantity_done → _prepare_move_line_vals
In `_prepare_move_line_vals` :
'location_dest_id': self.location_dest_id.id,
https://github.com/odoo/odoo/blob/47bf284e1e9d8be0d4255418e0a3f67c74fa5114/addons/stock/models/stock_move.py#L1688
The new move line inherits `move.location_dest_id` directly, which at this
point is already the failure location.
When the user then calls `do_pass()` on the second unit, `do_pass()` only
writes `quality_state = 'pass'` and never touches `location_dest_id`. So
the second (passed) move line silently retains the failure location.
Solution:
---------
Add the guard `move.product_uom_qty <= move_line.quantity` to the condition
so the entire move's destination is only redirected when there is genuinely
no remaining unfulfilled demand:
When demand > done qty, the else-branch runs instead: it reduces the
original move's demand and creates a new separate move pointing to the
failure location, leaving the original move's `location_dest_id` pointing
to stock. Any subsequent move lines created on the original move therefore
correctly inherit the stock destination.
---
opw-6080871
Forward-Port-Of: odoo/enterprise#120322
Forward-Port-Of: odoo/enterprise#112859This update resolves an issue where downloading ETA invoices could cause a JSON decoding error. A recent change introduced a workaround, but this new fix adds a crucial catch block to properly handle this error, ensuring invoices download reliably. This improves the stability of the l10n_eg_edi_eta module.
Original PR description
When we download the ETA invoice PDF, a JSONDecoderError can happen when calling the json() method on the request. This error is properly caught by Odoo : https://github.com/odoo/odoo/blob/7a9a340e0dbac470c4bea3f8ce8a32e55f3e82e6/addons/l10n_eg_edi_eta/models/account_edi_format.py#L58-L60 However, the following commit introduced a monkeypatch to handle errors when the simplejson library is installed : 2435fe76eec1fc4320ef71726fc7f16ece653a32 If we meet the conditions, the original error is replaced by a json.JSONDecodeError which is not caught during the previous process. We propose to add this error to the catch block. This modification was inspired by the commit d483dac144a9caf84c44b9d8d394ea327ca87cfe. opw-6266862 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#268309
This change prevents guest contact archiving during order validation from disrupting email notifications for related shipments. Previously, archiving removed the contact from key systems, leading to missing shipment confirmation emails. This reversion restores the original behavior to ensure reliable shipment notifications.
Original PR description
Archiving guest contacts upon SO validation breaks mail confirmations for related pickings. When a guest contact is archived, the ORM automatically filters it out from any search…
Archiving guest contacts upon SO validation breaks mail confirmations for related pickings. When a guest contact is archived, the ORM automatically filters it out from any search https://github.com/odoo/odoo/blob/e8a372b71dc91a3e3649e572380f59ee648c5bdc/odoo/orm/fields_relational.py#L673-L677 As a result, the partner is silently dropped from the `partner_ids` Many2Many on the mail composer even though we do write it https://github.com/odoo/odoo/blob/e8a372b71dc91a3e3649e572380f59ee648c5bdc/addons/mail/wizard/mail_compose_message.py#L538-L539 and the picking confirmation email is never sent. A potential fix would have been to disable this filtering at the ORM level but that would have impacted any flow that relies on archived partners being excluded. This reverts commit 3a20ff382d164f05d3d6b66e94318ed80aaa41cc. This reverts commit 64d9ded9637286ef0cfd9e65ba7c60d4f48d6c16. This reverts commit ef10f93b77263836815034e15bae6cddbd38c4f9. opw-6232937 Forward-Port-Of: odoo/odoo#269570 Forward-Port-Of: odoo/odoo#268568
This change prevents guest contact archiving from disrupting picking confirmation emails. When a guest contact is archived, it previously caused emails to fail to send. This fix reverts a previous change to avoid impacting other processes that rely on archived contacts.
Original PR description
Archiving guest contacts upon SO validation breaks mail confirmations for related pickings. When a guest contact is archived, the ORM automatically filters it out from any search https://github.com/odoo/odoo/blob/e8a372b71dc91a3e3649e572380f59ee648c5bdc/odoo/orm/fields_relational.py#L673-L677 As a result, the partner is silently dropped from the `partner_ids` Many2Many on the mail composer even though we do write it https://github.com/odoo/odoo/blob/e8a372b71dc91a3e3649e572380f59ee648c5bdc/addons/mail/wizard/mail_compose_message.py#L538-L539 and the picking confirmation email is never sent. A potential fix would have been to disable this filtering at the ORM level but that would have impacted any flow that relies on archived partners being excluded. This reverts commit 5616a5bbf78c4a50b412a57609c5ff50b80b854d. opw-6232937 Forward-Port-Of: odoo/enterprise#120269 Forward-Port-Of: odoo/enterprise#119563
This fix resolves an issue preventing users from sending PEPPOL invoices through a branch company without direct access. The code has been updated to remove a check that was incorrectly blocking this functionality, allowing invoices to be sent as intended. This ensures branch companies can fully utilize PEPPOL invoicing.
Original PR description
# How to reproduce - Activate Accounting & l10n_be modules with demo data - Use "BE Company CoA" - Go to Settings > Users & Companies > Companies > "BE Company CoA" > Branches - Create new branch…
# How to reproduce - Activate Accounting & l10n_be modules with demo data - Use "BE Company CoA" - Go to Settings > Users & Companies > Companies > "BE Company CoA" > Branches - Create new branch company - Go to Settings and Enable PEPPOL, then save - Still in Settings, click on "Activate Electronic Invoicing" > Activate Peppol (demo) - Now use the branch company - In Settings, click on "Activate Electronic Invoicing", select "Send from parent company" > Activate Peppol (demo) - Go to Settings > Users & Companies > Users > any user (can be the current one) - Remove the user's access to "BE Company CoA" - Log in as that user if it is not the current one - Create a partner that can receive PEPPOL invoices : - Country : Belgium - Invoice sending : by Peppol - eInvoice format : EU Standard (Peppol Bis 3.0) - VAT : BE0477472701 - Peppol id : Belgian Company Registry - Create an invoice for that partner - Click on Confirm, then Send # The problem You cannot select the "by Peppol" sending method. It has the "(no access)" error attached to it. # Cause The sending method's enable state is computed by : https://github.com/odoo/odoo/blob/c7f05ae216de64d1f8e76e332bc6dd9cf11ce657/addons/account_peppol/wizard/account_move_send_wizard.py#L13 This method runs multiple check to see if the invoice can be send via peppol and one of them calls `_have_unauthorized_peppol_parent_company()` : https://github.com/odoo/odoo/blame/686a0cf67bb1e818baf43309fc94f3f0462097ed/addons/account_peppol/models/res_company.py#L136-L143 This checks that the current user has access to the parent company, which is our exact use case. This specific flow was indeed blocked by the task that introduced branch company PEPPOL invoicing : https://github.com/odoo/odoo/commit/6dd8bc34ba79c14408dc271c19ca7afb0f85fa44 The reason behind this block is in part explained by this comment : https://github.com/odoo/odoo/pull/216864#discussion_r2205047170 But after talking with the Peppol PO, this flow should be allowed # Proposed solution Entirely remove the `_have_unauthorized_peppol_parent_company()` check. After testing, it does not seem we have any access issues to worry about. opw-6080867 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#262523
This update fixes a previous issue where sales employees transitioning to non-commission roles incorrectly accrued commission losses for public holidays and sick time. Now, employees in non-sales positions will no longer be impacted by these incorrect commission calculations, ensuring accurate payroll processing. This improves the reliability of the HR payroll module.
Original PR description
If a salesman moves to another job that doesn't pay commission, he shouldn't have loss on commissions for public holidays and sick time off. Forward-Port-Of: odoo/enterprise#120386
This update resolves a technical issue that caused tracebacks in Point of Sale (PoS) when testing LNA with IoT printer configurations. The fix ensures the IP field is properly defined, preventing errors and improving PoS stability. This addresses a known problem impacting printer connectivity.
Original PR description
When testing LNA using the LNA button in the navbar, if the printer configured is of type IoT, the IP field is undefined, and the PoS displays a traceback. We added a guard to return `false` when the IP is not defined. see odoo/enterprise#120273
This update ensures the LNA button in the POS interface correctly tests functionality for IoT Boxes. Previously, the button wasn't properly verifying LNA status, now a status action is sent when LNA is enabled, ensuring accurate IoT Box operation.
Original PR description
The LNA button in the POS navbar wasn't testing LNA for IoT Boxes. We now send a status action for IoT Boxes with LNA enabled. Forward-Port-Of: odoo/enterprise#119998
This update fixes an issue where barcode scanning incorrectly displayed and managed sale order quantities. The root cause was a flaw in how the system selected delivery lines, leading to inaccurate fulfillment. The fix ensures correct quantity updates when using barcode lots, preventing backorders and ensuring accurate order fulfillment.
Original PR description
Currently when user adds adds quantity in barcode using lots it leads to incorrect sale order quantities. ## Steps to replicate: - Install Sales and Barcode (no demo data). - Enable Lots & Serial…
Currently when user adds adds quantity in barcode using lots it leads to incorrect sale order quantities.
## Steps to replicate:
- Install Sales and Barcode (no demo data).
- Enable Lots & Serial Numbers in settings.
- Create Test Product with Tracking by Lots.
- Go to Inventory > Products>Lots & Serial Numbers and create 3 lots for the product.
- Update each lot’s on-hand quantity to 10 from the product page.
- Create and confirm a Sales Order for the product (lines: qty 3 and 2 units).
- Open the delivery in the Barcode app:
- Scan lot 2 > increase qty to 3 using +1 button
- Scan lot 3 > increase qty to 2 using +1 button
- Validate and go to the sale order.
## Observed Behavior:
The sale order delivered quantities are flipped and a backorder is created even though the quantity for the product is satisfied.
## Root cause:
The issue occurs because when a sales order is confirmed, the system defaults to
using lot 1 on the delivery receipt. When a user scans lot 2, the `_processBarcode` function is triggered, which calls `_findLine` at [1] to select the appropriate line on the receipt.
As the loop in `_findLine` iterates through `pageLines` with values like:
```
[{display_name: "Test product", quantity: 3, lot_id: { name: 'lot1' }},
{display_name: "Test product", quantity: 2, lot_id: { name: 'lot1' }}]
```
During the first iteration, `foundLine` is set at [2] for the line with quantity 3 . Since the subsequent if condition is not satisfied, the loop hits the continue block at [3].
On the next iteration, the line with quantity 2 causes `foundLine` to be overwritten at [2], and the continue block is executed again at [3].
This results in the line with quantity 2 being selected as the line to update at the end of the function.
When the user manually increases the quantity to 3, the line that originally required quantity 2 is updated and fulfilled.
Later, when lot 3 is scanned, the line that required quantity 3 is selected for update, and manually increasing the quantity to 2 before validating the order leads to a backorder and causes the delivered quantities to be flipped.
[1]:
https://github.com/odoo/enterprise/blob/81eaeb4b18d849c644160234def6c69013591abe/stock_barcode/static/src/models/barcode_model.js#L1335-L1337 [2]:
https://github.com/odoo/enterprise/blob/81eaeb4b18d849c644160234def6c69013591abe/stock_barcode/static/src/models/barcode_model.js#L1690-L1699 [3]:
https://github.com/odoo/enterprise/blob/81eaeb4b18d849c644160234def6c69013591abe/stock_barcode/static/src/models/barcode_model.js#L1727-L1729
## Solution:
Avoid grouping lines from different moves unless using batch transfers. This ensures that backorders are not created when the barcode lines are fulfilled.
opw-5423943
Forward-Port-Of: odoo/enterprise#120098
Forward-Port-Of: odoo/enterprise#109032This update corrects a bug where timesheets were incorrectly added to invoices after a partial refund was issued. The fix ensures that timesheets associated with fully invoiced orders are no longer re-added during invoice generation, preventing duplicate invoicing and maintaining accurate financial records. This improves the reliability of the invoicing process.
Original PR description
### Steps to reproduce: - Download 'Sales' and 'Timesheets' apps - Create 2 lines for the services product in the SO, invoicing policy = based on timesheets - Create 2 timesheets for both SO items - Invoice the SO - Create a credit note for line 1 => only line 2 is invoiced and line 1 is now released - Back to the SO > create invoice again > Line 2 is added to the invoice again. ### Cause of Issue: When generating the new invoice, `_recompute_qty_to_invoice` identifies timesheets linked to refunded invoices. Because the original invoice was partially refunded, all timesheets attached to that invoice match the domain used to locate timesheets—even the timesheets for line 2, which wasn't refunded. ### Fix: Ensures that lines that have already been completely invoiced are safely ignored and not inadvertently re-added to subsequent invoices. opw-6217684 Forward-Port-Of: odoo/odoo#268972 Forward-Port-Of: odoo/odoo#265840
This update resolves an error that occurred when downloading the asset template in the Fixed Assets section. Previously, the system incorrectly checked for an account code, causing a technical error. Now, the system uses the asset account's display name, ensuring a smooth download process regardless of the account code's presence.
Original PR description
Currently, an error occurs when downloading the asset template. **Steps to Reproduce:** - Install the `account_asset` module without demo data. - Go to `Accounting` > `Configuration` > `Accounting` >…
Currently, an error occurs when downloading the asset template. **Steps to Reproduce:** - Install the `account_asset` module without demo data. - Go to `Accounting` > `Configuration` > `Accounting` > `Chart of Accounts`. - Open the `Fixed Assets` account, set a `Depreciation` value, and remove the `account code`. - Go to `Accounting` > `Accounting` > `Assets & Liabilities` > `Assets`. - Click `With our template` on the screen. `TypeError: startswith first arg must be str or a tuple of str, not bool` After this [recent commit], account codes became optional and can be removed. As a result, when the code is removed from the Fixed Assets account and when donloading the asset template, the system checks whether the account name starts with the account code [1]. Since the account code is `False`, it raises an error. This commit ensures that the check is only performed when the account code exists; otherwise, the account name is used directly for the asset account. [recent commit]: https://github.com/odoo/odoo/commit/c3313b336b9f1305c363097745926f2bdf61e277 [1]- https://github.com/odoo/enterprise/blob/421fce171dc158faa3b13406b6cea5c1c907ee49/account_asset/controller/asset_template_controller.py#L46-L49 sentry-7487406857
This update now limits the employees assigned to work orders based on the workcenter's configuration. Previously, all employees could be assigned, but now only employees specifically authorized for that workcenter are selectable. This improves accuracy and control over work order assignments.
Original PR description
Add domain on `employee_assigned_ids` to restrict selectable employees based on the workcenter configuration. If `all_employees_allowed` is True, no filter is applied. Otherwise, only employees listed in `allowed_employees` are selectable. opw-6208602 Forward-Port-Of: odoo/enterprise#117876
This update fixes an issue where currency differences were incorrectly aggregated in hierarchical financial reports. Previously, the system was combining figures from different currencies, leading to inaccurate totals. This change ensures that reports accurately reflect the value of transactions in their original currency, improving reporting reliability.
Original PR description
opw-6015098 Forward-Port-Of: odoo/enterprise#119311 Forward-Port-Of: odoo/enterprise#114827
This update prevents the 'Project: Task Rating Request' email template from disappearing when project stages are set to inactive. Previously, disabling ratings on the last stage would remove the template option, causing a frustrating user experience. This fix ensures the template remains available for selection, streamlining the rating process.
Original PR description
Currently, when the `rating_active` feature is disabled on the last project stage using it, the default 'Project: Task Rating Request' email template is automatically archived. This creates a UX issue where the template disappears from the "Rating Email Template" dropdown on the stage form, preventing users from selecting it. This commit resolves the issue by: - Setting `active="True"` by default on the XML template record. - Removing the background archiving logic from the `write` method of `project.task.type`. - Appending a check to `test_send_rating_review` to ensure the template remains active even when all stages in the database have ratings disabled. Task-6102227 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#264394
This update resolves an issue where canceling a Global Invoice on a Mexican POS order prevented the creation of a new Global Invoice for the same order. The fix ensures that the refund process correctly updates CFDI documents, allowing users to generate new invoices after a refund is processed. This improves the functionality of the Mexican POS integration.
Original PR description
Steps to reproduce 1. With a Mexican POS configured, create a POS order and sign a Global Invoice for it. 2. Open a new session and partially return the order; close the session. 3. On the original…
Steps to reproduce 1. With a Mexican POS configured, create a POS order and sign a Global Invoice for it. 2. Open a new session and partially return the order; close the session. 3. On the original order, cancel the Global Invoice through the CFDI page. 4. Try to create a new Global Invoice for the original order. Issue The wizard raises "Orders <REFUND-NAME> are already sent or not eligible for CFDI." Validating the refund auto-signs an `invoice_sent` CFDI on the refund pos.order because its parent is `global_sent`, see `_l10n_mx_edi_check_autogenerate_cfdi_refund` at https://github.com/odoo/enterprise/blob/5af8048f0b0956a024d7eaeb10600eec74bdf3ee/l10n_mx_edi_pos/models/pos_order.py#L98. Cancelling the GI only flips its own document to `ginvoice_cancel`; the refund's `invoice_sent` doc stays untouched, so the refund's computed `l10n_mx_edi_cfdi_state` stays `'sent'`. The chain check in `_l10n_mx_edi_check_orders_for_global_invoice` at https://github.com/odoo/enterprise/blob/5af8048f0b0956a024d7eaeb10600eec74bdf3ee/l10n_mx_edi_pos/models/pos_order.py#L184 then rejects the refund as already sent and the new GI cannot be created. opw-6181136 Forward-Port-Of: odoo/enterprise#120349 Forward-Port-Of: odoo/enterprise#117211
This update resolves an issue where the `google_address_autocomplete` widget remained editable even when set to read-only mode. The fix ensures the widget correctly displays the field's value when in read-only mode, improving usability and data consistency.
Original PR description
**Issue:** The `google_address_autocomplete` widget remained editable even when the view or field was set to `readonly`. **Solution:** Modified the `AddressAutoCompleteTemplate` to conditionally render the component. If `props.readonly` is true, the template now renders a `<span>` with the field value. Task~5182770 Forward-Port-Of: odoo/odoo#268109 Forward-Port-Of: odoo/odoo#260952
This update ensures Polish company invoices sent to KSeF (a Polish tax system) correctly include a required field ('PrefiksPodatnika') in the FA(3) XML format. This is necessary for legal compliance with Polish tax regulations for common EU transactions like intra-Community sales and triangular sales, ensuring accurate reporting to the tax authorities.
Original PR description
Steps to reproduce 1. Configure a Polish company with KSeF enabled. 2. Create a customer invoice using a tax tagged with K_21 (0% EU G, intra-Community supply of goods), K_12 (0% EU S, services taxed…
Steps to reproduce 1. Configure a Polish company with KSeF enabled. 2. Create a customer invoice using a tax tagged with K_21 (0% EU G, intra-Community supply of goods), K_12 (0% EU S, services taxed in the buyer's EU country) or Triangular Sale. 3. Send the invoice to KSeF and download the generated FA(3) XML. Issue The Podmiot1 (seller) block in the rendered FA(3) XML omits the PrefiksPodatnika element, see https://github.com/odoo/odoo/blob/89219a843545d8bb0cad6ea806a1167cee6289da/addons/l10n_pl_edi/data/fa3_template.xml#L34-L42. According to the official Ministry of Finance documentation (https://ksef.podatki.gov.pl/media/4u1bmhx4/information-sheet-on-the-fa-3-logical-structure.pdf, page 11), this conditional field must carry the value "PL" when the invoice documents: - the intra-Community supply of goods, - the provision of services referred to in Article 100 sec. 1 item 1 of the Act for EU VAT taxpayers, - the supply carried out under a simplified triangular transaction by the second taxpayer (Article 135 sec. 1 item 4 (b) and (c)). The XSD marks the element as optional (minOccurs="0", fixed="PL") so KSeF accepts the XML, but the seller's tax reporting is still legally non-compliant for the three cases above, and the field is missing from the KSeF PDF viewer rendering. opw-6213178 Forward-Port-Of: odoo/odoo#264659
This update resolves an issue where the builder sidebar incorrectly displayed "Block" for website snippets. The fix ensures that snippet titles are accurately shown in the builder, improving usability and allowing users to easily manage their page content. This was caused by a change in the plugin's setup process.
Original PR description
\* = website ### Issue: When a page is created either through the configurator or from an existing page template, block-level snippets do not display the correct title in the builder sidebar.…
\* = website
### Issue:
When a page is created either through the configurator or from an
existing page template, block-level snippets do not display the correct
title in the builder sidebar. Instead, "Block" is shown for all
snippets.
### Steps to Reproduce:
- **Configurator:**
1. Install the website module or create a new website from Settings.
2. Complete all configurator steps. Do not use "Skip and start from
scratch".
- **Page template:**
1. Open the website and click the "New" button in the systray.
2. Click on "Page" and choose any template other than a blank page.
### Observed behavior:
The builder sidebar shows "Block" in the option container for all
snippets instead of their actual names.
### Reason:
Previously, just before the builder was opened, the `data-name`
attribute was injected through `_computeSnippetTemplates()` for any
snippet that did not already have it. This behavior was lost after the
plugin refactoring.
### Fix:
As before, we now inject the `data-name` attribute during builder setup
for snippets that do not already have it.
task-[6087348](https://www.odoo.com/odoo/all-tasks/6087348)
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#269287
Forward-Port-Of: odoo/odoo#259893This update ensures accurate calculation of variable double holiday pay for employees in Belgium. Previously, the system wasn't properly prorating holiday pay based on legal leave entitlements, leading to potential payment discrepancies. This fix corrects this issue, ensuring compliance and accurate payroll processing.
Original PR description
If you have a double holiday attest, we need to prorate the amount based on legal leave rights. The proration with regards to the previous work time rate wasn't done. Forward-Port-Of: odoo/enterprise#120403
This update fixes an issue where images in email marketing templates were stretched and distorted when paired with long text. By removing specific styling, images now maintain their natural aspect ratio and fit correctly alongside the text, ensuring a professional and consistent email design. This improves the overall visual quality of marketing campaigns.
Original PR description
The media list snippet forces the image to fill the height of its row. The image column carries align-self-stretch and the image carries h-100, so when the text next to the image is longer than the…
The media list snippet forces the image to fill the height of its row. The image column carries align-self-stretch and the image carries h-100, so when the text next to the image is longer than the image is tall, the row grows to fit the text and the image is stretched to that height (and cropped through object-fit: cover). The longer the text, the more the image is distorted. Drop h-100 from the image and align-self-stretch from its column in the s_media_list snippet and in the mass_mailing_themes templates that reuse it. With no forced height the image keeps its natural aspect ratio and the row height follows its content, so the image is laid out next to the text instead of being stretched to match it. Steps to reproduce: 1. Open Email Marketing and create a new mailing. 2. Select the Blogging template for the mail body. 3. In a media item, replace the text next to an image with a very long paragraph. => The image is stretched and cropped to match the height of the text. Ticket [link](https://www.odoo.com/odoo/project.task/5117571) opw-5117571 Forward-Port-Of: odoo/odoo#268675 Forward-Port-Of: odoo/odoo#238138
This update resolves an issue that caused UBL file imports to fail when a vendor bill contained an empty 'EndpointID' field. The fix ensures the import process is more robust and reliable, preventing errors during invoice processing. This improves the overall stability of our UBL integration.
Original PR description
**Description:** Importing a UBL file (vendor bill) fails if it contains an empty "EndpointID" node. It assumes the node always contains text content to sanitize, but if it is empty, it crashes with: AttributeError: 'NoneType' object has no attribute 'strip'. **Steps to reproduce:** 1. Import a UBL as a bill, with an empty EndpointID node of the other party. 2. The import fails with the AttributeError. opw-6246515 Forward-Port-Of: odoo/odoo#269028
This update fixes an issue where new contacts created without a parent record didn't automatically have a default language assigned. The change ensures that all contacts, regardless of their parent relationship, receive the correct language setting, improving data consistency and reporting accuracy. This resolves a previous bug impacting contact data.
Original PR description
Before this commit, when creating a new crm_lead in the form view, using the res_partner_many2one widget to "Create" or "Create and Edit" a new contact would generate a contact without a set language. This happens because _compute_lang in res_partner currently only runs when the res_partner has a parent_id. This fix allows _compute_lang to be run for res_partner records without a parent_id. This ensures that we properly assign a default language for new contacts, using the proper context or the database default. opw-6126637 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#263440
This update fixes an error in the Colombian DIAN module that incorrectly flagged invoices due to timezone differences. The change ensures invoice dates are validated accurately using Bogota local time, preventing reporting issues with DIAN. This improves compliance and data accuracy for Colombian businesses.
Original PR description
**Steps to reproduce:** * Install `l10n_co_edi` module with DEMO DIAN mode enabled. * Go to Accounting > Vendor > Bills and create a new bill. * Select any Colombian partner different from…
**Steps to reproduce:** * Install `l10n_co_edi` module with DEMO DIAN mode enabled. * Go to Accounting > Vendor > Bills and create a new bill. * Select any Colombian partner different from `Consumidor Final`. * Set the invoice date to 6 days in the past. * Select the DIAN Support Documents journal and a product with UNSPSC category. * Confirm the bill and click `Send Support Document to DIAN` after 5 PM Colombia time. **Observed behavior:** * An error is raised stating the issue date cannot be older than 6 days or more than 6 days in the future, even though the invoice date is within the allowed window in Colombia local time. **Cause:** * The date window validation in `_check_move_configuration` used `fields.Datetime.now()` which returns UTC time. Since Colombia is UTC-5, after 5 PM local time the UTC clock has already rolled over to the next calendar day, making a 6-day-old invoice appear 7 days old and failing the validation incorrectly. **Fix:** * Convert the current UTC datetime to the `America/Bogota` timezone and extract its local date before computing the allowed date window. * Compare directly against `move.invoice_date` (a `date` field) instead of using `fields.Datetime.to_datetime()`, keeping the comparison consistent as `date` vs `date`. opw-6011502 Forward-Port-Of: odoo/enterprise#120384 Forward-Port-Of: odoo/enterprise#115256
This update resolves an issue where account reassignments (moving accounts between companies) caused errors during chart of accounts reloading. The fix ensures that the system correctly identifies if an account is still associated with the target company, preventing errors and ensuring accurate account data is loaded.
Original PR description
When reloading a chart of accounts, `_pre_reload_data` resolves an account via its xmlid and then evaluates: ```py re.match(f'^{values["code"]}0*$', account.code) ``` `account.code` is a non-stored…
When reloading a chart of accounts, `_pre_reload_data` resolves an account via its xmlid and then evaluates:
```py
re.match(f'^{values["code"]}0*$', account.code)
```
`account.code` is a non-stored computed field that reads from the company-dependent field `code_store`. If the resolved account has no `code_store` entry for the target company (e.g. the account was originally set up under a different company but its xmlid was prefixed with the current company id), `_compute_code` returns False instead of a string, causing a TypeError in re.match.
```py
File "/home/odoo/src/odoo/19.0/addons/account/models/chart_template.py", line 442, in _pre_reload_data
if not account or not re.match(f'^{values["code"]}0*$', account.code):
File "/usr/lib/python3.10/re.py", line 190, in match
return _compile(pattern, flags).match(string)
TypeError: expected string or bytes-like object
```
```sql
apan_4342860=> SELECT
aa.id,
aa.code_store,
imd.module,
imd.name
FROM account_account aa
JOIN ir_model_data imd
ON imd.res_id = aa.id
AND imd.model = 'account.account'
WHERE aa.id = 1056;
id | code_store | module | name
------+-----------------+---------+-----------------
1056 | {"2": "510500"} | account | 1_co_puc_510500
(1 row)
```
This situation arises when a customer moves or reassigns an account between companies but the xmlid retains the original company prefix.
**Fix:**
After resolving the account via xmlid, check whether it actually belongs to the target company using filtered_domain with _check_company_domain. If it does not pass the check, unlink the stale ir.model.data entry and treat the account as not found, allowing the reload to re-establish the correct xmlid linkage via the code-based lookup that follows.
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#269696
Forward-Port-Of: odoo/odoo#269291This update simplifies invoice sending by automatically defaulting to the 'By Peppol' method only for customers in designated countries (GR, IT, PL, PO, RO). Previously, this setting was enabled by default for all customers, causing confusion and unnecessary notifications for users in these regions. This change streamlines the invoicing process and improves user experience.
Original PR description
Current behavior before PR: - If the customer has a valid Peppol endpoint, the 'By Peppol' invoice sending method is selected by default. - For countries like 'GR,' 'IT,' 'PL,' 'PO,' and 'RO,' peppol is not mandatory or not used for sending invoice. It brings noise and it bothers the users. Desired behavior after PR is merged: - The 'By Peppol' invoice sending method is set to true by default only for customers from PEPPOL_DEFAULT_COUNTRIES. Changes Implemented: - Moved the countries 'GR', 'IT, 'PL', 'PO', and 'RO' from PEPPOL_DEFAULT_COUNTRIES to PEPPOL_LIST. - Added condition to set 'By Peppol' invoice sending method to true when customer is from PEPPOL_DEFAULT_COUNTRIES. task-6072935 Forward-Port-Of: odoo/odoo#269417 Forward-Port-Of: odoo/odoo#262402