Daily updates from Odoo
Tuesday, May 19, 2026
53 changes · saas-19.1
New functionality added to Odoo
This update introduces a simple LED flashing feature within the IoT app, triggered by a 'test' button. This allows users to easily identify and locate IoT boxes, particularly when multiple boxes are present in a setup like an OXP. It's a small, helpful addition for troubleshooting and device management.
Original PR description
This PR adds a feature to flash red and green leds on the iot box with odoo-led-manager service when using "test" button in iot app This helps to identify an iot box when having multiple in the setup (Ex: OXP)
Enhancements to existing features
This update simplifies how Odoo manages addon locations. It now supports using wildcard patterns (globbing) in the list of addon paths, making it easier to manage multiple Odoo installations. This change reduces the need for manual configuration and improves flexibility for developers.
Original PR description
Pass all addons_path entries through glob.glob(), which returns [path] for literal paths and expands patterns otherwise. This is useful when managing multiple Odoo repositories under a common root, avoiding the need to list each addons path explicitly. Forward-Port-Of: odoo/odoo#259690
Resolved issues and error corrections
This update corrects a problem where the ABA file generated for Australian payroll wasn't being created correctly. The fix ensures the payslip batch is assigned before payment validation, guaranteeing the ABA file contains accurate payment information. This resolves a previous issue reported in odoo/enterprise#114970.
Original PR description
Payslip batch needs to be assgned before the payment batch is validated, otherwise the ABA file will be blank. This commit ensures that flow and the test ensure both aba flows generate the same file content. task-6123029 Forward-Port-Of: odoo/enterprise#114970
This update resolves a critical error in the audit reports module that occurred when invoices with zero balance move lines were generated. The fix prevents a division-by-zero error by correctly handling zero balances during report calculations, ensuring accurate financial reporting.
Original PR description
# How to reproduce - Create an invoice : - with a move line with a balance of 0 - for date X (e.g. 18/05/2026) - Go to Accounting > Review > Working Files - Create a new audit for the year following date X (e.g. from 01/01/2027 to 31/12/2027) - Go to the balances of that audit - Sort by Var % # The problem A traceback is shown, telling that there was a division by 0 # Cause When filtering by Var % (`audit_var_percentage`), the ORM will call `_field_to_sql` for that field and will use the override defined in `account_reports` : https://github.com/odoo/enterprise/blob/458e3c4b395485974c749955907a1f7310a896a8/account_reports/models/account.py#L229-L240 In this override, we divide by `COALESCE(prev_account_move_line.balance, 1)`, but `COALESCE` only replace the value by 1 if `balance` is `NULL`. When `balance = 0`, we divide by 0, which raises the error. opw-6165282 Forward-Port-Of: odoo/enterprise#116200
This update resolves an issue where kitchen tickets were incorrectly printed after a platform order was cancelled, regardless of where the cancellation occurred (Odoo PoS or the provider platform). Now, cancelled platform orders will no longer trigger kitchen ticket printing, streamlining the order process and preventing unnecessary printouts.
Original PR description
This fixes platform orders should not send to kitchen printer when the platform orders being cancelled. Currently accepting platform orders will not send to kitchen printer. However when cancelling platform orders on either provider platform, or within Odoo PoS. It will print a kitchen ticket of customer note. task-6071740 Forward-Port-Of: odoo/enterprise#114171
This update fixes an issue where dependent taxes weren't correctly recalculated after a base tax was removed from a sales order or invoice. The fix ensures that tax amounts are accurately computed, particularly when using the 'Affect Base of Subsequent Taxes' setting. This improves the reliability of financial reporting.
Original PR description
**Steps to reproduce:** * Install the *Accounting* module with French localization (*l10n_fr_account*). * Create a *Sales Tax* with: * A new tax group (e.g., 'Codifab'). * Enable *Affect Base of…
**Steps to reproduce:** * Install the *Accounting* module with French localization (*l10n_fr_account*). * Create a *Sales Tax* with: * A new tax group (e.g., 'Codifab'). * Enable *Affect Base of Subsequent Taxes*. * Create a *Sales Order*: * Add the first tax (with *Affect Base of Subsequent Taxes*). * Then add the second tax (eg VAT tax). * Confirm the *Sales Order*. * Create a *Down Payment Invoice* (percentage-based). * Open the generated invoice and: * Remove the first tax (the one affecting the base). **Observed behavior:** * The amount of the second tax group does not update after removing the first tax, leading to incorrect tax computation. **Cause:** * In `_import_base_line_extra_tax_data`, the condition: `all(str(tax.id) in extra_tax_data['manual_tax_amounts'] for tax in sorted_taxes)` only ensured partial matching of taxes. * This allowed reuse of stale `manual_tax_amounts` when taxes were removed or modified, causing incorrect base values for dependent taxes (e.g., *Affect Base of Subsequent Taxes*). **Fix:** * Update the condition to enforce an exact match between current taxes and cached `manual_tax_amounts` by checking both size and membership. * Prevent reuse of outdated tax data when taxes change, ensuring proper recomputation of dependent taxes. * Align Python logic with the JS implementation for consistency between `account_tax.py` and `account_tax.js`. opw-6063970 Forward-Port-Of: odoo/odoo#264434 Forward-Port-Of: odoo/odoo#259566
This update fixes a display issue where accounting reports, when filling a full screen, would obscure the final row, preventing users from seeing all data. The fix involves adjusting styling to ensure the complete final row is visible, improving report clarity and data accessibility. This enhancement ensures users can fully review their accounting reports.
Original PR description
Problem: When an accounting report fills a whole page, the final row is not fully visible Steps to reproduce: 1- View a tax report that has a lot of entries that would fill the whole screen 2- Notice how the last line is not fully visible and it isn't possible to scroll and view the rest of it Solution: Correctly style the different < div > elements opw-6171555 Forward-Port-Of: odoo/enterprise#116068
This update adjusts how errors during GIF searches are logged. Previously, errors were flagged as critical issues, but this change reclassifies them as warnings – a more appropriate response as the issue isn't a fundamental problem with the software. This improves logging clarity and reduces unnecessary alerts.
Original PR description
Currently, the logger prints an error message to the terminal when an error occurs searching for GIFs on Tenor. This commit changes the logger error to a warning, since this is not an error in the codebase. sentry-7218806107
This update fixes an issue where deleting all website records would cause a website access error. The fix adds a check to ensure at least one website remains before allowing deletion, preventing a 'False' value from triggering an error and improving website stability.
Original PR description
Currently an error occurs when the user unlinks all websites and tries to access the frontend ( website). Steps to produce an error: - Install the website module - Delete external identifier…
Currently an error occurs when the user unlinks all websites and tries to access the frontend ( website). Steps to produce an error: - Install the website module - Delete external identifier default_website - Delete the My Website from Website > Configuration > Websites - An error will occur when we try to access the website. Error: `TypeError: expected string or bytes-like object, got 'bool'` This issue was generated because while setting cookies to the Werkzeug response, we got 'value' as a `False` at line [1], and the `value` is the language code from the request (see line [2]) . The language is determined by the `IrHttp` class through the `_get_default_lang` method (see code line [3]). In the website module, this method is overridden to return the language configured on the current website. However, when all websites are deleted, no valid website record remains. As a result, the method attempts to retrieve the language from an empty website, which returns `False` (see code line [4]), leading to the issue. This commit fixes the issue by preventing the deletion of all website records. The method `_unlink_except_default_website` already ensures that the default website (identified by the external ID `website.default_website`) cannot be deleted. However, if this external identifier has been removed, the safeguard no longer applies, allowing the default website to be deleted without raising any error. To address this, an additional check has been introduced: when the `default_website` is not found, the system verifies whether any website records remain using search_count. If no records are found, a `UserError` is raised to prevent the deletion and ensure that at least one website always exists. [1]: https://github.com/odoo/odoo/blob/cdf8aaec82ee387c8f29b8327efbc95fd17e2cb8/odoo/http.py#L1825 [2]: https://github.com/odoo/odoo/blob/cdf8aaec82ee387c8f29b8327efbc95fd17e2cb8/addons/http_routing/models/ir_http.py#L518 [3]: https://github.com/odoo/odoo/blob/cdf8aaec82ee387c8f29b8327efbc95fd17e2cb8/addons/http_routing/models/ir_http.py#L407-L411 [4]: https://github.com/odoo/odoo/blob/cdf8aaec82ee387c8f29b8327efbc95fd17e2cb8/addons/website/models/ir_http.py#L288 sentry-7413005338
This update resolves issues where employees weren't properly checked out of attendance when archived, and where access errors occurred during planning slot archiving. The fix utilizes a 'sudo' method to grant necessary permissions for updating attendance and planning data, ensuring a smoother and more reliable employee archiving experience.
Original PR description
- Attendance checkout - Step to reproduce: with attendance installed and an employee checked in, archive that employee by HR user. If missing attendance rights, the employee will be archived but not…
- Attendance checkout
- Step to reproduce: with attendance installed and an employee checked in, archive that employee by HR user. If missing attendance rights, the employee will be archived but not checked out from its ongoing attendance.
- Cause: if no role set for Attendance (default), no permission to update the employee attendance while archiving.
- Solution: using sudo method so that any user with sufficient rights to archive an employee, can trigger check out of the corresponding attendance.
- Planning access error (fixed in 18.0 by https://github.com/odoo/odoo/pull/219395)
- Step to reproduce: with attendance and planning installed, archive an employee having planning slots. If missing planning rights, an access error is raised
- Cause: on employee archive, the corresponding planning.slots are updated and some fields recomputed with insufficient rights.
- Solution: using sudo method for recompute.
Task: 6131692
Forward-Port-Of: odoo/odoo#264518
Forward-Port-Of: odoo/odoo#260566This update fixes a potential error in Odoo's accounting system. Previously, using payable or receivable accounts as transition accounts for cash basis taxes could trigger validation errors. This change restricts users from selecting these account types, ensuring data consistency and preventing unexpected errors during invoice processing.
Original PR description
## **Issue** When a cash basis tax is configured with a payable/receivable transition account, tax journal items are generated on that account without a due date. Since payable/receivable accounts…
## **Issue** When a cash basis tax is configured with a payable/receivable transition account, tax journal items are generated on that account without a due date. Since payable/receivable accounts require a due date on journal items, this leads to a validation error during move creation: "Any journal item on a payable account must have a due date and vice versa." ## **Steps to reproduce:** 1. Install the Accounting and Inter-Company modules. 2. Create an additional company so that there are a total of two companies, then switch to Company 1. 3. Create a product with a price and assign a tax to it. 4. Navigate to Accounting → Configuration → Settings and enable Cash Basis accounting. 5. Go to Accounting → Configuration → Taxes and open the purchase tax (or the tax assigned to the product). 6. In the Tax Computation section, ensure that Group of Taxes is not selected. 7. Under the Advanced Options tab, set Tax Exigibility to Based on Payment. 8. Set the Cash Basis Transition Account to a payable account. 9. Open Company Settings, select Company 1, go to the Inter-Company Transactions section, and enable Synchronize invoices/bills. 10. Switch to Company 2 and create an invoice using the same product. Select the contact that is the partner of Company 1. 11. Confirm the invoice. The following error is raised: "Any journal item on a payable account must have a due date and vice versa." ## **With This Commit:** Added a domain on the Cash Basis Transition Account field to prevent users from selecting payable or receivable accounts, avoiding invalid configurations and runtime validation errors. opw-6189615 Forward-Port-Of: odoo/odoo#264777 Forward-Port-Of: odoo/odoo#263792
This update fixes an issue where e-Faktura invoices for non-Polish customers incorrectly included the country code in the VAT number. The fix ensures the correct VAT number format is used, aligning with KSeF regulations and preventing potential invoice rejection. This ensures compliance and accurate invoice generation.
Original PR description
Currently, an incorrect VAT format is used in the generated `FA3 XML` for non-Polish partners, where the VAT number includes the country code. **Steps to reproduce:** - Install the `l10n_pl_edi`…
Currently, an incorrect VAT format is used in the generated `FA3 XML` for non-Polish partners, where the VAT number includes the country code. **Steps to reproduce:** - Install the `l10n_pl_edi` module and switch to a `PL Company`. - Go to Settings and enable `Allow KSeF integration` (refer to [1]). - Create and confirm an invoice for a customer (e.g., Azure Interior). - Send the invoice using `by KSeF (e-Faktura)`. **Observation:** In the generated XML file, the `NrID` field contains the VAT number `with the country code` for non-Polish partners. **Root Cause:** At [2], `get_vat_number` sets the VAT number using `compact` from `stdnum.pl.nip`, which only works for Polish VAT numbers. At [3], `get_vat_number` correctly formats Polish VAT numbers without the country code in the `if condition`. However, in the fallback (else) case, it returns the VAT number as it is, including the country code. **Fix:** This commit ensures that for non-Polish VAT numbers, the country code is removed before setting the `NrID` or `NrVatUE` values in the XML, aligning the format with KSeF requirements. Ref: https://ksef.podatki.gov.pl/media/4u1bmhx4/information-sheet-on-the-fa-3-logical-structure.pdf (Page no.: 19) [1]: https://www.odoo.com/mail/message/1057847327 [2]: https://github.com/odoo/odoo/blob/d73e5662a0af7c549008661f743ba5d51f765339/addons/l10n_pl_edi/models/account_move.py#L257 [3]: https://github.com/odoo/odoo/blob/d73e5662a0af7c549008661f743ba5d51f765339/addons/l10n_pl_edi/data/fa3_template.xml#L67-L82 opw-6120118 Forward-Port-Of: odoo/odoo#263081
This update fixes an issue where portal messages were incorrectly restricted, preventing access to certain types of non-internal messages. The change ensures that internal notes remain hidden while allowing all other non-internal message types to be visible to users. This improves the overall usability of the portal.
Original PR description
*: test_mail_full Since #138233, portal messages were strictly filtered by the `mt_comment` subtype. This was intended to hide internal notes, but it incorrectly excluded other non-internal message subtypes. Basically we want the share domain (`_get_search_domain_share()`) to apply to all users in the portal. This change ensures internal notes remain hidden while allowing all other non-internal non-comment subtypes to be visible. opw-6031571 Forward-Port-Of: odoo/odoo#264431 Forward-Port-Of: odoo/odoo#263052
This update fixes an issue where the print button disappeared from PDF attachment previews in version 19 and later. The change removes a redundant setting that was hiding the print button on desktop, ensuring it's consistently visible for all users. This restores a key functionality for users to print PDF documents.
Original PR description
**Problem:** When opening a PDF attachment preview in v19+, the print button disappeared. As a result, the Print button is not accessible from the main toolbar. In v18 the buttons remained…
**Problem:** When opening a PDF attachment preview in v19+, the print button disappeared. As a result, the Print button is not accessible from the main toolbar. In v18 the buttons remained permanently visible. **Steps to reproduce:** - Open any record that has a PDF attachment in the chatter. - Click the PDF attachment to open the preview popup. - Observe toolbar buttons disappeared. **Cause:** commit responsible for this: https://github.com/odoo/odoo/commit/b7889d007f72c7e7f9f22318a9968338cde0ddb3 It was removed to prevent some bugs with some android/smartdevice and some old browsers `file_viewer.js` passes `hidePrint: true` to `hidePDFJSButtons()`. This was originally added alongside the mobile guard (`isMobileOS()`), but the `isMobileOS()` guard in `hidePDFJSButtons` already handles mobile, so the explicit `hidePrint: true` in `file_viewer.js` was redundantly hiding Print on desktop too. https://github.com/odoo/odoo/blob/654a1caafc2ab7b2841c372910b2e81dc6e9c035/addons/web/static/src/core/file_viewer/file_viewer.js#L60-L71 https://github.com/odoo/odoo/blob/654a1caafc2ab7b2841c372910b2e81dc6e9c035/addons/web/static/src/core/utils/pdfjs.js#L35-L37 **Fix:** - Remove `hidePrint: true` from `file_viewer.js` since mobile is already covered by the `isMobileOS()` check inside `hidePDFJSButtons()`. opw-6216534 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#264739
This update corrects a bug where attendance records would disappear after a public holiday was added. The issue stemmed from a mismatch between how attendance dates were stored (in UTC) and how they were compared against local time zones. The fix ensures attendance dates are correctly converted to the employee's local time zone for accurate reporting.
Original PR description
**Steps to reproduce in runbot:** 1. Install hr_holidays_attendance. 2. Create an employee with a contract start date (e.g., April 1st). 3. Set the timezone(for both user and emp working schedule) to…
**Steps to reproduce in runbot:** 1. Install hr_holidays_attendance. 2. Create an employee with a contract start date (e.g., April 1st). 3. Set the timezone(for both user and emp working schedule) to Europe/Brussels. 4. Create an attendance record (e.g., April 15th). 5. Go to Reporting > Time Off Ledger and remove all filters. -> Attendance is correctly shown for all dates from April 1st 6. Create a public holiday on April 16th starting at 00:00. 7. Check the Time Off Ledger again. **Issue:** The attendance entry for April 15th disappears after adding the public holiday. **Cause:** Calendar leave datetime fields (date_from/date_to) are stored in UTC but compared against attendance dates without converting to the employee's resource calendar timezone, causing date boundaries to shift and records to be incorrectly excluded. https://github.com/odoo/odoo/blob/b293ce50e0fc9355ffd233557f079916b514eac7/addons/hr_holidays_attendance/report/hr_leave_attendance_report.py#L133-L144 **Solution:** Convert calendar leave datetimes to the resource calendar timezone before casting to date, ensuring comparisons reflect the correct local boundaries. **NOTE:** This issue is mainly reproducible on runbot since its server timezone is GMT. On local machines configured with UTC, the stored datetime values already align with the expected conversions, so the date shift does not occur. opw-6118043 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#262179
This update fixes a bug that allowed users to create multiple leave requests for the same day, even after previously approving and rejecting a leave. The fix ensures that the system accurately detects and prevents conflicting leave requests, improving data integrity and reducing potential scheduling errors. This change enhances the reliability of the holiday calendar.
Original PR description
Steps to reproduce:- - Navigate to Time off Dashboard calendar view. - Create a leave. First approve it then refuse it. - Now on the same day create a leave and approve it. - Now re-approve the…
Steps to reproduce:- - Navigate to Time off Dashboard calendar view. - Create a leave. First approve it then refuse it. - Now on the same day create a leave and approve it. - Now re-approve the previously refused leave from step 2. - System will let user to create 2 leave of same types on same day! Cause:- In `_compute_dashboard_warning_message`, refused/cancelled leaves were excluded from warning computation. When approving a refused request, the warning message was not set, allowing the constraint check to pass even when conflicting approved requests existed for the same period. Fix:- 1. Refactored `_compute_dashboard_warning_message` to only compute warnings for active leaves (non-refused/cancelled) while still detecting conflicts with already approved requests 2. Updated `_check_date` constraint to skip validation for refused/ cancelled leaves, but enforce it when state changes to validate 3. Added 'state' to constraint triggers to ensure validation runs when approving previously refused requests task-[6181717](https://www.odoo.com/odoo/project/1251/tasks/6181717) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#262703
This update resolves an issue where invoices using the 'O-service out of tax scope' tax category in Odoo failed Peppol validation. The fix ensures correct handling of this tax category, aligning with Peppol requirements and preventing validation errors. This ensures seamless integration with Peppol trading partners.
Original PR description
**PROBLEM** In peppol, there is a tax category 'O-service out of tax scope'. This tax category is used when what is invoice can't be tax (out of the tax scope). This is different from tax exemption: when using tax category O, there can't be any vat id on the invoice. This also means you can't use tax category O with other taxes, since other taxes need the vat id. Invoices generated by odoo with tax category O failed peppol validation. **STEP TO REPRODUCE** 1. install account_edi_ubl_cii_tax_extension. 2. Create a tax with tax category O. 3. Create an invoice and try validating using the file validator. 4. You should have error BR-O-02 and BR-O-05. opw-6012669 Forward-Port-Of: odoo/odoo#264081 Forward-Port-Of: odoo/odoo#254645
This update resolves an issue where Odoo was attempting to process invalid GSTR2B attachments due to missing file content. The fix ensures that attachments have both metadata and actual file data before being processed, preventing errors and improving the reliability of tax reporting.
Original PR description
There may be databases contained GSTR2B JSON attachments whose metadata was still present in `ir.attachment`, but whose underlying binary content was missing from the filestore. This caused the matching flow to attempt processing invalid JSON payloads instead of moving the return to `error_in_fetching`. The condition validating JSON attachments now also checks that the attachment raw content exists before adding it to the payload list. opw-6088082 Forward-Port-Of: odoo/enterprise#117083
This update fixes an issue where flexible employee overtime calculations were inaccurate. The fix ensures that overtime hours are correctly computed based on the employee's flexible schedule, addressing a discrepancy in how the system determined worked hours. This ensures accurate overtime payments for flexible employees.
Original PR description
__ ## Short functional explanation of the error When setting attendances on several consecutive days for a flexible employee, with an overtime ruleset containing a single rule. This rule being based…
__ ## Short functional explanation of the error When setting attendances on several consecutive days for a flexible employee, with an overtime ruleset containing a single rule. This rule being based on week and quantity. When regenerating overtimes for this ruleset, the overtime hours generated isn't correct. ## Reproduction Steps 1. Create an employee. In the Payroll tab, set a start date for their contract. Set Work Entry Source as Attendances. Set their Working Hours as a flexible schedule. Set their weekly hours at 40. 2. Create an Overtime Ruleset. Add a single rule, based on Quantity, if the worked hours on a `Week` differs `from the amount defined on the contract`. Check Pay Extra Hours and leave the Work Entry Type to use as Overtime Hours. 3. Go back to the employee. In Settings, set the Overtime Ruleset field as the new Overtime Ruleset you just created. 4. Create 5 attendances, each from 8 am to 6 pm, from Monday to Friday. 5. Go to the Overtime Ruleset you just created and click on Regenerate Overtimes. 6. Go back to Attendances. Search for your employee, and click on the list view. ### Expected behavior The employee's schedule is 40 hours per week. They worked 50 hours. 10 hours should be considered as Worked Extra Hours. ### Unexpected behavior 18 hours are considered as extra hours. ## Origin of the issue To compute the expected duration of the day, we run: https://github.com/odoo/odoo/blob/7fc5edc29f854d619dbcb5fcc3503fb18ca05335/addons/hr_attendance/models/hr_attendance_overtime_rule.py#L303-L304 where `schedule['work']` will contain intervals on 5 consecutive days, from 8 am to 4 pm. However, the last day of the employee's attendances isn't contained in these intervals. As a result, `period_schedule` will contain 4 days (the common days between the employee's Attendance days and `schedule['work']` ) and thus, `expected_duration` will be set at 36 hours instead of 40. In the case where overtimes are computed based on hours from the contract, for flexible employees, the expected hours are the ones indicated on their schedule. __ opw-6131543 Forward-Port-Of: odoo/odoo#263335
This update fixes an issue where Knowledge articles appeared in a narrow, unreadable format when printed on large screens. The fix specifically targets the Knowledge editor's form view, preventing a default CSS rule from causing this layout problem. Now, articles print correctly in a standard format.
Original PR description
Currently, a CSS rule forces the form container width to 1px to ensure that the nested list view can correctly compute its size. See: ```scss .o_form_view.o_xxl_form_view { .o_form_view_container {…
Currently, a CSS rule forces the form container width to 1px to ensure that the nested list view can correctly compute its size.
See:
```scss
.o_form_view.o_xxl_form_view {
.o_form_view_container {
width: 1px; /* List view needs a width value to recompute the size correctly */
}
}
```
However, since the Knowledge editor is implemented as a form view, this rule also affects Knowledge. When zooming out, the `o_xxl_form_view` class is added to the form view container, causing the rule to apply. If an article is printed while this class is present, it is constrained to an extremely narrow column, making it unreadable.
Steps to reproduce:
1. Open an article in Knowledge
2. Zoom out using `Ctrl` + `-`
3. Open the kebab menu and select "Export"
=> The article is rendered in a very narrow column.
To address this issue, we override this rule specifically for Knowledge. With this change, articles are now rendered correctly when printed or exported as PDF.
Task-5999878
Forward-Port-Of: odoo/enterprise#103259This update fixes an issue where tax returns were incorrectly including all tax amounts, regardless of the specific region (e.g., British Columbia vs. Manitoba). The change ensures that tax return entries accurately reflect taxes owed only for the correct tax jurisdiction, improving the accuracy of tax reporting. This impacts companies using Odoo's tax return functionality in Canada, Ecuador, Egypt, Paraguay, South Africa, and Kenya.
Original PR description
Issue: Validating a tax return creates an entry with all the tax aml from the company instead of filtering them according to the tax return type. Steps to reproduce: - In a company in Canada - Invoice a Customer from British Columbia in the previous month (A) - Confirm - Go to tax report -> Return - Review and Validate tax return for "Manitoba PST Return (CA)" for month A - Click on the 3 dots -> View Entry Current Behavior: - Entry has lines for PST in British-Columbia and GST taxes Expected behavior: - Entry has lines for PST in Manitoba only Cause: https://github.com/odoo/enterprise/pull/98158 introduces method `_get_vat_closing_entry_additional_domain` in the wrong class. opw-6065838 Forward-Port-Of: odoo/enterprise#116813 Forward-Port-Of: odoo/enterprise#116366
This update fixes a rounding error in the calculation of prepaid taxes for invoices in Saudi Arabia. The previous calculation was leading to incorrect tax amounts, particularly when using global rounding. This change ensures accurate tax calculations, aligning with Odoo's global rounding standards.
Original PR description
### Steps to reproduce: - Download 'Sales', 'Accounting', and 'l10n_sa_edi' modules - Settings > Accounting > Rounding Method > Enable global rounding - Create sale order with 8 lines at 29.7 each…
### Steps to reproduce: - Download 'Sales', 'Accounting', and 'l10n_sa_edi' modules - Settings > Accounting > Rounding Method > Enable global rounding - Create sale order with 8 lines at 29.7 each with 15% taxes (triggers rounding precision issues) - Create and confirm 100% downpayment invoice - Deliver, then create final invoice with downpayment lines - Call `_l10n_sa_get_prepaid_amount()` on final invoice > Tax amount was calculated as 35.67 instead of correct 35.64 ### Cause of Issue: The prepaid amount calculation was summing pre-rounded `tax_amount_currency` values from individual downpayment lines (4.45 + 4.46 + 4.46... = 35.67), instead of summing unrounded `raw_tax_amount_currency` values (4.455 × 8 = 35.64) to calculate `tax_amount`. https://github.com/odoo/odoo/blob/27930ae41a5f03bd499983109de7f632472c3650/addons/l10n_sa_edi/models/account_edi_xml_ubl_21_zatca.py#L227-L240 This violates Odoo's [recent change](https://github.com/odoo/odoo/pull/180062) in `round_globally` pattern which states: https://github.com/odoo/odoo/blob/8a88756bed194910bc5a47e93f0e29610dbeee1f/addons/account/models/account_tax.py#L2208 ### Fix: Ensure cumulative rounding errors are avoided and correct global rounding is applied. opw-5881564 Forward-Port-Of: odoo/odoo#264713 Forward-Port-Of: odoo/odoo#261278
This update fixes an issue where returned subcontracted products were incorrectly routed to the subcontractor's location instead of the user's stock. When returning products 'for exchange', the system now correctly directs returned items to the subcontractor's location and new deliveries to the user's stock, ensuring accurate inventory tracking and order fulfillment. This prevents misdirected stock movements and improves the efficiency of subcontracting operations.
Original PR description
## Issue When making a request for quotation for a subcontracted product and returning the delivery "for exchange", the new incoming delivery does not have the correct destination. Instead of having…
## Issue
When making a request for quotation for a subcontracted product and returning the delivery "for exchange", the new incoming delivery does not have the correct destination. Instead of having the stock of the user, the destination of the new incoming delivery is the same as its source: the subcontracting location.
<img width="1254" height="257" alt="5479900" src="https://github.com/user-attachments/assets/c7e6d392-8328-4a03-a71e-466e768f448b" />
## Steps to reproduce
1. Install MRP Subcontracting (`mrp_subcontracting`) and Purchase (`purchase`)
2. In Settings, enable *Subcontracting*
3. Create a Product P and a subcontracting BoM with Subcontractor S
4. Create a Request for Quotation
- Vendor: Subcontractor S
- Product: Product P (any quantity > 0)
5. Confirm the RFQ, receive the PO, validate the picking
6. On the validated picking, click *Return*, set the quantity of products to return, and click *Return for Exchange*
- This creates two new pickings, one to return the product(s) we received, and one to receive new products
7. Validate the two new pickings
8. **In Inventory > Reporting > Moves History, the very last `stock.move.line` has the same location in the *From* (`location_id`) and the *To* (`location_dest_id`) columns**
## Cause
The `location_dest_id` of the new `stock.move` is updated in `StockReturnPickingLine._prepare_move_default_values`.
https://github.com/odoo/odoo/blob/fb534f1eadcb8ef74e2ee6fd5b68872dddb978e3/addons/mrp_subcontracting/wizard/stock_picking_return.py#L20-L25
The condition added by https://github.com/odoo/odoo/commit/5404b426aac9 sets the destination of all returned subcontracted moves to the subcontractor location. This is incorrect when using "return for exchange", as in this case, the return move is directed towards the user's stock. In fact, when using "return for exchange", the following pickings are created:
| id | name | return_id | |
|:--:|--------------|:---------:|---|
| 1 | WH/IN/00001 | | Initial RFQ delivery |
| 2 | WH/OUT/00001 | 1 | Return of the initial RFQ delivery |
| 3 | WH/IN/00002 | 2 | New products delivery to replace the initial delivery. The stock.move.line of this stock.picking has a wrong `location_dest_id` |
## Fix
In the context of return for exchanges, the returned item must be directed to the *Subcontracting Location* while the new item must be directed to the *Stock*. In the `_prepare_move_default_values`, we should only set the `location_dest_it` to the subcontractor location for outgoing pickings.
opw-5479900
Forward-Port-Of: odoo/odoo#264798
Forward-Port-Of: odoo/odoo#245905This update ensures that fiscal category and product information is automatically loaded when using the self-order blackbox feature. Previously, this data wasn't consistently available, leading to potential inaccuracies. This change improves the reliability and accuracy of self-order transactions.
Original PR description
Before this commit, the fiscal category and the products work in and work out weren't necessarily automatically loaded when using the self with a blackbox, it is now the case. Forward-Port-Of: odoo/enterprise#117044
This update fixes an issue where dragging events with open popovers was impossible. The fix ensures that the popover closes automatically during drag-and-drop, allowing users to seamlessly move events. It also eliminates popover flickering that occurred during the drag process.
Original PR description
[FIX] web: fix event drag and drop with opened popover Fix impossible event drag and drop when the event has its popover opened. On drag start, the popover should close to allow dragging the event. [FIX] web,calendar: fix popover flicker on event drag Fix the popover flickering when drag and dropping an event with its popover opened. Task-5965017 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#264347
This update corrects an issue where live chat conversations were incorrectly marked as read without user interaction. The change ensures that the chat window's focus state is properly managed, preventing unintended read-state updates and maintaining accurate conversation tracking. This improves the user experience for live chat.
Original PR description
Before this Commit: Previously, autofocusThread used an incremented autofocus value to handle re-render/reactivity cases for chat windows opened through `autoOpenChatWindowOnNewMessage`. However, this logic was too broad because it could trigger `mark-as-read` behavior even when the chat window, thread, or composer was not actually focused. This resulted in conversations being marked as read without any real user interaction. After this Commit: With this change, autofocusThread now directly reuses the chat window autofocus value instead of incrementing it, avoiding unnecessary read-state updates while still preserving the expected focus behavior. This commit also reverts the behavior introduced in: https://github.com/odoo/odoo/pull/253609 to align with the behavior implemented in: https://github.com/odoo/odoo/pull/263607 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#264940
This update optimizes how Odoo retrieves country state information, specifically for invoices and sales orders in the Indonesian localization. The change avoids a slow, repeated database query, resulting in faster performance, particularly during import processes. This improves overall system responsiveness.
Original PR description
There is no need to do a query to get a random foreign state. This search can be performed many times during imports. While the query is generally not reading a lot of data, it is still doing a seq…
There is no need to do a query to get a random foreign state. This search can be performed many times during imports.
While the query is generally not reading a lot of data, it is still doing a seq scan because of the ORDER BY, while the query can be avoided completely.
```sql
EXPLAIN ANALYZE
SELECT "res_country_state"."id"
FROM "res_country_state"
WHERE "res_country_state"."code" NOT IN ('IN')
ORDER BY "res_country_state"."code", "res_country_state"."id"
LIMIT 1;
QUERY PLAN
------------------------------------------------------------------------------------------------------------------------------
Limit (cost=84.93..84.94 rows=1 width=8) (actual time=0.450..0.450 rows=1 loops=1)
-> Sort (cost=84.93..90.49 rows=2224 width=8) (actual time=0.449..0.449 rows=1 loops=1)
Sort Key: code, id
Sort Method: top-N heapsort Memory: 25kB
-> Seq Scan on res_country_state (cost=0.00..73.81 rows=2224 width=8) (actual time=0.012..0.281 rows=2223 loops=1)
Filter: ((code)::text <> 'IN'::text)
Rows Removed by Filter: 2
Planning Time: 0.075 ms
Execution Time: 0.462 ms
```
This can be worse if when the table is not in the buffer.
Forward-Port-Of: odoo/odoo#265007This update fixes a usability issue where users could inadvertently edit the cover image, title, and subtitle of a blog post from the 'Next Post' section. The change restricts editing capabilities within this section, ensuring users only modify content within their current view and improving the overall user experience.
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#249815This update enhances self-attendance rights by allowing employees to modify their attendance records, including overtime, unless approved by their manager. It also restricts editing capabilities in the Gantt view and hides overtime details for self-attendance users, improving data accuracy and control. This change ensures employees have greater flexibility while maintaining appropriate managerial oversight.
Original PR description
Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: . Add new behavior so that self attendance right should be able to modify his attendances, even if they have overtime, unless this overtime has been approved by Manager . Disable attendance modify/drag/extend on the gantt view for self attendance right if not supposed to edit . Hide Overtime Details page for self attendance right if not supposed to edit . Add corresponding tests task-6067711 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update enhances self-attendance employees' ability to modify their own attendance records, including overtime, unless approved by a manager. It also restricts editing capabilities in the Gantt view and hides overtime details for these users, ensuring data integrity and streamlined workflows. This change improves employee self-service and reduces administrative overhead.
Original PR description
Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: . Add new behavior so that self attendance right should be able to modify his attendances, even if they have overtime, unless this overtime has been approved by Manager . Disable attendance modify/drag/extend on the gantt view for self attendance right if not supposed to edit . Hide Overtime Details page for self attendance right if not supposed to edit . Add corresponding tests task-6067711
This update corrects a problem where the 'Partner Pages List' view was incorrectly trying to modify a field added by the Mail module. This prevented the base module from upgrading properly. The fix ensures the view inherits correctly from the Mail module's version, guaranteeing the necessary field ('activity_ids') is available.
Original PR description
The `partner_pages_tree_view` was attempting to modify `activity_ids` field attributes, but this field is added by the mail module in a sibling inheritance branch…
The `partner_pages_tree_view` was attempting to modify `activity_ids` field attributes, but this field is added by the mail module in a sibling inheritance branch ([mail.res_partner_view_tree_inherit_mail]), making it unreachable from the [`partnership.view_res_partner_grade_tree`] ancestry chain:
```py
base.view_partner_tree → partnership.view_res_partner_grade_tree → partner_pages_tree_view
base.view_partner_tree → mail.res_partner_view_tree_inherit_mail ← activity_ids lives here
```
This caused a ParseError during base module upgrade:
```py
File "/home/odoo/odoo/odoo/odoo/tools/convert.py", line 639, in _tag_root
raise ParseError(msg) from None # Restart with "--log-handler odoo.tools.convert:DEBUG" for complete traceback
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
odoo.tools.convert.ParseError: while parsing /home/odoo/odoo/odoo/odoo/addons/base/views/res_partner_views.xml:13
Error while parsing or validating view:
Element '<field name="activity_ids">' cannot be located in parent view
View error context:
{'file': '/home/odoo/odoo/odoo/odoo/addons/base/views/res_partner_views.xml',
'line': 1,
'name': 'Partner Pages List',
'view': ir.ui.view(2148,),
'view.model': 'res.partner',
'view.parent': ir.ui.view(2108,),
'xmlid': 'website_crm_partner_assign.partner_pages_tree_view'}
```
**Steps to reproduce:**
- In a v19.1 db install `website_crm_partner_assign`
- Go to apps and search base module and click upgrade
**Fix:**
Make the partner view from partnership inherit from the one defined in mail instead of the one defined in base.
opw-6186684
[mail.res_partner_view_tree_inherit_mail]: https://github.com/odoo/odoo/blob/saas-19.3/addons/mail/views/res_partner_views.xml#L58C21-L67
[`partnership.view_res_partner_grade_tree`]: https://github.com/odoo/odoo/blob/f3b317310b84edb073009f7d15d7fec002f3ccf0/addons/partnership/views/res_partner_views.xml#L48-L57
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prThis update removes a potential risk for our IoT boxes by ensuring they can never check out the main development branch (master). This change addresses a previously unnecessary and potentially harmful process, enhancing the stability and security of our IoT integrations.
Original PR description
This PR removes a possibility for an iot box to ever checkout master. Since the latest stable version policy checking out to master is never used and is dangerous
This update fixes an issue where incorrect data on payslips could trigger warnings. The change ensures that payslips with flawed information are handled more gracefully, preventing disruptions to payroll processing. This improves the reliability and stability of the HR payroll module.
Original PR description
Task: 6133111
A recent change incorrectly set a single deadline for all stock moves on a Sale Order, regardless of individual line lead times. This resulted in inaccurate delivery scheduling. This fix removes the automatic assignment of a commitment date, allowing deadlines to be correctly calculated based on each line's lead time.
Original PR description
Version: -------- - saas-19.1+ Step to reproduce: ---------------------- * Install *sale_management* and *stock* modules. * Create a Sale Order with at least two order lines. * Set different…
Version:
--------
- saas-19.1+
Step to reproduce:
----------------------
* Install *sale_management* and *stock* modules.
* Create a Sale Order with at least two order lines.
* Set different *Customer Lead Time* (it is optional hide by default)
on each line:
* Line A: 5 days
* Line B: 10 days
* Confirm the Sale Order.
* Open the generated Delivery Order.
* Enable the *Deadline* field on stock moves (it is optional hide by default).
* Check the *Deadline* value for each move
issue:
-----
* Both stock moves have the same *Deadline*, corresponding to the minimum
lead time (earliest date), instead of their respective values.
Root cause:
-----------
1. User confirms a Sale Order with two lines:
- Line A: customer_lead = 5 → _expected_date() = order_date + 5
- Line B: customer_lead = 10 → _expected_date() = order_date + 10
2. sale.order.action_confirm()
└─ Before calling `_action_confirm()`, the method set:
`order.commitment_date = order.expected_date`
where `expected_date = min(all line._expected_date()) = order_date + 5`
3. sale.order._action_confirm()
└─ calls order_line._action_launch_stock_rule()
https://github.com/odoo/odoo/blob/00edcf55380431c454857b2749f2fe4930b1e758/addons/sale_stock/models/sale_order.py#L209
4. sale.order.line._action_launch_stock_rule()
└─ per line: calls line._prepare_procurement_values()
5. sale.order.line._prepare_procurement_values()
└─ date_deadline = self.order_id.commitment_date or self._expected_date()
Because commitment_date was force-set in step 2, BOTH lines resolve to
order_date + 5 instead of their individual values.
https://github.com/odoo/odoo/blob/00edcf55380431c454857b2749f2fe4930b1e758/addons/sale_stock/models/sale_order_line.py#L281
NOTE:
------
This issue originates from changes introduced in task: https://www.odoo.com/odoo/project/966/tasks/4687135
That task aimed to add the Promise Date to Purchase Order Lines and, during
confirmation, assign it as the expected arrival date.
* This behavior works correctly in Purchase Orders because the Promise Date is
applied at the purchase order line level and aligned with each
line’s expected arrival date. It does not participate in the computation of
date_deadline.
- In the purchase flow:
The incoming stock move date_deadline is directly derived from each line’s
expected arrival date.
https://github.com/odoo/odoo/blob/00edcf55380431c454857b2749f2fe4930b1e758/addons/purchase_stock/models/purchase_order_line.py#L308
There is no dependency on a promise date.
As a result, deadlines remain per-line and accurate.
However, in the Sale Order flow, the same approach introduces an issue.
Here:
The Promise Date (commitment_date) exists at the order level, not at line level.
During confirmation, it is set using the minimum of all line expected dates.
The delivery stock move date_deadline depends on this commitment_date.
As a consequence:
Setting a single order-level promise date overrides all per-line expected dates.
All stock moves receive the same (minimum) deadline.
Additionally, this is not aligned with the business logic:
Example:
Line A → lead time = 5 days
Line B → lead time = 10 days
Current behavior sets deadline = min(5, 10) = 5 days for all moves,
which incorrectly forces later deliveries to be scheduled earlier than intended.
Solution:
---------
* Remove the automatic assignment of commitment_date = expected_date in action_confirm().
commitment_date is a user-defined promised delivery date and should not be
implicitly set during confirmation. By leaving it unset, procurement values
correctly fall back to line._expected_date(), restoring per-line deadline
computation.
---
opw-6106045This update resolves a technical issue related to order validation in Point of Sale, specifically for the Food Delivery Module (FDM). By extracting a key process, we now allow for more flexible order adjustments and prevent orders from being prematurely finalized when errors occur, improving reliability.
Original PR description
In order to allow patching (in particular for FDM, where we don't want to finalize the validation of the order if there is an error), we extract the waiter method. see odoo/enterprise#104468 Forward-Port-Of: odoo/odoo#244298
This update fixes an issue where the Point of Sale (PoS) system incorrectly displayed order prices as $0. The change ensures the correct order total is calculated and shown on the feedback screen, even when requests are delayed. It also prevents the PoS from finalizing validation if an error occurs, improving overall order processing reliability.
Original PR description
We now call manually `setOrderPrices` on order validation to ensure `amount_total` is set on the order before displaying the feedback screen which depends on it. The issue is that requests to the FdM delay the call to this method, making the PoS display `0` as the amount is `undefined` in the meantime. We also ensure the PoS doesn't finalize the validation if an error occurs. see odoo/odoo#244298 Forward-Port-Of: odoo/enterprise#104468
A previous error prevented users from searching for links within email click tracking. This update resolves the issue by correcting how the system handles link searches, ensuring accurate results when searching by short URL. This improves the reliability of our email marketing analytics.
Original PR description
Overview ------ When searching based on the `Link (short_url)` field in the search bar, in the `link.tracker.click` list view, an error fires up. How to Reproduce ------ 1. Open the Email Marketing…
Overview ------ When searching based on the `Link (short_url)` field in the search bar, in the `link.tracker.click` list view, an error fires up. How to Reproduce ------ 1. Open the Email Marketing app 2. Create a new mailing (or you can use an existing one that has some clicks) and send it 3. Make a click in the email from the recipient's side 4. Open the link tracker `click` related to that mailing (select the mailing → `Link Trackers` stat button → click on a link → `Clicks` stat button) 5. Make a search based on the Link (short_url) field Expected Behavior ------ Return the list of links that matches the entered search query. Current Behavior ------ Odoo Server Error. Cause & Solution ------ The cause of this error is that the `shor_url` field is a computed, non-stored, field, and hence, we cannot directly make a search on it. So, either we make the `short_url` a stored field, which is not so efficient, or we create our own custom `_search_..` method. Task-6131693 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#263635 Forward-Port-Of: odoo/odoo#260146
This update resolves an issue where undoing a template conversion would prevent creating new templates from the same project. The fix ensures the original project's documents are properly restored and cleaned up after the undo, allowing users to create templates again without errors. This improves the usability of the project template feature.
Original PR description
Steps to Reproduce: --- 1. Create a new project. 2. Convert it into a template. 3. Click on "Undo". 4. Try to convert the project into a template again. Issue: --- After undoing the template…
Steps to Reproduce: --- 1. Create a new project. 2. Convert it into a template. 3. Click on "Undo". 4. Try to convert the project into a template again. Issue: --- After undoing the template conversion, the project's original documents folder remained archived while the template's documents folder stayed active. This inconsistent state prevented subsequent template creation from the same project. Current behaviour: --- A UserError is raised: "You cannot duplicate document(s) in the Trash." Expected behaviour: --- Undoing the template conversion should properly restore the original project's documents folder to active state and clean up the template's documents folder, allowing template conversion again without document folder conflicts. Fix: --- - Archive original project's documents folder during template creation to prevent mixed active/inactive states during copy operations - Implement callback system to properly unarchive original project's documents folder during undo task-4916027 Forward-Port-Of: odoo/odoo#264429 Forward-Port-Of: odoo/odoo#223152
This update resolves a bug that prevented users from recreating templates after undoing a previous conversion. The fix ensures that the original project's documents folder is properly restored during the undo process, eliminating a frustrating error message. This improves the stability and usability of the template creation feature.
Original PR description
Steps to Reproduce: --- 1. Create a project with documents. 2. Convert it into a template. 3. Click on "Undo". 4. Try to convert the project into a template again. Issue: --- After undoing the template conversion, the project's original documents folder remained archived while the template's documents folder stayed active. This inconsistent state prevented subsequent template creation from the same project. Current behaviour: --- A UserError is raised: "You cannot duplicate document(s) in the Trash." Expected behaviour: --- Undoing template conversion should properly restore original project's documents folder and clean up template's documents folder. Fix: --- - Archive original project's documents folder during template creation - Implement documents folder unarchival during undo operations task-4916027 Forward-Port-Of: odoo/enterprise#117303 Forward-Port-Of: odoo/enterprise#91595
This update fixes an issue where the bottom sheet wasn't consistently appearing on larger touch devices (like tablets). Previously, a dropdown was shown instead, which was visually incorrect. Now, the bottom sheet is always displayed, ensuring a consistent and user-friendly experience across all screen sizes.
Original PR description
Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#264705
This update fixes an issue where the spreadsheet feature was making unnecessary server requests when displaying CRM lists. The change ensures that all required data is fetched efficiently, reducing the number of calls to the server and improving spreadsheet loading times. This results in a smoother and faster user experience.
Original PR description
How to reproduce: - Create a spreadsheet with a CRM list and only set 2 cells content A1: =odoo.list(1, 1, "id") A2: =odoo.list.header(1,"zip") - save and reload the spreadsheet and look at the server calls ⮕ web_search_read called 2 times The problem is that the datasource methods early return if the datasource is already loading without adding the field to the list to fetch. It was partially solved by explicitely adding the field to fetch in the *getter* `getListCellValueAndFormat` but not on `getListHeaderValue`. This revision ensures that we always add the field to the list to fetch in the datasource directly, this responsibility should not be held by the plugin getters. Task-6175523 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#261985
This update prevents users from archiving Point of Sale (POS) configurations while an active sales session is running. This change ensures data integrity and avoids potential disruptions to sales transactions. The update includes a new test case to verify this protection.
Original PR description
Add 'active' to _get_forbidden_change_fields to block archiving a Point of Sale configuration while a session is still open. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#246760
This update resolves an issue preventing non-administrator users from viewing user settings within the Odoo Enterprise platform. Previously, users lacked access to the 'Settings/Users' view, hindering their ability to manage user accounts. This change ensures all users can access essential user management features.
Original PR description
Steps:
- Create a user X with admin rights
- Connect as X
- Open Settings/Users
- Access right error
```
Failed to read field res.users.database_user_ids
You are not allowed to access 'Database User' (databases.user)
```
opw-6209241
Forward-Port-Of: odoo/enterprise#117573This update ensures that the first product variant shown on the external website matches the order in which it appears on category pages and within the product configurator. By setting specific sequence values, the system now correctly prioritizes variant display, enhancing the user experience and consistency across sales channels.
Original PR description
When generating a product, set product.template.attribute.value sequences so that the variant that shows first in the external website is also first by _get_first_possible_variant_id(). This ensures the correct variant image appears on the shop category page and is pre-selected in the product configurator.
This update resolves a problem preventing the correct loading of icon assets (like .woff2 files) within the Odoo website. The fix ensures consistent handling of these assets, preventing errors and improving the visual appearance of the website. This improves the user experience by ensuring icons load correctly.
Original PR description
Currently, an exception is raised while loading icon content assets such as `.woff` or `.woff2`, due to a mismatch between the requested asset version and the latest available version. Steps to…
Currently, an exception is raised while loading icon content assets such as `.woff` or `.woff2`, due to a mismatch between the requested asset version and the latest available version. Steps to produce: - Install website - Open page `/web/assets/1/6a783c3/web.odoo_ui_icons.min.woff2` Error: `UnboundLocalError: cannot access local variable 'assets' where it is not associated with a value` This issue occurs because the code at [1] compares `binary.extension` with `asset_type`, causing the condition to fail because `binary.extension` contains values such as `woff` or `woff2`, while `asset_type` is set to `'binary'`. The root cause is that `asset_type` with value `'binary'` is being passed as a parameter to the `bundle.get_link` method (see [2]). The `asset_type` value comes from the `_parse_bundle_name` method (see [3]), where it is set to `'binary'` whenever the file extension belongs to `BINARY_EXTENSIONS`, such as `woff` or `woff2` (see [4]). This commit fixes the inconsistency between `bundle.get_version()` and `bundle.get_link()` when `binary` is `True`. Currently, `bundle.get_version()` used `extension if binary else asset_type`, while `bundle.get_link()` always received `asset_type`. This could lead to an incorrect redirect when handling binary assets. The fix normalizes the value by updating `asset_type` beforehand and reusing it consistently in both `bundle.get_version()` and `bundle.get_link()`. This also improves readability by removing the inline conditional expression. [1]: https://github.com/odoo/odoo/blob/8a2e001cffd381a89ab192f2e391ccc0843108c4/odoo/addons/base/models/assetsbundle.py#L166 [2]: https://github.com/odoo/odoo/blob/8a2e001cffd381a89ab192f2e391ccc0843108c4/addons/web/controllers/binary.py#L146 [3]: https://github.com/odoo/odoo/blob/8a2e001cffd381a89ab192f2e391ccc0843108c4/odoo/addons/base/models/ir_asset.py#L93-L94 [4]: https://github.com/odoo/odoo/blob/8a2e001cffd381a89ab192f2e391ccc0843108c4/odoo/tools/constants.py#L6-L7 Sentry-7441025709
This update resolves a problem that prevented upgrades when a module modified tax account tags within the chart of accounts. The fix replaces a problematic function call with a simpler parsing method, ensuring the upgrade process completes successfully and avoids data inconsistencies. This improves the stability and reliability of the system.
Original PR description
When a module depends on `l10n_account_withholding_tax` and updates tax account tags on the chart of accounts, the upgrade fails. `_withholding_tax_get_demo_account_ref` calls `_get_account_tax`, which calls `_deref_account_tags`, throwing an error due to missing tags in the database since the deref tags function dri. This occurs because the depening module tags has not updated yet as it needs to be triggered by the user post upgrade. This fix uses `_parse_csv` instead to avoid calling `_deref_account_tags` and triggering the issue. task-4967527 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update addresses a problem where translations weren't loading correctly due to a change in the Markupsafe library. The fix ensures translations are properly evaluated, maintaining compatibility with older Odoo versions while supporting the latest Markupsafe 3.0.0 used in our systems.
Original PR description
In Markupsafe 3.0.0, a refactoring [^1] aiming at simplifying speedups implementation had an impact on the encapsulated templates introduced in commit odoo/odoo@aab7b846cdb8e77701c5e84e81d9c95bd9cd0894. More precisely, the eventual subtitles containing most of the time lazy translation, those were not evaluated in the right context anymore leading to being unable to find the lang to translate into. This commit fixes it by forcing the evaluation of the translation at a point were the context makes sense and contains the right lang when using Markupsafe 3.0.0+ (used in Ubuntu Resolute), while maintaining compatibility with 2.1.5 (used in Ubuntu Noble and Debian Trixie). [^1]: https://github.com/pallets/markupsafe/commit/dcb170b127137880729ac66f03cb590fff562225
This update optimizes a key calculation within the MRP subcontracting purchase module, reducing unnecessary database queries. Specifically, it prevents the system from searching for BOM associations when computing lead times for orderpoints. This results in faster processing, particularly when managing a large number of orderpoints, leading to a smoother user experience.
Original PR description
When computing `qty_to_order` 1-3 extra queries are made by `get_lead_days()`, which can cause performance issues when computing `qty_to_order` for a large number of orderpoints. This commit aims to…
When computing `qty_to_order` 1-3 extra queries are made by `get_lead_days()`, which can cause performance issues when computing `qty_to_order` for a large number of orderpoints. This commit aims to prevent these extra queries by returning early if the current product is not associated with a bom. The amount this commit speeds up the compute depends on how many of products passed into `_get_lead_days()` are associated with a bom. `qty_to_order` is no longer a stored field after this commit: https://github.com/odoo/odoo/pull/159432 This benchmark was done in 18.0 on /stock.warehouse.orderpoint/search_panel_select_range. This call does not trigger the compute on all orderpoints in 17.0 as the field is stored but calling the compute directly on all orderpoints results in the same speed up as seen in 18.0. | Orderpoints | % of products linked to a bom | Time before | Queries before | Time after | Queries After | |-------------|-------------------------------|-------------|----------------|------------|---------------| | 800 | 50% | 2.8s | 1570 | 2.3s | 818 | | 8,000 | 0% | 28.2s | 16,698 | 15.3s | 242 | | 8,000 | 25% | 29.6s | 16,833 | 19.2s | 4497 | | 8,000 | 50% | 29.8s | 16,925 | 23.2s | 8693 | | 8,000 | 75% | 31.6s | 16,949 | 27.6s | 12827 | Forward-Port-Of: odoo/odoo#262321
This update fixes an issue where employees with overlapping flexible schedules were shown with double the reported hours in attendance reports. The fix ensures that shifts are counted correctly, regardless of their duration across multiple days, resulting in accurate attendance tracking.
Original PR description
__ ## Short functional explanation of the error When for an employee with a Flexible schedule, we set a shift overlapping on two days. The attendance report displays twice the worked hours. ##…
__ ## Short functional explanation of the error When for an employee with a Flexible schedule, we set a shift overlapping on two days. The attendance report displays twice the worked hours. ## Reproduction Steps 1. Create an employee with a flexible schedule and with Work Entry Source set at Planning. 2. Go to Planning. Create a Planning Slot for this employee from 9 pm to 5 am, then Send and Publish it. 3. Click on the Reporting tab > Planning / Attendance Analysis. ### Expected behavior The total for this Month for this employee under the Planned Time field should be equal to 8 hours, which is the duration of the planning slot. ### Unexpected behavior The total for this Month for this employee under the Planned Time field is equal to 16 hours. ## Origin of the issue This report is a view, for which the SQL is defined starting this line: https://github.com/odoo/enterprise/blob/7362f1c5be7f496bdab660ed8fad37a6dd283616/planning_attendance/report/planning_attendance_analysis_report.py#L27 the issue stems from here: https://github.com/odoo/enterprise/blob/7362f1c5be7f496bdab660ed8fad37a6dd283616/planning_attendance/report/planning_attendance_analysis_report.py#L56 where we don't select distinct the planning entries based on their ID. As our shift overlaps 2 days, there will be only one entry for this shift in the `planning_slot`, but because of that, it will be duplicated. __ opw-6146052 Forward-Port-Of: odoo/enterprise#115447
This update allows Invoicing Administrators to delete or modify reconciled lines in the accounting system, resolving a previous restriction. The change ensures consistent access control based on the line's review state, aligning with existing accounting rules. This improves flexibility and efficiency for users managing invoices.
Original PR description
Deleting or editing a reconciled line raised "Validated entries can only be changed by your accountant." for Invoicing Administrators because the check only tested `group_account_user`, which is not granted by the Invoicing privilege chain. Delegate to `AccountMove._check_review_state_access()` to apply the same rules as `account.move`: - `'supervised'` → requires `group_account_manager` - `'reviewed'` → requires `group_account_user` or `group_account_manager` - `'todo'` / `'anomaly'` → no restriction opw-6128792
This update removes unnecessary progress reporting from Odoo's automation and autovacuum processes. This prevents the job scheduler from incorrectly assuming tasks are complete, which could lead to redundant and failed retries. The change ensures the scheduler operates more reliably and efficiently.
Original PR description
Base automation and autovacuum should not log progress as this is makes the job scheduler think that something progresses and can be retried leading to the same error because we process the same (all) items. In general, progress numbers are only relevant for jobs that act as job queues. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#264684
Code cleanup and technical improvements
This update streamlines the process of checking user permissions for reviewing and supervising financial records. By creating helper functions, the system now more efficiently verifies if a user has the necessary roles to modify records based on their 'review_state', ensuring accurate access control and preventing potential errors.
Original PR description
Introduce two small helpers on `AccountMove`: * `_get_review_state_access_groups()` – returns the `(is_user_able_to_review, is_user_able_to_supervise)` booleans so the two `has_group` calls are not repeated across methods. * `_check_review_state_access(review_state)` – raises a `ValidationError` with a state-specific message when the current user lacks the required role to modify a record in the given `review_state`: - `'supervised'` → requires `account.group_account_manager` - `'reviewed'` / falsy → requires `account.group_account_user` - `'todo'`, `'anomaly'` → unrestricted opw-6128792
Documentation and clarification updates
This pull request implements a Corporate Legal Agreement (CLA) signature for QoQa, ensuring compliance with Odoo's contribution guidelines. The change was backported from an older version to maintain compatibility and reflects a legal requirement. This update supports a new business partner, QoQa, within the Odoo ecosystem.
Original PR description
Description of the issue/feature this PR addresses: This is the corporate CLA for QoQa. I backported #262581 because we need it from 18.0 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#262582