Daily updates from Odoo
Navigate
Branch
Wednesday, June 17, 2026
225 changes
31 changes
Enhancements to existing features
This update ensures Odoo automatically syncs product tags with UrbanPiper, resolving an issue where a single, hardcoded tag was used. Now, tags are dynamically managed based on user tax configurations and aggregator needs, allowing UrbanPiper to receive the most relevant information for accurate pricing and reporting.
Original PR description
Before this commit: ------------------------------------------ - The UrbanPiper payload used a hardcoded tag when the tax percentage was not 5%. - There was no mechanism to add additional tags based on providers, even though UrbanPiper supports multiple tags. After this commit: ------------------------------------------ - Tags are now dynamically handled using the Tag field in the product. - Users can define tags according to their tax configurations and aggregator requirements. - UrbanPiper only accepts relevant tags (default or provider-specific). task - 5154061 Forward-Port-Of: odoo/enterprise#112550 Forward-Port-Of: odoo/enterprise#96742
This update changes the color of the 'To Review' status on employee records from grey to orange. This improves readability, particularly in dark mode, ensuring that managers can quickly identify and address outstanding tasks. This enhancement ensures consistent and clear communication regarding employee status.
Original PR description
The 'To Review' status on employees uses a grey badge ('secondary'), which has poor contrast and is nearly invisible in dark mode.
Update the 'review_state' field options to change '2_to_review' to 'warning' (orange). This ensures the badge is readable in both light and dark modes.
Task: 6289919
Forward-Port-Of: odoo/enterprise#120486
Forward-Port-Of: odoo/enterprise#120268This update enhances the payment confirmation screen in Point of Sale (POS) and Self-Order to provide clearer feedback to customers. It now displays a 'Processing...' message during payment finalization, a visual success checkmark, and the amount paid upon completion, improving the user experience and confidence during transactions.
Original PR description
In this commit : - Show "Processing..." text while payment finalization is running - Show animated success checkmark and "Amount Paid" once processing completes - Remove warning notification when clicking during processing - Extract shared checkmark animation into reusable template - Update tour tests to verify the success state Task:6246377 Forward-Port-Of: odoo/odoo#269868 Forward-Port-Of: odoo/odoo#267635
Resolved issues and error corrections
A visual glitch was causing the Timesheets configuration menu to appear twice in the user interface. This update corrects a configuration issue, ensuring the menu displays correctly for all users. This resolves a minor usability problem.
Original PR description
Steps to reproduce the issue: 1- Log in as a user with Timesheets Administrator access rights. 2- Go to Timesheets → Configuration. 3- Disable Timesheets Assistant (BETA) and save. 4- Refresh the page. The Configuration menu is displayed twice. After (Expected): The Configuration menu should be displayed only once in the Timesheets app. solution: Adjusted the config menu blacklisting condition to hide the unwanted menu --- task-6302568
This update resolves an error that prevented Manufacturing Administrators from canceling Manufacturing Orders (MOs) when they lacked accounting permissions. The fix adds sudo privileges to allow cancellation, streamlining the process for administrators without requiring full accounting access. This ensures efficient workflow for managing MOs.
Original PR description
Currently, when a user without accounting permissions attempts to cancel a Manufacturing Order (MO), an Access Error is raised. ## Steps to produce: - Install Manufacturing and Accounting with demo…
Currently, when a user without accounting permissions attempts to cancel a Manufacturing Order (MO), an Access Error is raised. ## Steps to produce: - Install Manufacturing and Accounting with demo data. - Users > Marc Demo > Remove Accounting Permissions and give Admin permissions for Manufacturing - Login as Marc Demo - Create an MO for` [D_0045_G] Stool (Green) `and try to cancel it. ## Observed Behavior: Failed to read field mrp.workorder.employee_analytic_account_line_ids ## Root cause: After PR [1], version 19.0 introduced access checks when reading many2many fields. As a result, if a user lacks read access to a model field, an access error is raised. During cancellation, `action_cancel` [2] is called, and the error occurs when unlinking, since the user does not have read access to the account.analytic.line records the system throws an access error. **Why does this error not occur in 19.3+?** Commit [3] added `sudo` to allow cancellation of workorder [2]: https://github.com/odoo/enterprise/blob/d7ab7ee1287342638006e290ede20b955aae8370/mrp_workorder_hr_account/models/mrp_workorder.py#L24-L26 ## Solution: Manufacturing Administrators often need to cancel MOs and WOs, but granting them accounting rights solely for this purpose is not always necessary. A practical solution is to allow MO cancellation through sudo privileges, which can be achieved by backporting [3]. [1]: https://github.com/odoo/odoo/pull/217277 [3]: https://github.com/odoo/enterprise/commit/31cf5f014c48b97158042e64ad0b8e9827a6c0d5 Related Community PR: https://github.com/odoo/odoo/pull/264925 opw-6204049 Forward-Port-Of: odoo/enterprise#118950
This update resolves an issue where Intrastat CSV exports were failing due to incorrect formatting of numerical data. The fix ensures that data is properly converted to numeric values before calculations, preventing errors and improving the reliability of export reports. This ensures accurate reporting for Dutch Intrastat data.
Original PR description
During Intrastat CSV export, fields `supplementary_units` formatted using [formatLang](https://github.com/odoo/enterprise/pull/81711/changes), which converts numeric values into strings (e.g.,…
During Intrastat CSV export, fields `supplementary_units` formatted using [formatLang](https://github.com/odoo/enterprise/pull/81711/changes), which converts numeric values into strings (e.g., '84,0'). These string values are later reused in computations, leading to errors like:
```.py
File "/home/odoo/src/enterprise/19.0/l10n_nl_intrastat/models/account_intrastat_report.py", line 163, in l10n_nl_export_to_csv
supp_unit = str(round(res['supplementary_units'])).zfill(10) if res['supplementary_units'] else '0000000000'
TypeError: type str doesn't define __round__ method
```
https://github.com/odoo/enterprise/blob/2bfe0f32c0cec426fc7345ef716395146cc569ca/l10n_nl_intrastat/models/account_intrastat_report.py#L164 This occurs because the export logic expects numeric values, but receives localized strings or None.
Cause:
`formatLang` is applied at the report data level, converting floats into locale-formatted strings. These values are then used directly in arithmetic operations without normalization.
Fix:
Normalize values before computation by:
- Converting input to string
- Replacing locale-specific decimal separators (',' -> '.')
- Casting to float
- Falling back to 0 when value is None or empty
opw-6182286
Forward-Port-Of: odoo/enterprise#116166This update resolves a discrepancy where the social demo module was not correctly utilizing data after removing the demo partner. The fix ensures that the demo mode functions as intended, providing a consistent and accurate demonstration of the social features. This improves the reliability of the demo for potential customers and internal testing.
Original PR description
Since ce264a23798588ca7f9376900c44576acd89bc6a , we remove the demo partner in the social_demo module, but we didn't update the code to use the demo data in base. Task-6293738
This update fixes an error in the 401K matching calculation for hourly employees. Previously, when an employee's fixed wage was set to zero, the employer's matching contribution was incorrectly calculated as zero. The fix now accurately calculates the matching contribution based on the employee's actual gross pay, ensuring correct contributions regardless of employment type.
Original PR description
*= test_l10n_us_hr_payroll_account The employer matching cap for pre-retirement plans (401KMATCHING) evaluates to zero for hourly wage employees if wage is set to zero. ### **Steps to Reproduce:** 1)…
*= test_l10n_us_hr_payroll_account The employer matching cap for pre-retirement plans (401KMATCHING) evaluates to zero for hourly wage employees if wage is set to zero. ### **Steps to Reproduce:** 1) Install l10n_us_hr_payroll. 2) Create an employee with an hourly wage and set the fixed wage to 0. 3) Configure the retirement plan parameters as follows: - 401(k) = 3% - Matching Amount = 100% - Matching Yearly Cap = 100% 4) Generate a payslip for this employee and compute the sheet. ### **Observed Behavior:** The "Benefits Matching to Retirement Plans" line computes as zero for the hourly employee. ### **Expected Behavior:** The employer matching contribution should dynamically scale based on the actual gross pay period earnings instead of evaluating to zero. ### **Root Cause:** The calculation of `partial_cap` uses `version.wage` directly at [1]. For hourly employees, the fixed 'wage' field defaults to zero, causing the entire multiplication to cancel out. [1]- https://github.com/odoo/enterprise/blob/4c540f450d4de8b59b871662123f85ed54cca2a9/l10n_us_hr_payroll/data/hr_salary_rule_data.xml#L167 ### **Fix:** This commit computes the retirement matching eligibility cap from `gross annualized wages` and applies the employer matching percentage on the eligible contribution amount. This ensures retirement matching is calculated consistently regardless of the employee's contract type. **opw-6181024** Forward-Port-Of: odoo/enterprise#120570 Forward-Port-Of: odoo/enterprise#119370
This update fixes a visual issue where portal cards on the customer portal lacked a background color. The problem was caused by an initial setting of the 'portal-card' color variable to 'null'. Now, all portal cards will display with a default background color, improving the overall user experience and visual consistency.
Original PR description
Steps to reproduce: 1. Go to the "/my" or "/my/home" page. Issues: Portal cards do not have a background color by default. Cause: The `portal-card` color variable was initialized with a `null` value, preventing any default background color from being applied to portal cards. task-6250258 Forward-Port-Of: odoo/odoo#269574
This update resolves an issue that prevented users from properly closing the email composer when sending emails to a large number of leads (over 500). The fix avoids a technical error related to data formatting, ensuring the composer function works reliably even with extensive lists.
Original PR description
Steps to reproduce: 1. Install `crm` 2. Create leads more than 500. 3. Select all and try to send email 4. Not close the wizard by "X" Issue: - Traceback occurs: `Uncaught Promise > Unexpected end of JSON input` Cause: - res_ids is not set on the composer when more than 500 records are selected. This is expected, as the compute method `_compute_res_ids()` does not write `res_ids` when the number of `active_ids` exceeds 500 (to avoid storing large payloads on the field). Because of this, the code trying to JSON.parse(res_ids) fails while dismissing the wizard at `onCloseWizardModal` Solution: - Fallback to context.active_ids when res_ids is not available opw-5891862 Forward-Port-Of: odoo/odoo#252670 Forward-Port-Of: odoo/odoo#248406
This update corrects a technical issue where removing a subformula from reports didn't properly reset its value, leading to processing errors. The fix ensures that subformula values are set to 'False' when removed, preventing these errors and maintaining report accuracy. This improves the stability of financial reporting.
Original PR description
The subformula was [removed](https://github.com/odoo/enterprise/pull/117601) without resetting its value to False, leaving existing values in the database. This causes errors when processing records that still contain a subformula value. ```.py Invalid subformula in expression "balance" of line "Treasury shares": -sum ``` To prevent these errors, existing subformula values are reset to False opw-6297901 Forward-Port-Of: odoo/enterprise#120663
This update resolves an issue that occurred when using IoT printers with LNA enabled. Previously, the system would display an error message when attempting to process LNA status updates. This change adds a check to ensure printers have an IP address before attempting to split it, preventing the error and improving the stability of the Point of Sale system.
Original PR description
Before this commit, when clicking the lna status button when only iot printers were configured with use_lna set to true for at least one of them, a traceback would appear as we tried to split the printer_ip of the printers but those were undefined (iot printers do not have an ip). This commit adds a check on the ip field before trying to split it. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update fixes a bug where follow invitations weren't appearing in user inboxes unless a comment was added. The change ensures that the notification subject is always displayed, regardless of the notification body content, resulting in more reliable and visible follow invitation notifications. This improves the user experience for receiving and responding to follow requests.
Original PR description
Steps to reproduce: - Configure user A to receive inbox notifications. - As user B, invite user A to follow a record with Notify recipients enabled. - Open the inbox of user A. The Invitation to follow notification is not displayed in the inbox when no additional comment is provided. This happens because the notification body is empty unless extra comments are added. This commit fixes the issue by displaying only the subject when the body is empty. Task-[5485727](https://www.odoo.com/odoo/project/1519/tasks/5485727) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#269851 Forward-Port-Of: odoo/odoo#244653
This update fixes a visual issue on mobile devices where an unnecessary caret appeared next to the 'Expand' button in the Inbox. It also corrected the alignment of header buttons, preventing them from wrapping onto multiple lines when the messaging menu was open. This ensures a cleaner and more user-friendly experience.
Original PR description
On mobile, an unwanted caret was displayed next to the message 'Expand' button in the Inbox because the messaging menu itself opens a dropdown, causing any nested Dropdown to automatically display a caret. This commit also fixes the alignment of the Inbox header action buttons, which wrapped onto multiple lines when opening the messaging menu on mobile while the Inbox tab was already selected. In this case, the `AutoresizeInput` width was computed at its maximum size, leaving insufficient space for the header action buttons and causing them to wrap onto multiple lines. Task-[6244177](https://www.odoo.com/odoo/project/1519/tasks/6244177) Forward-Port-Of: odoo/odoo#270257 Forward-Port-Of: odoo/odoo#266343
This update fixes a bug where overtime wasn't being calculated correctly for attendance shifts that spanned multiple days, specifically on the last day of a weekend. The issue stemmed from a flaw in how the system generated date ranges for overtime rules. This change ensures accurate overtime payments for all shift types.
Original PR description
Steps to reproduce: ---------------------------------------- - Create two rules in an overtime ruleset: - Non-working hours rule: - Timing - Outside of a specific schedule - Select a schedule working…
Steps to reproduce:
----------------------------------------
- Create two rules in an overtime ruleset:
- Non-working hours rule:
- Timing
- Outside of a specific schedule
- Select a schedule working Monday to Friday
- Weekend rule:
- Timing
- On any non-working day
- Give this ruleset to an employee
- Create an attendance for this employee
- from 21pm on Friday
- to 4am on Saturday, the next day
- Check the overtime lines of the attendance
- There is only one overtime line for the first rule
Cause:
----------------------------------------
In the overtime refactor 49952e57ab2e8af908112fa77acd22a5e26fa627 the method `_get_dates()` was introduced to get the dates which an attendance overlap.
It uses `rrule()` to create a list of datetime:
`list(rrule(DAILY, dtstart=localized_start, until=localized_end))`
But `rrule` is returning a new date every 24 hours after the time given in `dtstart`. In our example only the datetime onat 21pm on Friday is returned. If it was ending after 21pm on Friday this time would also be returned.
These dates are given as `min_check_in` and `max_check_out`. So later these dates are used to calculate the non-working days:
https://github.com/odoo/odoo/blob/8d14665af5acf1bd391d05a5048dc701986e8b15/addons/hr_attendance/models/hr_attendance_overtime_rule.py#L441-L448
Only Friday is returned, so the second rule is ignored.
Solution:
----------------------------------------
We use `date()` when calling `rrule()` so the hours are ignored.
This has no impact as `min_check_in` and `max_check_out` are always used later with `datetime.combine(min_check_in, datetime.min.time())`.
opw-6159674
Forward-Port-Of: odoo/odoo#267202This update resolves an issue where users without accounting permissions would encounter an error when duplicating Manufacturing Orders. The fix prevents the system from attempting to copy accounting-related data during duplication, avoiding the access error. This ensures smoother operation for all users.
Original PR description
Currently, when a user without accounting permissions attempts to duplicate a Manufacturing Order (MO), an Access Error is raised. ## Steps to produce: - Install Manufacturing and Accounting with…
Currently, when a user without accounting permissions attempts to duplicate a Manufacturing Order (MO), an Access Error is raised. ## Steps to produce: - Install Manufacturing and Accounting with demo data. - Users > Marc Demo > Remove Accounting Permissions and give Admin permissions for Manufacturing - Login as Marc Demo - Create an MO and try to duplicate it. ## Observed Behavior: An Access Error is displayed saying failed to read mrp.production.wip_move_ids ## Root cause: After PR [1], version 19.0 introduced access checks when reading many2many fields. As a result, if a user lacks read access to a model field, an access error is raised during record duplication. During duplication, `copy_data` is called, and the error occurs when invoking the super method at [2], because the user does not have read access to the `wip_move_ids` field on account.move. **Why does this error not occur in 19.3+?** Commit [3] prevents the `wip_move_ids` field from being copied, which avoids triggering the access check and therefore prevents this error. [2]- https://github.com/odoo/odoo/blob/a2f072fe99a03aaf521bba1965e7f29a1c99e325/addons/mrp/models/mrp_production.py#L1135-L1137 ## Solution: Prevent copying the `wip_move_ids` fields because, as noted in commit [3], it does not make sense to carry over work-in-progress journal entries from a previous Manufacturing Order to a newly duplicated one. WIP entries represent accounting values for partially completed goods tied to the original Manufacturing Order, so duplicating those links is both functionally incorrect and can trigger the access error described above. [1]: https://github.com/odoo/odoo/pull/217277 [3]: https://github.com/odoo/odoo/pull/251731/changes/27b5d5551cc772f238695768478a448da75cac61 Related enterprise PR: https://github.com/odoo/enterprise/pull/118950 opw-6204049 Forward-Port-Of: odoo/odoo#264925
This update resolves a bug that occurred when propagating delivery carriers from sale orders to purchase order receipts. Specifically, the system incorrectly expected a single carrier ID when multiple carriers were used for related sale orders. This fix ensures that the receipt correctly identifies the carrier, preventing errors and improving order fulfillment accuracy.
Original PR description
Steps to reproduce 1. Set warehouse to 2-step incoming (Input → Stock) 2. Enable "Propagation of carrier" on the push rule (Input → Stock) 3. On the vendor, set "Purchase Orders Grouping" to "Always"…
Steps to reproduce 1. Set warehouse to 2-step incoming (Input → Stock) 2. Enable "Propagation of carrier" on the push rule (Input → Stock) 3. On the vendor, set "Purchase Orders Grouping" to "Always" 4. Create a storable product with the Buy route and that vendor 5. Create two sale orders for that product, each with a different delivery carrier 6. Confirm both sale orders → a single merged purchase order is created 7. Confirm the purchase order → a receipt (Vendors → Input) is created 8. Validate the receipt → ValueError: Expected singleton: delivery.carrier(1, 3) Issue In `_get_new_picking_values`, when the push rule fires to create the internal transfer (Input → Stock), the carrier is fetched from the referenced sale orders: carrier_id = self.reference_ids.sale_ids.carrier_id.id https://github.com/odoo/odoo/blob/5fb0c1f1460949043aa23ddbed09bdbfdc4a8482/addons/stock_delivery/models/stock_move.py#L45 Because both sale orders share the same merged receipt, the receipt move references both. When those SOs have different carriers, `self.reference_ids.sale_ids.carrier_id` returns a multi-record recordset and calling `.id` raises `ValueError: Expected singleton: delivery.carrier(1, 3)`. opw-6126760 Forward-Port-Of: odoo/odoo#270168 Forward-Port-Of: odoo/odoo#262671
This update fixes an error in the VAT balance calculation within the l10n_uy module for Uruguay. The previous formula was inaccurate, leading to incorrect reporting. This change ensures accurate VAT reporting, aligning with local tax regulations and improving financial data reliability.
Original PR description
### Steps to reproduce the issue: 1. Download Accounting and l10n_uy 2. Go to tax report and see the formula of the VAT balance that is incorrect ### Reason to introduce the fix: Correct the formula to display the right amount. opw-6261211 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#269376 Forward-Port-Of: odoo/odoo#268478
This update resolves a technical issue that caused tracebacks when printing invoices through IoT devices. The fix corrects how printer information is retrieved, preventing errors and ensuring reliable invoice printing. Additionally, the update includes a security enhancement to redact sensitive data from logged websocket messages.
Original PR description
When printing invoices from PoS, using an IoT device, we get a traceback, as the orm call to read device infos gets the whole selected printers params (duplex, don't ask me again, printer ids) instead of the printer ids. Issue was introduced in odoo/enterprise#113128 We also take the opportunity to redact documents from logged websocket messages. task-6307690 opw-6284287
This update fixes a bug that prevented receipt printing from the Odoo App's Point of Sale (POS) section. The fix allows users to print receipts for paid orders, mirroring the functionality available in the browser or desktop versions. This ensures consistent receipt printing across all Odoo App experiences.
Original PR description
**Steps to reproduce:** - Go on the Odoo App, start the pos - Go to orders, and go to paid ones - Click on review - Click on Print Receipt - It doesn't do anything, but it prints correctly on browser or desktop **Why the fix:** The Odoo app does not support the iframe printing, so we use this commit to make a hook function to be able to patch it in the enterprise related commit in pos_mobile. This is a backport of eb1e824 Enterprise PR: https://github.com/odoo/enterprise/pull/120043 opw-6186261 Forward-Port-Of: odoo/odoo#265024
This update resolves an issue preventing printing receipts from the Odoo Mobile App for paid orders. The fix allows the app to correctly utilize printing mechanisms previously available on desktop and web versions. This ensures consistent receipt printing across all Odoo Mobile App users.
Original PR description
**Steps to reproduce:** - Go on the Odoo App, start the PoS - Go to orders, and go to paid ones - Click on review - Click on Print Receipt - It doesn't do anything but it prints correctly on browser or desktop **Why the fix:** This is a partial backport of 41e4549 that fixes the app to allow the way we created IFRAMES in PoS since 19.2, allowing us to print on the app again. Community PR: https://github.com/odoo/odoo/pull/265024 opw-6186261 Forward-Port-Of: odoo/enterprise#120043
This update fixes an issue where long text labels in SelectMenu multi-select tags would overflow, creating a poor user experience. Now, tags are automatically truncated to fit, aligning with the design of Many2ManyTags, ensuring consistent and readable tag display.
Original PR description
Before: Tags in SelectMenu (multi-select) had no text-overflow handling. After: Tags now truncate text, consistent with Many2ManyTags behavior. task-5226503 Forward-Port-Of: odoo/odoo#269563
This update fixes a minor visual issue in the Web Studio interface. Previously, property tags within SelectMenu widgets were limited in width, leading to unused space. Now, tags automatically expand to fill the available width, creating a cleaner and more user-friendly experience.
Original PR description
Before: Each tag was limited to 200px, leaving available space unused. After: Each tag now expands to 100% of the available width. task-5226503 Forward-Port-Of: odoo/enterprise#120260
This update resolves a bug preventing the car simulation information and button from appearing correctly for Belgian employees with car orders. The fix addresses a race condition in the salary calculation process, ensuring the car details and simulation functionality are displayed reliably upon initial setup.
Original PR description
- Step to reproduce: open the salary configurator for a belgian employee with only a car to order linked to its version. Car info and simulation button are not appearing and the page reactivity is broken
- Cause:
- Broken page reactivity is due to a promise that never resolve in willStart super call because of race condition caused by overlapping calls to a debounced function
- Car model description is computed and displayed only when a new value is passed
- Simulation button is rendered only on select value change
- Solution:
- Execute `updateGross()` and `setUpBenefits()` sequentially in parent willStart to prevent overlapping salary recomputations during startup
- Implementing a condition that handle the case of the new car value being already set in the description computation function
- Triggering the new car change function in willStart so that the simulation button is rendered on page load
Task: 6241194
Forward-Port-Of: odoo/enterprise#118647This update resolves an issue that caused a traceback when deleting the last column from a table within the Odoo Report Editor. The fix ensures the editor remains stable by preventing errors related to a null value when the last column is removed, improving the user experience and preventing potential disruptions to report creation.
Original PR description
Problem: When deleting the last column in a table in studio we get a traceback. Cause: `firstCell` will be null if we delete the last cell in the table. Fix: Added a null check on `firstCell` before calling `setCursorEnd`, so the cursor is only repositioned when the table still has remaining cells. Steps to reproduce: - Edit a report with a table. - Remove all columns. - Traceback will occur when deleting the last one. opw-6263696 Forward-Port-Of: odoo/enterprise#119502
This update fixes an issue where Odoo's cron workers weren't efficiently managing database connections. By introducing a new configuration option, we can now set a lower memory limit for cron workers, preventing them from cycling through all databases and optimizing memory usage. This improves overall system performance and stability.
Original PR description
The configuration option `registry_lru_size` does not exist and does not work at all in recent versions. Defining odoo-specific environment variables to handle: - ODOO_REGISTRY_LRU_SIZE: the default registries size - ODOO_REGISTRY_LRU_SIZE_CRON: overwrite for cron workers Cron workers have often a different workload than HTTP workers and we may set a different limit there. If the limit is lower than the number of databases, a cron job will not reuse registries because it cycles through all known ones - in such cases, we can set a lower limit to keep the memory lower. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#270069 Forward-Port-Of: odoo/odoo#268587
This update strengthens security around financial reports by ensuring users have the correct accounting group permissions. Previously, access checks were insufficient, allowing certain groups (like the portal) to view reports. This fix adds a more robust check for accounting group membership to prevent unauthorized access.
Original PR description
Using check_access on the model alone is not enough, as some groups (like portal) could have access to the model itself but rely on record rules (which we now bypass) for filtering access to actual records. This check is there for extra-safety (the access rules to account.report should anyway prevent access) ; we fix it by explicitly checking the user has the proper accounting groups.
This update resolves an issue preventing live chat visitors on mobile from adding emojis to their messages. The fix utilizes a technique to correctly identify clicks within the emoji picker, ensuring emojis are properly inserted into the composer. This improvement enhances the user experience for mobile live chat interactions.
Original PR description
Before this commit, livechat visitors couldn't use the "Add emojis" feature in composer when in mobile: this was opening the emoji picker, but when selecting an emoji this wouldn't add the emoji to the composer text. This happens because the livechat is inside a shadow DOM, and `ev.target` maps to livechat root rather than the specific click inside the emoji picker of livechat. This commit fixes the issue by using `ev.composedPath`, which goes through any open shadow DOM to find the most specific targets. The livechat is an open shadow DOM, thus this works like `ev.target` when there's no shadow DOM into play. This commit is also a follow-up of [1] where the file viewer was shown twice in website due to an accidental regression with fixing overlays: emoji picker was not working in desktop too, therefore the test also covers issues with the overlay like in [1]. [1]: https://github.com/odoo/odoo/pull/265603 Forward-Port-Of: odoo/odoo#267795
This update corrects a technical error where Star printers were receiving incorrect commands. The fix ensures Star printers utilize the proper protocol and commands, resolving a compatibility issue and improving printer functionality.
Original PR description
Currently Star printers were correctly identified and thus were not using the right protocol and esc/pos commands were instead sent to the printers. `device_id` previously used is `""` for Star printers Star printers ignore such commands. This PR fixes the protocol used with Star printers Forward-Port-Of: odoo/odoo#270285
This update resolves an error that occurred when generating payment reports for Swiss companies. The issue arose when the required module was missing, causing a system error. This fix ensures that users can consistently create payment reports for Swiss payrolls.
Original PR description
*=l10n_ch_hr_payroll,hr_payroll_account_iso20022 When clicking the create payment report button on a payslip for a Swiss company, a traceback occurs if the ``hr_payroll_account_iso20022`` module is…
*=l10n_ch_hr_payroll,hr_payroll_account_iso20022 When clicking the create payment report button on a payslip for a Swiss company, a traceback occurs if the ``hr_payroll_account_iso20022`` module is not installed. Steps to reproduce the error: - Install ``l10n_ch_hr_payroll`` module - Switch to CH Company - Create an Employee and running contract for it - Go to Payroll > Payslip > All payslips > Create a new payslip > Set the employee > Confirm > Create payment report Traceback: ```py ValueError: Wrong value for hr.payroll.payment.report.wizard.export_format: 'iso20022_ch' ``` https://github.com/odoo/enterprise/blob/7792926504a823590fbbe574a96994002a92fc17/l10n_ch_hr_payroll/models/hr_payslip.py#L383 https://github.com/odoo/enterprise/blob/7792926504a823590fbbe574a96994002a92fc17/l10n_ch_hr_payroll/models/hr_payslip_run.py#L13 Here, ``iso20022_ch`` is passed as ``export_format``, However, ``iso20022_ch`` is added to the selection field in the ``hr_payroll_account_iso20022`` module at [1]. When that module is not installed, the selection value does not exist, leading to the above error. [1]: https://github.com/odoo/enterprise/blob/7792926504a823590fbbe574a96994002a92fc17/hr_payroll_account_iso20022/wizard/hr_payroll_payment_report_wizard.py#L11 sentry-7391832811 Forward-Port-Of: odoo/enterprise#120699 Forward-Port-Of: odoo/enterprise#113277
Features or functions removed from Odoo
This update removes a redundant, read-only column ('Extra Hours (encoded)') from the employee attendance view. Previously, this column was introduced as a temporary fix, but it's no longer needed. This change simplifies the user interface and improves clarity.
Original PR description
The 'Extra Hours (encoded)' column was previously made read-only in a stable fix, making its presence obsolete for users in this view. This commit removes the `manual_duration` field column entirely from the view to clear interface clutter. Task: 6253553 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#269799 Forward-Port-Of: odoo/odoo#266921
13 changes
Resolved issues and error corrections
This update fixes a visual issue where portal cards on the customer portal lacked a background color. The problem was caused by an initial setting of 'null' for the card's color, which prevented styling. Now, all portal cards will display with a default background color, improving the overall user experience.
Original PR description
Steps to reproduce: 1. Go to the "/my" or "/my/home" page. Issues: Portal cards do not have a background color by default. Cause: The `portal-card` color variable was initialized with a `null` value, preventing any default background color from being applied to portal cards. task-6250258 Forward-Port-Of: odoo/odoo#269574
This update resolves an issue where Intrastat CSV exports were failing due to incorrect formatting of numerical data. The fix ensures that data is properly converted to numeric values before calculations, preventing errors and improving the reliability of export reports. This ensures accurate reporting for Dutch businesses using the Intrastat system.
Original PR description
During Intrastat CSV export, fields `supplementary_units` formatted using [formatLang](https://github.com/odoo/enterprise/pull/81711/changes), which converts numeric values into strings (e.g.,…
During Intrastat CSV export, fields `supplementary_units` formatted using [formatLang](https://github.com/odoo/enterprise/pull/81711/changes), which converts numeric values into strings (e.g., '84,0'). These string values are later reused in computations, leading to errors like:
```.py
File "/home/odoo/src/enterprise/19.0/l10n_nl_intrastat/models/account_intrastat_report.py", line 163, in l10n_nl_export_to_csv
supp_unit = str(round(res['supplementary_units'])).zfill(10) if res['supplementary_units'] else '0000000000'
TypeError: type str doesn't define __round__ method
```
https://github.com/odoo/enterprise/blob/2bfe0f32c0cec426fc7345ef716395146cc569ca/l10n_nl_intrastat/models/account_intrastat_report.py#L164 This occurs because the export logic expects numeric values, but receives localized strings or None.
Cause:
`formatLang` is applied at the report data level, converting floats into locale-formatted strings. These values are then used directly in arithmetic operations without normalization.
Fix:
Normalize values before computation by:
- Converting input to string
- Replacing locale-specific decimal separators (',' -> '.')
- Casting to float
- Falling back to 0 when value is None or empty
opw-6182286
Forward-Port-Of: odoo/enterprise#116166This update resolves an error that occurred when generating payment reports for Swiss companies. The issue arose when the required module was missing, causing a system error. This fix ensures that users can consistently create payment reports for Swiss payrolls.
Original PR description
*=l10n_ch_hr_payroll,hr_payroll_account_iso20022 When clicking the create payment report button on a payslip for a Swiss company, a traceback occurs if the ``hr_payroll_account_iso20022`` module is…
*=l10n_ch_hr_payroll,hr_payroll_account_iso20022 When clicking the create payment report button on a payslip for a Swiss company, a traceback occurs if the ``hr_payroll_account_iso20022`` module is not installed. Steps to reproduce the error: - Install ``l10n_ch_hr_payroll`` module - Switch to CH Company - Create an Employee and running contract for it - Go to Payroll > Payslip > All payslips > Create a new payslip > Set the employee > Confirm > Create payment report Traceback: ```py ValueError: Wrong value for hr.payroll.payment.report.wizard.export_format: 'iso20022_ch' ``` https://github.com/odoo/enterprise/blob/7792926504a823590fbbe574a96994002a92fc17/l10n_ch_hr_payroll/models/hr_payslip.py#L383 https://github.com/odoo/enterprise/blob/7792926504a823590fbbe574a96994002a92fc17/l10n_ch_hr_payroll/models/hr_payslip_run.py#L13 Here, ``iso20022_ch`` is passed as ``export_format``, However, ``iso20022_ch`` is added to the selection field in the ``hr_payroll_account_iso20022`` module at [1]. When that module is not installed, the selection value does not exist, leading to the above error. [1]: https://github.com/odoo/enterprise/blob/7792926504a823590fbbe574a96994002a92fc17/hr_payroll_account_iso20022/wizard/hr_payroll_payment_report_wizard.py#L11 sentry-7391832811 Forward-Port-Of: odoo/enterprise#120433 Forward-Port-Of: odoo/enterprise#113277
This update resolves an issue where the Mail Composer would fail when sending emails with a large number of leads (over 500) selected. The fix prevents a technical error related to data processing, ensuring the Mail Composer functions correctly regardless of the number of records being addressed. This improves stability and usability for users managing large customer lists.
Original PR description
Steps to reproduce: 1. Install `crm` 2. Create leads more than 500. 3. Select all and try to send email 4. Not close the wizard by "X" Issue: - Traceback occurs: `Uncaught Promise > Unexpected end of JSON input` Cause: - res_ids is not set on the composer when more than 500 records are selected. This is expected, as the compute method `_compute_res_ids()` does not write `res_ids` when the number of `active_ids` exceeds 500 (to avoid storing large payloads on the field). Because of this, the code trying to JSON.parse(res_ids) fails while dismissing the wizard at `onCloseWizardModal` Solution: - Fallback to context.active_ids when res_ids is not available opw-5891862 Forward-Port-Of: odoo/odoo#252670 Forward-Port-Of: odoo/odoo#248406
This update resolves an issue where users without accounting permissions would encounter an error when duplicating Manufacturing Orders. The fix prevents the duplication of related accounting data, ensuring a smoother workflow for all users. It addresses a technical detail related to access controls within the Odoo system.
Original PR description
Currently, when a user without accounting permissions attempts to duplicate a Manufacturing Order (MO), an Access Error is raised. ## Steps to produce: - Install Manufacturing and Accounting with…
Currently, when a user without accounting permissions attempts to duplicate a Manufacturing Order (MO), an Access Error is raised. ## Steps to produce: - Install Manufacturing and Accounting with demo data. - Users > Marc Demo > Remove Accounting Permissions and give Admin permissions for Manufacturing - Login as Marc Demo - Create an MO and try to duplicate it. ## Observed Behavior: An Access Error is displayed saying failed to read mrp.production.wip_move_ids ## Root cause: After PR [1], version 19.0 introduced access checks when reading many2many fields. As a result, if a user lacks read access to a model field, an access error is raised during record duplication. During duplication, `copy_data` is called, and the error occurs when invoking the super method at [2], because the user does not have read access to the `wip_move_ids` field on account.move. **Why does this error not occur in 19.3+?** Commit [3] prevents the `wip_move_ids` field from being copied, which avoids triggering the access check and therefore prevents this error. [2]- https://github.com/odoo/odoo/blob/a2f072fe99a03aaf521bba1965e7f29a1c99e325/addons/mrp/models/mrp_production.py#L1135-L1137 ## Solution: Prevent copying the `wip_move_ids` fields because, as noted in commit [3], it does not make sense to carry over work-in-progress journal entries from a previous Manufacturing Order to a newly duplicated one. WIP entries represent accounting values for partially completed goods tied to the original Manufacturing Order, so duplicating those links is both functionally incorrect and can trigger the access error described above. [1]: https://github.com/odoo/odoo/pull/217277 [3]: https://github.com/odoo/odoo/pull/251731/changes/27b5d5551cc772f238695768478a448da75cac61 Related enterprise PR: https://github.com/odoo/enterprise/pull/118950 opw-6204049 Forward-Port-Of: odoo/odoo#264925
This update resolves an issue where users without accounting permissions would receive an error when attempting to cancel Manufacturing Orders (MOs). The fix grants Manufacturing Administrators the necessary privileges to cancel MOs, streamlining their workflow and avoiding disruptions. This was achieved by adding sudo access for cancellation.
Original PR description
Currently, when a user without accounting permissions attempts to cancel a Manufacturing Order (MO), an Access Error is raised. ## Steps to produce: - Install Manufacturing and Accounting with demo…
Currently, when a user without accounting permissions attempts to cancel a Manufacturing Order (MO), an Access Error is raised. ## Steps to produce: - Install Manufacturing and Accounting with demo data. - Users > Marc Demo > Remove Accounting Permissions and give Admin permissions for Manufacturing - Login as Marc Demo - Create an MO for` [D_0045_G] Stool (Green) `and try to cancel it. ## Observed Behavior: Failed to read field mrp.workorder.employee_analytic_account_line_ids ## Root cause: After PR [1], version 19.0 introduced access checks when reading many2many fields. As a result, if a user lacks read access to a model field, an access error is raised. During cancellation, `action_cancel` [2] is called, and the error occurs when unlinking, since the user does not have read access to the account.analytic.line records the system throws an access error. **Why does this error not occur in 19.3+?** Commit [3] added `sudo` to allow cancellation of workorder [2]: https://github.com/odoo/enterprise/blob/d7ab7ee1287342638006e290ede20b955aae8370/mrp_workorder_hr_account/models/mrp_workorder.py#L24-L26 ## Solution: Manufacturing Administrators often need to cancel MOs and WOs, but granting them accounting rights solely for this purpose is not always necessary. A practical solution is to allow MO cancellation through sudo privileges, which can be achieved by backporting [3]. [1]: https://github.com/odoo/odoo/pull/217277 [3]: https://github.com/odoo/enterprise/commit/31cf5f014c48b97158042e64ad0b8e9827a6c0d5 Related Community PR: https://github.com/odoo/odoo/pull/264925 opw-6204049 Forward-Port-Of: odoo/enterprise#118950
This update corrects a technical issue where removing a subformula in the Swiss reporting module (l10n_ch_reports) didn't properly reset its value. This prevented errors when processing financial records. The fix ensures subformula values are set to False, resolving the problem and maintaining accurate reporting.
Original PR description
The subformula was [removed](https://github.com/odoo/enterprise/pull/117601) without resetting its value to False, leaving existing values in the database. This causes errors when processing records that still contain a subformula value. ```.py Invalid subformula in expression "balance" of line "Treasury shares": -sum ``` To prevent these errors, existing subformula values are reset to False opw-6297901 Forward-Port-Of: odoo/enterprise#120663
This update corrects a bug where submitting a new task incorrectly linked the task and project to a new customer. The fix ensures that task customer information remains accurate, preventing unintended changes to existing customer records. This improves data consistency and reliability within the project management system.
Original PR description
Steps to reproduce: -------------------------------------------- 1. Install `website_project` module 2. Create a new project 3. Add a customer to the project 4. Go to customer > add email and phone…
Steps to reproduce:
--------------------------------------------
1. Install `website_project` module
2. Create a new project
3. Add a customer to the project
4. Go to customer > add email and phone
5. Create a new task in that project:
* Observe that the customer is the same as the project
6. Go to Website > Contact Us > Edit > Click on submit button
7. Set action to 'Create a Task' and select the created project in 'Project'
8. Click on Save and Open the URL in Incognito Mode
9. Go to the Contact Us page > Fill in the details > Submit
10. Comeback to our window and open tasks of the created project
Observation:
--------------------------------------------
1. A new task is created using the customer details entered in the form.
2. The existing task’s customer and the project’s customer are also incorrectly updated to this new customer.
Issue:
--------------------------------------------
The bug is in the `extract_data` method of the website form controller for projects.
A non-logged-in user submits the Contact Us form with name and an email that doesn't match any existing partner. The old code's `else` branch would set `partner_name` in the task record values without setting a `partner_id` https://github.com/odoo/odoo/blob/cd080047578b9992811608a5af73a982a414da39/addons/website_project/controllers/main.py#L65-L66
During task creation, the computed field `_compute_partner_id` automatically sets `partner_id` to the project's partner
https://github.com/odoo/odoo/blob/cd080047578b9992811608a5af73a982a414da39/addons/project/models/project_task.py#L1440-L1441
`partner_name` is defined as
https://github.com/odoo/odoo/blob/cd080047578b9992811608a5af73a982a414da39/addons/website_project/models/project_task.py#L12
In Odoo, a related field is essentially a shortcut to a field on a linked record The key attribute here is `readonly=False`. This tells Odoo:
* On read: Get the value from `self.partner_id.name`
* On write: Propagate the write back to `self.partner_id.name` (this is the inverse). So writing `task.partner_name = 'TEST'` is equivalent to writing `task.partner_id.name = 'TEST'`. It modifies the partner record itself, not just the task.
So, the partner record itself was renamed. Every record that references a partner now sees the new name
Solution:
--------------------------------------------
The fix passes `False` to `partner_id`, this way:
* The existing partner is untouched
* All other tasks and the sales order keep their correct customer
opw-6206080
Forward-Port-Of: odoo/odoo#264738This update fixes a potential instability issue in the French PDP registration process. By moving a key function to the company record, the system now reliably accesses the necessary data, preventing errors that could occur if the temporary registration model was deleted. This ensures a more stable and dependable registration experience.
Original PR description
The aim of this commit is to move _get_iap_url on res.company model instead of pdp.regitration. This move is made for 2 reasons: 1. PDP registration is a transient model which means that the object could be deleted in the time. 2. PDP registration implementation was using the model (api.model) and the record (self.edi_mode) which is a bad implementation. So by moving this function on company, we ensure that we always have a record to call the function and then the function is no longer an api.model. no task id --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#270382 Forward-Port-Of: odoo/odoo#270345
This update fixes a bug where follow invitations weren't appearing in user inboxes unless a comment was added. The change ensures that the notification subject is always displayed, regardless of the notification body content, resulting in more reliable and visible follow invitation notifications. This improves user experience and ensures timely updates.
Original PR description
Steps to reproduce: - Configure user A to receive inbox notifications. - As user B, invite user A to follow a record with Notify recipients enabled. - Open the inbox of user A. The Invitation to follow notification is not displayed in the inbox when no additional comment is provided. This happens because the notification body is empty unless extra comments are added. This commit fixes the issue by displaying only the subject when the body is empty. Task-[5485727](https://www.odoo.com/odoo/project/1519/tasks/5485727) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#269851 Forward-Port-Of: odoo/odoo#244653
This update fixes a bug that prevented overtime from being correctly calculated for attendance periods spanning multiple days, specifically when working late into the weekend. The issue stemmed from a flaw in how the system generated date ranges for overtime rules, leading to missed overtime lines. This change ensures accurate overtime payments for employees with extended shifts.
Original PR description
Steps to reproduce: ---------------------------------------- - Create two rules in an overtime ruleset: - Non-working hours rule: - Timing - Outside of a specific schedule - Select a schedule working…
Steps to reproduce:
----------------------------------------
- Create two rules in an overtime ruleset:
- Non-working hours rule:
- Timing
- Outside of a specific schedule
- Select a schedule working Monday to Friday
- Weekend rule:
- Timing
- On any non-working day
- Give this ruleset to an employee
- Create an attendance for this employee
- from 21pm on Friday
- to 4am on Saturday, the next day
- Check the overtime lines of the attendance
- There is only one overtime line for the first rule
Cause:
----------------------------------------
In the overtime refactor 49952e57ab2e8af908112fa77acd22a5e26fa627 the method `_get_dates()` was introduced to get the dates which an attendance overlap.
It uses `rrule()` to create a list of datetime:
`list(rrule(DAILY, dtstart=localized_start, until=localized_end))`
But `rrule` is returning a new date every 24 hours after the time given in `dtstart`. In our example only the datetime onat 21pm on Friday is returned. If it was ending after 21pm on Friday this time would also be returned.
These dates are given as `min_check_in` and `max_check_out`. So later these dates are used to calculate the non-working days:
https://github.com/odoo/odoo/blob/8d14665af5acf1bd391d05a5048dc701986e8b15/addons/hr_attendance/models/hr_attendance_overtime_rule.py#L441-L448
Only Friday is returned, so the second rule is ignored.
Solution:
----------------------------------------
We use `date()` when calling `rrule()` so the hours are ignored.
This has no impact as `min_check_in` and `max_check_out` are always used later with `datetime.combine(min_check_in, datetime.min.time())`.
opw-6159674
Forward-Port-Of: odoo/odoo#267202This update resolves a bug that occurred when propagating carrier information during purchase order creation. Specifically, a conflict arose when multiple sale orders with different carriers were combined into a single receipt, leading to an error. This fix ensures that carrier information is correctly applied, improving the reliability of purchase order processing.
Original PR description
Steps to reproduce 1. Set warehouse to 2-step incoming (Input → Stock) 2. Enable "Propagation of carrier" on the push rule (Input → Stock) 3. On the vendor, set "Purchase Orders Grouping" to "Always"…
Steps to reproduce 1. Set warehouse to 2-step incoming (Input → Stock) 2. Enable "Propagation of carrier" on the push rule (Input → Stock) 3. On the vendor, set "Purchase Orders Grouping" to "Always" 4. Create a storable product with the Buy route and that vendor 5. Create two sale orders for that product, each with a different delivery carrier 6. Confirm both sale orders → a single merged purchase order is created 7. Confirm the purchase order → a receipt (Vendors → Input) is created 8. Validate the receipt → ValueError: Expected singleton: delivery.carrier(1, 3) Issue In `_get_new_picking_values`, when the push rule fires to create the internal transfer (Input → Stock), the carrier is fetched from the referenced sale orders: carrier_id = self.reference_ids.sale_ids.carrier_id.id https://github.com/odoo/odoo/blob/5fb0c1f1460949043aa23ddbed09bdbfdc4a8482/addons/stock_delivery/models/stock_move.py#L45 Because both sale orders share the same merged receipt, the receipt move references both. When those SOs have different carriers, `self.reference_ids.sale_ids.carrier_id` returns a multi-record recordset and calling `.id` raises `ValueError: Expected singleton: delivery.carrier(1, 3)`. opw-6126760 Forward-Port-Of: odoo/odoo#270168 Forward-Port-Of: odoo/odoo#262671
This update fixes an error in the VAT balance calculation within the l10n_uy module for Uruguay. The previous formula was inaccurate, leading to incorrect reporting. This change ensures accurate VAT reporting, aligning with local tax regulations and improving financial data reliability.
Original PR description
### Steps to reproduce the issue: 1. Download Accounting and l10n_uy 2. Go to tax report and see the formula of the VAT balance that is incorrect ### Reason to introduce the fix: Correct the formula to display the right amount. opw-6261211 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#269376 Forward-Port-Of: odoo/odoo#268478
25 changes
New functionality added to Odoo
This update adds a button to the employee version list view, allowing users to directly access the detailed form view for each version. Currently, customers can't view attachments related to employee versions because the form view isn't accessible. This functionality is available starting with version 19.2.
Original PR description
In the version list view, there is currently no way to access the form view of an employee version. Add a button in the list view to open the corresponding version form view. The customer has a query regarding employee version attachments, but since we do not currently have access to the form view, there is no way to access the attachments. This functionality is available from version 19.2, but not in version 19. [here]: https://github.com/odoo/odoo/pull/223518/changes opw-6128590 upg-3839420 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#265819
Enhancements to existing features
This update adds three new invoice types – transit, foreign trade, and free zone transfer – to the Odoo accounting system for Jordan. These types are specifically designed to support the accurate reporting of goods moving across borders and within free zones, ensuring compliance with Jordanian tax regulations. The system now restricts these invoice types to registered taxpayers, enhancing data accuracy and security.
Original PR description
Extend l10n_jo_edi_invoice_type with JoFotara scope codes (3-5): transit (3), foreign trade (4), and free zone transfer (5). Validate that scope codes 3-5 are only available to registered taxpayers. task-4769255 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#269632 Forward-Port-Of: odoo/odoo#268839
Resolved issues and error corrections
This update resolves an issue where the Intrastat CSV export was failing due to incorrect formatting of numerical data. The fix ensures that values are properly converted to numbers before calculations, preventing errors related to locale-specific decimal separators. This improves the reliability of Intrastat reporting.
Original PR description
During Intrastat CSV export, fields `supplementary_units` formatted using [formatLang](https://github.com/odoo/enterprise/pull/81711/changes), which converts numeric values into strings (e.g.,…
During Intrastat CSV export, fields `supplementary_units` formatted using [formatLang](https://github.com/odoo/enterprise/pull/81711/changes), which converts numeric values into strings (e.g., '84,0'). These string values are later reused in computations, leading to errors like:
```.py
File "/home/odoo/src/enterprise/19.0/l10n_nl_intrastat/models/account_intrastat_report.py", line 163, in l10n_nl_export_to_csv
supp_unit = str(round(res['supplementary_units'])).zfill(10) if res['supplementary_units'] else '0000000000'
TypeError: type str doesn't define __round__ method
```
https://github.com/odoo/enterprise/blob/2bfe0f32c0cec426fc7345ef716395146cc569ca/l10n_nl_intrastat/models/account_intrastat_report.py#L164 This occurs because the export logic expects numeric values, but receives localized strings or None.
Cause:
`formatLang` is applied at the report data level, converting floats into locale-formatted strings. These values are then used directly in arithmetic operations without normalization.
Fix:
Normalize values before computation by:
- Converting input to string
- Replacing locale-specific decimal separators (',' -> '.')
- Casting to float
- Falling back to 0 when value is None or empty
opw-6182286
Forward-Port-Of: odoo/enterprise#116166This update resolves an issue where users without accounting permissions would encounter an error when duplicating Manufacturing Orders. The fix prevents the duplication of related accounting entries, ensuring a smoother user experience and avoiding disruptions to order processing. This change improves stability and usability for all users.
Original PR description
Currently, when a user without accounting permissions attempts to duplicate a Manufacturing Order (MO), an Access Error is raised. ## Steps to produce: - Install Manufacturing and Accounting with…
Currently, when a user without accounting permissions attempts to duplicate a Manufacturing Order (MO), an Access Error is raised. ## Steps to produce: - Install Manufacturing and Accounting with demo data. - Users > Marc Demo > Remove Accounting Permissions and give Admin permissions for Manufacturing - Login as Marc Demo - Create an MO and try to duplicate it. ## Observed Behavior: An Access Error is displayed saying failed to read mrp.production.wip_move_ids ## Root cause: After PR [1], version 19.0 introduced access checks when reading many2many fields. As a result, if a user lacks read access to a model field, an access error is raised during record duplication. During duplication, `copy_data` is called, and the error occurs when invoking the super method at [2], because the user does not have read access to the `wip_move_ids` field on account.move. **Why does this error not occur in 19.3+?** Commit [3] prevents the `wip_move_ids` field from being copied, which avoids triggering the access check and therefore prevents this error. [2]- https://github.com/odoo/odoo/blob/a2f072fe99a03aaf521bba1965e7f29a1c99e325/addons/mrp/models/mrp_production.py#L1135-L1137 ## Solution: Prevent copying the `wip_move_ids` fields because, as noted in commit [3], it does not make sense to carry over work-in-progress journal entries from a previous Manufacturing Order to a newly duplicated one. WIP entries represent accounting values for partially completed goods tied to the original Manufacturing Order, so duplicating those links is both functionally incorrect and can trigger the access error described above. [1]: https://github.com/odoo/odoo/pull/217277 [3]: https://github.com/odoo/odoo/pull/251731/changes/27b5d5551cc772f238695768478a448da75cac61 Related enterprise PR: https://github.com/odoo/enterprise/pull/118950 opw-6204049 Forward-Port-Of: odoo/odoo#264925
This update resolves an issue where users without accounting permissions would encounter an error when attempting to cancel Manufacturing Orders (MOs). The fix grants Manufacturing Administrators the necessary privileges to cancel MOs directly, streamlining their workflow. This change improves usability for key users.
Original PR description
Currently, when a user without accounting permissions attempts to cancel a Manufacturing Order (MO), an Access Error is raised. ## Steps to produce: - Install Manufacturing and Accounting with demo…
Currently, when a user without accounting permissions attempts to cancel a Manufacturing Order (MO), an Access Error is raised. ## Steps to produce: - Install Manufacturing and Accounting with demo data. - Users > Marc Demo > Remove Accounting Permissions and give Admin permissions for Manufacturing - Login as Marc Demo - Create an MO for` [D_0045_G] Stool (Green) `and try to cancel it. ## Observed Behavior: Failed to read field mrp.workorder.employee_analytic_account_line_ids ## Root cause: After PR [1], version 19.0 introduced access checks when reading many2many fields. As a result, if a user lacks read access to a model field, an access error is raised. During cancellation, `action_cancel` [2] is called, and the error occurs when unlinking, since the user does not have read access to the account.analytic.line records the system throws an access error. **Why does this error not occur in 19.3+?** Commit [3] added `sudo` to allow cancellation of workorder [2]: https://github.com/odoo/enterprise/blob/d7ab7ee1287342638006e290ede20b955aae8370/mrp_workorder_hr_account/models/mrp_workorder.py#L24-L26 ## Solution: Manufacturing Administrators often need to cancel MOs and WOs, but granting them accounting rights solely for this purpose is not always necessary. A practical solution is to allow MO cancellation through sudo privileges, which can be achieved by backporting [3]. [1]: https://github.com/odoo/odoo/pull/217277 [3]: https://github.com/odoo/enterprise/commit/31cf5f014c48b97158042e64ad0b8e9827a6c0d5 Related Community PR: https://github.com/odoo/odoo/pull/264925 opw-6204049 Forward-Port-Of: odoo/enterprise#118950
This update corrects a technical issue in the Swiss reporting module (l10n_ch_reports) that was causing errors due to outdated subformula values. The fix resets these values to 'False', ensuring accurate record processing and preventing disruptions to financial reports. This resolves a potential data inconsistency.
Original PR description
The subformula was [removed](https://github.com/odoo/enterprise/pull/117601) without resetting its value to False, leaving existing values in the database. This causes errors when processing records that still contain a subformula value. ```.py Invalid subformula in expression "balance" of line "Treasury shares": -sum ``` To prevent these errors, existing subformula values are reset to False opw-6297901 Forward-Port-Of: odoo/enterprise#120663
This update fixes an issue where overtime wasn't being calculated correctly for attendance periods that spanned multiple days, specifically on the last day of a shift. The change adjusts how the system determines overlapping dates to ensure all overtime hours are accurately recorded. This ensures employees are compensated correctly for all worked time.
Original PR description
Steps to reproduce: ---------------------------------------- - Create two rules in an overtime ruleset: - Non-working hours rule: - Timing - Outside of a specific schedule - Select a schedule working…
Steps to reproduce:
----------------------------------------
- Create two rules in an overtime ruleset:
- Non-working hours rule:
- Timing
- Outside of a specific schedule
- Select a schedule working Monday to Friday
- Weekend rule:
- Timing
- On any non-working day
- Give this ruleset to an employee
- Create an attendance for this employee
- from 21pm on Friday
- to 4am on Saturday, the next day
- Check the overtime lines of the attendance
- There is only one overtime line for the first rule
Cause:
----------------------------------------
In the overtime refactor 49952e57ab2e8af908112fa77acd22a5e26fa627 the method `_get_dates()` was introduced to get the dates which an attendance overlap.
It uses `rrule()` to create a list of datetime:
`list(rrule(DAILY, dtstart=localized_start, until=localized_end))`
But `rrule` is returning a new date every 24 hours after the time given in `dtstart`. In our example only the datetime onat 21pm on Friday is returned. If it was ending after 21pm on Friday this time would also be returned.
These dates are given as `min_check_in` and `max_check_out`. So later these dates are used to calculate the non-working days:
https://github.com/odoo/odoo/blob/8d14665af5acf1bd391d05a5048dc701986e8b15/addons/hr_attendance/models/hr_attendance_overtime_rule.py#L441-L448
Only Friday is returned, so the second rule is ignored.
Solution:
----------------------------------------
We use `date()` when calling `rrule()` so the hours are ignored.
This has no impact as `min_check_in` and `max_check_out` are always used later with `datetime.combine(min_check_in, datetime.min.time())`.
opw-6159674
Forward-Port-Of: odoo/odoo#267202This update fixes an issue where the quantity received on a returned purchase order was incorrectly calculated. The change ensures that returns are accurately reflected in inventory, regardless of the return operation type. This resolves a discrepancy in how the system handles location types during the return process.
Original PR description
### Steps to reproduce: - In the settings enable: Multi-Steps Routes - Put your warehouse in delivery in 2 steps - On the receipt operation type change the return operation type to be "pick" by…
### Steps to reproduce: - In the settings enable: Multi-Steps Routes - Put your warehouse in delivery in 2 steps - On the receipt operation type change the return operation type to be "pick" by default. - Create and confirm a PO for 1 unit of P - Validate the receipt > return > Create the return for 1 unit - Change the operation type of the return from Pick to Delivery to return the product in one step. - Validate the return #### > The qty_received is updated from 1 to 2 instead of 0. ### Cause of the issue: Updating the `picking_type_id` of the return will also update the `location_dest_id` to the default values: https://github.com/odoo/odoo/blob/89807c10c20fb533124b18815f307fc3c380528d/addons/stock/models/stock_picking.py#L1138-L1147 However, the default values of the `Delivery` is "Partner/customer". As such, the location dest of the move is also updated to be "Partner/customer". Now the issue is that the `qty_received` only considers moves to be returned if the location dest usage is not 'supplier': https://github.com/odoo/odoo/blob/89807c10c20fb533124b18815f307fc3c380528d/addons/purchase/models/purchase_order_line.py#L226-L231 https://github.com/odoo/odoo/blob/89807c10c20fb533124b18815f307fc3c380528d/addons/purchase_stock/models/purchase_order_line.py#L55-L67 https://github.com/odoo/odoo/blob/89807c10c20fb533124b18815f307fc3c380528d/addons/purchase_stock/models/purchase_order_line.py#L76-L77 https://github.com/odoo/odoo/blob/89807c10c20fb533124b18815f307fc3c380528d/addons/purchase_stock/models/stock_move.py#L129-L131 opw-6292918 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#269867
This update fixes an error in the VAT balance calculation within the l10n_uy module for Uruguay. The previous formula was inaccurate, leading to incorrect reporting. This change ensures accurate VAT reporting, aligning with local tax regulations and improving financial data reliability.
Original PR description
### Steps to reproduce the issue: 1. Download Accounting and l10n_uy 2. Go to tax report and see the formula of the VAT balance that is incorrect ### Reason to introduce the fix: Correct the formula to display the right amount. opw-6261211 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#269376 Forward-Port-Of: odoo/odoo#268478
This update resolves an issue where creating payment sequences in the Accounting module would trigger a technical error. The fix ensures that the system correctly handles date-only values when generating sequence numbers, preventing a traceback and ensuring smooth payment processing. This improves stability and usability for users creating payment sequences.
Original PR description
## Issue When trying to call `dt.replace` on a `datetime.time`, a TypeError is raised ``` File "/home/odoo/Documents/src/odoo/190/odoo/addons/base/models/ir_sequence.py", line 270, in _next return…
## Issue
When trying to call `dt.replace` on a `datetime.time`, a TypeError is raised
```
File "/home/odoo/Documents/src/odoo/190/odoo/addons/base/models/ir_sequence.py", line 270, in _next
return seq_date.with_context(ir_sequence_date_range=seq_date.date_from, ir_sequence_date=dt.replace(tzinfo=None))._next()
^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'tzinfo' is an invalid keyword argument for replace()
```
## Steps to reproduce
1. Install *Accounting* (`accountant`)
2. Update the `account.payment` sequence:
- Toggle *Use subsequences per date_range* and create a range
3. In Accounting > Customers > Payments, create a payment:
- Payment Type: Receive
- Customer: Any
- Amount: Any
4. **A traceback appears**
## Cause
This error was introduced by https://github.com/odoo/odoo/commit/4b9dd7893f96.
The `AccountPayment._compute_name` method calls `_next_by_code` and passes a date as the `sequence_date`.
https://github.com/odoo/odoo/blob/337efb069f6cf2cb9478a970f075fd139c1e8e0a/addons/account/models/account_payment.py#L420-L422
In the `_next` method, the `dt` variable is set to that date (`datetime.date`), and calling the `.replace` method on that variable raises an error, as there's no tzinfo for `datetime.date`s.
opw-6303885
Forward-Port-Of: odoo/odoo#270283This update fixes an issue where tags in the Select Menu were overlapping with the input field, especially when multiple selections were made. Now, tags and the input field are consistently displayed on separate lines, providing a cleaner and more usable experience for users. This improves the overall visual clarity of the Select Menu.
Original PR description
Before: With multiSelect enabled, tags appear on the same line as the input, shrinking it. After multiple selections, the input wraps to the next line inconsistently. After: Tags and the input are always on separate lines. task-5226503 Forward-Port-Of: odoo/odoo#269497
This update resolves a validation error that occurred during subcontracting production recording when deleting and recreating move lines. The previous code incorrectly invalidated the cache, leading to missing data and the validation failure. This change ensures correct data handling during this common workflow.
Original PR description
**Issue** In subcontracting, deleting a raw move line and adding a new one in the same editing flow can lead to a validation error during production recording. **Steps to reproduce** - Create a…
**Issue** In subcontracting, deleting a raw move line and adding a new one in the same editing flow can lead to a validation error during production recording. **Steps to reproduce** - Create a subcontracting product with a comp A - Create and confirm a purchase order of that product (with the subcontracting partner) - Open the associated delivery - Open the move details (hamburger button) - Delete the move line linked to the comp A - Create a new move line for a comp B with a quantity of 1 - Record the production -> A validation error occurs: the mandatory field `product_uom_id` is not set. **Cause** The regression comes from this commit: https://github.com/odoo/odoo/commit/54f10b56f577ad9ed5575bd396dba7d20d22fc2e While assigning `move_raw_ids`, the inverse method is triggered: https://github.com/odoo/odoo/blob/9267b2d1a9b2d2d6a33eceab07d572406c68c723/addons/mrp_subcontracting/models/mrp_production.py#L34 At this stage, newly added lines are still virtual records (`line`): https://github.com/odoo/odoo/blob/9267b2d1a9b2d2d6a33eceab07d572406c68c723/addons/mrp_subcontracting/models/mrp_production.py#L38 The previous implementation directly unlinked removed move lines (see commit https://github.com/odoo/odoo/commit/54f10b56f577ad9ed5575bd396dba7d20d22fc2e): https://github.com/odoo/odoo/blob/9267b2d1a9b2d2d6a33eceab07d572406c68c723/addons/mrp_subcontracting/models/mrp_production.py#L40-L43 Which will eventually flush and invalidate all the cache: https://github.com/odoo/odoo/blob/0e78b4fd2ab904f2e12107cb6ff7cc11d512259f/odoo/models.py#L4666 And since `line` is a virtual record (not in db), its associated values will be reset, among those, `product_uom_id`. Later, when the move line is reassigned: https://github.com/odoo/odoo/blob/0e78b4fd2ab904f2e12107cb6ff7cc11d512259f/addons/mrp_subcontracting/models/mrp_production.py#L49 https://github.com/odoo/odoo/blob/0e78b4fd2ab904f2e12107cb6ff7cc11d512259f/odoo/models.py#L5223-L5228 the validation fails because the virtual line no longer contains the required values. **Additional note** An alternative could have been using Command but since this line: https://github.com/odoo/odoo/blob/0e78b4fd2ab904f2e12107cb6ff7cc11d512259f/addons/mrp_subcontracting/models/mrp_production.py#L42 can not be converted to: `Command.set([line.id for line in lines])` because `lines` may also contain virtual records. This causes an invalid quantity for the move. Indeed, even if the command operator would update the quantity on the `move_line` correctly, it won't for the quantity of the `move` because of its associated compute method: https://github.com/odoo/odoo/blob/26ba95ac1c5bbb24975efb1a6f53c1ab47b61532/addons/stock/models/stock_move.py#L399-L400 that relies on `.ids`, which is `[]` on virtual records. Therefore, keep the change minimal. opw-6133281 Forward-Port-Of: odoo/odoo#267279 Forward-Port-Of: odoo/odoo#263058
This update corrects a bug where selection fields within the Odoo Studio were incorrectly marked as required. The fix ensures that selection fields are only required when explicitly defined as such, preventing unexpected behavior and improving the usability of the Studio for users. This resolves an issue that could have caused data entry errors.
Original PR description
Before: any studio property using a SelectMenu (selection) component, without a `required: false` in the childProps, was implicitly required because the check used `required !== false`, which evaluates `undefined` as truthy. After: `required` is only applied when explicitly set to `true`. task-5226503 Forward-Port-Of: odoo/enterprise#120037
This update resolves an issue that caused a traceback when users deleted the last column from a table within the Odoo Report Editor. The fix prevents a technical error by ensuring the editor handles the scenario where a table has no remaining columns gracefully. This improves the overall stability and usability of the report design tool.
Original PR description
Problem: When deleting the last column in a table in studio we get a traceback. Cause: `firstCell` will be null if we delete the last cell in the table. Fix: Added a null check on `firstCell` before calling `setCursorEnd`, so the cursor is only repositioned when the table still has remaining cells. Steps to reproduce: - Edit a report with a table. - Remove all columns. - Traceback will occur when deleting the last one. opw-6263696 Forward-Port-Of: odoo/enterprise#119502
This update fixes an issue where Odoo's cron workers weren't efficiently managing memory usage. By introducing a new configuration option, we can now set a lower memory limit specifically for cron jobs, preventing them from cycling through all databases and optimizing overall system performance. This ensures smoother operation for background tasks.
Original PR description
The configuration option `registry_lru_size` does not exist and does not work at all in recent versions. Defining odoo-specific environment variables to handle: - ODOO_REGISTRY_LRU_SIZE: the default registries size - ODOO_REGISTRY_LRU_SIZE_CRON: overwrite for cron workers Cron workers have often a different workload than HTTP workers and we may set a different limit there. If the limit is lower than the number of databases, a cron job will not reuse registries because it cycles through all known ones - in such cases, we can set a lower limit to keep the memory lower. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#270069 Forward-Port-Of: odoo/odoo#268587
This update corrects a bug where the system wasn't correctly finding refused applicants in the recruitment search. The issue stemmed from a change in how refused applications were being searched, combined with the fact that refused applications are automatically archived. This fix ensures recruiters can now accurately view all refused applications.
Original PR description
Searching on `[("application_status", "=", "refused")]` is always empty. It is an overlook from [odoo/206645] ([b6e4817]), where the `_search` query was changed to search only active refused applications. However, refused applications are always archived.
This was breaking `website_hr_recruitment` which was searching for refused applications, without finding any.
[odoo/206645]: https://github.com/odoo/odoo/pull/206645
[b6e4817]: https://github.com/odoo/odoo/commit/b6e48176219b2b123bcbf0353b8586c888fc6a94
opw-6204868
Forward-Port-Of: odoo/odoo#266370This update corrects a minor issue in how overtime hours are recorded, ensuring more accurate calculations for payroll and payments. Previously, rounding errors led to slight inaccuracies in duration measurements. The fix maintains precise sub-second precision for overtime duration, which is crucial for correct financial reporting.
Original PR description
Overtime duration computed as fractional hours was rounded to 3 decimal places before being stored on the overtime line. Since 1 decimal hour = 3600 seconds, this gives only 3.6 seconds of precision and the rounding can go in the wrong direction due to floating-point representation. The fix consists in replacing the duration rounding to 4 decimals when building overtime work entries so stored durations keep sub-second precision needed for money computation. task-6212231 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#268889
This update corrects a rounding issue in overtime calculations, ensuring more precise tracking of work hours. Previously, overtime durations were being rounded to 3 decimal places, leading to potential inaccuracies in payroll. The fix now maintains 4 decimal place precision for overtime durations, improving the accuracy of time and wage calculations.
Original PR description
Overtime duration computed as fractional hours was rounded to 3 decimal places before being stored on the overtime line. Since 1 decimal hour = 3600 seconds, this gives only 3.6 seconds of precision and the rounding can go in the wrong direction due to floating-point representation. The fix consists in replacing the duration rounding to 4 decimals when building overtime work entries so stored durations keep sub-second precision needed for money computation. task-6212231 Forward-Port-Of: odoo/enterprise#119721
This update resolves a problem where validating rental deliveries for new kit products (specifically, products rented with components) was failing. The fix ensures that the system correctly handles the explosion of bills when a rental order is confirmed, preventing errors related to deleted records. This ensures rental kits can be properly validated and tracked.
Original PR description
### Steps to reproduce: - Enable rental transfer - Create a rentable product R - Create and confirm a rental order for 1 unit of R - Create a kit bom for R: 1 x COMP - Validate the delivery of your…
### Steps to reproduce:
- Enable rental transfer
- Create a rentable product R
- Create and confirm a rental order for 1 unit of R
- Create a kit bom for R: 1 x COMP
- Validate the delivery of your unit of R
#### > Missing Error: Record does not exist or has been deleted.
### Cause of the issue:
Confirming your rental order will generate a confirm moves of R. However, since at this point the product was not a kit, these will not be exploded. Now, the issue is that at validation The move will be exploded and deleted in the super call:
https://github.com/odoo/enterprise/blob/7cceddaf086d849b8e2121e1023ef3479397534f/sale_mrp_renting/models/stock_move.py#L10-L13 https://github.com/odoo/odoo/blob/0f2f222a431627a672daf10c86ec2578a27f97bb/addons/mrp/models/stock_move.py#L550-L555 https://github.com/odoo/odoo/blob/0f2f222a431627a672daf10c86ec2578a27f97bb/addons/mrp/models/stock_move.py#L591-L593 However, since the overrides of the sale_{mrp,stock}_renting modules call self rather than the result of the super call, they still expect to work with the original move rather than its exploded result: https://github.com/odoo/enterprise/blob/7cceddaf086d849b8e2121e1023ef3479397534f/sale_mrp_renting/models/stock_move.py#L10-L13 https://github.com/odoo/enterprise/blob/7cceddaf086d849b8e2121e1023ef3479397534f/sale_stock_renting/models/stock_move.py#L61-L65
opw-6191841
Forward-Port-Of: odoo/enterprise#120640
Forward-Port-Of: odoo/enterprise#120051This update resolves an issue where multiple Oboxes connected to a database wouldn't consistently display a green Websocket status in the Kanban view. Now, all connected Oboxes show the correct green status, ensuring accurate monitoring of Obox connectivity.
Original PR description
Before this commit, if you had multiple Oboxes connected to a DB, and you looked at them in the Kanban view, only 1 Obox would show a green status for Websocket, despite all of them being connected. After this commit, the Websocket status for each Obox is green as expected.
This update resolves an issue where live chat visitors on mobile couldn't add emojis to their messages. The fix utilizes a technique to correctly identify clicks within the emoji picker, ensuring emojis are properly inserted into the composer. This improvement enhances the user experience for mobile live chat interactions.
Original PR description
Before this commit, livechat visitors couldn't use the "Add emojis" feature in composer when in mobile: this was opening the emoji picker, but when selecting an emoji this wouldn't add the emoji to the composer text. This happens because the livechat is inside a shadow DOM, and `ev.target` maps to livechat root rather than the specific click inside the emoji picker of livechat. This commit fixes the issue by using `ev.composedPath`, which goes through any open shadow DOM to find the most specific targets. The livechat is an open shadow DOM, thus this works like `ev.target` when there's no shadow DOM into play. This commit is also a follow-up of [1] where the file viewer was shown twice in website due to an accidental regression with fixing overlays: emoji picker was not working in desktop too, therefore the test also covers issues with the overlay like in [1]. [1]: https://github.com/odoo/odoo/pull/265603 Forward-Port-Of: odoo/odoo#267795
This update fixes an issue where clicking on an employee's avatar in the Discuss section displayed outdated information. The fix ensures that the correct, most recent employee details are shown, even when employees are archived or multiple employees share the same company. This improves the user experience and data accuracy.
Original PR description
*: hr_holidays,test_discuss_full **Steps to reproduce,** Create an employee linked to a user Archive the employee and remove the link to the user Create another employee for the same user Go to…
*: hr_holidays,test_discuss_full **Steps to reproduce,** Create an employee linked to a user Archive the employee and remove the link to the user Create another employee for the same user Go to Discuss > 'General' channel Open the member list and click on the user's avatar **Before this commit,** Clicking on the avatar opened a popover showing outdated information from the archived employee record instead of the new one. **Cause,** By default, the server sends employee data ordered by name. Since both records have the same name, the order is non-deterministic. The client then attempts to match the employee's company to the current user's company, falling back to the first record in the list if no match is found. **Fix,** Filter out archived records first (treating them as non-existent). Then, sort the remaining employee records to prioritize those that match the current user's active company. In case records share the same company, prioritize employees with a related user. Fall back to descending order of creation for identical results. **After this commit,** Clicking on the avatar shows the correct employee details in the popover. task-6175765 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#252170
This update resolves an issue where leave schedules were incorrectly preventing resource allocation, now only applying to resources with matching calendars. Additionally, tests have been reorganized and corrected to ensure proper functionality, particularly regarding rental planning roles.
Original PR description
## [FIX] sale_renting_planning: check global leaves working schedule Before this commit: any `resource.calendar.leaves` with no `resource_id` created would prevent all resources from being allocated…
## [FIX] sale_renting_planning: check global leaves working schedule
Before this commit: any `resource.calendar.leaves` with no `resource_id` created would prevent all resources from being allocated during the leave date.
After this commit: any `resource.calendar.leaves` with `no resource_id` would be applied only to resources with the same `calendar_id` as the leave.
if the leave has no `calendar_id` then the leave applies to all `resource.calendars`
if a resource has no `calendar_id` then leaves with no `calendar_id` apply to it as well
## [IMP] {website_}sale_renting_planning: move tests from industry and fix existing ones
This commit moves the tests from [odoo/industry#1980](vscode-file://vscode-app/snap/code/237/usr/share/code/resources/app/out/vs/code/electron-browser/workbench/workbench.html) to their respective standard modules.
It also fixes the logic behind some tests as they weren't testing a `planning.role` with `sync_shift_rental` enabled.
task-6179505
Forward-Port-Of: odoo/enterprise#116430Code cleanup and technical improvements
This update streamlines the account module's code by creating reusable JavaScript classes and removing unnecessary conditional statements. These changes enhance the system's efficiency and stability, preventing potential issues caused by bypassing intended behavior within the account and bank statement modules.
Original PR description
Made some generic JS classes that can be used between account move and account bank statement and removed some if statements that are no longer needed from account_tree controller because they were used to bypass default behavior if used by a model other than the intended one. This issue was fixed in: https://github.com/odoo/enterprise/pull/117476 task-5892419 Forward-Port-Of: odoo/odoo#264775
This update streamlines the bank statement import process by replacing a duplicated controller with a more efficient, generic version. Removing unnecessary code from the import module ensures accurate data processing and avoids potential conflicts with other Odoo modules, enhancing stability.
Original PR description
account_bank_statement_import_view was using the same controller used in account.move which caused some wrong behavior when some logic isn't shared between both modules, now account_bank_statement_import uses a generic controller that doesn't add unneeded behavior. As well as removing all of the account move classes from bank statement import and using generic ones or ones specific to account bank statement import. task-5892419 Forward-Port-Of: odoo/enterprise#117476
4 changes
Resolved issues and error corrections
This update fixes a scheduling issue with semi-monthly payrolls. Previously, payslips started on the 15th, coinciding with the end of the first half of the month. Now, payslips begin on the 16th, ensuring accurate payroll calculations for employees on a second-half monthly schedule.
Original PR description
Issue: ---------------------------------------- The start date of semi-monthly payslips on second half of the month is the 15 which is also the end date of the first half of the month. Steps to reproduce: ---------------------------------------- - Have an employee with a semi-monthly payroll - When in the first half of the month, create a payslip for this employee - The payslip is from 1st to 15th - Do the same when in the second half of the month - The payslip is from 15th to end of the month Cause: ---------------------------------------- In `_schedule_period_start()` we set the start date to th 15th for semi-monthly payslips. Solution: ---------------------------------------- Set it to the 16th. opw-6281556
This update resolves a problem where validating rental orders for kit products (specifically, renting a component) would trigger an error. The fix ensures that the system correctly handles the explosion of the kit BOM during validation, preventing the 'record does not exist' error. This ensures rental orders for kit products function as expected.
Original PR description
### Steps to reproduce: - Enable rental transfer - Create a rentable product R - Create and confirm a rental order for 1 unit of R - Create a kit bom for R: 1 x COMP - Validate the delivery of your…
### Steps to reproduce:
- Enable rental transfer
- Create a rentable product R
- Create and confirm a rental order for 1 unit of R
- Create a kit bom for R: 1 x COMP
- Validate the delivery of your unit of R
#### > Missing Error: Record does not exist or has been deleted.
### Cause of the issue:
Confirming your rental order will generate a confirm moves of R. However, since at this point the product was not a kit, these will not be exploded. Now, the issue is that at validation The move will be exploded and deleted in the super call:
https://github.com/odoo/enterprise/blob/7cceddaf086d849b8e2121e1023ef3479397534f/sale_mrp_renting/models/stock_move.py#L10-L13 https://github.com/odoo/odoo/blob/0f2f222a431627a672daf10c86ec2578a27f97bb/addons/mrp/models/stock_move.py#L550-L555 https://github.com/odoo/odoo/blob/0f2f222a431627a672daf10c86ec2578a27f97bb/addons/mrp/models/stock_move.py#L591-L593 However, since the overrides of the sale_{mrp,stock}_renting modules call self rather than the result of the super call, they still expect to work with the original move rather than its exploded result: https://github.com/odoo/enterprise/blob/7cceddaf086d849b8e2121e1023ef3479397534f/sale_mrp_renting/models/stock_move.py#L10-L13 https://github.com/odoo/enterprise/blob/7cceddaf086d849b8e2121e1023ef3479397534f/sale_stock_renting/models/stock_move.py#L61-L65
opw-6191841
Forward-Port-Of: odoo/enterprise#120640
Forward-Port-Of: odoo/enterprise#120051A recent issue causing the Documents view to crash when accessed through an activity has been resolved. This was due to a timing problem with how different parts of the system were updating data. This fix ensures the Documents view functions reliably for all users.
Original PR description
### Description When navigating to Documents via an activity, the list view crashes with a TypeError on setting 'COMPANY'. ### Root Cause An asynchronous race condition occurs between parent and child `onWillStart` hooks. The child finishes an await before the parent's hook runs `expandDefaultValue()`. Thus, `this.state.expanded[sectionId]` is undefined when the child tries to write to its nested keys. ### Solution Await `sectionsPromise` first in the child hook. opw-6276003 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/enterprise#120713 Forward-Port-Of: odoo/enterprise#119634
This update resolves an issue where the Odoo Report Editor would crash when deleting the last column from a table. The fix prevents a technical error caused by a null value, ensuring the editor remains stable and reliable for users creating reports.
Original PR description
Problem: When deleting the last column in a table in studio we get a traceback. Cause: `firstCell` will be null if we delete the last cell in the table. Fix: Added a null check on `firstCell` before calling `setCursorEnd`, so the cursor is only repositioned when the table still has remaining cells. Steps to reproduce: - Edit a report with a table. - Remove all columns. - Traceback will occur when deleting the last one. opw-6263696 Forward-Port-Of: odoo/enterprise#119502
8 changes
New functionality added to Odoo
This update adds new invoice types specifically designed for Jordan's export regulations. These types – transit, foreign trade, and free zone transfer – align with local tax requirements. The change ensures these types are only accessible to registered Jordanian taxpayers, improving compliance.
Original PR description
Extend l10n_jo_edi_invoice_type with JoFotara scope codes (3-5): transit (3), foreign trade (4), and free zone transfer (5). Validate that scope codes 3-5 are only available to registered taxpayers. task-4769255 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#268839
Resolved issues and error corrections
This update resolves an issue where Peppol invoices generated with invoice-type contacts were missing the correct buyer reference information. The fix ensures that the configured Leitweg-ID is properly included in the XML invoice data, facilitating compliant Peppol transactions. This improves the accuracy of invoice data for German businesses using Peppol.
Original PR description
**Steps to reproduce:** - Install the `l10n_de` module and switch to a `DE Company`. - Enable `Peppol` in the Invoicing app settings. - Open the `DE Company` customer record. - In the `Invoicing`…
**Steps to reproduce:** - Install the `l10n_de` module and switch to a `DE Company`. - Enable `Peppol` in the Invoicing app settings. - Open the `DE Company` customer record. - In the `Invoicing` tab, change the Peppol ID code from `Germany VAT` to `Germany Leitweg-ID` and set a code (e.g., `13075957-K000-52`). - In the `Contacts & Addresses` tab, create an invoice-type contact named `test`. - Create a new invoice using the `test` contact. - Send the invoice via Peppol. - Download the generated `XML` and inspect the `BuyerReference` field. **Observation:** The `<cbc:BuyerReference>` field is set to `N/A` instead of the configured `Leitweg-ID`. **Root Cause:** At [1], the `BuyerReference` node is populated using `vals['customer']`. For invoices addressed to an invoice-type contact, the contact itself does not contain the Peppol configuration, which is stored on the commercial partner. As a result, the code fails to retrieve the customer's `Leitweg-ID` and leaves the `BuyerReference` field empty. **Fix:** This commit ensures that the configured Leitweg-ID is correctly added to the `BuyerReference` field for child contact. [1]: https://github.com/odoo/odoo/blob/281658e86971687656f3235ac1ff8afcb52f2908/addons/account_edi_ubl_cii/models/account_edi_xml_ubl_xrechnung.py#L87-L97 opw-6269478 Forward-Port-Of: odoo/odoo#269818
This update resolves an issue where saving job page descriptions with all content removed resulted in a 'Document is empty' validation error. The fix ensures that empty, whitespace-only HTML fields are handled correctly during saving, preventing the error and allowing users to successfully update their job postings. This improves the user experience for managing recruitment content.
Original PR description
Steps to reproduce: =================== 1. Edit a job page. 2. Delete every `s_rating` block. 3. Save. => Validation Error: Document is empty. Cause: ====== Deleting the last snippet inside an…
Steps to reproduce: =================== 1. Edit a job page. 2. Delete every `s_rating` block. 3. Save. => Validation Error: Document is empty. Cause: ====== Deleting the last snippet inside an editable HTML field (e.g. the last `s_rating` block in the `website_rating` field of a job page) leaves the field's editable container with only whitespace text nodes. On save, it writes that whitespace to the record and then calls `_copy_custom_snippet_translations`, which does `html.fromstring(lang_value)` on the whitespace and raises `lxml.etree.ParserError: Document is empty`, re-raised as `ValidationError`. The user sees a "Validation Error" dialog and can't finish saving. The previous fix for the analogous "Document is empty" symptom on product description editing (commit [1]) added a `cleanupEmptyStructures` `on_removed_handlers` that strips whitespace from `.oe_empty` containers after element removal. That selector covers `oe_structure.oe_empty` containers but not editable HTML field savables (`[data-oe-type="html"]`), which don't carry an `oe_empty` class when they originally had content. As a result, fields like `hr.job.website_rating` still hit the failing parse path. Solution: ========= Extend the cleanup selector to also include `[data-oe-type="html"]` so HTML-field editables are normalized to genuinely empty after the last inner snippet is removed. [1]: https://github.com/odoo/odoo/commit/53d5cc7eed635f64038bf0315f6863011879c529 opw-6244892 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#267397
A bug was causing ewaybill generation to fail when a global discount with a negative amount was applied to an invoice. This update corrects the system to handle these discount lines properly, ensuring ewaybills are generated successfully. This resolves a technical issue impacting invoice processing and ewaybill generation in India.
Original PR description
Issue: Global discount creates negative lines that are refused by the endpoint. Steps to reproduce: - In an Indian company - Create an invoice to "B2B Customer Intrastate" - Add a product - Add a Discount line with a negative amount - Confirm - Generate ewaybill - set - Document Type to "Tax Invoice (supply)" - Transportation mode to "" - Generate ewaybill Current behavior: - When sent, JSON produce a "234 Total Amount Error" (not mocked on runbot) Expected behavior: - JSON is accepted Cause: Discount line is sent as is. However, endpoint refuses negative lines. opw-6130779
A recent issue causing the Documents view to crash when accessed through an activity has been resolved. This was due to a timing problem with how the system processed data, leading to an error when trying to set a key value. This update ensures the Documents view functions reliably for all users.
Original PR description
### Description When navigating to Documents via an activity, the list view crashes with a TypeError on setting 'COMPANY'. ### Root Cause An asynchronous race condition occurs between parent and child `onWillStart` hooks. The child finishes an await before the parent's hook runs `expandDefaultValue()`. Thus, `this.state.expanded[sectionId]` is undefined when the child tries to write to its nested keys. ### Solution Await `sectionsPromise` first in the child hook. opw-6276003 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/enterprise#120713 Forward-Port-Of: odoo/enterprise#119634
This update fixes an error in the VAT balance calculation within the l10n_uy module for Uruguay. The previous formula was incorrect, leading to inaccurate reporting. This change ensures that VAT reports accurately reflect the correct financial balances, improving the reliability of financial data.
Original PR description
### Steps to reproduce the issue: 1. Download Accounting and l10n_uy 2. Go to tax report and see the formula of the VAT balance that is incorrect ### Reason to introduce the fix: Correct the formula to display the right amount. opw-6261211 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#269376 Forward-Port-Of: odoo/odoo#268478
This update resolves an issue in the Odoo Studio report editor where deleting the last column from a table would trigger a technical error (traceback). The fix ensures the editor remains stable by preventing errors when the last column is removed, improving the user experience and preventing report editing disruptions.
Original PR description
Problem: When deleting the last column in a table in studio we get a traceback. Cause: `firstCell` will be null if we delete the last cell in the table. Fix: Added a null check on `firstCell` before calling `setCursorEnd`, so the cursor is only repositioned when the table still has remaining cells. Steps to reproduce: - Edit a report with a table. - Remove all columns. - Traceback will occur when deleting the last one. opw-6263696 Forward-Port-Of: odoo/enterprise#119502
This update significantly speeds up how Odoo groups email messages, particularly when dealing with large volumes of data. The previous method was slow and inefficient, but this change optimizes the process, resulting in a dramatic performance boost. This means faster email processing and improved system responsiveness for our customers.
Original PR description
## The Problem When grouping messages, the code was accumulating recordsets using the `|=` union operator inside a loop. Since each union call internally builds an `OrderedSet` over all previously…
## The Problem When grouping messages, the code was accumulating recordsets using the `|=` union operator inside a loop. Since each union call internally builds an `OrderedSet` over all previously accumulated IDs, the performance degraded quadratically relative to the number of document records. This caused bottlenecks on databases with large message volumes. ## The Solution * Replaced the `|=` recordset accumulation with a plain Python dictionary of ordered sets to store IDs per operation, while keeping same behavior. * Deferred the `browse()` call until after the loop is complete. * Reduced the overall complexity from **$O(N^2)$** to **$O(N)$**. --- ## Benchmarks *Tested on a customer database grouping by "Created By" and "Created On":* | Record Count | Before | After | Improvement | | :--- | :--- | :--- | :--- | | **300k records** | 83.00s | **1.00s** | **-99%** | | **30k records** | 0.60s | 0.25s | (Minor) | **Note:** The performance gains become exponentially more significant as the record count grows. **OPW-6123758** Forward-Port-Of: odoo/odoo#269123 Forward-Port-Of: odoo/odoo#260147
1 change
Resolved issues and error corrections
This update resolves a stability issue in the Odoo Studio report editor. Removing the last column from a table previously caused a technical error (traceback). The fix ensures the editor remains stable even when the last column is deleted, improving the user experience and preventing data loss.
Original PR description
Problem: When deleting the last column in a table in studio we get a traceback. Cause: `firstCell` will be null if we delete the last cell in the table. Fix: Added a null check on `firstCell` before calling `setCursorEnd`, so the cursor is only repositioned when the table still has remaining cells. Steps to reproduce: - Edit a report with a table. - Remove all columns. - Traceback will occur when deleting the last one. opw-6263696 Forward-Port-Of: odoo/enterprise#119502
5 changes
Enhancements to existing features
This update brings the Owl library used in several Odoo modules up to the latest version. The change involves adapting the codebase to align with the new prop syntax introduced in the updated Owl library, ensuring continued functionality and compatibility.
This update enhances Odoo's security by standardizing how access rights are managed across multiple modules. The changes consolidate access control definitions, ensuring consistent and predictable behavior, and ultimately strengthening the overall security posture of the system. This simplifies maintenance and reduces the risk of access-related issues.
Original PR description
See https://github.com/odoo/odoo/pull/166359
Resolved issues and error corrections
This update resolves an issue where the Intrastat CSV export was failing due to incorrect formatting of numerical data. The fix ensures that data is properly converted to numeric values before calculations, preventing errors and improving the reliability of Intrastat reporting. This ensures accurate data export for Dutch businesses.
Original PR description
During Intrastat CSV export, fields `supplementary_units` formatted using [formatLang](https://github.com/odoo/enterprise/pull/81711/changes), which converts numeric values into strings (e.g.,…
During Intrastat CSV export, fields `supplementary_units` formatted using [formatLang](https://github.com/odoo/enterprise/pull/81711/changes), which converts numeric values into strings (e.g., '84,0'). These string values are later reused in computations, leading to errors like:
```.py
File "/home/odoo/src/enterprise/19.0/l10n_nl_intrastat/models/account_intrastat_report.py", line 163, in l10n_nl_export_to_csv
supp_unit = str(round(res['supplementary_units'])).zfill(10) if res['supplementary_units'] else '0000000000'
TypeError: type str doesn't define __round__ method
```
https://github.com/odoo/enterprise/blob/2bfe0f32c0cec426fc7345ef716395146cc569ca/l10n_nl_intrastat/models/account_intrastat_report.py#L164 This occurs because the export logic expects numeric values, but receives localized strings or None.
Cause:
`formatLang` is applied at the report data level, converting floats into locale-formatted strings. These values are then used directly in arithmetic operations without normalization.
Fix:
Normalize values before computation by:
- Converting input to string
- Replacing locale-specific decimal separators (',' -> '.')
- Casting to float
- Falling back to 0 when value is None or empty
opw-6182286
Forward-Port-Of: odoo/enterprise#116166This update fixes a bug where 401K matching contributions were incorrectly calculated for hourly employees with zero fixed wages. The change ensures that matching contributions are accurately determined based on actual gross pay, providing consistent and correct retirement plan benefits for all employees. This improves payroll accuracy and compliance.
Original PR description
*= test_l10n_us_hr_payroll_account The employer matching cap for pre-retirement plans (401KMATCHING) evaluates to zero for hourly wage employees if wage is set to zero. ### **Steps to Reproduce:** 1)…
*= test_l10n_us_hr_payroll_account The employer matching cap for pre-retirement plans (401KMATCHING) evaluates to zero for hourly wage employees if wage is set to zero. ### **Steps to Reproduce:** 1) Install l10n_us_hr_payroll. 2) Create an employee with an hourly wage and set the fixed wage to 0. 3) Configure the retirement plan parameters as follows: - 401(k) = 3% - Matching Amount = 100% - Matching Yearly Cap = 100% 4) Generate a payslip for this employee and compute the sheet. ### **Observed Behavior:** The "Benefits Matching to Retirement Plans" line computes as zero for the hourly employee. ### **Expected Behavior:** The employer matching contribution should dynamically scale based on the actual gross pay period earnings instead of evaluating to zero. ### **Root Cause:** The calculation of `partial_cap` uses `version.wage` directly at [1]. For hourly employees, the fixed 'wage' field defaults to zero, causing the entire multiplication to cancel out. [1]- https://github.com/odoo/enterprise/blob/4c540f450d4de8b59b871662123f85ed54cca2a9/l10n_us_hr_payroll/data/hr_salary_rule_data.xml#L167 ### **Fix:** This commit computes the retirement matching eligibility cap from `gross annualized wages` and applies the employer matching percentage on the eligible contribution amount. This ensures retirement matching is calculated consistently regardless of the employee's contract type. **opw-6181024** Forward-Port-Of: odoo/enterprise#120570 Forward-Port-Of: odoo/enterprise#119370
This update resolves a technical issue impacting the accuracy of tests across several Odoo modules. The team removed a fallback mechanism that was causing inconsistencies in test results. This ensures more reliable testing and ultimately contributes to a more stable and dependable Odoo Enterprise platform.
Original PR description
Removed fallback. https://github.com/odoo/odoo/pull/270190
6 changes
Enhancements to existing features
This update ensures Odoo sends the LC116 code with dots, as required by Avalara for their city web services. Currently, Odoo removes these dots, which prevents Avalara's automated sanitization process from working correctly. This change aligns with Avalara's requirements to ensure proper data processing.
Original PR description
Purpose: Avalara requires the LC116 code to be dotted for certain city webservices. Their tool will automatically sanitize the dots for cities that don't support it. Current Behavior: Odoo sanitizes the LC116 code before sending the JSON payload. Expected Behavior: The LC116 code is sent in the JSON payload with the dots. task-6304351
Resolved issues and error corrections
This update resolves a crash that occurred when opening certain account report articles within the Enterprise module. The issue stemmed from a mutation of component properties during setup, which was preventing the application from functioning correctly. The fix ensures data is properly initialized, preventing crashes and improving stability.
Original PR description
When opening an article containing an embedded account report component, the application crashes because the `name` prop is mutated during the component `setup`, which is not allowed.
Steps to reproduce:
1. Create a new audit report
2. Open the "Journal Audit" article containing an embedded account report
=> The following exception is raised:
```
Uncaught (in promise) TypeError: setting getter-only property "name"
setup account_report.js:15
```
To fix the issue, the translation of the `name` prop is moved to `getProps`, which prepares component props before mounting. This ensures the value is already translated at instantiation time, avoids any mutation during setup, and preserves prop immutability throughout the component lifecycle.
Ref: odoo/enterprise#109962
Task-6292898This update resolves a bug preventing proper validation of rental transfers when using kit products. The fix ensures that stock movements are correctly processed after a rental order is confirmed, allowing for accurate tracking of rented items. This improves the reliability of the rental process for kit-based products.
Original PR description
### Steps to reproduce: - Enable rental transfer - Create a rentable product R - Create and confirm a rental order for 1 unit of R - Create a kit bom for R: 1 x COMP - Validate the delivery of your…
### Steps to reproduce:
- Enable rental transfer
- Create a rentable product R
- Create and confirm a rental order for 1 unit of R
- Create a kit bom for R: 1 x COMP
- Validate the delivery of your unit of R
#### > Missing Error: Record does not exist or has been deleted.
### Cause of the issue:
Confirming your rental order will generate a confirm moves of R. However, since at this point the product was not a kit, these will not be exploded. Now, the issue is that at validation The move will be exploded and deleted in the super call:
https://github.com/odoo/enterprise/blob/7cceddaf086d849b8e2121e1023ef3479397534f/sale_mrp_renting/models/stock_move.py#L10-L13 https://github.com/odoo/odoo/blob/0f2f222a431627a672daf10c86ec2578a27f97bb/addons/mrp/models/stock_move.py#L550-L555 https://github.com/odoo/odoo/blob/0f2f222a431627a672daf10c86ec2578a27f97bb/addons/mrp/models/stock_move.py#L591-L593 However, since the overrides of the sale_{mrp,stock}_renting modules call self rather than the result of the super call, they still expect to work with the original move rather than its exploded result: https://github.com/odoo/enterprise/blob/7cceddaf086d849b8e2121e1023ef3479397534f/sale_mrp_renting/models/stock_move.py#L10-L13 https://github.com/odoo/enterprise/blob/7cceddaf086d849b8e2121e1023ef3479397534f/sale_stock_renting/models/stock_move.py#L61-L65
opw-6191841
Forward-Port-Of: odoo/enterprise#120640
Forward-Port-Of: odoo/enterprise#120051This update resolves a technical issue in Odoo's Studio that caused errors when users deleted the last column from a report table. The fix ensures the system handles this scenario gracefully, preventing unexpected tracebacks and improving the user experience. This ensures reports can be edited without interruption.
Original PR description
Problem: When deleting the last column in a table in studio we get a traceback. Cause: `firstCell` will be null if we delete the last cell in the table. Fix: Added a null check on `firstCell` before calling `setCursorEnd`, so the cursor is only repositioned when the table still has remaining cells. Steps to reproduce: - Edit a report with a table. - Remove all columns. - Traceback will occur when deleting the last one. opw-6263696 Forward-Port-Of: odoo/enterprise#119502
This update resolves an issue where recurring plans would disappear when updating product quantities. The fix ensures that the selected plan is correctly recomputed and displayed after changes, primarily addressing a conflict between the 'One-Time Purchase' option and page updates. This improves the user experience for subscription products.
Original PR description
# Introduction note This PR fixes two bugs introduced by the same commit : https://github.com/odoo/enterprise/commit/106d70a1ef0ddbd61a74b7cac82dfce1e316beaa The original commit fixed multiple issues…
# Introduction note This PR fixes two bugs introduced by the same commit : https://github.com/odoo/enterprise/commit/106d70a1ef0ddbd61a74b7cac82dfce1e316beaa The original commit fixed multiple issues regarding the display of recurring plans when the One-time purchase option was enabled, but it also introduced new ones. Theses new issues are due to multiple new checks on `allow_one_time_sale`, but this variable only indicates that the One-time purchase option is available to the user, not that it is actually selected. So the fixes of the original commit works when first loading the page, but fails when the content of the page is updated. # Shared steps - Activate Subscriptions & eCommerce modules - Create a subscription product, enable 'Accept One-Time' and publish it on the website # Bug 1 ## How to reproduce - Add atleast two recurring plans to the product - Go to the product page on the website - Select one of the recurring plans - Increase the quantity of the product ## The problem The recurring plan selection is removed ## Cause The condition `!combination_info.allow_one_time_sale` was added on the `t-att-checked` of the recurring plan selection display. This correctly fixed the issue when first loading the page, but when the user changes the price or the variant, the recurring plan are recomputed and rerendered : https://github.com/odoo/enterprise/blob/0b408acbadb2cfcbc844521f3244a06b7ae7be22/website_sale_subscription/static/src/interactions/product_page.js#L37-L40 When that is the case, that condition blocks the proper display of the selected recurring plan. ## Proposed Solution When loading the recurring plan selection, what defines wich plan is selected is the `subscription_default_pricing_plan_id` variable, which is based on the `plan_id` value given in the request to the server : https://github.com/odoo/enterprise/blob/0b408acbadb2cfcbc844521f3244a06b7ae7be22/website_sale_subscription/models/product_template.py#L222 We make it so if no `plan_id` is sent to the server and `allow_one_time_sale` is enabled, then the server does not give back any `subscription_default_pricing_plan_id` opw-6131532 # Bug 2 ## How to reproduce - Add an attribute with values A & B for the product - Define atleast two recurring plans for the variant with attribute B - Publish the product - Go to the product page - Select the variant with attribute B ## The problem The recurring plan is not displayed. If the order of the attribute is reversed, then it works as expected. ## Cause The pricings are correcly sent to the front-end but they are not added to selection because of the check on `allow_one_time_sale` : https://github.com/odoo/enterprise/blob/0b408acbadb2cfcbc844521f3244a06b7ae7be22/website_sale_subscription/static/src/interactions/product_page.js#L42-L50 opw-6132160
A recent issue causing the Documents view to crash when accessed through an activity has been resolved. This was due to a timing problem with how different parts of the system were updating data. This fix ensures the Documents view functions reliably for all users.
Original PR description
### Description When navigating to Documents via an activity, the list view crashes with a TypeError on setting 'COMPANY'. ### Root Cause An asynchronous race condition occurs between parent and child `onWillStart` hooks. The child finishes an await before the parent's hook runs `expandDefaultValue()`. Thus, `this.state.expanded[sectionId]` is undefined when the child tries to write to its nested keys. ### Solution Await `sectionsPromise` first in the child hook. opw-6276003 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/enterprise#120713 Forward-Port-Of: odoo/enterprise#119634
4 changes
New functionality added to Odoo
This update adds new invoice types specifically for Jordan's export regulations, including 'transit,' 'foreign trade,' and 'free zone transfer.' The system now ensures these types are only accessible to registered Jordanian taxpayers, aligning with local tax requirements. This improves compliance and streamlines export invoicing processes.
Original PR description
Extend l10n_jo_edi_invoice_type with JoFotara scope codes (3-5): transit (3), foreign trade (4), and free zone transfer (5). Validate that scope codes 3-5 are only available to registered taxpayers. task-4769255 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#268839
Resolved issues and error corrections
This update enhances the stability of the French PDP (Point of Departure) registration process. The code was refactored to move a key function to the company record, addressing a previous issue where the registration model was frequently deleted. This ensures a reliable and consistent registration process.
Original PR description
The aim of this commit is to move _get_iap_url on res.company model instead of pdp.regitration. This move is made for 2 reasons: 1. PDP registration is a transient model which means that the object could be deleted in the time. 2. PDP registration implementation was using the model (api.model) and the record (self.edi_mode) which is a bad implementation. So by moving this function on company, we ensure that we always have a record to call the function and then the function is no longer an api.model. no task id --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update prevents errors when generating e-Waybills when the dispatch and delivery locations share the same pin code. Previously, the system couldn't automatically calculate the distance in these cases, leading to incomplete requests. This change ensures a distance is always provided, improving e-Waybill generation reliability.
Original PR description
Prevent sending incomplete e-Waybill requests to the GSP server when the dispatch and delivery pincodes are identical. In such cases, the distance cannot be automatically determined and must be provided explicitly. This commit adds a validation to ensure a distance is set before generating the e-Waybill, avoiding incomplete requests and subsequent server-side errors. task-6234343 Forward-Port-Of: odoo/odoo#270155 Forward-Port-Of: odoo/odoo#268497
Miscellaneous changes
This pull request completes the final translation updates for Odoo 18.0, ensuring all user-facing strings are accurately translated across multiple languages. This improves the overall user experience and supports our global customer base. The changes are focused on polishing and finalizing the translation process.
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
3 changes
Resolved issues and error corrections
This update prevents errors in e-Waybill requests when the dispatch and delivery locations share the same pincode. Previously, the system couldn't automatically calculate the distance in these cases, leading to incomplete requests. Now, a distance must be provided to ensure accurate e-Waybill generation and avoid server issues.
Original PR description
Prevent sending incomplete e-Waybill requests to the GSP server when the dispatch and delivery pincodes are identical. In such cases, the distance cannot be automatically determined and must be provided explicitly. This commit adds a validation to ensure a distance is set before generating the e-Waybill, avoiding incomplete requests and subsequent server-side errors. task-6234343 Forward-Port-Of: odoo/odoo#268497
This update resolves an issue where combo products were missing from generated UBL invoices when using the Peppol integration. The fix removes a filter that incorrectly excluded combo lines due to a tax-related reason. This ensures all invoice lines, including combo products, are now accurately included in the UBL file.
Original PR description
**PROBLEM** Combo product are missing from generated ubl files. **STEP TO REPRODUCE** 1. Install point_of_sale and l10n_be. 2. Activate peppol on the belgium demo company. 3. Create an invoice with a combo line, and send the invoice via peppol to generate a ubl. 4. Open the ubl and see that there is no invoice line in it. **CAUSE** For some reason, we filter lines with `_check_edi_line_tax_required()` in account_edi_ubl_20.py, this filter out combo product since sometime they can't have a tax associated with them. **FIX** We should keep the combo product lines in the invoice since they are on the invoice. opw-6296898
This update resolves an issue where Odoo would incorrectly mark auto-install modules for installation if a required dependency was missing. Now, if an auto-install module has a dependency that isn't available, it won't be flagged for installation, preventing installation errors and improving database initialization stability.
Original PR description
Let's consider an auto-install module `A` having 2 dependencies, one to `base` and the second to custom module `B`. If module `B` is not present in the addons path (i.e is unknown), during a new database initialization module `A` would still be marked as `to install`. This commit ensures that if an auto-install module has a missing dependency, it will not be marked as `to install`. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr