Daily updates from Odoo
Thursday, June 11, 2026
45 changes · saas-19.2
Resolved issues and error corrections
This fix resolves an issue where generating the general ledger report with many batched invoices caused wkhtmltopdf to fail due to excessive file descriptor usage. By limiting the length of the invoice reference display name, we prevent the report from becoming overly large and ensure reliable PDF generation.
Original PR description
The display name of the account.report.line in the general ledger report has the format of: INVOICE NAME (invoice refs) In the case where a client has hundreds of sales orders batched to a single…
The display name of the account.report.line in the general ledger report has the format of: INVOICE NAME (invoice refs) In the case where a client has hundreds of sales orders batched to a single invoice, the ref can become extremely long, e.g.: INV/2026/00001 (S12123, S12152, S12159, S12140, S12165, S12161, S12162, S12110, S12099, S12124, S12145, S12128, S12114, S12131, S12097, S12185, S12154, S12133, S12190, S12118, S12116, S12102, S12155, S12153, S12158, S12150, S12100, S12142, S12121, S12122, S12111, S12187, S12172, S12177, S12095, S12117, S12144, S12137, S12092, S12138, S12186, S12182, S12112, S12148, S12183, S12101, S12178, S12119, S12169, S12115, S12146, S12093, S12126, S12160, S12163, S12129, S12098, S12151, S12096, S12174, S12120, S12130, S12147, S12180, S12191, S12164, S12141, S12105, S12136, S12139, S12109, S12106, S12104, S12103, S12175, S12179, S12188, S12113, S12173, S12167, S12171, S12134, S12094, S12184, S12166, S12170, S12125, S12135, S12143, S12176, S12189, S12156, S12181, S12107, S12157, S12132, S12149, S12127, S12108, S12168...) Because the length of the account.report.line is unchecked in account_general_ledger.py label builder, the pdf can clog to one or two account.report.lines per page, skyrocketing the pdf page length. As wkhtmltopdf processes the report from html to pdf it makes a system call openat() to the /tmp/report.footer.tmp.x.html file for EACH page of the pdf. You can see the TODO comment in the spoolTo function in wkhtmltopdf (both in Odoo and the original repo) saying that the header and footer need to be freed, on each page processing, not just null pointed. https://github.com/odoo/wkhtmltopdf/blob/2c884bd1545b8a639847de22f24754ee5a6fc44c/src/lib/pdfconverter.cc#L794 I verified that that the number of openat calls to the /tmp/report.footer.tmp.x.html file equals the exact number of pages in the pdf to be generated if the report HAD generated successfully by setting the footer input into _run_wkhtmltopdf to None, generating the report without footers, then separately running an strace on wkhtmltopdf when the report fails to generate. See related ticket linked at bottom. The linux machine used on sh instances has a ulimit -n of 1024 file descriptors. Because the footer file descriptors accumulate, once a pdf has about 1010+ pages (~a dozen fd's are allocated for other purposes), over 1024 file descriptors are opened and the system fails with: Wkhtmltopdf failed (error code: -6). Message: QEventDispatcherUNIXPrivate(): Unable to create thread pipe: Too many open files QEventDispatcherUNIXPrivate(): Can not continue without a thread pipe Since wkhtmltopdf is archived and Odoo has a replacement in development, I suggest that we limit the display_name of the account.report.line to 200 to keep the bloat minimized, preventing one account.report.line's name from taking up an entire page of the general ledger pdf. This allows many more batched invoices to be shown in the report and a much greater time range of data to be printed without hitting the fd limit. I suggest changing it at the general ledger report level rather than in the account.move.line _compute_display_name function, as we probably still want to see the full display_names at the invoice level. On runbot, the machine has different memory constraints than on sh / local, so it hits the following error before the one above: Wkhtmltopdf failed (error code: -11). Memory limit too low or maximum file number of subprocess reached. Message : Steps to Reproduce on 19.0 newdb: 1. newdb -n test_gl -v 19.0 2. ensure ulimit is set to 1024 in shell that runs odoo instance by running ulimit -n 1024 to mimic ulimit of sh environment 3. run db with python3 odoo-bin, ensuring high enough memory constraints to simulate multi worker sh instance, i.e. --limit-memory-soft=12884901888 --limit-memory-hard=1288490188 4. install sales, accounting, stock 5. install demo data 6. create invoices with 100+ associated sales orders 7. generate the pdf 8. Increase the amount of invoices till the general ledger page count hits ~1010+, where you will hit the error. Notes: opw-ticket-6201508 closes #118067 Forward-Port-Of: odoo/enterprise#118067
This update fixes an issue where the strikethrough price on the product configurator wasn't updating correctly when the unit of measure was changed. The fix ensures the system uses the selected UOM for price calculations, providing accurate pricing information for customers. This improves the user experience and prevents pricing discrepancies.
Original PR description
Steps to produce: --- - Install `website_sale` module. - Enable ` Units of Measure & Packagings `and `Comparison Price` features from settings. - Create product > set sales price as 5 and Compare to…
Steps to produce: --- - Install `website_sale` module. - Enable ` Units of Measure & Packagings `and `Comparison Price` features from settings. - Create product > set sales price as 5 and Compare to Price as 12. - From the sales tab, under Upsell & Cross-Sell > set Packagings as pack of 6. - Go to the shop page on eCommerce, and add your product via the shop page (this should open the product configurator). - Change the UOM from the radio. Issue: --- - Changing the UOM doesn't change the strikethrough price. Root cause: --- - At [1], The `_get_strikethrough_price` method was not receiving the selected uom parameter, causing it to compute the compare_list_price based on the product's base uom instead of the user-selected uom. Solution: --- - Pass `uom` parameter from `_get_basic_product_information` to `_get_strikethrough_price` - Apply uom conversion to compare_list_price when the selected uom differs from the product's base uom. - Also fix pricelist base price calculation to use the selected uom. - Update the JS logic to refresh the strikethrough price when the uom changes. [1]https://github.com/odoo/odoo/blob/bfcb22256226ae056e934e2f9e498e8cea4d2f63/addons/website_sale/controllers/product_configurator.py#L101-L154 Before: --- <img width="974" height="321" alt="image" src="https://github.com/user-attachments/assets/f360d730-bedf-4898-ba22-c47ea8fa1df7" /> After: --- <img width="977" height="321" alt="image" src="https://github.com/user-attachments/assets/79d66143-959c-4f39-9272-437cb768837e" /> opw-6201754 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#263556
This update ensures that Quality Checks and Mass Produce options remain accessible on the Shop Floor, regardless of whether production is automatically closed. Previously, disabling auto-close production hid these critical features, preventing users from completing quality checks and generating serial numbers. This change improves workflow efficiency and data accuracy.
Original PR description
### *Why this commit*: --- Ensures Quality Checks and Mass Produce options remain available on the Shop Floor regardless of the "Auto-close Production" setting. ### *Steps to Reproduce* --- 1. Define…
### *Why this commit*: --- Ensures Quality Checks and Mass Produce options remain available on the Shop Floor regardless of the "Auto-close Production" setting. ### *Steps to Reproduce* --- 1. Define a product tracked by Serial Numbers with a Manufacturing BoM. 2. Create a Quality Control Point for the product on the Manufacturing operation. 3. In Inventory Configuration, disable "Auto-close Production" on the Manufacturing operation type. 4. Create a Manufacturing Order (MO) and open it in the Shop Floor view. 5. If the MO has no operations, try to use Mass Produce. ### *Before this PR* --- When auto_close_production was set to False, the Shop Floor card footer incorrectly hid both the Quality Checks and Mass Produce buttons. This blocked users from registering Serial Numbers and completing mandatory quality check steps. Additionally, for products without BoM operations, clicking Mass Produce triggered quality check validation instead leading to errors, preventing the generation of serial numbers. ### *After this PR* --- The visibility logic for Shop Floor actions is now decoupled from the closing permission. The workflow follows this corrected sequence: Mass Produce: Stays visible to allow serial registration and backorder creation even if the MO cannot be closed from the Shop Floor. Quality Checks: Remain accessible to ensure all mandatory tests are passed before production progresses. Close Production: Only appears if "Auto-close Production" is enabled on the operation type. OPW: 5473839 Forward-Port-Of: odoo/enterprise#117829 Forward-Port-Of: odoo/enterprise#103926
This update ensures Odoo's financial reports (GSTR-3B and GSTR-2B) accurately reflect new requirements for purchase composition supplies as mandated by Indian tax regulations. The changes align the report formats with government guidelines, improving data accuracy and compliance.
Original PR description
As a new GSTR section for purchase composition supplies has been introduced, the related report domains also need to be updated accordingly. With this commit: GSTR-3B domains are updated to properly include purchase_composition_supplies transactions in the relevant report section. GSTR-2B now includes a separate line for composition supplies, aligned with the government utility format. task-6239870 Forward-Port-Of: odoo/enterprise#118312
This update corrects a bug in the journal report where multi-country tax grids displayed incorrectly, causing countries to disappear when more than two were selected. The fix ensures accurate column spanning and proper display of all selected countries, improving the accuracy of financial reporting.
Original PR description
When more than 2 country are used in the taxes, the colspan of the header is wrong. When more than 2 country are used in tax grids, the country isn't displayed anymore. Forward-Port-Of: odoo/enterprise#120032 Forward-Port-Of: odoo/enterprise#119348
This update fixes an issue where automation rules couldn't correctly assign users to newly created activities when using complex user field paths. The change allows for dynamic user assignment, ensuring activities are properly linked to the intended users within your contacts. This enhancement improves the reliability of automation workflows.
Original PR description
Steps to reproduce: ------------------------------------ 1. Install `ai` and `contacts` modules 2. Create an automation rule on Contact model: * Trigger: On Creation * Action To Do: Execute AI Action…
Steps to reproduce:
------------------------------------
1. Install `ai` and `contacts` modules
2. Create an automation rule on Contact model:
* Trigger: On Creation
* Action To Do: Execute AI Action
* Add a server action tool with 'Create Next Activity' action
* Set Activity User Type to Dynamic
* Set User Field to a dotted path (e.g., user_ids or partner_id.user_id)
3. Create a contact with a linked user
Observation:
------------------------------------
The activity description in the toast message fails to retrieve the user when using dotted field paths
Issue:
------------------------------------
The direct field access `record[self.activity_user_field_name]` in `_ai_get_action_description` method doesn't support dotted paths like 'partner_id.user_id'. This causes the same issue as in the mail module where relational field chains cannot be traversed
Solution:
------------------------------------
Use `record.mapped()` to support dotted paths by traversing the relational chain, consistent with the fix applied to the mail module
opw-6191715
Related Community PR: https://github.com/odoo/odoo/pull/263530
Forward-Port-Of: odoo/enterprise#118921A recent update in Odoo 19.2 caused portal users to experience crashes when viewing Knowledge articles with item lists. This fix restricts access to internal user data for portal users, preventing AccessErrors. Adding a specific group allows portal users to correctly view the article content.
Original PR description
Problem: Since saas-19.2, portal users crash when opening a Knowledge article containing items with "Created by" or "Last edited by" columns. Cause: Portal users are restricted to their own res.users record. Reading create_uid and last_edition_uid of internal users raises an AccessError. This was not raised in 19.0. Solution: Add groups="base.group_user" to create_uid and last_edition_uid fields across list, kanban, form, and search views. This resolves the AccessError and the field values are still returned correctly for portal users. Steps to reproduce: 1. Create a Knowledge article. 2. Add an "Item list" element. 3. Add some items to the list. 4. Share the article with a portal user. 5. Open the article as the portal user. 6. Observe that only the list header is visible and the items are not displayed. opw-6199714
This update fixes an issue where planned dates were lost when converting projects to project templates. The fix ensures that the original planned dates are correctly copied to the new template, improving project tracking accuracy. This change impacts how project templates are created and managed.
Original PR description
****Steps** to reproduce:** - Open a project with a planned date set. - Create Template of that project. - Observe the created project template. **Issue:** The planned dates of the project are lost when converting the project into a template. **Cause:** When we create a project template from a project, the project gets archived. Because a new project template record is created, and the start and expiration fields have copy=False, those dates are not being copied. **Fix:** Explicitly pass the planned date when copying the project, so the project template keeps the original planned date. task-5872500 Forward-Port-Of: odoo/odoo#269257 Forward-Port-Of: odoo/odoo#249411
This update fixes an issue where planned dates were lost when converting projects to project templates. The change ensures that the original planned dates are retained when creating a template, improving project tracking accuracy. This resolves a previous bug impacting project planning workflows.
Original PR description
Steps to reproduce: -------- - Open a project with a planned date set. - Create Template of that project. - Observe the created project template. Issue: ---------- The planned dates of the project are lost when converting the project into a template. Cause: ----- When we create a project template from a project, the project gets archived.Because a new project template record is created, and the start and expiration fields have copy=False, those dates are not being copied. Fix: ------- Explicitly pass the planned date when copying the project, so the project template keeps the original planned date. task-5872500 Forward-Port-Of: odoo/enterprise#119997 Forward-Port-Of: odoo/enterprise#115035
This update resolves an issue where accrual reports (like 'Bill To Receive') incorrectly displayed zero totals for grouped data. The fix corrects a technical error in how the reports calculated group totals, ensuring accurate financial reporting for accountants during period-end closing processes. This ensures accurate reporting for key financial analysis.
Original PR description
### Issue before this commit: In accrual reports (e.g., "Bill To Receive", "Billed Not Received", "Invoices To Be Issued", and "Invoices Not Delivered"), when grouping the list view by fields such as…
### Issue before this commit: In accrual reports (e.g., "Bill To Receive", "Billed Not Received", "Invoices To Be Issued", and "Invoices Not Delivered"), when grouping the list view by fields such as Vendor, the group header totals for the "Received", "Billed", and "Amount" columns display 0.00 even if the interanl lines of the group are not 0.00. ### Steps to reproduce the issue: 1. Download Purchase Accounting and Sale Accounting 2. Go to one of this pages: Billed Not Received, Bill To Receive, Invoices To Be Issued, and Invoices Not Delivered 3. Ensure the view is in its default grouping (grouped by Vendor or Customer) 4. Observe the group header rows for the Received (or Delivered), Billed (or Invoiced), and Amount columns. They all display 0.00 5. Expand a group that contains records with values greater than zero 6. Observe that the individual records populate correctly, but the aggregated group header row continues to display 0.00. ### Cause of the issue: The commit ddc1b681656ea8c70f3231cda20b5a58b9ff7dd6 adapted the code to retrieve the new accrual reports but attempted to fetch grouped records using group[0].id as the dictionary key, while the grouped() method actually used the recordset object as the key. This mismatch caused the dictionary lookup to fail, resulting in 0.00 sums. https://github.com/odoo/enterprise/blob/c8535a7a0e2eae811048a34a0bae187a1fa45311/account_accountant/models/analytic_mixin.py#L40-L48 ### Reason to introduce the fix: This fix restores the core analytical utility of the accrual reports, which are crucial for accountants during period-end closings to evaluate totals at a glance. opw-6232273 Forward-Port-Of: odoo/enterprise#118399
This update resolves an issue where users could view financial budgets created in other companies. The fix adds a security rule to the budget model, ensuring that users only see budgets associated with companies they are actively connected to. This enhances data security and prevents unauthorized access to financial information.
Original PR description
**Steps to reproduce:** - Install the `account_reports` module. - Create a new company. - Navigate to Accounting > Configuration > Financial Budgets. - Create a new budget record. - Switch to another company. - Open the list view of Financial Budgets. **Observation:** The budget record created in another company is still visible. **Root Cause:** The model `account.report.budget` does not have any record rule restricting access based on company. As a result, users can see financial budgets belonging to other companies even if they are not connected to them. **Fix:** This commit allows users to hide financial budgets from companies they are not connected to by adding a record rule on `account.report.budget` opw-6083892 Forward-Port-Of: odoo/enterprise#120059 Forward-Port-Of: odoo/enterprise#114771
This update resolves an issue where the system incorrectly calculated non-deductible amounts on vendor bills, particularly when deductibility percentages were set to 99%. The fix ensures that tax calculations and journal entries accurately reflect the correct deductions, improving financial reporting accuracy.
Original PR description
### Issue When setting the partial deductibility percentage to 99% on a vendor bill line, the system incorrectly treats it as 100% deductible and completely ignores the non-deductible part…
### Issue When setting the partial deductibility percentage to 99% on a vendor bill line, the system incorrectly treats it as 100% deductible and completely ignores the non-deductible part Additionally, changing the deductibility percentage on a line with taxes does not trigger an update of the non-deductible tax journal items, leaving the private part taxes unchanged ### Cause In the tax recomputation mechanism, `float_compare` was wrongly configured with `precision_rounding=2` instead of `precision_digits=2` when checking the `deductible_amount` field This rounding error caused 99.00 to be evaluated as equal to 100.00, skipping the creation of the non-deductible line Furthermore, `_sync_tax_lines` relies on `get_base_line_tracked_fields` to detect modifications that require a tax recalculation This tracked field list only included price, quantity, and discount. Modifying the deductibility percentage did not trigger any sync, preventing the non-deductible tax lines from adjusting ### Fix To fix the synchronization, `deductible_amount` is added to the tracked fields for invoices This straightforward approach is preferred here for simplicity However, a more restrictive condition may be needed for example only check it on lines with taxes ### Steps to reproduce - Install `account` - Create a Vendor Bill (Price: 1000$, Taxes: 15%, Professional %: 50) - Check the Journal Items tab to see the Private Part line at 500$ debit and Private Part (taxes) line at 75$ debit - Change the Professional % field on the invoice line to 75 Before the fix, the Private Part (taxes) line remains at 75$ debit - Change the Professional % field on the invoice line to 99 Before the fix, the private part lines completely disappear instead of adapting to 1% opw-6245909 Forward-Port-Of: odoo/odoo#267427
This update resolves a technical issue that prevented users from correctly accessing certain fields on payslips within the Odoo system. The problem stemmed from an error in how the system retrieves data for these fields, specifically when closing or discarding a payslip. This fix ensures data integrity and prevents errors for users managing payslips.
Original PR description
Steps to reproduce the bug: - open an employee in a belgian company - open End of collaboration in the cog menu - go to the holiday attest tab - click the payslips link - open a payslip then close it or press discard - open the same payslip then close or discard it again - you get a traceback "Cannot read properties of undefined (reading 'relatedPropertyField')" in `_computeDataContext` which happens for some property fields (e.g. seprator) because the `fieldName` is in data but `this.fields[fieldName]` is undefined task-id: 6265648 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update fixes an issue where the bank account currency wasn't correctly reflected in the XML file generated for Polish e-invoices (Ksef). The change ensures the 'OpisRachunku' field in the XML accurately displays the invoice's bank account currency, improving compliance with Polish tax regulations. This resolves a previous error impacting invoice processing.
Original PR description
**STEP TO REPRODUCE** 1. Create a partner with a bank account and setup its currency. 2. Create an invoice using a different currency. 3. Send the invoice to Ksef. 4. Notice the generated xml contains the invoice currency in the field OpisRachunku, but it should be the bank account currency instead. opw-6150563 Forward-Port-Of: odoo/odoo#263842
This update clarifies the status shown when signing documents on behalf of another user. Previously, the display always included the sender's name. Now, it accurately shows 'via [user]' when signing through another user's link, and only the date is displayed when signing directly.
Original PR description
Before this commit, the signer status always displayed "On <date> via <sender>". Now the message only mentions "via <user>" when the document was actually signed by a different user (for example, when an admin is logged in and signs through a signer's link). When the signer uses their own link, only the date is shown. task-6216243
This update fixes an issue where timesheet totals were not displayed on the portal's task view. The change involved separating the timesheet list and totals into distinct XML templates, correcting a naming conflict that prevented the totals from rendering. This ensures users see a complete overview of their timesheet data within tasks.
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
This update fixes an issue where created packages weren't displayed within the barcode picking app when putting items into packs. Previously, the system didn't show the nested packages, making it difficult for users to track the packaging process. This change ensures that all packages, including nested ones, are clearly visible, improving workflow and accuracy.
Original PR description
### Steps to reproduce: - Enable `Lots & Serial Numbers` and `Packages` in the settings - Create a product tracked by SN and add SN001 and SN002 to stock - Create and confirm a delivery for 2 units -…
### Steps to reproduce: - Enable `Lots & Serial Numbers` and `Packages` in the settings - Create a product tracked by SN and add SN001 and SN002 to stock - Create and confirm a delivery for 2 units - Open the Barcode app and open the delivery - Scan the product > Scan SN001 - Click `Put in Pack` ### Current behavior: The created package is not displayed anywhere. Clicking Put in Pack again nests the package into another package without any visible indication to the user. ### Cause of the Issue: The GroupedLineComponent cannot display neither the source or destination package: https://github.com/odoo/enterprise/blob/c5bbcaeed513817fdda1f3f42f4c9b2440264174/stock_barcode/static/src/components/grouped_line.xml#L4-L21 However, our case the grouped line contains only a single line and prevents the users from viewing the sublines since the `Show Reserved Lots` is disabled on the operation type and only one lot (with additional demand) was scanned: https://github.com/odoo/enterprise/blob/c5bbcaeed513817fdda1f3f42f4c9b2440264174/stock_barcode/static/src/components/grouped_line.js#L75-L77 https://github.com/odoo/enterprise/blob/c5bbcaeed513817fdda1f3f42f4c9b2440264174/stock_barcode/static/src/components/grouped_line.js#L44-L55 opw-6237834 Forward-Port-Of: odoo/enterprise#119114
A recent update to Odoo caused an error when generating PDF invoices using the ‘Get ETA Invoice PDF’ button. This fix resolves a technical issue related to how Odoo processes data from external requests, ensuring the button continues to function correctly. This prevents potential disruptions to invoice generation.
Original PR description
Using the “Get ETA Invoice PDF” button located on the form view of invoices can result in a stacktrace error. Since installing requests==2.25.1 with python 3.10, and using: requests.exceptions.JSONDecodeError Will raise the following error: AttributeError: module 'requests.exceptions' has no attribute 'JSONDecodeError' This change fixes the error by using 'JSONDecodeError' from the 'json' package. Related: https://github.com/odoo/odoo/commit/55bddda59b8f9479d515163852fa8cbc718ddbd3 [opw-6275476](https://www.odoo.com/odoo/project/49/tasks/6275476?debug=assets) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#268920
This update resolves an issue where the website's main menu would unexpectedly close due to overlapping updates. By closing the extra menu before opening the main menu, the system now provides a more consistent and reliable user experience. This prevents frustrating errors and ensures smooth navigation.
Original PR description
[FIX] website: close the extra menu before opening site menu Update of the extra menu item is done multiple times (cfr `afterFontsloading`). If the extra menu item and the site menu were already open before an update of the extra menu item, the result is a close of the site menu. This can lead to undeterministic error. To solve the problem, the extra menu dropdown is closed before opening the site menu. runbot-240955 Forward-Port-Of: odoo/odoo#269177 Forward-Port-Of: odoo/odoo#266376
This update fixes an issue where purchase order subtotals were incorrectly calculated when some order lines had a quantity of zero. The fix ensures that subtotals are accurately displayed regardless of whether lines with zero quantity are filtered out, improving the accuracy of purchase order reports. This change was made to address a bug impacting order reporting.
Original PR description
Bug introduced in: https://github.com/odoo/odoo/commit/3ac515ab55dd6708e0df283c634e2b99fc4a5561 When order lines with qty=0 are filtered out, `line_index` refers to the filtered list but `order_line[line_index+1]` indexed into the full unfiltered recordset, causing section subtotals to fire at the wrong position with incorrect values. Solution: Pre-store the filtered recordset and use it for the next-element lookup opw-6174429 Forward-Port-Of: odoo/odoo#267924
This update resolves an issue causing excessive logging in Odoo, specifically when handling attachments created by external systems. By returning 'None' when attachment data is missing, the system avoids unnecessary error handling and log spam, improving stability for integrations like EDI connectors. This change primarily impacts third-party integrations.
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#114160 Forward-Port-Of: odoo/enterprise#113396
This update fixes an issue where product descriptions weren't correctly appearing on manufacturing orders (MOs) created from Point of Sale (POS) orders. The change ensures that all product variants, including those with custom attributes, have accurate descriptions displayed on MOs, aligning with how descriptions are handled in the standard sale module. This improves order clarity and traceability.
Original PR description
**Steps to reproduce:** - Install pos_mrp - Make a BoM for a product - The product must have a custom attribute, of type always - Go to the PoS - Make a sale, with a customer, enable Ship Later - Go…
**Steps to reproduce:** - Install pos_mrp - Make a BoM for a product - The product must have a custom attribute, of type always - Go to the PoS - Make a sale, with a customer, enable Ship Later - Go to the created MO - The Custom Description field is not showing **Why the fix:** This fix was previously done by e53dae2 but it did not account for the other variants and only did the fix for the never attributes. This is because it seemed to work with other kinds of attributes until 19.0 We now also compute the move description if we have a custom attribute. We need the never variants to have a description as well, as it is done in the sale module. This commit basically aligns the behavior to the on done in the sale module. A test had to be changed, as we now write the description in a different way, to make it the same regardless of where the picking and moves were created from. We now won't see a difference on the MO between one created from the POS and one created through the sale module. opw-6169257 Forward-Port-Of: odoo/odoo#268713 Forward-Port-Of: odoo/odoo#263350
This update fixes an issue where invoices were incorrectly labeled as 'proforma' when printed. The print button for posted invoices has been made secondary to emphasize the 'Send' action, aligning with the standard invoicing workflow. This ensures invoices are consistently displayed and processed correctly.
Original PR description
Revert 3ef2c09 which incorrectly added a proforma label when printing posted invoices that had not yet been sent, proforma invoices have an entire feature in the sales app, so an invoice in invoicing should just be an invoice in all cases. --- The Print button on posted invoices was visually styled as a primary action. Make it secondary so the Send action keeps the main visual emphasis, while Print remains available with the same behavior. task-6269645 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#269183 Forward-Port-Of: odoo/odoo#268552
This update prevents placeholder images from being sent during menu synchronization, ensuring that only actual product images are transmitted. This improves the efficiency of data transfer and reduces unnecessary data usage, leading to a smoother user experience. The change was driven by a bug affecting menu display.
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#119883 Forward-Port-Of: odoo/enterprise#119482
This update fixes an issue where the product image carousel wouldn't scroll correctly after changing a product's variant on the e-commerce site. The fix ensures that the carousel properly updates and responds to user interactions, improving the shopping experience. This was caused by a technical glitch in how the system handles carousel updates.
Original PR description
Steps to produce: --- - Install `website_sale` module. - Create a product with a variant and add the images from the sale tab. - Go to the product on the e-commerce and change the variant. - Attempt…
Steps to produce: --- - Install `website_sale` module. - Create a product with a variant and add the images from the sale tab. - Go to the product on the e-commerce and change the variant. - Attempt to scroll through the product images (using the mouse wheel). Issue: --- - After changing a product variant on the eCommerce product page, attempting to scroll through the product images (using mouse wheel) has no effect. Root cause: --- - When a product variant is changed, `_updateProductImage` dynamically replaces the product image carousel DOM element (`#o-carousel-product`) by injecting new HTML and removing the old one. - The old CarouselProduct interaction instance remains in memory, causing a resource and event listener leak on the detached old DOM element. - The newly inserted `#o-carousel-product` element is ignored by the interaction service, meaning that the CarouselProduct interaction is never initialized on the new carousel. This leaves the new carousel static and unresponsive to user interactions. Solution: --- - Before replacing the carousel DOM node, manually notify the public.interactions service to clean up any active interactions on the old element. After the new DOM node is queried, start the interactions on the new element. opw-6229291 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#269170 Forward-Port-Of: odoo/odoo#265537
This update fixes a warning related to how Odoo generates PDFs using the PyPDF library. The change ensures the PDF generation process is compatible with recent PyPDF library updates, preventing potential errors and maintaining stable PDF output. This ensures consistent PDF generation across Odoo versions.
Original PR description
In recent versions of PyPDF, modifying a `PageObject` directly from a `PdfFileReader` instance triggers a `PageObject.replace_contents` deprecation warning. As identified in the pypdf library's…
In recent versions of PyPDF, modifying a `PageObject` directly from a `PdfFileReader` instance triggers a `PageObject.replace_contents` deprecation warning. As identified in the pypdf library's architecture updates (specifically PR #3638 [^1] and PR #3669 [^2]), a reader's page is intended to be read-only. Mutating it directly (e.g., using `mergePage` or `compressContentStreams`) before attaching it to a writer can break internal object references and cause `NullObject` errors. This commit resolves the warning by inverting the order of operations to ensure we only mutate writable objects. The fix implements the following flow: 1. Add the unmodified source page directly to the `PdfFileWriter`. 2. Retrieve the newly created, writable output page. 3. Apply `mergePage` and `compressContentStreams` exclusively to the writer's copy of the page. [^1]: https://github.com/py-pdf/pypdf/pull/3638 [^2]: https://github.com/py-pdf/pypdf/pull/3669 Forward-Port-Of: odoo/odoo#268865 Forward-Port-Of: odoo/odoo#267958
This update fixes a warning related to how Odoo generates PDFs using the PyPDF library. The change ensures the PDF generation process is compatible with newer versions of PyPDF, preventing potential errors and maintaining stable PDF output. This improves the reliability of our PDF generation functionality.
Original PR description
In recent versions of PyPDF, modifying a `PageObject` directly from a `PdfFileReader` instance triggers a `PageObject.replace_contents` deprecation warning. As identified in the pypdf library's…
In recent versions of PyPDF, modifying a `PageObject` directly from a `PdfFileReader` instance triggers a `PageObject.replace_contents` deprecation warning. As identified in the pypdf library's architecture updates (specifically PR #3638 [^1] and PR #3669 [^2]), a reader's page is intended to be read-only. Mutating it directly (e.g., using `mergePage` or `compressContentStreams`) before attaching it to a writer can break internal object references and cause `NullObject` errors. This commit resolves the warning by inverting the order of operations to ensure we only mutate writable objects. The fix implements the following flow: 1. Add the unmodified source page directly to the `PdfFileWriter`. 2. Retrieve the newly created, writable output page. 3. Apply `mergePage` and `compressContentStreams` exclusively to the writer's copy of the page. [^1]: https://github.com/py-pdf/pypdf/pull/3638 [^2]: https://github.com/py-pdf/pypdf/pull/3669 Forward-Port-Of: odoo/enterprise#119694 Forward-Port-Of: odoo/enterprise#119239
This update resolves an issue where calendar events with multiple attendees displayed inconsistent 'Contact Details' information, showing a random attendee's contact info. The fix limits the 'Contact Details' block to events with only one non-organizer attendee, ensuring a consistent and predictable display for 1-on-1 meetings. This improves the user experience and data clarity within the calendar.
Original PR description
When a calendar event has multiple attendees, `_get_contact_details_description` picks the first non-organizer partner from a set-based recordset to render under "Contact Details" in the event…
When a calendar event has multiple attendees, `_get_contact_details_description` picks the first non-organizer partner from a set-based recordset to render under "Contact Details" in the event description. The recordset is built from `partner_ids_from_attendees`, a set whose iteration order depends on Python's hash seed, so the displayed contact is effectively random and not controllable from the UI. Restrict the "Contact Details" block in `_get_contact_details_description` to events with exactly one non-organizer attendee (1-on-1 meetings). For group meetings the block is omitted entirely, since any single attendee picked from a larger group is arbitrary by construction. Steps to reproduce: 1. Go to Calendar > New 2. Add 3+ attendees (e.g. Alice, Bob, Charlie) 3. Save the event 4. Check the Notes tab in the event form => One random attendee's contact info appears under "Contact Details" Ticket [link](https://www.odoo.com/odoo/project.task/6035192) opw-6035192 Forward-Port-Of: odoo/odoo#258901
This update simplifies how spreadsheet documents are handled within Odoo, preventing unnecessary version history creation. By disabling versioning for spreadsheets and frozen spreadsheets, we reduce storage usage and improve performance. This change ensures spreadsheets function efficiently without creating redundant data attachments.
Original PR description
This PR consists of two commits. The first commit hides the Manage Versions action button for spreadsheet and frozen spreadsheet documents, since versioning is disabled for those records. The second commit is a backport of enterprise commit 0e319d0. It disables document versioning for spreadsheet and frozen spreadsheet documents, as spreadsheets already manage their history through spreadsheet revisions. This avoids creating unnecessary document history attachments when spreadsheet data is written or when a spreadsheet is copied. Task: [6236496](https://www.odoo.com/odoo/project/2328/tasks/6236496) Forward-Port-Of: odoo/enterprise#119932 Forward-Port-Of: odoo/enterprise#118484
This update fixes an issue where users could inadvertently edit the cover image, title, and subtitle of a blog post from the 'Next Post' section. The change ensures that this section is fully non-editable, improving the user experience and preventing unintended content modifications. This resolves a potential inconsistency in how the builder handles interactive elements.
Original PR description
[*]: html_builder Issue: When viewing a blog post, the "Next Post" section allows editing the cover image, title, and subtitle of another post. Editing content that belongs to a different post from…
[*]: html_builder
Issue:
When viewing a blog post, the "Next Post" section allows editing the cover image, title, and subtitle of another post. Editing content that belongs to a different post from within the current one is incorrect.
Steps to reproduce:
* Open a blog post that has a "Next Post" section visible.
* Enter edit mode.
* Try to edit the cover image, title, or subtitle of the next post.
* These elements can be interacted with even though they should not be
editable.
Fix:
Make the "Next Post" section fully non-editable. The title and subtitle were already handled via content_not_editable_selectors, but the cover image could still activate builder options, allowing it to be replaced.
Introduce a new `not_activable_element_selectors` resource in the `BuilderOptionsPlugin` so that plugins can declare elements that should not trigger the builder overlay when clicked. Updated the builder to retrieve this selector list from plugin resources instead of using a hardcoded value.
task-5435878
Forward-Port-Of: odoo/odoo#265103
Forward-Port-Of: odoo/odoo#249815This update ensures the LNA button in the POS interface correctly tests functionality for IoT Boxes. Previously, the button wasn't properly sending status updates. Now, the system sends the necessary status action when LNA is enabled on IoT Boxes, improving the reliability of the POS system.
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.
This update fixes a problem where receipt printing in Austria was incorrect, and prevented a deadlock during authentication with Fiskaly and FON. The changes ensure accurate receipt printing and a smoother authentication process for users in Austria, improving the overall POS experience.
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#119732 Forward-Port-Of: odoo/enterprise#102313
This update streamlines the ordering process in our Point of Sale system by ensuring order synchronization runs in the background without delaying the user interface. Previously, order submissions blocked the screen, but now the system handles syncing orders efficiently, improving speed and responsiveness. This change also enhances data accuracy and prevents users from selecting tables while orders are still being processed.
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#268291 Forward-Port-Of: odoo/odoo#256883
This update fixes a discrepancy in how product prices are displayed. Previously, changing the price on a product without variants only updated the variant form, not the main product template. Now, the template price will automatically update when the variant price is changed, ensuring consistent pricing across all product views.
Original PR description
Issue: When the sales price is changed from the product variant form for a product without configured variants, the price is updated only on `product.product.lst_price`. The main product form, opened…
Issue: When the sales price is changed from the product variant form for a product without configured variants, the price is updated only on `product.product.lst_price`. The main product form, opened from Inventory > Products, displays `product.template.list_price`, which remains unchanged. The same issue is visible from Purchase Orders because the product internal link on a purchase order line opens `product.product`, while the product page opens `product.template`. Steps to reproduce: - Create or open a product without configured variants - Open product variant form from the internal link in a purchase order - Change the Sales Price on the product from there - Open the product from Inventory > Products (`product.template`) - The template Sales Price still shows the old value Cause: Since version 19.1, `product.product.lst_price` is an editable stored field, allowing variant-level prices to differ from the template price. This is correct for products with multiple variants, where each variant may have its own sales price. However, for products with only one variant (the product itself), no synchronization was performed from `product.product.lst_price` back to `product.template.list_price`, leaving both product forms inconsistent. Solution: - Add `_inverse_product_lst_price` on `product.product.lst_price` so that When `lst_price` is written and the template has exactly one variant, set `list_price` to `lst_price` (delegates to the template) opw-6260015 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#268017
This update ensures that employee avatars are consistently shown in the timesheet kanban view, even for users without HR access rights. Previously, a placeholder image was displayed. The fix addresses a permissions issue, retrieving avatars from a public model when direct access isn't granted.
Original PR description
Steps to reproduce:
- Install the hr_timesheet module
- Create a user without HR access rights
- Create a timesheet
- Log in with the above user
- Open the kanban view
Issue:
Instead of showing the employee's avatar, a placeholder image
is displayed.
Reason:
The user does not have access to the hr.employee model.
Fix:
In this commit, if the user does not have access to hr.employee,
we fetch the image from the hr.employee.public model.
Task: 4461272
X-original-commit: b3018b1ab4bcdfebd8bb83bad38209b96646da3c
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#269262This update fixes an issue where purchase transactions were incorrectly identified as intra-state, leading to inaccurate reporting. The change separates sales and purchase transactions during computation, ensuring the correct transaction type is assigned for all transactions, including inter-state vendor bills. A migration update has also been applied to existing databases.
Original PR description
Previously, for purchase journals, `l10n_in_state_id` was always computed using the current company `state_id`. However, in `_compute_l10n_in_transaction_type`, the `l10n_in_state_id` was compared with the company `state_id` for both sales and purchases. As a result, all purchase transactions were always computed as intra-state, including inter-state vendor bills. This commit handles sales and purchase transactions separately while computing `l10n_in_transaction_type` to ensure the correct transaction type is assigned. Migration also added to update it in existing dbs. Forward-Port-Of: odoo/enterprise#118297
This update fixes a problem where tax reports for Moroccan companies were incorrectly including entries with zero balances. The fix filters out these unnecessary entries, ensuring the reports accurately reflect financial data. This improves the reliability and clarity of tax reporting.
Original PR description
When generating the tax report for a Moroccan company, entries with a zero balance were appearing in the report. Steps to reproduce: ------------------- * Create a Moroccan company * Create a bill with a tax to pay * Change the bill date and accounting date to a past date * Make a first payment of the bill, with a date to today * Unreconcile the payment, and make a second payment with a date in the past (the same one as the bill date for example) * Now generate the tax report for the period of today > Observation: The report contains useless entries with a zero balance. Why the fix: ------------ We add `HAVING SUM(account_move_line.balance) != 0` to filter out the line that have a zero balance. opw-5911669 Forward-Port-Of: odoo/enterprise#113956
This update resolves an issue impacting the Mexican tax reporting module (l10n_mx_edi) by correctly managing dependencies on PINT and CEN. This change ensures accurate tax calculations and reporting for Mexican businesses using Odoo Enterprise. The fix was verified by multiple developers.
Original PR description
X-original-commit: 3675550ec7a8ccc0b4646f8e24aa38a3b52cf36c Forward-Port-Of: odoo/enterprise#119981
This update resolves an issue preventing authenticated users from submitting the donation page on databases with Cloudflare Turnstile enabled. The fix skips Turnstile attachment when a submit button isn't present, ensuring the donation process works correctly. This improves the user experience for donations.
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
This update resolves an issue where the website rental planning module would crash when the quantity input field was removed from the product page. The change was due to a shift in how the system handles data evaluation, and this fix ensures the system gracefully handles the absence of the quantity field, preventing errors and maintaining functionality.
Original PR description
Steps to reproduce: 1. Install website_sale_renting_planning 2. In rental module, create a product that is of type service and can be sold 3. Go to the website and remove the quantity selector input…
Steps to reproduce: 1. Install website_sale_renting_planning 2. In rental module, create a product that is of type service and can be sold 3. Go to the website and remove the quantity selector input field from the page and save. Issue: `TypeError: Cannot read properties of null (reading 'dataset')` Why this happens: Following architectural changes in v19.1, the rental data evaluation logic was moved directly into the DaterangePicker component lifecycle. Commit 4e5f71d introduces a new method to where, during initialization (`willStart`), the component triggers `setAddQtyInputMax()` to update the dataset attributes of the quantity selector input box. If the quantity selector has been removed via the website customizer `querySelector` returns `null`, causing the assignment to crash. In v19.0, this logic lived in the `WebsiteSale` interaction, executing only during post-render UI event listener triggers which kept it safe. opw-6268945 Forward-Port-Of: odoo/enterprise#119574
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 it to stick to the left even when space was available. This change removes the memorization, ensuring suggestions are displayed correctly regardless of scrolling.
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 fixes a bug where sequence names weren't correctly displaying the time portion of dates when using date ranges. The fix ensures that sequence names accurately reflect the quotation date's time, resolving a discrepancy in the generated order names. This improves data consistency and accuracy.
Original PR description
## Issue When using a prefix containing a time-based placeholder (`%(h24)s`, `%(h12)s`, `%(min)s`, `%(sec)s`) with *Subsequences per date\_range*, the time information are missing and consistently…
## Issue
When using a prefix containing a time-based placeholder (`%(h24)s`, `%(h12)s`, `%(min)s`, `%(sec)s`) with *Subsequences per date\_range*, the time information are missing and consistently set to 0 when interpolating the prefix.
## Steps to reproduce
1. Install *Sales* (`sale_management`)
2. In Settings > Technical > Sequences, update the `sale.order` sequence:
- Prefix: `S/%(y)s/%(month)s/`
- Suffix: `/%(h24)s/%(min)s/%(sec)s`
- Tick the *Use subsequences per date_range* checkbox and set a range for the current month
3. Create and confirm a SO
4. **The name of the SO correctly contains the Quotation date in the prefix, but the suffix is set to /00/00/00, even though the quotation date contains time information.**
## Cause
Commit https://github.com/odoo/odoo/commit/f7c330d83cc3 sets the `ir_sequence_date` to a `datetime.date` object in `IrSequence._next`. This leads to the time information missing from the interpolation dict:
https://github.com/odoo/odoo/blob/d58f4ed332af35f6de26a93f07adf05368731e20/odoo/addons/base/models/ir_sequence.py#L211-L214
## Fix
The context key `ir_sequence_date` should be set to a `datetime.datetime` object to correctly interpolate the time information in the prefix/suffix of a sequence. To do so, the `tzinfo` needs to be drop for the date to be interpretable by the `fields.Datetime.from_string` method:
https://github.com/odoo/odoo/blob/d58f4ed332af35f6de26a93f07adf05368731e20/odoo/orm/fields_temporal.py#L239-L244
The time is not cast to a specific timezone (e.g., UTC) before dropping the tzinfo, as doing so would lead to incoherent time information from the user's perspective. For example, creating a SO at 13:00 in Brussels (UTC+2) would result in `11` being used as the hour to interpolate the `%(h24)s` placeholder.
opw-6104485
Forward-Port-Of: odoo/odoo#260782This update ensures that delivery orders created during multi-step manufacturing processes correctly reserve newly produced lots when the 'Store Finished Products' transfer uses a sublocation within the warehouse. Previously, the system incorrectly defaulted to using existing stock, leading to inaccurate inventory tracking. This fix corrects a logic error that prevented the MTO link from being maintained.
Original PR description
Steps to reproduce: - Create a storable product “P1” with Lot tracking - Enable routes: MTO + Manufacture - Create a BoM for the product: - Component: C1 - Configure the warehouse with 3-step…
Steps to reproduce:
- Create a storable product “P1” with Lot tracking
- Enable routes: MTO + Manufacture
- Create a BoM for the product:
- Component: C1
- Configure the warehouse with 3-step manufacturing
- Have on-hand stock in WH/Stock with Lot 001
- Confirm a Sales Order for the product
- Confirm the generated Manufacturing Order and produce Lot 002
- In the "Store Finished Products" transfer, change the destination location from WH/Stock to WH/Stock/Shelf 1 and validate
- Check the Delivery Order reservation
Problem:
The move is reserved with Lot 001 instead of 002
When using a 3-step manufacturing flow (MTO + Manufacture), if the user manually changes the destination of the "Store Finished Products" transfer to a sublocation of WH/Stock (e.g. WH/Stock/Shelf 1), the MTO link between the production and the delivery order was incorrectly broken, causing the delivery to reserve existing stock instead of the freshly produced lot.
Root cause: `_skip_push()` only skipped push logic when the downstream move's source was a child-or-equal of the current move's destination (`m.location_id._child_of(self.location_dest_id)`). When the destination was changed to a sublocation (WH/Stock/Shelf 1), this check failed, so `_push_apply()` ran, found the delivery's source (WH/Stock) was not a child of WH/Stock/Shelf 1, and called `_break_mto_link()`, clearing `move_orig_ids` on the delivery move. The delivery then fell back to make-to-stock reservation and picked an unrelated lot.
opw-6197212
Forward-Port-Of: odoo/odoo#268783This update resolves a bug where saving multiple forms could trigger errors due to a timing issue with cached data. Now, the system gracefully handles changes to record IDs, preventing crashes and ensuring data consistency when creating or editing forms. This improves the stability and reliability of the 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#269415 Forward-Port-Of: odoo/odoo#268884
This update resolves an issue where scanning a package type alongside a regular package didn't correctly link the new package to the product, leading to missing product associations. The fix ensures that when a package type is scanned, the new package is properly linked to the relevant products and displayed within the barcode interface.
Original PR description
When scanning a package then a package type, from the point of view of the user nothing happend, and in the backend it will created a new package but it will not link it to the products nor will it…
When scanning a package then a package type, from the point of view of the user nothing happend, and in the backend it will created a new package but it will not link it to the products nor will it show any warning. Steps to reproduce: ------------------- * Install barcode and stock * Enable packages in settings * Open Inventory * Create a product, * Create a Package Type -> barcode PACKTYPE, * Create a Package linked to this package type -> PACK, * Add at least 2 unit of product to this package, * Create a delivery for 2 unit of the product, Open Barcode * Operation > Delivery orders > your delivery * Erase the destination package from the first line * Scan PACK ( don't click on the green line) * Scan PACKTYPE **Actual behavior** create a new package but does not link it to the new products **Expected behavior** create a new package and set it as destination package. Observation: ------------- When scanning the package (PACK), we will go through ```_processPackage``` -> ```async _processPackage``` where in the end the line is unselected: https://github.com/odoo/enterprise/blob/39d8a473fe03038ca0494a6a8165e3eb75bd8492/stock_barcode/static/src/models/barcode_picking_model.js#L2090 When we scan our package type (PACKTYPE), we will go to ``` _processPackage``` -> ```_processPackage```->```_processPackageType``` where we will obtains packagesIds checking that we have a source package: https://github.com/odoo/enterprise/blob/7cd9834d1d918f12dec43844cae6f112309e5772/stock_barcode/static/src/models/barcode_picking_model.js#L2123-L2132 and will send us to ```_putPackInPack```: https://github.com/odoo/enterprise/blob/7cd9834d1d918f12dec43844cae6f112309e5772/stock_barcode/static/src/models/barcode_picking_model.js#L2133-L2136 Where we will avoid the empty packageIds since we checked on the source package and not the destination package: https://github.com/odoo/enterprise/blob/2b887d094c66be7aebd92fbf735b1852f5dde4b5/stock_barcode/static/src/models/barcode_picking_model.js#L2296-L2299 and will call ```action_put_in_pack``` from the packaging model: https://github.com/odoo/enterprise/blob/2b887d094c66be7aebd92fbf735b1852f5dde4b5/stock_barcode/static/src/models/barcode_picking_model.js#L2301-L2306 In ```action_put_in_pack``` will create a new packaging and put it as a the new destination package, but since the ```previous_dest_package``` (saved in db) was itself, he will [erase the link](https://github.com/odoo/odoo/blob/cda011dc8590773f6c3a26f4ae9d5242a3147024/addons/stock/models/stock_package.py#L354-L363) he just made. Which means that in our case, we created a package without linking it to anything. Even if we avoid the function to erase the destination package, since the destination package shown in barcode is the one from move line : https://github.com/odoo/enterprise/blob/d0d0a3cf4a02bf24cf502b533e494fe7ca155eb3/stock_barcode/static/src/components/line.js#L115-L117 It will not show the new package in barcode opw-5449729 Forward-Port-Of: odoo/enterprise#104876