Daily updates from Odoo
Wednesday, January 14, 2026
191 changes
12 changes
Resolved issues and error corrections
This update resolves an issue preventing non-admin users in multi-company environments from updating their profile picture or preferred language. Previously, a rule blocked access to company information, causing an error. This change bypasses the rule to ensure a smoother user experience across different company setups.
Original PR description
### Impacted versions: 19.0 and later ### Steps to reproduce: - Install at least 2 languages - Create multiple companies - Log in as marc demo and select only one company - Try to update profile picture or modify preferred lang ### Current behavior: When a non-admin user operates in a multi-company environment with only some companies active in their context, the `res_company_rule_employee` record rule blocks access to `company_ids` when trying to read all assigned companies. This causes an Access Error in the `res.users.new()` method when it attempts to count the user's companies to manage the `base.group_multi_company` group membership, preventing users from changing their profile picture and updating their preferred language Task: [5458607](https://www.odoo.com/odoo/project/49/tasks/5458607) Forward-Port-Of: odoo/odoo#243259
This update fixes an issue where Point of Sale orders weren't consistently linked to the correct company within the Odoo system. Now, when a new order is created, the system automatically sets the company ID to match the configuration of the current Point of Sale session, ensuring accurate reporting and accounting. This improves data integrity and simplifies business operations.
Original PR description
When creating an order, if due to some reason the company_id is not set on the order data, we set it to the company of the POS session's config. opw-5470175 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#243249
This update fixes a technical issue that prevented Odoo from properly exporting code translations for the new odoo.orm package. By specifying the package name in the framework's export process, Odoo can now accurately capture and manage code translations, ensuring consistent localization across the platform. This improves the quality and accuracy of our translated code.
Original PR description
New package odoo.orm was added in PR https://github.com/odoo/odoo/pull/182727 The new package's name must be specified in ``TranslationModuleReader._export_translatable_resources`` to allow the framework to export its code translations. 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#243584
This update resolves an issue where users without specific group permissions would prevent superuser mode from correctly pinning or unpinning embedded actions within the Documents module. The change adds a check for superuser status, ensuring these actions function as expected during automated processes or when using sudo. This improves stability and reliability for all users.
Original PR description
Prior to this commit, an AccessError would be raised when pinning or unpinning embedded actions if the current user did not belong to the 'documents.group_documents_user' group. This could cause issues during operations running in superuser mode (e.g., automated actions, installation scripts, or sudo() calls) because the check strictly validated the user's groups without considering the environment's superuser flag. This commit adds a check for `self.env.su` to ensure the AccessError is not raised when the environment is in superuser mode. Task-5380727 Forward-Port-Of: odoo/enterprise#104043 Forward-Port-Of: odoo/enterprise#101106
This update resolves an issue where the HTML editor would automatically highlight links when a new Todo was created and the page was refreshed. The fix ensures the highlighting only occurs when a user actively selects a link within the editor. This improves the user experience and prevents unexpected visual distractions.
Original PR description
Problem: Add a link as the first line in a todo and refresh the page. The link is highlighted as soon as the page loads, even though no selection was made by the user. Cause: After 880734ee1f1f4d20d92c44e3cedcf2c61c0da908, when the editor is loaded without an active selection, the selection is set to the first element in the editable. If that element is a link, the class `o_link_in_selection` is added automatically. Solution: Only add `o_link_in_selection` when the selection is on a link and the editable is focused. Steps to reproduce: - Open a Todo. - Add a link as the first text. - Refresh the page. - Observe the link is highlighted. task-5436106 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#241277
This update fixes a visual issue where links within editable fields were incorrectly highlighted when the field itself wasn't focused. This change aligns the testing process with the corrected behavior, ensuring consistent and accurate highlighting. The fix was originally identified and addressed in the community version of Odoo.
Original PR description
Links that are the first deep node in an editable are highlighted even when the editable is not focused which was fixed in the community PR. Adapt the test to reflect the correct behavior opw-5436106 Forward-Port-Of: odoo/enterprise#103676
This update resolves an issue where weighing information lingered on the customer display after a product was weighed. Now, the display automatically clears when the weighing dialog is closed, ensuring a cleaner and more accurate customer experience. This improves the usability of the point-of-sale system.
Original PR description
Before this commit, after weighing a product, the weighing details would remain on the customer display even after closing the weighing dialog. Only weighing another product could get it to change. After this commit, the weighing details on the customer display are always cleared once the weighing dialog is closed.
This update resolves an issue where Odoo encountered errors when processing emails with attachment content types incorrectly identified as '*/*'. To ensure emails are processed reliably, the system now defaults to 'application/octet-stream' for these cases, minimizing disruption while acknowledging the sender's responsibility for correct email formatting.
Original PR description
In some rare cases it would seem that some systems construct emails with attachments reporting `*/*` as the Content-Type. While trying to parse such content in Odoo, it causes issues with the…
In some rare cases it would seem that some systems construct emails with attachments reporting `*/*` as the Content-Type. While trying to parse such content in Odoo, it causes issues with the standard CPython email library, as no standard handler exists for '*/*' content-types: Example error: ``` File "/usr/lib/python3.13/email/contentmanager.py", line 25, in get_content raise KeyError(content_type) KeyError: '*/*' ``` This is not compliant with valid MIME types defined in RFC2046/section-3, but in real life scenarios, blocking the processing of an incoming email in Odoo because of this might be excessive. While not a perfect solution, we will assume that attachments falsly reported as `*/*` are to be processed as 'application/octet-stream' content types. This should cover most use-cases, and if it still fails, we will consider that it's up to the original email sender to be RFC compliant. OPW-5425093 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#242193
This update resolves an issue where clicking a link in the portal triggered a false 'page view' event for customers. A simple fix was implemented by adding a variable to the request headers from the link preview, ensuring accurate tracking of customer portal activity. This improves the reliability of our portal analytics.
Original PR description
When a link to the portal is sent from the chatter via message or log note, the preview of the link triggers that the page was viewed by customer. As a solution a variable was added to the request headers coming from the previewer. opw-5237785 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#243061
This update resolves an issue where user images within the referral module were not aligned correctly. The fix ensures a consistent and professional appearance for user profiles, enhancing the overall user experience. This improves the visual quality of the referral process.
Original PR description
This fix ensures that the user's image is correctly aligned task-5264613 Forward-Port-Of: odoo/enterprise#99488
This update fixes an issue where a distracting element appeared in the bank reconciliation journal when there were no transactions. The change hides this element when the quick-create view is open and empty, resulting in a cleaner and more professional user experience, particularly on mobile devices.
Original PR description
Before this PR, in the bank reconciliation journal, the no-content helper remained visible when the quick-create view was opened and there were 0 entries. This was unexpected behavior and caused overlapping issues, especially on mobile views. With this PR, the no-content helper is hidden whenever the quick-create view is open and there are 0 entries either isGrouped or not. task-5470591 Forward-Port-Of: odoo/enterprise#103776
This update resolves a bug where the default purchase tax wasn't correctly associated with the appropriate company in a multi-company Odoo setup. The fix ensures that the correct tax is selected when invoices are imported, preventing potential accounting errors. This improves data accuracy and reliability.
Original PR description
In v18.4, the invoice import has been refactored with these 2 PRs: - [189979](https://github.com/odoo/odoo/pull/189979) - [75327](https://github.com/odoo/enterprise/pull/75327) This introduced a small bug where, in a multi-company setup, an `account.tax` could be selected from the wrong company when `_fetch_mail()` was called from the cron `Mail: Fetchmail Service` or if the method was called manually from the wrong company. Ticket: opw-5375785 Forward-Port-Of: odoo/enterprise#103190
13 changes
Resolved issues and error corrections
This update resolves an issue where users without specific group permissions would encounter errors when pinning or unpinning embedded actions, particularly within superuser mode. By adding a check for superuser status, the system now correctly allows superusers to perform these actions, ensuring stability for automated processes and installation scripts.
Original PR description
Prior to this commit, an AccessError would be raised when pinning or unpinning embedded actions if the current user did not belong to the 'documents.group_documents_user' group. This could cause issues during operations running in superuser mode (e.g., automated actions, installation scripts, or sudo() calls) because the check strictly validated the user's groups without considering the environment's superuser flag. This commit adds a check for `self.env.su` to ensure the AccessError is not raised when the environment is in superuser mode. Task-5380727 Forward-Port-Of: odoo/enterprise#104043 Forward-Port-Of: odoo/enterprise#101106
This update fixes a technical issue that prevented Odoo from properly exporting code translations for the new odoo.orm package. By specifying the package name in the framework's export process, Odoo can now accurately capture and manage code translations, ensuring consistent localization across the platform. This improves the quality and accuracy of our translated applications.
Original PR description
New package odoo.orm was added in PR https://github.com/odoo/odoo/pull/182727 The new package's name must be specified in ``TranslationModuleReader._export_translatable_resources`` to allow the framework to export its code translations. 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#243584
This update resolves a rare error in tax calculations that occurred due to the unpredictable order in which a set of allowed tokens is processed. The fix ensures that tax formulas are consistently evaluated, preventing calculation failures. This improves the reliability of tax processing within Odoo.
Original PR description
…me tokens greedily. Fixes issue #241004 and is a cleaned up version of a previous PR https://github.com/odoo/odoo/pull/241033 This is a hard to reproduce bug because it depends in what order the…
…me tokens greedily. Fixes issue #241004 and is a cleaned up version of a previous PR https://github.com/odoo/odoo/pull/241033 This is a hard to reproduce bug because it depends in what order the FORMULA_ALLOWED_TOKENS set is iterated. Since the set is an unordered structure, this bug will happen just sometimes. The issue is this: There might be taxes that do a different calculation depending on the base. So for example, we might need to do a formula like this: (base >= 100) and (base * 0.05) or (base * 0.07) <img width="1302" height="651" alt="Captura de pantalla 2025-12-26 a la(s) 11 17 02" src="https://github.com/user-attachments/assets/7ce16272-56a4-452b-8eba-e797442f68c2" /> This formula multiplies the base by a certain value depending on whether the base is greater or equal than 100. This formula will work sometimes, but sometimes, it will fail with this error. <img width="1302" height="615" alt="Captura de pantalla 2025-12-26 a la(s) 11 18 48" src="https://github.com/user-attachments/assets/5527ff5d-6747-4221-b54f-085e0603aa5a" /> The position of the error is the '=', because the '=' is not a valid token in this list: https://github.com/odoo/odoo/blob/18.0/addons/account_tax_python/models/account_tax.py#L10. The formula is not using just the '=' token in this formula. The formula is using the '>=' token and '>=' is an allowed token. So why this error appears sometimes? So here is the important thing and why this bug appears only sometimes: FORMULA_ALLOWED_TOKENS is not a tuple. It is a set. And sets iterate randomly (it is an unordered list). So the loop in this line: https://github.com/odoo/odoo/blob/18.0/addons/account_tax_python/models/account_tax.py#L127 sometimes sees the token '>=' first, and sometimes sees the token '>' first in its cycle. When the '>=' is first in the set of allowed tokens, the loop goes through the formula, trying to match substrings to each token in the set. It matches the '>=' first so it advances 2 positions. In this scenario, the validation does not fail. But when the '>' is first in the set of allowed tokens, the loop goes through the formula, trying to match substrings to each token in the set. It matches the '>' first so it advances 1 position. It has consumed only the '>' of '>='. Now, it will try to match the lone '=' to any of it tokens in the set of allowed tokens, but this '=' will not match any of the allowed tokens, so it will fail. You can reproduce this bug using the above formula, and restarting Odoo if the error does not appear. Eventually, after restarting, the FORMULA_ALLOWED_TOKENS will have the '>' first and trigger the error. The important part to understand here is that FORMULA_ALLOWED_TOKENS is unordered, so, the order of the loop is not guaranteed and sometimes this error is triggered and sometimes it is not, depending on the order the loop is done. 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#242661
This update fixes an issue where a distracting helper element appeared in the bank reconciliation journal when there were no entries. The change hides this element when the quick-create view is open and empty, resulting in a cleaner and more user-friendly experience, particularly on mobile devices.
Original PR description
Before this PR, in the bank reconciliation journal, the no-content helper remained visible when the quick-create view was opened and there were 0 entries. This was unexpected behavior and caused overlapping issues, especially on mobile views. With this PR, the no-content helper is hidden whenever the quick-create view is open and there are 0 entries either isGrouped or not. task-5470591 Forward-Port-Of: odoo/enterprise#103776
This update resolves an issue where Odoo encountered errors when processing emails with attachment content types incorrectly identified as '*/*'. To ensure emails are processed reliably, the system now defaults to 'application/octet-stream' for these cases, minimizing disruption. The change is a temporary workaround until email senders adhere to standard MIME type specifications.
Original PR description
In some rare cases it would seem that some systems construct emails with attachments reporting `*/*` as the Content-Type. While trying to parse such content in Odoo, it causes issues with the…
In some rare cases it would seem that some systems construct emails with attachments reporting `*/*` as the Content-Type. While trying to parse such content in Odoo, it causes issues with the standard CPython email library, as no standard handler exists for '*/*' content-types: Example error: ``` File "/usr/lib/python3.13/email/contentmanager.py", line 25, in get_content raise KeyError(content_type) KeyError: '*/*' ``` This is not compliant with valid MIME types defined in RFC2046/section-3, but in real life scenarios, blocking the processing of an incoming email in Odoo because of this might be excessive. While not a perfect solution, we will assume that attachments falsly reported as `*/*` are to be processed as 'application/octet-stream' content types. This should cover most use-cases, and if it still fails, we will consider that it's up to the original email sender to be RFC compliant. OPW-5425093 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#242193
This update fixes an issue where clicking links in the Odoo portal triggered a false 'page view' event for customers. A simple adjustment was made to the request headers sent from the link preview, ensuring accurate tracking of customer portal activity. This improves reporting and analytics related to customer engagement.
Original PR description
When a link to the portal is sent from the chatter via message or log note, the preview of the link triggers that the page was viewed by customer. As a solution a variable was added to the request headers coming from the previewer. opw-5237785 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#243061
This update resolves an issue where FrontDesk hosts with limited access were unable to check out visitors via email. The fix allows the checkout process to run with elevated permissions, ensuring all hosts can successfully complete the visitor checkout. This improves the user experience for FrontDesk staff.
Original PR description
Steps to reproduce: * Create a visitor record with a host who has only FrontDesk user access. * Ensure Notify with Email is enabled on the station. * Click Check Out Visitor from the received email → access error appears. Issue: * Hosts with only FrontDesk user access received an access error when clicking the “Check Out Visitor” button from the email notification. * They were unable to complete the visitor checkout process. Fix: * Run the checkout action with sudo() so the host can successfully check out the visitor from the email link. Impact: * Hosts can now check out visitors without encountering permission errors. task-5373026 Forward-Port-Of: odoo/enterprise#101179
This update automatically updates the IoT box's database when a new version is released. Previously, manual restarts were required, which was disruptive. Now, the IoT box will seamlessly restart and update its database when it receives a notification of a new version change, ensuring it always uses the latest data.
Original PR description
Before this commit, when the DB was upgraded to a new version, the IoT box had to be manually restarted so that it would checkout and align with the new version. After this commit, we check the DB branch whenever we receive a `bundle_changed` message on the websocket. If it has changed then the IoT will restart and checkout the new version. task-5463520 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#242195
This update resolves an issue where enabling integer rounding on Aged Receivable reports caused a crash. The fix prevents a type error that occurred when the system attempted to round values that were 'None'. Now, users can safely enable integer rounding without encountering this error.
Original PR description
Currently, enabling the Integer Rounding option (e.g. 'Nearest') on accounting reports like Aged Receivable/Payable causes a crash when expanding lines if any column value evaluates to None. Steps to…
Currently, enabling the Integer Rounding option (e.g. 'Nearest') on accounting reports like Aged Receivable/Payable causes a crash when expanding lines if any column value evaluates to None. Steps to reproduce: 1) Install 'account_reports' module with demo data and enable developer mode. 2) Navigate to Accounting > Reporting> Partner Reports > Aged Receivable. 3) Click on 'gear icon' to navigate advance options. 4) Click on the Options tab and set Integer Rounding to 'Nearest', click save and close adv options. 5) Expand a partner line. Error: `TypeError: unsupported operand type(s) for /: 'NoneType' and 'int'` Root Cause: When integer rounding is enabled, the system iterates over formula results to round them using `float_round`(see[1]). However, specific report columns (such as totals for empty periods) may return None. The `float_round` function attempts to perform arithmetic on this value, failing because it cannot divide NoneType. FIX: Skip the rounding if the value received at [1] is None. [1]- https://github.com/odoo/enterprise/blob/9b517564d95424836da1e8368f6b5dc52ae45d1a/account_reports/models/account_report.py#L3329 opw-5392883 Forward-Port-Of: odoo/enterprise#102417
This update fixes a problem where incorrect credentials caused confusing error messages when sending invoices. The change adds a test to specifically handle this scenario and ensures a clearer error display for users. This improves the reliability of invoice processing.
Original PR description
Fixing incorrect error display that occurred while trying to send an invoice to MER with incorrect credentials set up. (no task/error ID) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#243489
This update resolves a display problem in the General Ledger report when using analytic accounting. Previously, the report showed incorrect information and linked to the wrong journal entries. The fix ensures the General Ledger accurately reflects analytic distributions and provides correct links to the relevant journal entries.
Original PR description
Issue: Inconsistent use of line ID in the general ledger between account_move_line.id and account_analytic_line.id Step to reproduce: - Activate analytic accounting - Go to Accounting Report ->…
Issue: Inconsistent use of line ID in the general ledger between account_move_line.id and account_analytic_line.id Step to reproduce: - Activate analytic accounting - Go to Accounting Report -> General Ledger -> Options - Activate "Analytic Group By" - Create an invoice - add a line with an analytic account - Confirm the Invoice - Duplicate the invoice - Confirm the second invoice - Go to the General Ledger - Group By the analytic account you used Current Behavior: General Ledger display 2 lines per journal entry being part of the analytic distribution used for the group by. The first line displays the part related to the analytic group by, while the second line display infos for global general ledger. Clicking on the dots of the first line -> "View Journal Entry" send you to an unrelated entry. Expected behavior: - "View Journal Entry" should send to the right entry Proposed Solution: To proceed to the group_by, `_prepare_lines_for_analytic_groupby` create a temporary SQL table. This table uses the account_analytic_line.id as if it was the account_move_line.id. This commit fixes this and goes back to account_move_line.id. However, lines are merged into only one single line. opw-5267981 Forward-Port-Of: odoo/enterprise#103169
This update resolves a minor performance issue in a test related to loading menus within the Odoo web application. The change optimizes a query number used in the test, resulting in faster and more reliable test execution. This improves the overall stability and responsiveness of the web module.
Original PR description
Forward-Port-Of: odoo/odoo#243298
This update corrects a flaw in a VoIP contact search test. Previously, the test could produce incorrect results due to using demo data. The fix ensures the test only evaluates data created within the test environment, leading to more reliable and accurate search results.
Original PR description
In the test, we suppose to find no phone number matched result when search term length is shorter than `_phone_search_min_length`. However, it can still match `name` or `email` if possible. In this fix, we change the test to only consider the data created in the test, to avoid the wrong result from demo data. backport odoo/enterprise#101200 Forward-Port-Of: odoo/enterprise#104120
14 changes
Resolved issues and error corrections
This update fixes a minor issue in the VoIP contact search test. Previously, the test could produce incorrect results due to data used in the demo environment. The fix now ensures the test only uses data created specifically for the test, leading to more reliable and accurate search results.
Original PR description
In the test, we suppose to find no phone number matched result when search term length is shorter than `_phone_search_min_length`. However, it can still match `name` or `email` if possible. In this fix, we change the test to only consider the data created in the test, to avoid the wrong result from demo data. backport odoo/enterprise#101200
This update fixes an issue where a distracting helper message remained visible in the bank reconciliation journal when there were no entries. The change hides this message, creating a cleaner and more professional experience, particularly on mobile devices. This improves usability and reduces visual clutter.
Original PR description
Before this PR, in the bank reconciliation journal, the no-content helper remained visible when the quick-create view was opened and there were 0 entries. This was unexpected behavior and caused overlapping issues, especially on mobile views. With this PR, the no-content helper is hidden whenever the quick-create view is open and there are 0 entries either isGrouped or not. task-5470591
This update resolves an issue where FrontDesk hosts with restricted user access couldn't complete the visitor checkout process via email. The fix allows the checkout action to run with elevated permissions, ensuring all hosts can now successfully check out visitors without errors. This improves the usability of the FrontDesk module for all staff.
Original PR description
Steps to reproduce: * Create a visitor record with a host who has only FrontDesk user access. * Ensure Notify with Email is enabled on the station. * Click Check Out Visitor from the received email → access error appears. Issue: * Hosts with only FrontDesk user access received an access error when clicking the “Check Out Visitor” button from the email notification. * They were unable to complete the visitor checkout process. Fix: * Run the checkout action with sudo() so the host can successfully check out the visitor from the email link. Impact: * Hosts can now check out visitors without encountering permission errors. task-5373026
This update fixes an issue where follower list avatars appeared distorted, particularly with non-square images. The change utilizes a standard Odoo class for avatars, ensuring consistent and correct image scaling and ratios. This improves the visual appearance of the follower list for all users.
Original PR description
Before this commit, follower list menu had avatar that do not preserve ratio of avatars. This is noticeable for avatars that have ratio quite different from 1:1, like 3:2 or 2:3 or even less squarish. This happens because of missing `.o_object_fit_cover`, that [1] erroneously removed from REF of follower template part into its own component. This commit uses an equivalent but more official solution: `.o_avatar`, which is a classname dedicated for avatars, which has `.o_object_fit_cover` property. Task-5412078 Before / After <img width="638" height="526" alt="Screenshot 2026-01-12 at 17 23 54" src="https://github.com/user-attachments/assets/b8d3a921-52a8-48b7-a0d0-5fbfdd33a92c" /> <img width="640" height="528" alt="Screenshot 2026-01-12 at 17 23 33" src="https://github.com/user-attachments/assets/8070420c-f341-4085-bcb2-2fba060765f0" /> [1]: https://github.com/odoo/odoo/pull/200382
This update fixes an issue where a specific error occurred when a leave request was linked to a refused allocation and the system's automated cleanup process ran. The fix addresses a problem with how data was being accessed, preventing a traceback and ensuring the system functions correctly under these circumstances. This improves the reliability of leave management.
Original PR description
When a leave is linked to a refused allocation and the cron ``Time Off: Cancel invalid leaves`` runs, a traceback occurs. Steps to reproduce the error: - Install ``hr_holidays`` without demo data -…
When a leave is linked to a refused allocation and
the cron ``Time Off: Cancel invalid leaves`` runs, a traceback occurs.
Steps to reproduce the error:
- Install ``hr_holidays`` without demo data
- Create a new Time Off Type > Time Off Requests, Approval: No Validation >
Allow Negative Cap: True > Maximum Excess Amount: 2
- Create an Accrual Plan using default values
- Create a New Allocation
- Allocation Type: Accrual Allocation
- Set the Time Off Type and Accrual Plan created above
- Allocation: 1 day > Approve
- Create a new Time Off in the near future (in the current month) and select the Time Off Type created above
- Go back to the Allocation > Refuse
- Run the cron ``Time Off: Cancel invalid leaves``
Traceback:
``IndexError: list index out of range``
https://github.com/odoo/odoo/blob/bc5f24195a486112574900015ecbcf0e3ba32145/addons/hr_holidays/models/hr_leave.py#L1535-L1536
Here, ``leave_type_data`` becomes ``defaultdict(<class 'list'>, {})``
because when the allocation is refused and the cron runs,
the ``get_allocation_data`` method returns an empty defaultdict.
As a result, accessing the index leads to the above traceback.
sentry-6874651972
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#243315
Forward-Port-Of: odoo/odoo#227201This update resolves an issue where superuser mode prevented users from correctly pinning or unpinning embedded actions within the Documents module. The change adds a check for superuser status, allowing superusers to perform these actions without errors, which is crucial for automated processes and installation scripts.
Original PR description
Prior to this commit, an AccessError would be raised when pinning or unpinning embedded actions if the current user did not belong to the 'documents.group_documents_user' group. This could cause issues during operations running in superuser mode (e.g., automated actions, installation scripts, or sudo() calls) because the check strictly validated the user's groups without considering the environment's superuser flag. This commit adds a check for `self.env.su` to ensure the AccessError is not raised when the environment is in superuser mode. Task-5380727 Forward-Port-Of: odoo/enterprise#104043 Forward-Port-Of: odoo/enterprise#101106
This update fixes an issue where matching a partner by bank account could be overwritten by a subsequent match using the partner's name. This ensures that the correct partner is always associated with bank statements, improving data accuracy and reliability. The change prevents redundant matching and avoids incorrect partner assignments.
Original PR description
Ensure the retrive partner from partner name doesn't override the retrieve partner from bank account. When retrieving a partner on an st_line, we first check for a match based on the bank account, and then on the partner name. However, we fail to check if a match was already found before searching by name. This means that if a partner is matched via bank account, and subsequently another match is found via name, the first match gets overridden by the second one. This commit adds a check for st_line.partner_id before attempting further matching, preventing the previous result from being overridden. no-task
This update fixes a technical issue that prevented Odoo from properly exporting code translations for the new odoo.orm package. By specifying the package name in the framework's export process, Odoo can now accurately capture and manage code translations, ensuring consistent localization across the platform. This improves the quality and availability of translated code for our users.
Original PR description
New package odoo.orm was added in PR https://github.com/odoo/odoo/pull/182727 The new package's name must be specified in ``TranslationModuleReader._export_translatable_resources`` to allow the framework to export its code translations. 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#243584
This update resolves an issue where Odoo encountered errors when processing emails with attachment content types incorrectly identified as '*/*'. To ensure emails are processed smoothly, the system now defaults to 'application/octet-stream' for these cases, minimizing disruption. The change is a pragmatic workaround to avoid blocking legitimate emails.
Original PR description
In some rare cases it would seem that some systems construct emails with attachments reporting `*/*` as the Content-Type. While trying to parse such content in Odoo, it causes issues with the…
In some rare cases it would seem that some systems construct emails with attachments reporting `*/*` as the Content-Type. While trying to parse such content in Odoo, it causes issues with the standard CPython email library, as no standard handler exists for '*/*' content-types: Example error: ``` File "/usr/lib/python3.13/email/contentmanager.py", line 25, in get_content raise KeyError(content_type) KeyError: '*/*' ``` This is not compliant with valid MIME types defined in RFC2046/section-3, but in real life scenarios, blocking the processing of an incoming email in Odoo because of this might be excessive. While not a perfect solution, we will assume that attachments falsly reported as `*/*` are to be processed as 'application/octet-stream' content types. This should cover most use-cases, and if it still fails, we will consider that it's up to the original email sender to be RFC compliant. OPW-5425093 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#242193
This update resolves an issue where clicking a link in the portal triggered a false 'page view' event for customers. A simple adjustment was made to the request headers sent from the link preview, ensuring accurate tracking of customer portal activity. This improves the reliability of our data regarding customer engagement.
Original PR description
When a link to the portal is sent from the chatter via message or log note, the preview of the link triggers that the page was viewed by customer. As a solution a variable was added to the request headers coming from the previewer. opw-5237785 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#243061
This update fixes a problem where incorrect credentials caused misleading error messages when sending invoices. The change adds a test to ensure the correct error is displayed, preventing confusion and ensuring invoices are processed properly. This improves the reliability of the HR EDI module.
Original PR description
Fixing incorrect error display that occurred while trying to send an invoice to MER with incorrect credentials set up. (no task/error ID) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#243489
This update resolves a minor performance issue in a test related to loading menus within the Odoo web application. The change optimizes a database query, resulting in faster test execution times. This improves the overall stability and responsiveness of the web module.
Original PR description
Forward-Port-Of: odoo/odoo#243298
This update resolves a rare error in tax calculations that occurred due to the unpredictable order in which a set of allowed tokens is processed. The fix ensures that tax formulas are consistently evaluated, preventing calculation failures. This improves the reliability of tax processing within Odoo.
Original PR description
…me tokens greedily. Fixes issue #241004 and is a cleaned up version of a previous PR https://github.com/odoo/odoo/pull/241033 This is a hard to reproduce bug because it depends in what order the…
…me tokens greedily. Fixes issue #241004 and is a cleaned up version of a previous PR https://github.com/odoo/odoo/pull/241033 This is a hard to reproduce bug because it depends in what order the FORMULA_ALLOWED_TOKENS set is iterated. Since the set is an unordered structure, this bug will happen just sometimes. The issue is this: There might be taxes that do a different calculation depending on the base. So for example, we might need to do a formula like this: (base >= 100) and (base * 0.05) or (base * 0.07) <img width="1302" height="651" alt="Captura de pantalla 2025-12-26 a la(s) 11 17 02" src="https://github.com/user-attachments/assets/7ce16272-56a4-452b-8eba-e797442f68c2" /> This formula multiplies the base by a certain value depending on whether the base is greater or equal than 100. This formula will work sometimes, but sometimes, it will fail with this error. <img width="1302" height="615" alt="Captura de pantalla 2025-12-26 a la(s) 11 18 48" src="https://github.com/user-attachments/assets/5527ff5d-6747-4221-b54f-085e0603aa5a" /> The position of the error is the '=', because the '=' is not a valid token in this list: https://github.com/odoo/odoo/blob/18.0/addons/account_tax_python/models/account_tax.py#L10. The formula is not using just the '=' token in this formula. The formula is using the '>=' token and '>=' is an allowed token. So why this error appears sometimes? So here is the important thing and why this bug appears only sometimes: FORMULA_ALLOWED_TOKENS is not a tuple. It is a set. And sets iterate randomly (it is an unordered list). So the loop in this line: https://github.com/odoo/odoo/blob/18.0/addons/account_tax_python/models/account_tax.py#L127 sometimes sees the token '>=' first, and sometimes sees the token '>' first in its cycle. When the '>=' is first in the set of allowed tokens, the loop goes through the formula, trying to match substrings to each token in the set. It matches the '>=' first so it advances 2 positions. In this scenario, the validation does not fail. But when the '>' is first in the set of allowed tokens, the loop goes through the formula, trying to match substrings to each token in the set. It matches the '>' first so it advances 1 position. It has consumed only the '>' of '>='. Now, it will try to match the lone '=' to any of it tokens in the set of allowed tokens, but this '=' will not match any of the allowed tokens, so it will fail. You can reproduce this bug using the above formula, and restarting Odoo if the error does not appear. Eventually, after restarting, the FORMULA_ALLOWED_TOKENS will have the '>' first and trigger the error. The important part to understand here is that FORMULA_ALLOWED_TOKENS is unordered, so, the order of the loop is not guaranteed and sometimes this error is triggered and sometimes it is not, depending on the order the loop is done. 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#242661
This update resolves a technical issue in the Odoo recruitment demo data. The system was incorrectly using user records instead of partner records, which caused errors. This fix ensures the demo data functions correctly, providing a reliable demonstration of the recruitment module.
Original PR description
author_id expects a res.partner record. In this commit: Replace the user record with the corresponding partner record to avoid passing an incorrect recordset in demo data. Forward-Port-Of: odoo/odoo#241260
8 changes
Resolved issues and error corrections
This update resolves an issue where printing reports using custom handlers (like IoT) didn't automatically close the associated wizard. Previously, the wizard remained open, leading to unexpected behavior. Now, the system correctly closes the wizard after a report download, regardless of the handler used.
Original PR description
Problem: When an alternate ir.action.report handler is used (such as for IoT), the logic to close the wizard after the report is downloaded (printed) is skipped, so the wizard stays open. Steps to Reproduce: - Go to "Acoustic Bloc Screens" product and click "Print Labels" - Select "ZPL labels" and confirm - The report downloads and the wizard closes as expected - Go to Settings > Technical > Reports and select "Product Label (ZPL)" - Set an IoT device on the report - "Print Labels" again, selecting a printer and the IoT toasts in the top right appear after the wizard closes - Refresh the page, and try printing again - The wizard stays open (wrong) and the IoT toasts appear Solution: When returning from the custom handler, check if close_on_report_download and close the wizard. opw-5153139 Forward-Port-Of: odoo/odoo#238247
This update ensures that rating cards are only shown in portal chatter when a module specifically requests them. Previously, rating cards were displayed even when a module didn't explicitly enable the feature, leading to a cluttered user experience. This change improves the portal's clarity and focus.
Original PR description
*: test_mail_full Modules using portal rating can set an `data-display_rating` attribute when calling the portal chatter template to indicate whether they want the rating feature displayed. Currently, only two modules have this attribute set to true: ecommerce and elearning. For other modules that don't set this attribute, even if there is a rating, such as when rating a ticket in the helpdesk module, we don't want the rating card feature to be shown in portal chatter. This change ensures that the feature is only available if the module requests it. task-5347848 Forward-Port-Of: odoo/odoo#243255
This update resolves an issue where Odoo encountered errors when processing emails with attachment content types incorrectly identified as '*/*'. To ensure emails are processed smoothly, the system now defaults to 'application/octet-stream' for these cases, minimizing disruption. The change is a temporary workaround until email senders consistently adhere to standard MIME types.
Original PR description
In some rare cases it would seem that some systems construct emails with attachments reporting `*/*` as the Content-Type. While trying to parse such content in Odoo, it causes issues with the…
In some rare cases it would seem that some systems construct emails with attachments reporting `*/*` as the Content-Type. While trying to parse such content in Odoo, it causes issues with the standard CPython email library, as no standard handler exists for '*/*' content-types: Example error: ``` File "/usr/lib/python3.13/email/contentmanager.py", line 25, in get_content raise KeyError(content_type) KeyError: '*/*' ``` This is not compliant with valid MIME types defined in RFC2046/section-3, but in real life scenarios, blocking the processing of an incoming email in Odoo because of this might be excessive. While not a perfect solution, we will assume that attachments falsly reported as `*/*` are to be processed as 'application/octet-stream' content types. This should cover most use-cases, and if it still fails, we will consider that it's up to the original email sender to be RFC compliant. OPW-5425093 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#242193
This update resolves an issue where clicking a link in the Odoo portal triggered a false 'page view' event for customers. A simple change was made to the request headers to accurately track link clicks. This ensures that customer page views are recorded correctly, improving reporting and analytics.
Original PR description
When a link to the portal is sent from the chatter via message or log note, the preview of the link triggers that the page was viewed by customer. As a solution a variable was added to the request headers coming from the previewer. opw-5237785 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#243061
This update corrects a potential issue where admin users could inadvertently modify course ratings by editing or deleting other users' messages. The change ensures that default rating options remain consistent for admin users, maintaining the integrity of course evaluations. This prevents unintended alterations to course data.
Original PR description
*: website_slides The default values for the admin user should not be changed by editing or deleting others' messages in courses. task-5326273 Forward-Port-Of: odoo/odoo#236475
This update resolves an issue where enabling integer rounding on Aged Receivable reports would cause a crash. The fix prevents the system from attempting calculations with 'None' values, which were triggering an error. This ensures reports function correctly regardless of rounding settings.
Original PR description
Currently, enabling the Integer Rounding option (e.g. 'Nearest') on accounting reports like Aged Receivable/Payable causes a crash when expanding lines if any column value evaluates to None. Steps to…
Currently, enabling the Integer Rounding option (e.g. 'Nearest') on accounting reports like Aged Receivable/Payable causes a crash when expanding lines if any column value evaluates to None. Steps to reproduce: 1) Install 'account_reports' module with demo data and enable developer mode. 2) Navigate to Accounting > Reporting> Partner Reports > Aged Receivable. 3) Click on 'gear icon' to navigate advance options. 4) Click on the Options tab and set Integer Rounding to 'Nearest', click save and close adv options. 5) Expand a partner line. Error: `TypeError: unsupported operand type(s) for /: 'NoneType' and 'int'` Root Cause: When integer rounding is enabled, the system iterates over formula results to round them using `float_round`(see[1]). However, specific report columns (such as totals for empty periods) may return None. The `float_round` function attempts to perform arithmetic on this value, failing because it cannot divide NoneType. FIX: Skip the rounding if the value received at [1] is None. [1]- https://github.com/odoo/enterprise/blob/9b517564d95424836da1e8368f6b5dc52ae45d1a/account_reports/models/account_report.py#L3329 opw-5392883 Forward-Port-Of: odoo/enterprise#102417
This update resolves a technical problem preventing the correct saving of order details (blackbox data) for the Swedish point-of-sale system. The fix ensures that this critical data is properly recorded in the database, improving data accuracy and reporting. It also includes updates for compatibility with new IoT box images.
Original PR description
In commit 807420a, the `pos.order` fields in `pos_l10n_se` were renamed to add `sweden_` at the start. However, these fields were not renamed in the JS code. The result is that the fields were not being saved to the DB. This commit fixes the issue by renaming the fields in the frontend. It also adds some fixes to ensure compatibility with the newest IoT box image. opw-5253585 Forward-Port-Of: odoo/enterprise#104180
This update fixes a problem where incorrect credentials caused misleading error messages when sending invoices. The change adds a test to ensure the correct error is displayed, improving the user experience and preventing confusion. This ensures invoices are processed correctly and reduces potential delays.
Original PR description
Fixing incorrect error display that occurred while trying to send an invoice to MER with incorrect credentials set up. (no task/error ID) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#243489
24 changes
Resolved issues and error corrections
This update corrects a calculation error in the Belgian payroll module (l10n_be_hr_payroll) related to the 3000 deduction. The change ensures that the deduction amount is accurately reflected up to the year 2026, aligning with updated Belgian tax regulations. This ensures accurate payroll processing and compliance for businesses using this module.
Original PR description
Forward-Port-Of: odoo/enterprise#103891 Forward-Port-Of: odoo/enterprise#103824
This update corrects small errors in the 2026 balance sheet and profit & loss reports for the Danish localization. These changes involve correcting formula signs and text labels, likely due to an oversight during development. This ensures accurate financial reporting for Danish businesses using Odoo Enterprise.
Original PR description
In this commit: https://github.com/odoo/enterprise/commit/0d431fe2cc6556a040888ecc5d6a71be4a435447 we introduce a new balance sheet report for 2026 but there was a mistake in the sign of a formula and in the text of a line. Same for the profit and loss, some errors in sign of accounts and naming. The errors don't come from a ticket but more of a logical fix, those errors were probably an oversight during development. no task id Forward-Port-Of: odoo/enterprise#103830
This update clarifies the call settings for users who have muted a participant. Previously, the menu and hints were confusing, showing the deafen icon with the unmute label. Now, only the 'undeafen' button is displayed when a participant is muted, streamlining the user experience and ensuring clarity.
Original PR description
Before this commit, the hint in the call settings was not taking into account if it was deafen or mute. On top of that the icon in the menu was showing the deafen icon but with the unmute label. When deafened, this was redundant with the undeafen button as well since unmute and undeafen are practically doing the same thing. Now, when deafen is activated, only the undeafen button is shown in the call menu and the hint in the call actions is undeafen not unmute. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#242887 Forward-Port-Of: odoo/odoo#242519
This update corrects a recent change to the access rights for the account online synchronization feature, ensuring it's correctly linked to Invoicing & Banks. The previous update missed a crucial step, preventing proper access control, and this fix resolves that oversight.
Original PR description
In this commit: https://github.com/odoo/enterprise/commit/6edc057a9c0459af2b6d625415b700daf6280520 we changed the access rights of the account online sync to Invoicing & Banks but forgot to add the duplicate transactions no task id Forward-Port-Of: odoo/enterprise#104008
This update fixes an issue where the HTML editor would incorrectly display extra lines when multiple lines were selected. The change filters out empty text nodes to prevent unnecessary font wrappers, resulting in cleaner and more accurate rendering of selected text.
Original PR description
**Current behavior before PR:** - When multiple lines were selected within a block, any empty text nodes between them would also receive a font wrapper when applying a color. - As a result, it appeared as though an extra line was being inserted when the color was applied. **Desired behavior after PR is merged:** - Empty text nodes that are not visible and are not zero-width space or line-break nodes are now filtered out before the font tag is created. - This prevents font wrappers from being created around those nodes. task-5344051 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#236824
This update resolves a minor typo in the Odoo Enterprise system. Specifically, the name of an attachment file was corrected to align with its intended functionality and external ID. This ensures data consistency and proper operation within the accounting module.
Original PR description
Fix typo – Correct the ir_attachment file name to match the external ID and its functionality. OPW-5428700 Forward-Port-Of: odoo/enterprise#103809
This update fixes a minor issue in the Sendcloud integration where the system was incorrectly retrieving product information. The change ensures that product IDs are accessed using the correct 'id' key, resolving a potential data retrieval problem. This improves the reliability of sending orders through Sendcloud.
Original PR description
Same fix as d4fae97, the id was retrieved by doing `[0]` but the proxy object has changed so we need to use the `id` key to get the value instead. ----- Ticket: opw-5433254 Forward-Port-Of: odoo/enterprise#103706
This update fixes an issue where users without write access couldn't star messages in threads, resulting in an error. The fix adds a necessary permission adjustment to allow users to star messages they can read, ensuring broader functionality for all users. This improves the user experience and prevents a frustrating access error.
Original PR description
Before this commit, starring a message in a thread without write access would result in an access error. This happens because since [1] a message is marked as starred by writing on the `starred_partner_ids` field of mail.message instead of the `starred_message_ids` field of res.partner. This results in an access error when the uses does not have write access. This commit fixes the issue by adding a sudo call to the write of `starred_partner_ids`, which is acceptable because a user should always be able to star a message they can read. [1] https://github.com/odoo/odoo/pull/219282 task-5481662 Forward-Port-Of: odoo/odoo#243130
This update streamlines the process of assigning barcodes to product packaging. Previously, users faced a confusing, multi-step process leading to duplicate UoM creation. Now, the barcode field is integrated directly into the packaging creation flow, offering a simpler and more efficient experience.
Original PR description
Before this commit: ------------------------- - In the product form view, when creating new packaging, a pop-up form opens to Create a new Unit of Measure (UoM), and if the user tries to assign a…
Before this commit: ------------------------- - In the product form view, when creating new packaging, a pop-up form opens to Create a new Unit of Measure (UoM), and if the user tries to assign a barcode Within that form, a second pop-up opens instead of assigning the barcode directly. - In the second pop-up, if the user creates the same UoM again, it causes data duplication; the same UoM gets created in 'Units and Packagings' with a default quantity of 1 without reference unit. This incorrect behavior leads to confusion when selecting the UoM later. Steps to reproduce: ------------------------- 1. Install the 'sale_stock' module. 2. Enable Units of Measure & Packagings in stock. 3. Create or open any product. 4. Go to the Sales tab. 5. Create new packaging (e.g., Pack of 5), set the quantity and reference unit, and try to create a barcode. 6. A second pop-up form opens to again create a new UoM and assign the barcode. 7. It causes data duplication; the same UoM gets created in 'Units and Packagings' with a default quantity of 1 without reference unit. Cause of the issue ------------------------- When assigning a new barcode to a UoM, the field could not fetch the corresponding UoM(In uom.uom) record because it did not yet exist in the database. As a result, the system opened another pop-up to create the same UoM(In product.uom) again and assign a barcode to it. After this commit: ----------------------- - The barcode field is hidden until the UoM is created. - Once the packaging is saved, users can edit it to assign a barcode to the specific UoM of the product. - This improves the flow by preventing duplicate UoM creation and ensuring a clear, single-step process for assigning barcodes to product packaging. Task ID:5023229 Forward-Port-Of: odoo/odoo#230474
This update prevents the full composer window from unexpectedly opening when users are editing messages within tasks. The original issue stemmed from a technical error related to how the composer was initialized during editing, causing a crash. This fix ensures a smoother editing experience for all users.
Original PR description
Steps to reproduce: =================== 1- Go to a project task & log any note. 2- Edit & Click the additional "+" and click "Open Full Composer" 3- Click on Save. -> traceback. Cause: ====== When entering edit mode, the composer was created without a thread reference, causing "Cannot read properties of undefined (`this.props.composer.thread is undefined`)" errors in `onClickFullComposer`. Solution: ========= We shouldn't have "open-full-composer" action in editing messages opw-5443985 Forward-Port-Of: odoo/odoo#242002
This update resolves an issue where the 'copy link' button in the salary calculator was generating a 404 error. The fix ensures the offer is saved before creating the link, preventing errors related to missing offer IDs. This improves the usability of the salary calculator for generating offer links.
Original PR description
Steps to reproduce: 1- Open salary calculator 2- Do not edit any fields 3- Click on copy link button 4- Open the link Issue: When you open the link you'll see a 404 page. Cause: The salary calculator essentially creates an offer. When no fields are modified in the form, the offer isn't created yet. When a link is created for that offer, the offer id part of the link is NewId_xxx. Fix: Modify the widget that copies the link to clipboard to first save the offer before generating the link. Task-5441297 Forward-Port-Of: odoo/enterprise#104021 Forward-Port-Of: odoo/enterprise#102900
This update resolves an issue where applications weren't accurately counted and matched within a multi-company Odoo setup. The change removes a filtering constraint from the application matching process, ensuring a more precise count of applications per company. This improves the accuracy of reporting and data analysis across multiple businesses.
Original PR description
This commit fixes the issue where applications are not matched are not mathced with thier count among companies in a multi-company environment. The domain on company was removed from `_get_similar_applicants_domain` since there is no domain on company in `_compute_application_count`. task-5375876 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#243154 Forward-Port-Of: odoo/odoo#238386
This update fixes an issue where public channels were incorrectly configured, defaulting to an internal user instead of being publicly accessible. Setting `group_public_id` to `None` ensures channels are properly designated as public, resolving a previous bug. This improves channel visibility and functionality.
Original PR description
Since #206619, the fixed test has used a wrong value for `group_public_id`, as if it's not set, the default is `Internal User`. This change sets it to `None` to make the channel public. Forward-Port-Of: odoo/odoo#243354 Forward-Port-Of: odoo/odoo#243237
A recent update added call duration information to chatter messages, but this caused a tour to fail intermittently. This fix corrects the tour's targeting method to ensure consistent functionality, preventing future disruptions to the tour process.
Original PR description
After 5751f93c53d3cf37ae8cb627fb8d10a81b7b8833, call duration will be added to chatter message. This change is done by modifing the original message, which results in a non-deterministic failure when selector trying to match the original message. Change the selector to match a stable attribute. Forward-Port-Of: odoo/enterprise#104132
This update fixes a previous issue where the messaging menu incorrectly added needaction channel counts to the inbox count. Now, the inbox counter accurately reflects the number of unread messages across all channels, providing a more reliable view of communication activity. This ensures users have a precise understanding of their messaging workload.
Original PR description
This commit corrects a regression intoduced in [1]: the messaging menu now subtracts the channels needaction counter from the inbox counter, rather than adding it [1] https://github.com/odoo/odoo/pull/229751 Forward-Port-Of: odoo/odoo#243478 Forward-Port-Of: odoo/odoo#243318
This update fixes a bug where payslips were showing blank worked days for employees on fully flexible contracts. The change ensures accurate calculation of worked days, even when contracts don't have a standard calendar assigned, addressing a previous issue with attendance-based work entries. This improves payroll accuracy and reporting.
Original PR description
**Issue:** Payslips show blank worked days for employees with contracts without a `resource_calendar_id` (fully flexible, despite having valid work entries **Cause:** `_get_worked_day_lines()` skips…
**Issue:** Payslips show blank worked days for employees with contracts without a `resource_calendar_id` (fully flexible, despite having valid work entries **Cause:** `_get_worked_day_lines()` skips worked day computation if the contract has no calendar https://github.com/odoo/enterprise/blob/1a10e0444fdb71a072262a1f14f0bfc766d109c6/hr_payroll/models/hr_payslip.py#L665-L674 **Steps to Reproduce:** - Assign an employee a fully flexible contract with attendance as work entry source. - Create work entries based on the attendance records of the employee record - Go to employees > contracts > new Payslip Worked Days section is empty, even though attendance shifts are showing up on top. **Fix:** removing the calendar requirement in the main method and adding a fallback calendar in the called utility method **Note:** same issue happens if work entry source of the contract is Planning opw-4931972 Forward-Port-Of: odoo/enterprise#102668 Forward-Port-Of: odoo/enterprise#93935
This update resolves an issue where non-admin users in multi-company environments couldn't update their profile picture or preferred language. The fix bypasses access rules that were incorrectly blocking company data access, allowing users to manage these settings without errors. This ensures a smoother experience for all users regardless of their company setup.
Original PR description
### Impacted versions: 19.0 and later ### Steps to reproduce: - Install at least 2 languages - Create multiple companies - Log in as marc demo and select only one company - Try to update profile picture or modify preferred lang ### Current behavior: When a non-admin user operates in a multi-company environment with only some companies active in their context, the `res_company_rule_employee` record rule blocks access to `company_ids` when trying to read all assigned companies. This causes an Access Error in the `res.users.new()` method when it attempts to count the user's companies to manage the `base.group_multi_company` group membership, preventing users from changing their profile picture and updating their preferred language Task: [5458607](https://www.odoo.com/odoo/project/49/tasks/5458607) Forward-Port-Of: odoo/odoo#243259
This update fixes an issue where Point of Sale orders weren't consistently linked to the correct company. Now, when a new order is created, the system automatically uses the company setting from the POS session's configuration, ensuring accurate reporting and accounting. This improves data integrity and simplifies business operations.
Original PR description
When creating an order, if due to some reason the company_id is not set on the order data, we set it to the company of the POS session's config. opw-5470175 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#243249
This update ensures that Odoo's code translations are correctly exported. A new package, odoo.orm, was recently added, and this change clarifies how the framework identifies and exports translations from this package. This improves the accuracy and completeness of our code translation resources.
Original PR description
New package odoo.orm was added in PR https://github.com/odoo/odoo/pull/182727 The new package's name must be specified in ``TranslationModuleReader._export_translatable_resources`` to allow the framework to export its code translations. 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#243584
This update resolves an issue where users without specific group permissions would encounter errors when pinning or unpinning embedded actions, particularly within superuser mode. By adding a check for superuser status, the system now correctly allows superusers to perform these actions, ensuring stability for automated processes and installation scripts.
Original PR description
Prior to this commit, an AccessError would be raised when pinning or unpinning embedded actions if the current user did not belong to the 'documents.group_documents_user' group. This could cause issues during operations running in superuser mode (e.g., automated actions, installation scripts, or sudo() calls) because the check strictly validated the user's groups without considering the environment's superuser flag. This commit adds a check for `self.env.su` to ensure the AccessError is not raised when the environment is in superuser mode. Task-5380727 Forward-Port-Of: odoo/enterprise#104043 Forward-Port-Of: odoo/enterprise#101106
This update resolves an issue where the AI module's exception handling wasn't functioning correctly, specifically when a request cursor closed. The fix ensures the system uses the local environment, preventing errors and improving the stability of AI-powered features. This enhances the reliability of the AI module for users.
Original PR description
self.env is invalid inside generator after request cursor closes Forward-Port-Of: odoo/enterprise#104106
This update resolves an issue where Odoo encountered errors when processing emails with attachment content types incorrectly identified as '*/*'. To ensure emails are processed smoothly, the system now defaults to 'application/octet-stream' for these cases, minimizing disruption. The change is a pragmatic solution to avoid blocking emails due to non-standard content types.
Original PR description
In some rare cases it would seem that some systems construct emails with attachments reporting `*/*` as the Content-Type. While trying to parse such content in Odoo, it causes issues with the…
In some rare cases it would seem that some systems construct emails with attachments reporting `*/*` as the Content-Type. While trying to parse such content in Odoo, it causes issues with the standard CPython email library, as no standard handler exists for '*/*' content-types: Example error: ``` File "/usr/lib/python3.13/email/contentmanager.py", line 25, in get_content raise KeyError(content_type) KeyError: '*/*' ``` This is not compliant with valid MIME types defined in RFC2046/section-3, but in real life scenarios, blocking the processing of an incoming email in Odoo because of this might be excessive. While not a perfect solution, we will assume that attachments falsly reported as `*/*` are to be processed as 'application/octet-stream' content types. This should cover most use-cases, and if it still fails, we will consider that it's up to the original email sender to be RFC compliant. OPW-5425093 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#242193
This update fixes an issue where links shared within Odoo's chat system were incorrectly marking customer portal page views. A simple adjustment was made to the request headers sent by the previewer, ensuring accurate tracking of customer activity on the portal. This improves our understanding of customer engagement.
Original PR description
When a link to the portal is sent from the chatter via message or log note, the preview of the link triggers that the page was viewed by customer. As a solution a variable was added to the request headers coming from the previewer. opw-5237785 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#243061
This update resolves an issue where user images within the referral module were not aligned correctly. The fix ensures a consistent and professional appearance for user profiles, enhancing the overall user experience. This improves the visual quality of the referral process.
Original PR description
This fix ensures that the user's image is correctly aligned task-5264613 Forward-Port-Of: odoo/enterprise#99488
16 changes
Resolved issues and error corrections
This update fixes a technical issue that prevented Odoo from properly exporting code translations for the new odoo.orm package. By specifying the package name in the framework's export process, Odoo can now accurately capture and manage code translations, ensuring consistent localization across the platform. This improves the quality and accuracy of our translated software.
Original PR description
New package odoo.orm was added in PR https://github.com/odoo/odoo/pull/182727 The new package's name must be specified in ``TranslationModuleReader._export_translatable_resources`` to allow the framework to export its code translations. 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#243584
This update fixes an issue where a distracting helper element remained visible in the bank reconciliation journal when there were no entries. By hiding this element when there's no data, the view is now cleaner and more user-friendly, particularly on mobile devices. This improves the overall user experience.
Original PR description
Before this PR, in the bank reconciliation journal, the no-content helper remained visible when the quick-create view was opened and there were 0 entries. This was unexpected behavior and caused overlapping issues, especially on mobile views. With this PR, the no-content helper is hidden whenever the quick-create view is open and there are 0 entries either isGrouped or not. task-5470591 Forward-Port-Of: odoo/enterprise#103776
This update addresses a rare issue where emails with incorrectly identified attachment types (specifically '*/*') caused errors in Odoo. To ensure emails are processed smoothly, the system now defaults to treating these attachments as 'application/octet-stream'. This prevents processing failures while acknowledging the sender's responsibility for correct email formatting.
Original PR description
In some rare cases it would seem that some systems construct emails with attachments reporting `*/*` as the Content-Type. While trying to parse such content in Odoo, it causes issues with the…
In some rare cases it would seem that some systems construct emails with attachments reporting `*/*` as the Content-Type. While trying to parse such content in Odoo, it causes issues with the standard CPython email library, as no standard handler exists for '*/*' content-types: Example error: ``` File "/usr/lib/python3.13/email/contentmanager.py", line 25, in get_content raise KeyError(content_type) KeyError: '*/*' ``` This is not compliant with valid MIME types defined in RFC2046/section-3, but in real life scenarios, blocking the processing of an incoming email in Odoo because of this might be excessive. While not a perfect solution, we will assume that attachments falsly reported as `*/*` are to be processed as 'application/octet-stream' content types. This should cover most use-cases, and if it still fails, we will consider that it's up to the original email sender to be RFC compliant. OPW-5425093 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#242193
This update enhances the reliability of the barcode tour process by ensuring all related actions have completed before the tour ends. Removing a synchronous check for DOM elements prevents potential errors and allows for a smoother user experience. This improves the overall stability of the barcode functionality.
Original PR description
After validate an operation, it's still beter to wait for trigger .o_stock_barcode_main_menu to be sure the calls are finished before closing the tour... especially when assertions are made after the tour in python. runbot-error-id~234470
This update fixes an issue where clicking links in the portal triggered a false 'page view' event for customers. A simple adjustment was made to the system's tracking to ensure accurate recording of customer activity within the portal. This improves the reliability of our portal analytics.
Original PR description
When a link to the portal is sent from the chatter via message or log note, the preview of the link triggers that the page was viewed by customer. As a solution a variable was added to the request headers coming from the previewer. opw-5237785 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#243061
This update resolves an issue where FrontDesk hosts with limited access were unable to check out visitors via email. The fix allows the checkout process to run with elevated permissions, ensuring all hosts can successfully complete the visitor checkout. This improves the user experience for FrontDesk staff.
Original PR description
Steps to reproduce: * Create a visitor record with a host who has only FrontDesk user access. * Ensure Notify with Email is enabled on the station. * Click Check Out Visitor from the received email → access error appears. Issue: * Hosts with only FrontDesk user access received an access error when clicking the “Check Out Visitor” button from the email notification. * They were unable to complete the visitor checkout process. Fix: * Run the checkout action with sudo() so the host can successfully check out the visitor from the email link. Impact: * Hosts can now check out visitors without encountering permission errors. task-5373026 Forward-Port-Of: odoo/enterprise#101179
This update resolves a bug that occurred when switching between accounting configurations (COAs) within the Hair Salon Point of Sale industry. The fix ensures that payment methods are correctly deleted during the CoA switch, preventing database errors and ensuring smooth operation.
Original PR description
Steps to reproduce: - Install industry Hair Salon - Settings > Invoicing > Fiscal Localization - Switch to Jordan fiscal localization Issue: Action will fail with error ``` ERROR: update or delete on table "account_journal" violates foreign key constraint "pos_payment_method_journal_id_fkey" on table "pos_payment_method" DETAIL: Key (id)=(6) is still referenced from table "pos_payment_method". ``` Analysis: It occurs because, when switching CoA, the system attempt to delete and re-create journals. However, the hair salon industry initialize a PoS configuration that will create a default payment method based on one of those journal, thus the system will raise a constraint error on delete. A solution is to manually enforce cascade delete when we are switching CoA. opw-5145235 Forward-Port-Of: odoo/odoo#243381 Forward-Port-Of: odoo/odoo#239433
This change fixes an issue where the Eas field automatically gained focus during Peppol registration, causing confusion for users. The fix removes the ability to focus this field, ensuring the system correctly pre-selects it and streamlines the registration process. This improves the user experience for Peppol registration.
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
This update resolves an issue where carousel slide heights were inconsistent, potentially impacting the visual presentation of product listings on the website. The change adjusts the slide height within the 's_carousel_cards' component, improving the overall user experience and ensuring consistent display of content. This is a minor visual fix.
Original PR description
[WIP]
A bug was causing a traceback when opening contacts due to an ambiguous column reference in the account_followup module. This fix resolves the issue by clarifying which table the 'commercial_partner_id' column belongs to within a database query, ensuring proper data retrieval and preventing errors.
Original PR description
### Issue: When creating a record rule on moves using partners, a traceback is raised when opening a contact. ### Steps to reproduce: - Install 'account_followup' and 'contacts' - In Settings >…
### Issue:
When creating a record rule on moves using partners, a traceback is raised when opening a contact.
### Steps to reproduce:
- Install 'account_followup' and 'contacts'
- In Settings > Technical > Security > Record Rules create a new rule
- name: Test Rule
- model: Journal Entry
- definition: `[('partner_id.is_company', '!=', True)]`
- Open the Contact app and try to open a contact
- Traceback
### Cause:
The newly created rule is used in the query computed by `_compute_has_moves()`. To do this the tables 'account_move' and 'res_partner' are joined. Then `subselect()` simply adds the select element with the string it is given, resulting in:
```sql
SELECT commercial_partner_id
FROM "account_move"
LEFT JOIN "res_partner"
...
```
But both `account_move` and `res_partner` have a column named "commercial_partner_id" resulting in an ambiguous column reference traceback.
### Solution:
We need to add precision on which table should be used. `subselect()` cannot guess which one should be used. We cannot add the precision in the definition of `field_names` because it is not compatible with the domain used by `_search()`.
So we add `'account_move.'` to the field name before giving it to `subselect()`.
opw-5467608This update resolves an issue where the system was incorrectly granting elevated permissions (sudo) to bank statement data. This change improves security and efficiency by streamlining access to bank information, ensuring only authorized processes can interact with it. The fix was implemented as a straightforward correction.
Original PR description
--- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#242899 Forward-Port-Of: odoo/odoo#242771
This update corrects a minor issue with how prices were calculated in the Point of Sale (POS) system. The change ensures accurate price signs are displayed, preventing potential display errors. This improves the overall user experience for POS transactions.
Original PR description
We were using `currencyDisplayPriceUnit` inside `Math.sign()`. However, `currencyDisplayPriceUnit` returns a string. Now we use `displayPriceUnit`. opw-5405572
This update resolves a minor issue in a performance test related to menu loading within the Odoo web application. The change optimizes a query number used in the test, resulting in faster and more reliable test execution. This improves the overall stability and efficiency of the web module.
Original PR description
Forward-Port-Of: odoo/odoo#243298
This update resolves an issue where users without specific group permissions would encounter errors when pinning or unpinning embedded actions, particularly within superuser mode. The change ensures superuser operations, such as automated tasks or installations, can correctly manage these actions without restriction. This improves stability and reliability of the Documents module.
Original PR description
Prior to this commit, an AccessError would be raised when pinning or unpinning embedded actions if the current user did not belong to the 'documents.group_documents_user' group. This could cause issues during operations running in superuser mode (e.g., automated actions, installation scripts, or sudo() calls) because the check strictly validated the user's groups without considering the environment's superuser flag. This commit adds a check for `self.env.su` to ensure the AccessError is not raised when the environment is in superuser mode. Task-5380727 Forward-Port-Of: odoo/enterprise#104043 Forward-Port-Of: odoo/enterprise#101106
This update corrects a flaw in a VoIP test that was incorrectly matching results based on unrelated data. The fix ensures the test only evaluates data created within the test environment, preventing inaccurate results and improving the reliability of VoIP contact searches. This enhances the overall stability of the enterprise module.
Original PR description
In the test, we suppose to find no phone number matched result when search term length is shorter than `_phone_search_min_length`. However, it can still match `name` or `email` if possible. In this fix, we change the test to only consider the data created in the test, to avoid the wrong result from demo data. backport odoo/enterprise#101200 Forward-Port-Of: odoo/enterprise#104120
This update addresses a change in Shopee's API, which previously used outdated testing paths. The team has corrected these paths to ensure the Odoo Enterprise system continues to function correctly with Shopee. This fix maintains seamless integration with Shopee for sales operations.
Original PR description
Shopee has changed the API path and the original testing API paths are no longer valid. Forward-Port-Of: odoo/enterprise#103939
9 changes
Resolved issues and error corrections
This update resolves a technical issue in the Odoo recruitment demo data. The system was incorrectly using user records instead of partner records, which caused errors. This fix ensures the demo data accurately reflects the expected data structure, improving the demo experience.
Original PR description
author_id expects a res.partner record. In this commit: Replace the user record with the corresponding partner record to avoid passing an incorrect recordset in demo data.
This update addresses a potential issue where deleted records could still be accessed within Odoo, particularly after cascade deletions. The changes add checks to ensure related records don't exist before accessing data, preventing errors and improving system stability. This ensures notifications and activities are handled correctly even when records are removed.
Original PR description
In order to be defensive we have to check records linked to messages, notifications or activities exist before checking related information like display_name, or even to skip them in various flows. This happens notably due to DB-level cascade deletion that does not remove side records linked through (model, res_id) pairs. It implies some additional exist queries. Task-5138556 Forward-Port-Of: odoo/enterprise#101300 Forward-Port-Of: odoo/enterprise#101185
This update resolves an issue where URLs were appearing twice in WhatsApp messages due to a formatting error in how the Odoo UI's markup was converted. The fix prevents the duplication of URLs, ensuring messages are clear and consistent for users. This improves the user experience when sharing links via WhatsApp.
Original PR description
Steps to reproduce: 1. Set up whatsapp integration. 2. Send a direct message containing a URL. 3. Observe that the URL appears twice in the message received in whatsapp. Issue: This issue arises within the `_send_message` method, where we are taking the Markup body that we use within the Odoo UI to have a clickable URL, like `<a href="https://example.com">https://example.com</a>`. Then, the html2plaintext function duplicates by adding the footnote for the anchor tag, which "duplicates" the URL since the text within the anchor tag is the same as the URL itself. This results in a message body that contains the URL twice, leading to confusion for the user. Solution: This commit addresses the issue by backporting the solution to this problem introduced in odoo/odoo@a152910 and using the `include_references` parameter of the `html2plaintext` function to exclude footnotes from the conversion. opw-4936400
This update resolves an issue where incorrect credentials caused misleading error messages when sending invoices. The fix ensures a clearer and more accurate error display, preventing confusion and streamlining the invoice processing workflow. This improves the reliability of the HR EDI module.
Original PR description
Fixing incorrect error display that occurred while trying to send an invoice to MER with incorrect credentials set up. (no task/error ID) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves an issue where Odoo encountered errors when processing emails with attachment content types incorrectly identified as '*/*'. To ensure emails are processed smoothly, the system now defaults to treating these attachments as 'application/octet-stream'. This prevents processing failures and maintains email functionality.
Original PR description
In some rare cases it would seem that some systems construct emails with attachments reporting `*/*` as the Content-Type. While trying to parse such content in Odoo, it causes issues with the…
In some rare cases it would seem that some systems construct emails with attachments reporting `*/*` as the Content-Type. While trying to parse such content in Odoo, it causes issues with the standard CPython email library, as no standard handler exists for '*/*' content-types: Example error: ``` File "/usr/lib/python3.13/email/contentmanager.py", line 25, in get_content raise KeyError(content_type) KeyError: '*/*' ``` This is not compliant with valid MIME types defined in RFC2046/section-3, but in real life scenarios, blocking the processing of an incoming email in Odoo because of this might be excessive. While not a perfect solution, we will assume that attachments falsly reported as `*/*` are to be processed as 'application/octet-stream' content types. This should cover most use-cases, and if it still fails, we will consider that it's up to the original email sender to be RFC compliant. OPW-5425093 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#242193
This update resolves a problem where Excel reports generated from accounting data would produce blank cells when zero values were present in the data. The fix ensures that zero values are correctly represented as '0.0' in the exported spreadsheets, improving data accuracy and report consistency. This change impacts the General Ledger reports.
Original PR description
Steps to reproduce: - activate debug mode - go to "Accounting / Configuration / Management / Accounting Reports" - Click on "General Ledger" - Go to "Columns" tab - Activate "Blank if Zero" for debit, credit or balance -> Traceback: ``` col['name'] += total_line['columns'][col_index]['name'] TypeError: unsupported operand type(s) for +=: 'float' and 'str' ``` This happens when computing the total from the totals of each account, if there are totals of 0 mixed with non-zero totals. The fix is to fallback to `0.0` if falsy value. opw-5490171 Forward-Port-Of: odoo/enterprise#104165
This update resolves an issue that previously prevented users from duplicating journal entries containing outdated accounts. Now, users can duplicate entries with deprecated accounts, correct the account in the draft, and successfully post the entry. The system validates only during the posting stage, preventing errors before the account is fixed.
Original PR description
Before this commit, duplicating a journal entry that contained a deprecated account raised a validation error immediately. This blocked the duplication process entirely, preventing users from using historical entries as templates. This commit changes the validation to be done in write function and post. Now, users can duplicate an entry with a deprecated account, correct the account in the draft, and post successfully. Validation only blocks the user if they attempt to post the entry without fixing the deprecated account. or if the user inserted a deprecating account while editing the move. task-5417810 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#240230
This update ensures that when a customer clicks a link shared through Odoo's messaging system, the portal correctly records that the page has been viewed. Previously, the system wasn't accurately tracking these views, leading to incomplete customer activity data. This fix improves the accuracy of our portal analytics.
Original PR description
When a link to the portal is sent from the chatter via message or log note, the preview of the link triggers that the page was viewed by customer. As a solution a variable was added to the request headers coming from the previewer. opw-5237785 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#243061
This update corrects a missing piece of information for Chilean SII (Service de Impuestos Internos) reporting within the Odoo Enterprise system. Specifically, the Regional Office for Alto Hospicio, located in the Taracapá region, has been added to ensure accurate tax compliance. This ensures correct reporting for businesses operating in that specific region.
Original PR description
Oficina Regional Alto Hospicio Comuna Alto Hospicio Región Taracapá
4 changes
Resolved issues and error corrections
This update addresses a rare technical issue where a variable within the Odoo mail system was sometimes undefined, leading to potential instability. This fix ensures the mail functionality operates reliably in all circumstances, improving overall system stability. The change is a minor correction to prevent unexpected errors.
Original PR description
In rare cases a variable is not defined.
This update resolves an issue where the save and cancel buttons in the report editor's WYSIWYG interface were difficult to see due to insufficient contrast. The change improves the visibility of these buttons, ensuring a better user experience for creating and editing reports. This addresses a minor usability concern.
Original PR description
Before this PR, the save and cancel button could not be seen properly, now the contrast has been improved. | Before | After | |--------|--------| | <img width="1056" height="97" alt="Screenshot 2026-01-08 at 11 00 30" src="https://github.com/user-attachments/assets/9b03a220-5537-4f6c-a7e2-a6fa3a4da75a" /> | <img width="1056" height="97" alt="Screenshot 2026-01-08 at 11 00 20" src="https://github.com/user-attachments/assets/cb4a868d-e2ab-429d-8588-a92c4e1e170e" /> | task-5401415
This update addresses a potential issue where long email display names could cause emails to be incorrectly formatted, leading to problems with email delivery and folding. The fix ensures that display names are properly quoted in email headers, maintaining RFC compliance and preventing misinterpretation of the email message. This ensures reliable email communication for our users.
Original PR description
In certain edge-case, when having long display names in an email address, the standard mail library in Python used to have a bug were it would remove the quotes in the display name of the email…
In certain edge-case, when having long display names in an email address, the standard mail library in Python used to have a bug were it would remove the quotes in the display name of the email address and lead to miss-folded header values in the final email after serialization of the message object for SMTP sending. See cpython#80222. While a fix was deployed in recent Python versions and backported, given it's non-critical nature, it is not backported my default in Debian/Ubuntu distribution for Python versions <3.13. This means that as long as the minimal supported version for Odoo is below 3.13, we will need to pre-emptively prevent this issues with an Odoo side fix. ## Bug description: 1) Create a contact with a very long display name: `A Name That Is Extremely Long And Will Force The Header Folding Mechanism To Break The Quotes, Which Is The Bug We Are Testing` 2) Send an email message to this contact (capture with a mailcatcher) 3) Analyse the "TO" header an notice that it's miss-folded and RFC non compliant ``` To: A Name That Is Extremely Long And Will Force The Header Folding Mechanism To Break The Quotes, Which Is The Bug We Are Testing <test@example.com> ``` Notice that the quotes were wrongly removed, now the single email is interpreted as multiple ones due to the non-quoted commas. ## After this fix: ``` To: "A Name That Is Extremely Long And Will Force The Header Folding Mec..." <test@example.com> ``` OPW-4988762 BPO-36041 BPO-44637
This update resolves an issue where Odoo encountered errors when processing emails with attachment content types incorrectly identified as '*/*'. To avoid blocking legitimate emails, the system now defaults to 'application/octet-stream' for these cases, ensuring email processing continues smoothly. The change is a minor fix to improve email reliability.
Original PR description
In some rare cases it would seem that some systems construct emails with attachments reporting `*/*` as the Content-Type. While trying to parse such content in Odoo, it causes issues with the…
In some rare cases it would seem that some systems construct emails with attachments reporting `*/*` as the Content-Type. While trying to parse such content in Odoo, it causes issues with the standard CPython email library, as no standard handler exists for '*/*' content-types: Example error: ``` File "/usr/lib/python3.13/email/contentmanager.py", line 25, in get_content raise KeyError(content_type) KeyError: '*/*' ``` This is not compliant with valid MIME types defined in RFC2046/section-3, but in real life scenarios, blocking the processing of an incoming email in Odoo because of this might be excessive. While not a perfect solution, we will assume that attachments falsly reported as `*/*` are to be processed as 'application/octet-stream' content types. This should cover most use-cases, and if it still fails, we will consider that it's up to the original email sender to be RFC compliant. OPW-5425093 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#242193