Daily updates from Odoo
Tuesday, March 24, 2026
55 changes · saas-19.1
Enhancements to existing features
This update removes the display of '0.00' credit and debit entries on invoices and bills. This change enhances the clarity and professionalism of financial documents, making them easier to understand for both internal teams and customers. It's a simple improvement focused on user experience.
Original PR description
In order to improve the readability muting the 0.00 credit / debit on journal items in invoices / bills task: 5960944 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#254397
Resolved issues and error corrections
This update fixes an issue where users weren't receiving email notifications for signature requests, even when they preferred to receive notifications in their inbox. Now, all signature requests will trigger an email, ensuring signers are promptly informed and can respond. This improves the efficiency of the signature process.
Original PR description
When a user's notification preference is set to "inbox", no email is sent, which may prevent signers from being notified of signature requests. This commit enforces sending email notifications for signature requests regardless of user notification settings. Notifications are still created in Odoo, preserving in-app visibility for users who rely on it. task-6041834 Forward-Port-Of: odoo/enterprise#111094
This update fixes a technical error that occurred when users tried to take a picture without an IoT device connected to a quality control point. The fix prevents a system crash and now guides users to add a device before attempting to capture an image, ensuring a smoother user experience.
Original PR description
Currently, an error occurs when the user clicks the Take Picture button without an IoT box set on the quality control point. ## Steps to replicate: - Install Quality, Purchase, IoT - Quality >…
Currently, an error occurs when the user clicks the Take Picture button without an IoT box set on the quality control point. ## Steps to replicate: - Install Quality, Purchase, IoT - Quality > Quality Control > Control points - Create a new Control point with - Type: Take A Picture - Operations: My Company: Receipts - Create and confirm a purchase order for a test product - Receipts > Quality Checks > Take A picture ## Observed behavior: TypeError: Cannot read properties of undefined (reading '0') ## Root cause: This error occurs because no device has been set on the control point. When the user clicks the **Take a Picture** button, the `onClick` method [1] is triggered. Since `this.iotDevice` is false, both `iotBoxId` and `deviceIdentifier` are undefined. These undefined values are then passed to the action function [2], which in turn passes them to the `_attemptFallbacks` function. At [3], a type error occurs because the system tries to index `iotBoxId` even though it is undefined. [1]: https://github.com/odoo/enterprise/blob/2c2e358695357a730b66480fd99c27d7e922bd0b/quality_iot/static/src/iot_picture_button.js#L7-L17 [2]: https://github.com/odoo/enterprise/blob/2c2e358695357a730b66480fd99c27d7e922bd0b/iot/static/src/network_utils/iot_http_service.js#L213-L236 [3]: https://github.com/odoo/enterprise/blob/2c2e358695357a730b66480fd99c27d7e922bd0b/iot/static/src/network_utils/iot_http_service.js#L149-L152 [4]: https://github.com/odoo/enterprise/blob/1d25675de808521dc8ad8c56bc9fbd320a0ae56b/quality_iot/static/src/iot_measure_button.js#L27-L32 ## Solution: Add a check for an unset device and notify the user to add a device to the quality point. This prevents a traceback and clearly informs the user about the issue. Similar to how it was done in [4] opw-6010095 Forward-Port-Of: odoo/enterprise#110615
This update fixes an issue where the 281.50 PDF report occasionally generated an extra page due to formatting. The change optimizes the report layout to ensure it consistently appears on a single page for standard reports, improving readability and reducing unnecessary printing.
Original PR description
**Behavior:** Currently when generating the 281.50 report the pdf ends up taking an extra page filled only with header and footer, the page appears when creating the report for a natural person and…
**Behavior:** Currently when generating the 281.50 report the pdf ends up taking an extra page filled only with header and footer, the page appears when creating the report for a natural person and adding a national number. The solution is not to fully prevent the report form being more than 1 page long, as some informations could span over more than one line which would make the pdf need an extra page. But to shave a few milimeters so that by default when filled with standard informations the pdf appears cleaner. **Steps to reproduce:** - Log to a Belgian company - Create a contact that is a person - Add the 281.50 tag to them - Create a credit note for any positive amount for that person and set the date to the previous year - Make sure the account used in the credit note has any 281.50 x tag assigned - Go to Accounting/Reporting/Open 325 forms and create a new form for the year indicated in the credit note - When generating the 281.50 PDF you'll seee it span over 2 pages if you have filled the national number of the contact opw-5930339 Forward-Port-Of: odoo/enterprise#111310
This update ensures the 'Mark as Complete' button is always visible when closing a return flow in Odoo, regardless of whether the API connection is active. This resolves an issue where the button was hidden for users relying on manual uploads, improving usability for all return processes.
Original PR description
When a flow is already started, the button "mark as complete" on returns was invisible. This is an issue for some localizations that don't handle the flow when the API connection is not desired by the user. Another use case, for example, is the API connection is down temporarily, the user manually uploads it on the website, then wants to close the started return. Forward-Port-Of: odoo/enterprise#111600
This update corrects a technical issue impacting UK users' top-up payments via Stripe. The system previously relied on outdated data location information, which has now been updated to align with the current UK account payload structure. This ensures accurate processing of UK top-up transactions.
Original PR description
Fix the UK top-up logic as UK accounts payload structure shifts from the EU where the country data is located in the EU payload it could be found under bank_transfer[financial_adresses][0][iban][country] and bank_transfer[country] but in the uk payload it can only be found in the second As we used the first one, we are now switching it to the second as it's the only common ground Forward-Port-Of: odoo/enterprise#111588
This update corrects a bug where text fields in Odoo Sign PDFs were incorrectly displayed as checkmarks instead of the entered text. The issue stemmed from an incorrect interpretation of Appearance State tags within standard text fields. This change ensures text fields accurately reflect the user's input when generating signable PDFs.
Original PR description
Create an interactive PDF form in Adobe Acrobat containing a standard Text Field (/FT /Tx). - Fill the text field with a value (e.g., "John Doe") and save the PDF. - (Note: Adobe Acrobat will often…
Create an interactive PDF form in Adobe Acrobat containing a standard Text Field (/FT /Tx). - Fill the text field with a value (e.g., "John Doe") and save the PDF. - (Note: Adobe Acrobat will often automatically assign an Appearance State (/AS /N) to this text field). - Upload this PDF to the Sign app. **Current behavior:** The text field's string value is ignored and replaced with a checkmark (✓). **Expected behavior:** The text field should correctly render the string value that the user entered. **Cause of the issue:** In the _draw_field_value function, the parser checks if an /AS (Appearance State) tag exists and is not set to /Off. If true, it assumes the field is a checked box and draws a chr(0x2713). However, it fails to check the Field Type (/FT) first. Because Adobe Acrobat sometimes assigns /AS tags to standard Text Fields (/FT /Tx), we misinterprets these populated text fields as checked buttons. **Solution:** This PR fixes the issue safely for stable versions across two commits: [REF]: Extracts the value extraction logic into a dedicated _get_field_value helper method to allow isolated unit testing without requiring a canvas or physical PDF files. No behavioral changes in this commit. [FIX]: Wraps the /AS check within an if field_type == "/Btn": condition. This ensures only actual Checkboxes and Radio Buttons render as checkmarks, allowing Text Fields to fall through and properly return their /V string values. Task: 6018260 Forward-Port-Of: odoo/enterprise#110292
This update corrects a minor typo in the industry_fsm_report module's view definitions. The change ensures accurate reporting functionality related to project tasks. This fix prevents potential inconsistencies in data displayed within the reporting system.
Original PR description
the view name is incorrect and already used for this view https://github.com/odoo/enterprise/blob/60e9e0f3232c9cd1e9675cb2e5c4b054dc57bbda/industry_fsm_sale/views/project_task_views.xml#L358 Forward-Port-Of: odoo/enterprise#108862
This update fixes an issue where DATEV exports were inaccurate when a move line's account was changed. Now, updating a line's account automatically recalculates the DATEV main account, ensuring the exported data correctly reflects the current financial accounts. This prevents duplicate lines in DATEV reports.
Original PR description
Description of the issue this commit addresses: When the account of a move line is updated (e.g. replacing the suspense account with the actual one), l10n_de_datev_main_account_id was not recomputed which leads to an incorrect DATEV export with duplicate lines. Desired behavior after this commit is merged: Changing the account_id of a move line recomputes l10n_de_datev_main_account_id so that the exported DATEV data reflects the current accounts of the move. Forward-Port-Of: odoo/enterprise#111493
This update resolves a bug where users accessing the Enterprise version of Odoo through a specific domain were incorrectly redirected to another domain, preventing them from viewing their documents. This change ensures that the documents smart button correctly directs users to the appropriate domain for accessing their files, improving usability for all users.
Original PR description
Steps to reproduce:
- Have two domains for your database (".odoo.com" and ".example.com")
- set the ".example.com" domain as your web base url
- login on the ".odoo.com" domain, go on an employee and click the documents smart button
-> you cannot see any documents because you are redirected on the ".example.com" domain on which you are not connected
opw-5857914
Forward-Port-Of: odoo/enterprise#107384This update fixes an issue where payroll attendance calculations were incorrectly high due to how public holidays were being handled. The change ensures accurate attendance amounts are calculated, preventing overestimation of worked hours when public holidays are present. This improves payroll accuracy and reporting.
Original PR description
Fixes the calculation of the worked day lines amount, in cases where a public holiday is set. The current computation doesn't account for hours of public holiday when calculating the attendance amount; causing it to be higher than expected. This is caused by the calculation of work_time, which comes from the calendar data from _work_intervals_batch. If there is a public holiday, the work interval for that day is being removed from the result, causing it to wrongly calculate a lower work_time than expected and increasing the attendance line amount. task-5979501
This update corrects a technical issue that prevented proper anonymization of payroll moves when analytic distribution rules were used. The fix ensures that payroll data is correctly aggregated and protected, maintaining privacy for employees. This improves data security and compliance.
Original PR description
The Batch Account Move Lines option in the settings is used to aggregate together the different payslips of a payrun and to create only one move with aggregated lines, per account. This is done to…
The Batch Account Move Lines option in the settings is used to aggregate together the different payslips of a payrun and to create only one move with aggregated lines, per account. This is done to enforce privacy and avoid having lines for each employee in the payrun. If salary rules with analytic distributions are involved, though, the lines are not merged and we lose the anonimity.
This happens because in the _get_existing_lines funciton, that should return the lines to be merged with the input line (line), the condition for the rules that have an analytic distribution is wrong.
In particular, the condition is wrong because the
distribution_analytic_account_ids field is a recordset of the accounts, while line_id['analytic_distribution'] is a dictionary with keys that are comma separated strings of the ids of the accounts, with values reflecting the percentage.
For example, if a rule has one analytic distribution for 40% and involving accounts 13,7 and 12 + another analytic distribution for 60% involving accounts 3 and 5, line_id['analytic_distribution'] will be {'13,7,12': 40.0, '3,5': 60.0} while distribution_analytic_etc will be a recordset containing (13,7,12,3,5). To fix the problem and keep everything inline, we extract the logic to a new function, where we first unravel the ids from the keys of the dictionary and only then try to match them to the values in the recordset.
Task: 6043957
Forward-Port-Of: odoo/enterprise#111140This update corrects a small, non-critical message displayed within the documents generated for employee payroll. The fix ensures consistent and accurate reporting for HR and payroll processes. This change does not impact functionality or user experience.
Original PR description
Task#5980045 Forward-Port-Of: odoo/enterprise#109063
This update resolves an issue where Odoo generated invalid UBL/QR invoices for foreign customers. When a Peruvian company invoices a customer from another country (like Colombia) without a VAT code, the system was producing an error. This change automatically sets a default 'schemeID' of '0' for these invoices, ensuring compliance with SUNAT requirements and proper UBL/QR generation.
Original PR description
In multi-country databases, a Peruvian company can invoice a foreign customer (e.g., a Colombian company) whose identification type is defined by another localization. Those records typically have an…
In multi-country databases, a Peruvian company can invoice a foreign customer (e.g., a Colombian company) whose identification type is defined by another localization. Those records typically have an empty l10n_pe_vat_code, since there are no cross-country dependencies between LATAM identification types. In that case, the generated UBL leaves the receiver identity type empty and SUNAT returns an error like: ``` 2015/2015 - El XML no contiene el tag o no existe informacion del tipo de documento de identidad del receptor... (missing schemeID value). ``` Odoo already defines schemeID = 0 for some foreign identification types in l10n_pe data, but it cannot cover identification types coming from other countries’ localizations (e.g. Colombia): https://github.com/odoo/odoo/blob/18.0/addons/l10n_pe/data/l10n_latam_identification_type_data.xml#L4 This change ensures that, when the partner is not from Peru and the PE VAT code is missing, we fallback the receiver identification type to "0" in: - PartyIdentification/ID/@schemeID - AccountingCustomerParty/AdditionalAccountID - the QR payload identification type field This prevents generating invalid UBL/QR content for foreign customers in multi-country setups. Forward-Port-Of: odoo/enterprise#110324 Forward-Port-Of: odoo/enterprise#105115
This update resolves a technical issue within the Odoo Enterprise system by updating how currency rates are accessed. The change replaces an older method with the recommended approach, ensuring more reliable and consistent configuration. This improves the stability and performance of the currency rate functionality.
Original PR description
https://github.com/odoo/odoo/pull/223180 removes the `get_param` method from `res.config_parameter`, which was used in the `currency_rate_live` module. This commit replaces it with the `get_str` method, which is the recommended way to retrieve configuration parameters in Odoo. No task ID
This update fixes an issue where multi-select rectangles on scaled PDF signatures were inaccurately drawn, leading to incorrect selections. Additionally, the update resolves a potential error when dropping elements and ensures helper lines align correctly during dragging, improving the overall signature creation experience. This enhances usability and reduces potential errors during signature creation.
Original PR description
When drawing the multi-select rectangle on scaled PDF pages, the rectangle corner was not properly synchronized with the mouse pointer, leading to inaccurate selection. Additional fixes: - An uncaught error could be triggered when dropping elements on the page. - Helper lines during dragging were not accurately aligned around sign items. task-6049004 Forward-Port-Of: odoo/enterprise#111156
This update fixes an issue where repositioning a signature within the PDF viewer caused erratic resizing behavior. The change ensures only one resize listener is attached per signature, resulting in a more reliable and predictable resizing experience for users. This improves the overall usability of the signature feature.
Original PR description
Previously, repositioning a sign item inside the PDF iframe would attach multiple resize event listeners. This led to inconsistent and unintuitive resizing behavior. This commit ensures that only a single resize listener is registered per item, avoiding duplicated handlers and restoring stable interaction. task-6048759 Forward-Port-Of: odoo/enterprise#111520 Forward-Port-Of: odoo/enterprise#111146
This update fixes an issue where currency rates were incorrectly calculated after Bulgaria transitioned to the Euro. The system was using reversed rates from the BNB XML data, leading to inaccurate unit conversions. The fix ensures the correct currency rates are used, maintaining accurate financial reporting.
Original PR description
Issue: after Bulgaria switched to EUR, currency rate fetching from BNB was incorrectly set to still use reversed currency rates from the fetched XML, resulting in unit-to-EUR and EUR-to-unit rates being flipped in the database. Solution: adjusting the parser to get rate from 'RATE' rather than 'REVERSERATE', as the XML provides both. task-6050519 Forward-Port-Of: odoo/enterprise#111275
This update resolves an issue where night shift slots (e.g., 20PM - 4AM) were not visible in the weekly planning view. The fix adjusts how the system displays multi-day slots, ensuring all scheduled hours are accurately shown. This improvement ensures employees can effectively manage their flexible work schedules.
Original PR description
**Steps to reproduce** 1. Have an employee using a flexible schedule 2. Create a slot from e.g. 20PM to 4AM for this employee. Make sure this is the only slot that week for the employee. 3. Publish…
**Steps to reproduce** 1. Have an employee using a flexible schedule 2. Create a slot from e.g. 20PM to 4AM for this employee. Make sure this is the only slot that week for the employee. 3. Publish the Schedule and send it to the employee. Open the outgoing mail to access the link to the planning view. Issue: the slot is not visible in the week view. **Cause** https://github.com/odoo/enterprise/blob/04a885dbb6eed96297cb5ce9a155ebf8e169427c/planning/controllers/main.py#L193-L194 The `event_hour_min` and `event_hour_max` returned by `planning_get` and used to control the min/max hours displayed in the week view, didn't account for slots over multiple days. For a slot between 20pm and 4am, the `event_hour_max` should be the end of the day, and the `event_hour_min` should be the start of the day. **Solution** - we change the `event_hour_min` and `event_hour_max` for multi-day slots to display the full days in the week view - the previous point has the drawback of displaying the full days for non-flexible employees even when not necessary. This is because `slots_start_datetime` and `slots_end_datetime` contained the `planning.slot` start and end. Instead, we can look at the actual slot values displayed (by `_get_slots_vals`). For example, a 5 day slot for a non-flexible employee may contain actual slot values corresponding to a typical 8-17 working day. opw-5245985 Forward-Port-Of: odoo/enterprise#110874 Forward-Port-Of: odoo/enterprise#99784
This update resolves a bug where custom snippets created in the website builder wouldn't display their dynamic content in the preview. The fix ensures that dynamic content is correctly reflected when previewing custom snippets, addressing a visual inconsistency and improving the user experience. This change was necessary following a recent website builder refactor.
Original PR description
The interaction for filling the dynamic content of dynamic snippets did not run inside the iframe to preview the snippet to add. This is not an issue for the initial dynamic snippet, as they are…
The interaction for filling the dynamic content of dynamic snippets did not run inside the iframe to preview the snippet to add. This is not an issue for the initial dynamic snippet, as they are filled with fake content. But when saving a custom snippet, the dynamic content is cleared, and they seem empty when previewed. This is the case since the [website builder refactor] as the previous builder re-used the preview of the initial snippet. This commit adds the interaction to fill dynamic content in the preview iframe, and changes the interaction to avoid emptying the fake content from initial dynamic snippets during preview. Steps to reproduce: - Open website builder - Add a dynamic snippet (for example "Events") - Save the snippet as a custom snippet - Click on "Custom" snippet category - Bug: The preview for the custom snippet does not have the dynamic part (there is no event, just the title) [website builder refactor]: 9fe45e2b7ddbbfd0445ffe25a859e67a316d02b2 task-5427353 Forward-Port-Of: odoo/enterprise#110696 Forward-Port-Of: odoo/enterprise#108912
This update fixes an issue where configuring PEPPOL document syncing settings incorrectly navigated users to a document form instead of the intended Kanban view. The change adds a dedicated widget to the settings, ensuring users are directed to the correct view for managing PEPPOL documents. This improves the user experience and streamlines the document synchronization process.
Original PR description
Before this commit: clicking through on the setting of configuring the folder to sync peppol documents would lead to the document form view instead of the kanban view. Task-6040802 Forward-Port-Of: odoo/enterprise#111765 Forward-Port-Of: odoo/enterprise#111341
This update resolves an issue where documents uploaded to the 'All' folder in the Documents app were not viewable through the bridge interface. The fix ensures that 'All' folder uploads now default to the standard bridge folder, restoring full accessibility for users.
Original PR description
Problem: When a user uploads a document through a bridge to the Documents app, if the destination is set to the `All` folder, the file becomes unviewable from the bridge. It can only be accessed directly via the Documents app. Cause: This occurs because `All` is not an actual folder. Uploads directed to it default to the `My Drive` folder instead. Because `My Drive` is restricted and inaccessible via the bridge, the uploaded documents remain hidden. Solution: To solve this problem, this PR ensures that uploads directed to the `All` folder default to the default bridge folder rather than to `My Drive`. task-6023290 Forward-Port-Of: odoo/enterprise#111715 Forward-Port-Of: odoo/enterprise#111290
This update ensures the sale dashboard accurately displays all completed orders from the POS system. Previously, orders marked 'done' in the POS were not visible on the dashboard. This change corrects a data synchronization issue, providing a more complete view of sales performance.
Original PR description
Step to reproduce: - install spreadsheet_dashboard_sale and pos_sale - create a order in pos , invoice it too - open sale dashboard Observation: - the order fulfilled in pos, does not reflect in…
Step to reproduce: - install spreadsheet_dashboard_sale and pos_sale - create a order in pos , invoice it too - open sale dashboard Observation: - the order fulfilled in pos, does not reflect in dashboard Cause: - sale has 4 status i.e ["draft", "sent", "sale", "cancel"] - when pos_sale is installed, new status oders are added i.e ['paid', 'invoiced', 'done'] - sale dashboard pivot relies on sale defined status only, which so not consider orders that have status in ['paid', 'invoiced', 'done'] Fix: - fix the domain of pivots such that, it will now accept other orders too **Before:** <img width="1058" height="277" alt="image" src="https://github.com/user-attachments/assets/e58c88fa-5ad3-4194-9f9c-ddf41f2f73de" /> <img width="1116" height="190" alt="image" src="https://github.com/user-attachments/assets/259e0347-5d5b-4d5c-9aeb-74102aa4becd" /> <br/> **After** <br/> <img width="1137" height="232" alt="image" src="https://github.com/user-attachments/assets/406b71a5-1dd8-4164-9d4e-4f0bca34c9e8" /> <img width="1125" height="235" alt="image" src="https://github.com/user-attachments/assets/fded3203-7d72-45ea-b5aa-142ebcd52136" /> opw-5487654 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#248142
This update ensures that timesheet entries are correctly removed when a time off request is deleted or cancelled. Previously, timesheets remained even after time off was removed, leading to inaccurate tracking. This fix resolves a duplication issue when a public holiday overlaps with a time off request.
Original PR description
BUG 1: ----------- **Steps to reproduce:** 1. Install Time Off and Timesheets with demo data. 2. Create a time off for an employee and approve it. 3. Check the related timesheet entry for that…
BUG 1: ----------- **Steps to reproduce:** 1. Install Time Off and Timesheets with demo data. 2. Create a time off for an employee and approve it. 3. Check the related timesheet entry for that employee. 4. Delete the approved time off. 5. Check the timesheet entries again. **Issue:** The timesheet entry remains even after the related time off record is deleted. **Cause:** Following commit 944c11e, admins can delete [approved time off ](https://github.com/odoo/odoo/blob/f6cf0d067e5f30e2b22ea513071cd7c5e3d9f44c/addons/hr_holidays/models/hr_leave.py#L956-L959)records. The relationship between the leave and the analytic line (timesheet) did not have a deletion policy defined. When the leave was [unlinked](https://github.com/odoo/odoo/blob/f6cf0d067e5f30e2b22ea513071cd7c5e3d9f44c/addons/hr_holidays/models/hr_leave.py#L961-L964), the analytic line remained without its parent reference. **Solution:** Explicitly remove related timesheet entries before deleting the leave record. BUG 2: ----------- Currently, refusing/cancelling a time off record can lead to orphan timesheets/duplicated hours (16h instead of 8h) if a public holiday exists on the same day. **Root cause:** The issue comes from this write method: https://github.com/odoo/odoo/blob/79ff1d63caed2c1058aa338947b9af90ebb6cd20/addons/project_timesheet_holidays/models/hr_leave.py#L128-L130 The method first unlinks the holiday_id from the timesheets and then attempts to delete them. However, once the holiday_id is set to False, the timesheets are no longer linked to the leave. As a result, leave.timesheet_ids becomes empty, and nothing is deleted. This leads to orphan timesheet records. When the leave is later refused or cancelled, a new public holiday timesheet entry is generated (if applicable), resulting in duplicated timesheet entries for the same day. **Steps to reproduce:** 1. Create a time off for one day and validate it (8h timesheet generated). 2. Create a public holiday for the same day. 3. Observe that leave duration becomes 0, but the timesheet remains. 4. Refuse or cancel the time off. 5. Observe two timesheet entries for the same day (16h total). opw-5384428 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#247155
This update resolves a validation error that occurred when creating invoices from POS orders with cash rounding enabled. The fix ensures that rounding logic is only applied when a cash payment method is used, preventing the "Missing required account" error for non-cash payments. This improves the reliability of invoice generation from POS.
Original PR description
## Issue before this commit: Creating an invoice from a POS order with **Cash Rounding enabled only for cash payment methods** raised an unexpected validation error: > *"The operation cannot be…
## Issue before this commit: Creating an invoice from a POS order with **Cash Rounding enabled only for cash payment methods** raised an unexpected validation error: > *"The operation cannot be completed: Missing required account on accountable line."* This happened when the order was paid using a **non-cash payment method**, but rounding logic was still applied. ## Steps to Reproduce: 1. Install the `point_of_sale` module. 2. Go to POS Configuration → Settings: * Enable **Cash Rounding** * Set a **Rounding Method** * Enable **Only on cash methods** 3. Create a product: * Sale Price: 260 * Tax: 6% 4. Open a POS session. 5. Add the product to an order. 6. Apply a discount (e.g., 1.123). 7. Pay using a **non-cash payment method** (journal not marked as cash). 8. Enable **Invoice** and validate the order *(or create the invoice later from the Orders menu)* ## Cause of the Issue: While `_prepare_invoice_vals` correctly avoids setting `invoice_cash_rounding_id` for non-cash payments, `_create_invoice` still executes rounding logic whenever cash rounding is enabled on the POS configuration. This leads to a mismatch where: * No rounding configuration is set on the invoice * Rounding logic still attempts to create/update rounding lines * Required accounts (profit/loss) cannot be determined * A validation error is raised due to missing account on the generated line ## With This Commit: The rounding logic in `_create_invoice` is now guarded by checking the presence of `invoice_cash_rounding_id`. This ensures rounding is only applied when properly configured and avoids unexpected validation errors for non-cash payment invoices. Steps To Reporduce: [Video Link](https://drive.google.com/file/d/10ticlUW5i5pbu_oDDPqR-jg0hVcNWf3Z/view?usp=sharing) opw-6005320 opw-5951991 opw-6036870 Forward-Port-Of: odoo/odoo#254844
This update fixes an issue where invoices were displaying the delivery date one day in the past. The root cause was a mismatch in data types when calculating the delivery date from the sales order. The fix ensures the invoice accurately reflects the delivery date based on the system's time zone, improving order accuracy for customers.
Original PR description
Currently when the user creates an invoice the delivery date is set incorrectly. <h2>Steps to produce:</h2> * Set system timezone to Asia/Kolkata and time to 5:00 * Install Sales, Inventory * Create…
Currently when the user creates an invoice the delivery date is set incorrectly. <h2>Steps to produce:</h2> * Set system timezone to Asia/Kolkata and time to 5:00 * Install Sales, Inventory * Create and confirm a sale order * Go to Delivery and Validate the delivery * Go back to the Sale order and create an invoice. <h2>Observed Behavior:</h2> The delivery date on the customer invoice is set to one day before the current date, even though the effective date for the delivery correctly reflects the system date and time. <h2>Root cause:</h2> This issue occurs because, when a delivery is validated, the `date_done` field is set using the current time in UTC at [1], because odoo operates in UTC by default. This value is then used to compute the effective date on the sales order at [2], which in turn is used to determine the delivery date on the invoice at [3] and [4]. Users see the effective date on the delivery in their own timezone because `Datetime` fields are converted from UTC to the user’s timezone on the client side as stated in [5]. However problem arises from a type mismatch. The delivery date field is of type `Date`, while the effective date is a `Datetime`. As a result, when the value is assigned at [3] or at [4], only the date portion is passed. Because a Date field does not carry any timezone information, no timezone conversion occurs, leading to the observed discrepancy. [1]- https://github.com/odoo/odoo/blob/ebb2b2ef02bbffeac4d11c1acdd7e6b4dc151bf9/addons/stock/models/stock_picking.py#L1274 [2]- https://github.com/odoo/odoo/blob/ebb2b2ef02bbffeac4d11c1acdd7e6b4dc151bf9/addons/sale_stock/models/sale_order.py#L87-L88 [3]- https://github.com/odoo/odoo/blob/ebb2b2ef02bbffeac4d11c1acdd7e6b4dc151bf9/addons/sale_stock/models/account_move.py#L122 [4]- https://github.com/odoo/odoo/blob/ebb2b2ef02bbffeac4d11c1acdd7e6b4dc151bf9/addons/sale_stock/models/sale_order.py#L301 [5]- https://github.com/odoo/odoo/blob/ebb2b2ef02bbffeac4d11c1acdd7e6b4dc151bf9/odoo/orm/fields_temporal.py#L214-L217 ## **Solution:** Using the `context_timestamp` function makes it possible to work with the `Datetime` in the client’s timezone, which can then be used to correctly assign the delivery date on the invoice. opw-5391189 Forward-Port-Of: odoo/odoo#247122
This update resolves an issue where a "This question requires an answer" alert incorrectly appeared on survey questions, even when it was the first time a user viewed them. With recent changes to how conditional survey questions are handled, this fix ensures the alert only displays when a question is part of the post-submit flow and was genuinely skipped by the user. This improves the survey experience for all users.
Original PR description
Purpose ======= Fix the "This question requires an answer" alert which is displayed under the question even if it's the first time the user sees it. Specification ============= Following…
Purpose ======= Fix the "This question requires an answer" alert which is displayed under the question even if it's the first time the user sees it. Specification ============= Following odoo/odoo#215237 conditional questions can now be displayed in the post-submit flow. The purpose was to give the user the chance to see and answer the conditional questions that are triggered by a mandatory question that was skipped. However the condition to display this error alert was only relying on the fact that the question was considered post-submit or not. But now that the post-submit questions also includes the conditional questions that are waiting for answer, this condition is not enough anymore. Making the condition more precise to be sure that the error is displayed only if the questions is considered post-submit AND it's already the post-submit flow or it's the pre-submit flow and the question was effectively skipped by the user. Task-6048598 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves a critical issue where a user's inbox could crash when accessing multiple companies. The problem stemmed from a permissions error preventing proper notification handling, specifically when a user viewed messages related to a partner in a different company. This fix ensures inbox stability and consistent access across all company environments.
Original PR description
### Issue: Due to this bug, user's inbox can crash and become inaccessible by another user. #### Steps to reproduce: 1- Create a db with two companies and sale installed with demo data. 2- Demo user should only have access to company A 3- Demo user preference should be handle in Odoo 4- Admin should access both companies 5- Create a partner called partner_b with company set to company B 6- Using admin create a SO in company B, with the partner_b 7- Send a message (not internal note) in SO chatter, and mention Demo user 8- Login using Demo user 9- Open discuss app. As you see the inbox is not accessible anymore. ### Cause: This is caused because Demo user doesn't have read access to partner_b. This cause issue in adding notification for partner_b. https://github.com/odoo/odoo/blob/6e262e8cf7666216305a04f92c213578452fd652/addons/mail/models/mail_message.py#L1042-L1064 opw-5089738 Forward-Port-Of: odoo/odoo#252298 Forward-Port-Of: odoo/odoo#232894
This update resolves an issue preventing invoices sent to partners in Åland Island (AX) from being properly transmitted via Peppol. Previously, invoices were generated and attached but not sent or displayed in the chatter. Now, invoices will be correctly sent and appear in the chatter, enabling companies in Åland Island to utilize Peppol.
Original PR description
Before this commit, invoice to a partner in Åland Island can't be sent via Peppol. XML and PDF are generated, linked to the account.move, but are not sent and don't appear in the chatter. Steps to reproduce: - Create a partner in Åland Island - Create an invoice - Send to Peppol Current behavior: - Invoice is not sent, appear in the attachment, but doesn't appear in the chatter. Expected behavior: - invoice is sent and attachments are in the chatter This also allow activating Peppol for companies in Åland Island. Ticket [link](https://www.odoo.com/odoo/project.task/5949439) opw-5949439 Forward-Port-Of: odoo/odoo#251943
This update resolves an issue where removed fields from the website contact form were still appearing in the associated project tasks. The change ensures that unset task data is no longer displayed, improving the clarity and consistency of project task information. This was caused by a recent update to how partner data is added to task descriptions.
Original PR description
# How to reproduce - Add a contact form to your website - Make it so the contact form creates a task on submit - Remove some field from the contact form, but no the email (ex: Phone) - Fill in the contact form; the email must be from one of the existing partners - Submit the form and go look at the task in the project application # The problem The fields removed from the form are still present in the task's description (ex: partner_phone: False) # Why This commit (https://github.com/odoo/odoo/commit/7d0660e034f3be1b92869c266dc2cfb0bc6b6941) changed the way the partner's data was added to the description. When adding that data, it does not check if it exists before hand and instead adds a default value if not found. opw-5920816 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#252848
This update addresses a confusing issue where exporting XML from bills resulted in incorrect customer and supplier information. Previously, the 'Export XML' button was incorrectly used for non-imported bills, leading to data errors. Now, the button is hidden for non-self-bill bills to prevent customer confusion and ensure data accuracy.
Original PR description
Problem --------- Currently, in the bills list view, when you select bills > Print > Export XML; not-imported bills gets their customer and supplier party inverted. This is because the XML export of those trigger the XML computation which is not designed for bills but only for invoices or self-bills. For imported bills (coming from Peppols for example), we re-use the imported XML. Since XML export of created bills is not supported anymore. The button leaves customers confused as to why their partner are inverted in the XML. Solution --------- Don't show the "Export XML" if one or more move are selected for the import and don't compute the XML for bills that are not self-bills. no-task --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#255289
This update fixes a technical error that prevented users from sharing course content hosted externally (like Google Drive). The issue stemmed from a browser security restriction (Same-Origin Policy) when accessing the content within a slide's iframe. This change ensures seamless sharing functionality for all course content.
Original PR description
Step to reproduce: 1. Install `website_slides` 2. Open any course and add content 3. Select the `Document` type and upload a Google Drive link 4. Save and publish the content 5. Click the "Share" button for this specific content in full screen Issue: - A traceback occurs: `Uncaught Javascript Error > Failed to read a named property 'document' from 'Window': Blocked a frame with origin "http://localhost:3000" from accessing a cross-origin frame.` Cause: - The `_onClickShareSlide` method attempts to calculate the `documentMaxPage` by accessing the internal DOM of the slide's iframe (`iframe.contentWindow.document`). When the content is hosted externally the iframe source is cross-origin. Browsers enforce the Same-Origin Policy. Solution: - Check the origin of the iframe's source URL before attempting to get max page. opw-5422655 Forward-Port-Of: odoo/odoo#250679 Forward-Port-Of: odoo/odoo#241090
This update ensures that DDT (Documento di Trasporto per Dati) information is displayed correctly for dropship orders in Italy. Previously, this information was missing, which caused confusion. The fix addresses a technical issue related to how the system identifies and displays relevant data for different order types.
Original PR description
Steps to reproduce the bug: - Create a company with country = Italy and select it - Install the module “l10n_it_stock_ddt” - Activate “Dropshipping” in the inventory settings - Create a delivery → the group "DDT Information" is visible - Create a dropship → the group "DDT Information" is not visible Problem: The DDT information should also be visible for dropship operations. The compute used for “l10n_it_show_print_ddt_button” correctly takes dropship operations into account, but it cannot be reused to control the visibility of the DDT Information group because this compute is True only when the picking state is done and locked: https://github.com/odoo/odoo/blob/e6d4ab62e950c8b88ac54fecbf2682cba846c7c3/addons/l10n_it_stock_ddt/models/stock_picking.py#L34-L35 opw-5190251 Forward-Port-Of: odoo/odoo#254986
This update resolves a bug where invoice cancellations triggered by TicketBAI would block Odoo, leading to data inconsistencies. The fix checks for a security hash before sending invoices to TicketBAI, preventing Odoo from attempting to reset protected invoices. This ensures invoices can be correctly processed and avoids database lockups.
Original PR description
Before this commit, if the user configured the sales journal to be locked by a hash, then a cancellation in ticketbai would 1/ send the cancel request to ticketBAI. This would be processed…
Before this commit, if the user configured the sales journal to be locked by a hash, then a cancellation in ticketbai would 1/ send the cancel request to ticketBAI. This would be processed successfully 2/ try to reset the invoice to draft inside of Odoo, then cancel it. This would fail with an error since account moves protected by a hash cannot be reset to draft. The result is a blocked database where the invoice cannot be altered in Odoo while its status doesn't match the status in ticketBAI. In this commit, we propose to check for the secure hash before sending the invoice over to ticketBAI. The invoice is not altered yet at that stage to account for potential ticketBAI errors in the normal flow. While this option is not great from a usability perspective (preventing secure hashes with ticketBAI is probably best), we believe the current solution offers the best compromise in the context of a bugfix. The issue does not seem to be reproducible outside of production as the core of the problem is a mismatch in state between ticketBAIand Odoo. opw-5912848 Forward-Port-Of: odoo/odoo#250886
This update resolves an error that occurred when updating inventory valuations after returning a delivery, specifically when the original delivery's quantity was set to zero. The fix ensures that return moves with a zero quantity are properly valued at zero, preventing a calculation error. This improves the accuracy of inventory valuation reports.
Original PR description
An error is raised when we try to acces the inventory valuation if a move has been returned and the quantity set on the original move is changed to 0 Steps to reproduce: 1. Install Accounting and…
An error is raised when we try to acces the inventory valuation if a move has been returned and the quantity set on the original move is changed to 0 Steps to reproduce: 1. Install Accounting and Inventory 2. Create a product called "Product" and set the Category to "Goods" 3. Go to Inventory > Configuration > Categories, open category "Goods" and change the costing method to "Average Cost (AVCO)" 4. Go to Inventory > Operations > Deliveries and create a new delivery for any customer with one of product "Product" 5. Validate the delivery, click on "Return" then on "Return All" 6. Validate the return 7. Go back to the original delivery and in Actions, click on "Lock/Unlock" 8. Set the quantity to 0 and save 9. Go to Accounting > Review > Inventory valuation 10. Change the day to any day after today 11. An error is raised Issue: Trying to get the inventory valuation at another day then today will replay the history https://github.com/odoo/odoo/blob/88df50bc96448dfaff28bd37e970ffd18bf8d554/addons/stock_account/models/product.py#L444-L450 Which will call `_get_value()` on the moves related to the product https://github.com/odoo/odoo/blob/88df50bc96448dfaff28bd37e970ffd18bf8d554/addons/stock_account/models/stock_move.py#L388-L391 A ZeroDivisionError will then be raised when trying to get the value of a return move and the original move's quantity is 0 https://github.com/odoo/odoo/blob/873d4d262ed3e85362aa677b5a782d6e7fa00f09/addons/stock_account/models/stock_move.py#L457 Solution: If the original move's quantity is 0, set the value to 0 This ensures the move is valued at 0 if the move has no quantity. In other words, a move that has no quantity shouldn't be considered to have any value as there really is nothing to value. opw-5980600 Forward-Port-Of: odoo/odoo#253392
This update resolves an issue where the filmstrip on the shop page had inconsistent heights when images were missing. The fix ensures a consistent display across all designs, regardless of image presence, and introduces a placeholder image for empty filmstrips. This improves the overall visual appearance and user experience.
Original PR description
This commit fixes two issues regarding the filmstrip in the /shop page : - Adding a minimum height to the elements of the `default` and `bordered` designs, so that their heights remain consistent whether they contain an image or not. - Display a placeholder image for the `images` filmstrip if empty. task-5491550 | Before | After | |--------|--------| | <img width="613" height="103" alt="image" src="https://github.com/user-attachments/assets/852ef2ce-6265-4622-9e30-4e8112bbf264" /> | <img width="618" height="114" alt="image" src="https://github.com/user-attachments/assets/0933c0c2-a669-4236-9148-a25226214ce6" /> | | <img width="718" height="164" alt="image" src="https://github.com/user-attachments/assets/ac1b8d91-44fa-4ce0-8ddb-beba271a2423" /> | <img width="718" height="164" alt="image" src="https://github.com/user-attachments/assets/8676e9f9-074b-40e9-a75b-76561437c081" /> | --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update fixes an issue where product names in the website catalog's table of contents were overflowing when many products were displayed. The change updates the product snippet template to use `h6` tags instead of `h2` tags for product titles, ensuring proper recognition by the table of contents plugin. This improves the overall presentation and usability of product listings.
Original PR description
# How to reproduce - Have atleast one product published on the website. The more products published, the more noticable the issue is - Edit the website - Add a table block to a page (Search for table…
# How to reproduce
- Have atleast one product published on the website. The more products published, the more noticable the issue is
- Edit the website
- Add a table block to a page (Search for table in the "Insert block" popup and pick the first one)
- Add a catalog block to the table. This catalog block needs to be the one with the title "Our latest content".
- Add any other block in the table block to update the table of content
# The problem
The table of contents display the names of the different products. If there are a lot of products, it fills the whole table of content
# Why
The TableOfContentPlugin scans for ```<h2>``` tags to use them in the table of content.
```js
updateTableOfContentNavbar(tableOfContentMain) {
const tableOfContent = tableOfContentMain.closest(".s_table_of_content");
const tableOfContentNavbar = tableOfContent.querySelector(".s_table_of_content_navbar");
const currentNavbarItems = [...tableOfContentNavbar.children].map((el) => ({
title: el.textContent,
href: el.getAttribute("href"),
}));
if (tableOfContentMain.children.length === 0) {
// Remove the table of content if empty content.
this.dependencies.remove.removeElement(tableOfContent);
return;
}
const targetedElements = "h1, h2";
const currentHeadingItems = [...tableOfContentMain.querySelectorAll(targetedElements)]
.filter((el) => !el.closest(".o_snippet_desktop_invisible"))
.map((el) => ({ title: el.textContent, id: `#${el.id}`, el }));
```
The product snippet template uses ```<h2>``` for their product title dispite having the h6 CSS class.
Note that the reason you need to add another block to the table to see the issue is that the table of content is updated before the products are loaded in the catalog.
opw-5992937
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#253002This update fixes an issue where mass email campaigns were failing due to inconsistencies in email date information. The fix adds a default date to emails lacking a date or create_date, ensuring reliable sorting and preventing errors during email processing. This improves the stability and performance of our email sending functionality.
Original PR description
Background: In odoo.com, due to some migration scripts, there are messages without neither a date nor create_date Issue: When sending mass emails to applicants, when determining the parent email, emails are sorted using their date, but since some emails have a date and some don't, comparing them results in an exception (comparing datetime with bool). Fix: Add datetime.min as a fallback for the email's date if neither date nor create_date are set. Task-6041584 Forward-Port-Of: odoo/odoo#254372
This update optimizes how Odoo calculates inventory values, specifically for large warehouses with many locations. By directly using valued locations instead of redundant expansion, the process is significantly faster. This change reduces the time it takes to generate inventory valuation reports, improving overall system performance.
Original PR description
To compute the inventory valuation report, stock_account builds a valuation context through `_with_valuation_context()` and passes the valued internal/transit locations to stock quantity computation.…
To compute the inventory valuation report, stock_account builds a valuation context through `_with_valuation_context()` and passes the valued internal/transit locations to stock quantity computation. Without `strict=True`, stock quantity domains treat these locations as hierarchical anchors and expand them again through the location tree. This is redundant in this specific call site because `_with_valuation_context()` already provides the valued locations to filter on. On databases with a large location tree, this extra expansion makes the inventory valuation load much slower than necessary. Using `strict=True` makes quantity computation use the provided valued locations directly. ### Benchmark: - active products: 5912 - stock moves: ~785k - internal locations: 4213 | Before | After | |---------|--------| | 99.285s | 1.853s | opw-5944584 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#253656
This update fixes a bug that caused Odoo to crash when adding products to a list field while in edit mode. Specifically, the issue occurred when a user pressed a key while adding a product, leading to an error. This change ensures a more stable and reliable user experience when managing product lists.
Original PR description
When a record is in edit mode in an x2many list and the user presses a key while clicking "Add a product", onCellKeydownEditMode is called with record=null while editedRecord is set, causing a TypeError on record.dirty. Steps to reproduce: 1. Create a Sales Order 2. Click "Add a product" 3. While pressing the right arrow key, click "Add a product" again opw-6032870 Forward-Port-Of: odoo/odoo#254881
This update enhances the user experience by adding zoom functionality to product images within the Product, Expenses, and Point of Sale modules. Previously, users couldn't easily inspect smaller details of products. This change provides a more detailed and intuitive view for product selection and presentation.
Original PR description
This PR enables the zoom feature for product images across the **Product**, **Expenses**, and **Point of Sale** modules. Currently, some product views display images without the zoom capability. This makes it difficult for users to inspect smaller details of a product. Enabling the `zoom` option on the `image_1920` widget provides a more consistent UI. ### **Changes** Added zoom to the following modules: **hr_expense** (product variant), **point_of_sale** (product view), and **product** (template and variant views). **Task ID: 6003499**
This update fixes a bug where users could confirm empty `TextInputPopup` fields, impacting key processes like adding floors and generating gift cards. Now, the confirm button is disabled if the input is blank or contains only spaces, ensuring data integrity and preventing incorrect actions.
Original PR description
*= point_of_sale, pos_loyalty, pos_restaurant Before this commit: =================== - User was able to confirm `TextInputPopup` with an empty input value. Affected functionalities: - Add New Floor - Rename Floor / Table - Enter Code (Gift card or Discount code) - Generate a Gift Card After this commit: ================== - The confirm button will be disabled if the input value is empty or has only spaces so that an empty string will not be accepted. Task-6019160 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#255354 Forward-Port-Of: odoo/odoo#253307
This update fixes a validation issue related to ZATCA XML generation in Saudi Arabia. Previously, invoice cash rounding wasn't included in the payable amount calculation, causing validation errors. The change ensures the rounding amount is correctly added, resolving the validation mismatch and ensuring accurate invoice processing.
Original PR description
Currently the generated ZATCA XML is not accounting for invoice cash rounding, leading to an invoice validation issue due to a mismatch in the calculation of PayableAmount. Steps to reproduce: - Have a SA Company setup - Create a [cash rounding] with strategy 'Add invoice line' and rounding 1.00 (UP) - Create an invoice for 99.55 + 15% Tax - Set Cash Rounding Method to [cash rounding] - Confirm and send xml for validation Issue: Validation will issue the following warning `[202] BR-CO-16 : Amount due for payment (BT-115) = Invoice total amount with VAT (BT-112) -Pre-Paid amount (BT-113) + Rounding amount (BT-114).` Analysis: The ZATCA implementation was calculating the payable amount strictly as (TaxInclusiveAmount - PrepaidAmount). This change ensures the rounding amount is fetched and added to the total payable calculation opw-5939550 Forward-Port-Of: odoo/odoo#255178 Forward-Port-Of: odoo/odoo#253555
This update resolves a test failure (runbot error 242012) related to product imports. The change ensures tests are no longer reliant on demo data, improving their reliability and preventing disruptions to the product import process. This enhances the stability of the product management features.
Original PR description
runbot error: 242012 (lasted error in `Post install tests for pos_restaurant -> !sale`: resolved)
This update resolves an issue where a 'false' value for the TOTP secret caused the feature to be disabled. The change ensures that an empty string is used when TOTP is not enabled, improving the system's reliability and preventing unexpected behavior. This update focuses on a technical detail to ensure proper functionality.
Original PR description
Empty strings in secret mean that totp is not enabled. Remove support for the totp_secret = 'false'. If we don't have a secret, it should be empty (null or ''). --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update prevents incorrect cash rounding adjustments when POS orders are consolidated into invoices. Previously, the system would create rounding lines even with non-cash payment methods, leading to errors. This fix ensures rounding adjustments only occur with actual cash payments, improving invoice accuracy.
Original PR description
When consolidating POS orders into a single invoice, the cash rounding adjustment logic was triggered whenever cash rounding was enabled on the POS configuration, even if the payment methods were not cash.
In scenarios where only non-cash payment methods (card or customer account) were used, 'invoice.invoice_cash_rounding_id' could legitimately be unset as 'only_round_cash_method' is enabled. However, the rounding adjustment code still attempted to create a rounding line using accounts from this field.
This resulted in a NULL `account_id` on a rounding line ("Missing required account on accountable line")
This fix ensures that the rounding adjustment logic only executes when there is cash payment (meaning that 'invoice_cash_rounding_id' exsists).
Related to opw-5969706
Forward-Port-Of: odoo/odoo#251862This update fixes an issue where component products weren't being correctly consumed during production runs. The change ensures that consumed quantities are accurately tracked and a warning message appears when attempting to produce without proper lot/serial number information. This prevents errors and ensures accurate inventory management.
Original PR description
# Product Configuration *Manufactured Product* - Storable - Tracked by Quantity - Manufacture Route - Has a BOM with atleast 1 component *Component Product* - Storable - Tracked By Lot # How to…
# Product Configuration
*Manufactured Product*
- Storable
- Tracked by Quantity
- Manufacture Route
- Has a BOM with atleast 1 component
*Component Product*
- Storable
- Tracked By Lot
# How to reproduce
- Ensure there is available stock for the component product in a lot
- Create a MO for the Manufatured Product
- Confirm the MO
- Click "Details" on the component product
- Remove the reserved quant and add a new one
- Increase the quantity of this new quant to more than "To Consume"
- Save
- Observe that "Consumed" = The quantity you just set on the quant
- Click on "Produce All"
# The issue
- The Consumed quantity is reset to the "To Consume" quantity.
- Furthermore, a warning popup should be displayed when clicking on "Produce All" but there is none.
- Finally, depending on the version you may get this error message : "You need to supply Lot/Serial Number for products and 'consume' them: - Component Product" even though a lot is already assigned
# Why
All these issues stem from the fact that move_raw_ids.picked from mrp.production is set to False instead of True.
This issue was introduced by this commit (https://github.com/odoo/odoo/commit/ef592464983d66ac76bc71a9886462f1f47dc28d) that changed the way the picked value is set.
In write(self, vals) de stock_move, we have :
```py
if self.env.context.get('force_manual_consumption') and 'quantity' in vals:
moves_to_update = self.filtered(lambda move: move.product_uom_qty != vals['quantity'])
if moves_to_update:
moves_to_update.write({'manual_consumption': True, 'picked': True})
```
Followed a bit later by :
```py
res = super().write(vals)
```
This usually works fine except when vals contains edition commands for move_line_ids. Then, the first write will correclty set picked to True, but then picked will be reevaluted after the second write with :
```py
@api.depends('move_line_ids.picked', 'state')
def _compute_picked(self):
for move in self:
if move.state == 'done' or any(ml.picked for ml in move.move_line_ids):
move.picked = True
else:
move.picked = False
```
If all the resulting move_line_ids from the commands edition have picked set to False, then move.picked will also be set to False.
opw-5937171
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#253607This update corrects a bug where presence status information wasn't updating correctly after changes to related records like holiday schedules. The fix ensures that status updates are immediately reflected, preventing outdated information from being displayed to users. This improves the reliability of presence indicators.
Original PR description
After sending a presence notification, `_send_status_updated_notification` leaves `im_status` cached on the user/guest record. If a related model that affects `im_status` (such as `hr.leave`) is modified afterwards in the same transaction, the ORM has no declared dependency on it and will not invalidate the cache. Subsequent reads then return the stale value. breaking PR: https://github.com/odoo/odoo/pull/249314 runbot-242076 Forward-Port-Of: odoo/odoo#255361
This update fixes an issue where stock valuation reports incorrectly displayed inventory values after a product was marked as trackable. Previously, the system didn't automatically adjust inventory levels when tracking was enabled. This change ensures accurate stock valuation reporting, reflecting the true value of inventory for trackable products.
Original PR description
### Steps to reproduce: - Create a product that is not track inventory (`is_storable = False`) - Set its cost to 50$ and put it in an avco perpetual valuation category - Create and receive a purchase…
### Steps to reproduce: - Create a product that is not track inventory (`is_storable = False`) - Set its cost to 50$ and put it in an avco perpetual valuation category - Create and receive a purchase order for 10 units - Set the product as track inventory (`is_storable = True`) - Inventory > Reporting > Stock - Click on the `unit cost` of your product line #### > This opens the `stock.avco.report` according to which the total value of your stock is 500$ and the total quantity is 10 units even though do not have any unit in stock. ### Expected behavior: The line of the receipt should have been counter balanced by an inventory adjustment line to resets the valuation at the same time as the product has been set to `is_storable` ### Cause of the issue: There is currently no mechanism to counter balance the stock that should have been present in internal locations if the moves done had been processed with a storable product. opw-5472902 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#254380
This update resolves an issue where notification reminders would fail when attendees had access to companies not visible to the event organizer. The fix ensures that attendee company access is properly checked, allowing reminders to function correctly regardless of the organizer's company permissions. This improves the reliability of event invitations and notifications.
Original PR description
[FIX] calendar: use sudo for attendee company access in notifications Invitations with notification reminders fail if the attendee has access to companies hidden from the organizer. ### Reproduction Steps 1. User A (Company 1) invites User B (Company 1 & 2). 2. Add a "Notification" reminder. 3. Saving the event raises an AccessError on res.company. ### Cause When preparing notifications, the attendee's company list is fetched while still in the organizer's environment. The `res.company` record rule restricts visible companies to the organizer's own, so the attendee's extra companies are blocked. Since 9a21edd99e7f, `Many2many.read()` uses `_search()` without `bypass_access`, which explicitly checks read access and raises `AccessError` instead of silently filtering at the SQL level. opw-5916536 Forward-Port-Of: odoo/odoo#253679
This update resolves a memory issue that could occur when generating the inventory valuation report for companies with many products and extensive stock movement history. By processing inventory calculations in smaller batches, the system now uses significantly less memory and avoids crashes, leading to faster report generation.
Original PR description
Related Ticket: https://www.odoo.com/odoo/project/49/tasks/5416006 Issue: If a database has products that use the average cost method, and those products have millions of stock moves, a memory error…
Related Ticket: https://www.odoo.com/odoo/project/49/tasks/5416006 Issue: If a database has products that use the average cost method, and those products have millions of stock moves, a memory error can occur when the inventory valuation report is opened. Explanation: When the inventory valuation report is opened, the `_run_average_batch` method is invoked on batches of up to 1000 AVCO products at a time. Previously, all matching stock moves for those products were fetched in a single query and kept in cache for the duration of the computation. For large databases, even a single invocation of `_run_average_batch` can exhaust available memory if the products involved have enough stock moves. Solution: Moves are now fetched and processed in batches of 50,000 records, with the cache for `stock.move` and `stock.move.line` invalidated between each batch. For memory: | # Input data | Before PR | After PR | |:-------------:|:----------:|:---------:| | 100 products with 61,024 moves | 280 MB | 274 MB | | 500 products with 535,250 moves | 983 MB | 301 MB | | 500 products with 912,405 moves | 1.7 GB | 337 MB | | 1000 products with 1,447,655 moves | Mem error | 393 MB | For speed (in m:ss): | # Input data | Before PR | After PR | |:-------------:|:----------:|:---------:| | 100 products with 61,024 moves | 0:15 | 0:16 | | 500 products with 535,250 moves | 1:12 | 1:17 | | 500 products with 912,405 moves | 2:02 | 2:10 | | 1000 products with 1,447,655 moves | N/A | 3:53 | opw-5416006 Co-authored by Cooper Spinelli (spco) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#250526
This update resolves an issue where custom snippets created from dynamic content (like events or sales) wouldn't display the dynamic data in the preview. The fix ensures that dynamic content is correctly reflected in the preview iframe, improving the user experience when building and testing website content.
Original PR description
*: website_blog, website_event, website_sale The interaction for filling the dynamic content of dynamic snippets did not run inside the iframe to preview the snippet to add. This is not an issue for…
*: website_blog, website_event, website_sale The interaction for filling the dynamic content of dynamic snippets did not run inside the iframe to preview the snippet to add. This is not an issue for the initial dynamic snippet, as they are filled with fake content. But when saving a custom snippet, the dynamic content is cleared, and they seem empty when previewed. This is the case since the [website builder refactor] as the previous builder re-used the preview of the initial snippet. This commit adds the interaction to fill dynamic content in the preview iframe, and changes the interaction to avoid emptying the fake content from initial dynamic snippets during preview. Steps to reproduce: - Open website builder - Add a dynamic snippet (for example "Events") - Save the snippet as a custom snippet - Click on "Custom" snippet category - Bug: The preview for the custom snippet does not have the dynamic part (there is no event, just the title) [website builder refactor]: 9fe45e2b7ddbbfd0445ffe25a859e67a316d02b2 task-5427353 Forward-Port-Of: odoo/odoo#253985 Forward-Port-Of: odoo/odoo#246328
This update fixes an issue where users couldn't properly filter records based on date and time properties within the CRM. The update now correctly recognizes and handles these property fields, ensuring accurate filtering capabilities. This enhancement improves the usability of the CRM for managing time-sensitive data.
Original PR description
Steps: - Install crm - Add a propertie field date type - try to filter with this field - Invalid domain Currently tree_editor does not take into account if a path is a property field or not, with this commit there is a new `is_property` attribut in node opw-5906605 Forward-Port-Of: odoo/odoo#250350
This update resolves an issue where creating a project from a template without a company would trigger a 'company inconsistencies' error. The fix ensures that the customer's company information is correctly applied when a project is created from a template, allowing for more flexible project setup. This improves usability for users managing projects with diverse customer relationships.
Original PR description
### Issue: Creating a project from a template that has no company with a customer who has one results in a "company inconsistencies" error. ### Steps to reproduce: - Install `hr_timesheet` and `project` - Convert a project with no companies and the option "Timesheets" ticked, to a template - Create a new project using the template - In the wizard, input a name and select a customer with a company - Click "Create Project" - An error pops up ### Cause: `hr_timesheet` overrides the `create()` of `project.project` to create an `account.analytic.account` if the project allows timesheet and none is given. During the creation of the analytic account, as the field `partner_id` is `check_company=True`, the error is raised in `_check_company()`. ### Solution: We set the company of the customer on the generated project before building the `analytic_accounts_vals` list. opw-5931994 Forward-Port-Of: odoo/odoo#250150
A bug in the Odoo testing framework was causing freezes due to an infinite loop. This was resolved by switching from an array to a set data structure, preventing the framework from repeatedly visiting the same child nodes and exhausting resources. This ensures stable testing and prevents disruptions to the Odoo system.
Original PR description
Problem: Triggering the `child_of` operator in the testing framework caused an infinite loop that froze Odoo. This occurred because the framework attempted to fetch all children of the root operand without accounting for already visited nodes, resulting in children being added indefinitely. Solution: Switched from using an `array` to `set` to prevent duplicate traversal. Task-6023290 Forward-Port-Of: odoo/odoo#255419 Forward-Port-Of: odoo/odoo#254857