Daily updates from Odoo
Wednesday, May 20, 2026
236 changes
8 changes
Resolved issues and error corrections
This update resolves an issue where links between related blogs weren't correctly updated in Odoo. The fix ensures that all blog links are properly replaced after a blog is created, improving the overall user experience and content consistency.
Original PR description
Blogs that reference each other were not having their links properly replaced. This commit fixes it by making a second pass to replace the links once the blogs have been created
This update resolves an issue that prevented users from selecting multiple resources within the Planning app. The fix corrects a technical error that occurred when multiple resources were chosen, ensuring users can now efficiently manage resource assignments. This improves the usability of the Planning module.
Original PR description
Currently, selecting multiple resources in planning causes an error. ### **Steps to reproduce:** 1) Install Planning with demo data 2) Go to the Planning app and click on `New` 3) In the Resource field, open the dropdown, click Search More, select multiple records, then click Select ### **Error:** ``` TypeError: ResourceResource.get_materials_assigned_to_human_resources() takes 1 positional argument but 18 were given ``` ### **Root Cause:** At [1], a single argument is passed to `get_materials_assigned_to_human_resources`, but the field allows selecting multiple records, which leads to the error. [1]: https://github.com/odoo/enterprise/blob/8a843b69a59bc915fb6163aab03b144c2c93ac6b/planning/static/src/views/fields/many2many_avatar_resource/many2many_avatar_resource_field.js#L46C16-L50 ### **Fix:** Handle multiple records when calling `get_materials_assigned_to_human_resources`. **opw-6192072**
This update fixes an issue where the website search icon didn't function correctly on translated versions of the site (like French or Spanish). The change ensures the search bar opens consistently regardless of the user's selected language, improving the user experience across all supported languages.
Original PR description
Before this commit, clicking the search icon in the website header correctly opened the searchbar on the default language page, but failed on translated pages (e.g. FR, ES). Steps to reproduce: 1. Install a website with multiple languages enabled 2. Open the website in the default language (e.g. EN) 3. Click the search icon in the header -> Observe that the searchbar opens correctly 4. Switch to another language (e.g. FR or ES) 5. Click the same search icon -> Observe that nothing happens This commit updates the selector logic to properly target the search button regardless of the active website language. task-6226424
This update resolves an issue where branch companies couldn't access bank accounts configured for the parent company. Previously, attempts to pay invoices from a branch company resulted in an error. This change ensures branch companies have proper access to their associated bank accounts, allowing for seamless payments.
Original PR description
**Steps to reproduce:**
- Install Accounting
- Create a branch company
- From parent company, configure Bank journal:
=> set its "Bank Account Number" to a bank account having its company field set
- Switch to the branch company
- Create an invoice
- Confirm the invoice
- Try to pay from the invoice
**Issue:**
An Access Error is raised because the bank account used for the payment belongs to the parent company and the branch company doesn't have access to it.
opw-6001573
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#262173This update resolves an issue where PDFs containing JPG images were no longer readable after upgrading the pdf.js library. The team integrated OpenJPEG support, allowing Odoo to correctly process and display PDFs with JPG content, ensuring consistent PDF viewing functionality.
Original PR description
Following the update of pdf.js to v5.4, reading pdfs containing JPG files didn't work anymore: https://github.com/odoo/odoo/commit/5035107ef64a8c1ca1aae3a2b0de5bf8efa246f4 Taken from https://github.com/mozilla/pdf.js/blob/v5.4.394/external/openjpeg/openjpeg.wasm opw-6073568 Forward-Port-Of: odoo/odoo#260997
This update optimizes how Odoo handles changes to a partner's parent organization. Previously, updates could trigger unnecessary checks and errors. Now, the system only performs these checks when a true change to the parent ID occurs, resulting in faster and more reliable partner updates, especially through the API.
Original PR description
When updating a partner's parent_id, ensure the VAT check and move line updates are only triggered if the parent_id actually changes. This prevents unnecessary validations and side effects when writing the same parent_id value. This fix improves performance and avoids spurious errors when updating partners via the API. task-[6214466](https://www.odoo.com/odoo/project.task/6214466) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#264175
This update optimizes the Point of Sale system by preventing unnecessary event triggers when no new products are created. Previously, a process triggered updates across many loyalty rewards even when no changes were made. This change improves performance and reduces redundant updates, leading to a smoother user experience.
Original PR description
Previously, `loadData` always fired the `"create"` event for every model in a batch, even when all records in that batch were updates (`createdIds = []`). Any listener registered on `"create"` would then be invoked with an empty ID list.
For example, `computeDiscountProductIdsForAllRewards` in pos_loyalty is subscribed to `product.product` "create". When called with `{ ids: [] }`, it still iterated over every `loyalty.reward` and rebuilt its `all_discount_product_ids` array — a no-op that triggered reactive updates across all rewards on every product scan.
The fix guards the `triggerEvents("create", ...)` call behind a `createdIds.length` check, so the event only fires when at least one record was actually created.
opw-6091501
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#264145This update prevents error messages from appearing when spreadsheets are unavailable, improving the user experience. The fix addresses a previous issue where changes required modifications to multiple parts of the system, which was deemed unreliable. This change simplifies the process and ensures consistent error handling.
Original PR description
The fix suggested in #81276 did not account for other spreadsheet models than a document as it required some modification in the component template. The same logic should then have been forwarded to other models (quality.check for instance] but that process is error prone. This revision changes the approach by handling the server error inside the abstract action so that no template modification is required. task-6208222 Forward-Port-Of: odoo/enterprise#117788 Forward-Port-Of: odoo/enterprise#117221
4 changes
Resolved issues and error corrections
This update resolves issues preventing the planning tour tests from running correctly. A recent change removed a template saving step, and a missing check for a related app caused further failures. This ensures the planning tour tests continue to function as expected.
Original PR description
Since fc7b3c2, the "save as template" step of the planning tour was removed, making the test checking for templates in project_forcast fail. The commit also adds a condition checking if planning_field_service is installed before running the planning_test_tour but didn't add it for the sale_planning_test_tour, which extends the planning_test_tour and fails as well if the 3 apps are installed. opw-6176441 runbot-230670
This update resolves an issue where PDFs containing JPG images were no longer readable after upgrading the pdf.js library. The team integrated OpenJPEG support, allowing Odoo to correctly process and display PDFs with JPG content. This ensures consistent PDF viewing functionality for users.
Original PR description
Following the update of pdf.js to v5.4, reading pdfs containing JPG files didn't work anymore: https://github.com/odoo/odoo/commit/5035107ef64a8c1ca1aae3a2b0de5bf8efa246f4 Taken from https://github.com/mozilla/pdf.js/blob/v5.4.394/external/openjpeg/openjpeg.wasm opw-6073568 Forward-Port-Of: odoo/odoo#260997
This update prevents error messages from appearing when spreadsheets are unavailable, improving the user experience. The fix addresses a previous issue where changes were needed across multiple spreadsheet models, which was prone to errors. This change handles server errors directly, simplifying the process and ensuring consistent behavior.
Original PR description
The fix suggested in #81276 did not account for other spreadsheet models than a document as it required some modification in the component template. The same logic should then have been forwarded to other models (quality.check for instance] but that process is error prone. This revision changes the approach by handling the server error inside the abstract action so that no template modification is required. task-6208222 Forward-Port-Of: odoo/enterprise#117788 Forward-Port-Of: odoo/enterprise#117221
This update optimizes the Point of Sale system by preventing unnecessary event triggers when updating existing records. Previously, a process triggered updates across multiple loyalty rewards even when no new products were created. This change improves performance and reduces unnecessary system activity.
Original PR description
Previously, `loadData` always fired the `"create"` event for every model in a batch, even when all records in that batch were updates (`createdIds = []`). Any listener registered on `"create"` would then be invoked with an empty ID list.
For example, `computeDiscountProductIdsForAllRewards` in pos_loyalty is subscribed to `product.product` "create". When called with `{ ids: [] }`, it still iterated over every `loyalty.reward` and rebuilt its `all_discount_product_ids` array — a no-op that triggered reactive updates across all rewards on every product scan.
The fix guards the `triggerEvents("create", ...)` call behind a `createdIds.length` check, so the event only fires when at least one record was actually created.
opw-6091501
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#2641452 changes
Resolved issues and error corrections
This update corrects a bug where a negative payment through a POS order incorrectly inflated the 'Settle Due Amount' displayed to customers. The fix prevents negative values from being used in calculations, ensuring accurate remaining balances are shown in the customer interface. This improves the reliability of the payment settlement process.
Original PR description
When a customer paid off their account balance through a POS order, a negative pay_later amount was used. The condition `if order_due:` in `_compute_customer_due_total` evaluated to True for negative values, causing `customer_due_total` and `init_customer_due_total` to be set to a negative amount. This made `pos_orders_amount_due` on the partner go negative, which in turn inflated `remainingDue` in the frontend (remainingDue = totalDue - posOrdersAmountDue), showing a wrong amount in the "Settle due amount" button. opw-6187771 Forward-Port-Of: odoo/enterprise#116394
This update optimizes the Point of Sale system by preventing unnecessary event triggers when updating existing records. Previously, a process triggered updates across multiple loyalty rewards even when no new products were created. This change improves performance and reduces redundant updates, leading to a smoother user experience.
Original PR description
Previously, `loadData` always fired the `"create"` event for every model in a batch, even when all records in that batch were updates (`createdIds = []`). Any listener registered on `"create"` would then be invoked with an empty ID list.
For example, `computeDiscountProductIdsForAllRewards` in pos_loyalty is subscribed to `product.product` "create". When called with `{ ids: [] }`, it still iterated over every `loyalty.reward` and rebuilt its `all_discount_product_ids` array — a no-op that triggered reactive updates across all rewards on every product scan.
The fix guards the `triggerEvents("create", ...)` call behind a `createdIds.length` check, so the event only fires when at least one record was actually created.
opw-6091501
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#2641454 changes
Resolved issues and error corrections
This update corrects a bug where certain quality control test types were incorrectly visible to users. The change ensures these test types are only accessible during manufacturing operations, aligning with the intended functionality. This prevents users from selecting inappropriate test types, improving data accuracy.
Original PR description
### Issue: The `Print Label`, `Register Production`, `Register By-products`and `Register Consumed Materials` are all available in the test types at control point creation. ### Expected behavior:…
### Issue:
The `Print Label`, `Register Production`, `Register By-products`and `Register Consumed Materials` are all available in the test types at control point creation.
### Expected behavior:
These test types are only meant for manufacturing operations and are supposed to be hidden by the field domain:
https://github.com/odoo/enterprise/blob/f56aa85b4ad32c5d9ad5593df1366d72e88da0e4/mrp_workorder/models/quality.py#L102-L104 https://github.com/odoo/enterprise/blob/00d6cccd75c402378698a6fd11ee2692f2361c7f/mrp_workorder/models/quality.py#L20-L24
### Cause of the issue:
Since saas-18.1: 5ef007a2116e528b796ebe80fb291ba5f1a94c8f domains are optimised into equivalents SQL clause with better sql performances. This optimization results in the following match for boolean fields:
`('field', '=', True)` -> `('field', 'in', OrderedSet([True]))`
`('field', '=', False)` -> `('field', ' not in', OrderedSet([True]))`
Because of these:
https://github.com/odoo/odoo/blob/82b16e8feb3d60a9a3855e3adb3164ae5a6c041d/odoo/orm/domains.py#L1058-L1079 https://github.com/odoo/odoo/blob/82b16e8feb3d60a9a3855e3adb3164ae5a6c041d/odoo/orm/domains.py#L1215-L1236
Now the issue is that the specific `search_method` of the `allow_registration` field is then called with this optimized domain: https://github.com/odoo/odoo/blob/82b16e8feb3d60a9a3855e3adb3164ae5a6c041d/odoo/orm/domains.py#L860-L866 https://github.com/odoo/enterprise/blob/00d6cccd75c402378698a6fd11ee2692f2361c7f/mrp_workorder/models/quality.py#L20-L24
And since `value` is defined as a non empty ordered set in both cases it the search method returns a True leaf as search domain.
opw-5915197This update fixes a technical problem caused by a recent change in Odoo's Python environment. Specifically, it resolved a circular import issue related to a new library, preventing errors during startup. The change also cleaned up an unused import statement.
Original PR description
In Python 3.14, the introduction of `annotationlib` changes the standard library's internal import graph. When `inspect` imports `annotationlib`, it subsequently imports `ast`. Odoo's custom module…
In Python 3.14, the introduction of `annotationlib` changes the standard library's internal import graph. When `inspect` imports `annotationlib`, it subsequently imports `ast`.
Odoo's custom module loader intercepts this `ast` import to execute `odoo._monkeypatches.ast`. Previously, this monkeypatch had a top-level `import logging`. Loading `logging` triggers an import chain (`traceback` -> `_colorize` -> `dataclasses`) that ultimately attempts to call `annotationlib.get_annotations`. Because `annotationlib` is still in the middle of its initial load, this attribute does not exist yet, resulting in an AttributeError.
This commit defers the `logging` import inside the `ast` monkeypatch to the local scope, breaking the circular import chain and allowing Python 3.14 to finish initializing its core modules properly.
Also it cleans up a blocking and unused `logging` import in `_monkeypatches/num2words.py`.
runbot-938481
<hr>
For information, the actual traceback:
```
'Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/data/src/odoo/odoo/api/__init__.py", line 4, in <module>
from odoo.orm.identifiers import NewId
File "/data/src/odoo/odoo/orm/__init__.py", line 20, in <module>
import odoo.init # noqa: F401
File "/data/src/odoo/odoo/init.py", line 23, in <module>
from .orm.utils import SUPERUSER_ID
File "/data/src/odoo/odoo/orm/utils.py", line 8, in <module>
from odoo.tools import SQL
File "/data/src/odoo/odoo/tools/__init__.py", line 7, in <module>
from .cache import ormcache, ormcache_context
File "/data/src/odoo/odoo/tools/cache.py", line 7, in <module>
from decorator import decorator
File "/usr/lib/python3/dist-packages/decorator.py", line 37, in <module>
import inspect
File "/usr/lib/python3.14/inspect.py", line 146, in <module>
from annotationlib import Format, ForwardRef
File "/usr/lib/python3.14/annotationlib.py", line 3, in <module>
import ast
File "<frozen importlib._bootstrap>", line 1371, in _find_and_load
File "<frozen importlib._bootstrap>", line 1342, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 938, in _load_unlocked
File "/data/src/odoo/odoo/_monkeypatches/__init__.py", line 46, in exec_module
hook()
File "/data/src/odoo/odoo/_monkeypatches/__init__.py", line 70, in patch_module
module = importlib.import_module(f\'.{name}\', __name__)
File "/usr/lib/python3.14/importlib/__init__.py", line 88, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/data/src/odoo/odoo/_monkeypatches/ast.py", line 4, in <module>
import logging
File "/usr/lib/python3.14/logging/__init__.py", line 26, in <module>
import sys, os, time, io, re, traceback, warnings, weakref, collections.abc
File "/usr/lib/python3.14/traceback.py", line 12, in <module>
import _colorize
File "/usr/lib/python3.14/_colorize.py", line 157, in <module>
@dataclass(frozen=True, kw_only=True)
File "/usr/lib/python3.14/dataclasses.py", line 1432, in wrap
return _process_class(cls, init, repr, eq, order, unsafe_hash,
File "/usr/lib/python3.14/dataclasses.py", line 1041, in _process_class
cls_annotations = annotationlib.get_annotations(
AttributeError: partially initialized module \'annotationlib\' from \'/usr/lib/python3.14/annotationlib.py\' has no attribute \'get_annotations\' (most likely due to a circular import)
'
```This update corrects an issue where reducing the purchase order quantity after a partial receipt incorrectly increased the backorder quantity in multi-step receipt warehouses. The fix ensures that the backorder demand is calculated accurately based on the current quantity of moves, resolving a discrepancy in quantity calculations.
Original PR description
**Issue** Reducing the PO quantity after performing a partial receipt, in multi-step receipts warehouse can incorrectly update the remaining receipt quantity. **Steps to reproduce** - Setup 2-route…
**Issue** Reducing the PO quantity after performing a partial receipt, in multi-step receipts warehouse can incorrectly update the remaining receipt quantity. **Steps to reproduce** - Setup 2-route receipt warehouse (Inventory > Configuration > Warehouse Management > Warehouses) - Create a PO for 35 units and confirm it - Click on receive products, set received quantity to 10 and create a backorder - Validate the next transfer - Go back to the PO and change the quantity to 20 - Check the receipt demand -> The backorder picking demand become 35 instead of 10 **Cause** Updating the quantity of a purchase order line, also updates the related picking: https://github.com/odoo/odoo/blob/5fc1e34d174f7f61d692d086d0ff65fbfc72b013/addons/purchase_stock/models/purchase_order_line.py#L120 It updates the picking associated to the backorder since the other one is done: https://github.com/odoo/odoo/blob/5fc1e34d174f7f61d692d086d0ff65fbfc72b013/addons/purchase_stock/models/purchase_order_line.py#L185-L187 https://github.com/odoo/odoo/blob/5fc1e34d174f7f61d692d086d0ff65fbfc72b013/addons/purchase_stock/models/purchase_order_line.py#L197 This ultimately calls: https://github.com/odoo/odoo/blob/5fc1e34d174f7f61d692d086d0ff65fbfc72b013/addons/purchase_stock/models/purchase_order_line.py#L228 To compute the new demand for the picking, it retrieves the `move_dest`: https://github.com/odoo/odoo/blob/5fc1e34d174f7f61d692d086d0ff65fbfc72b013/addons/purchase_stock/models/purchase_order_line.py#L240 To compute `qty_to_push`: https://github.com/odoo/odoo/blob/5fc1e34d174f7f61d692d086d0ff65fbfc72b013/addons/purchase_stock/models/purchase_order_line.py#L247-L249 However, since we are in a 2-route receipt setup, `move_dest` is the move from Input to stock for the done picking. Thus, `qty_to_push` is `20 - 10 = 10` instead of `20 - 35 = -15` **Solution** The previous logic assumes a pull flow, where downstream (move_dest_ids) quantities are always up-to-date and can be used as the source of truth to recompute demand. In push flows (e.g., multi-step receipts), this assumption does not hold. To fix this, we instead base the computation on the quantity of the current moves (qty) if nothing has to be attached. **Additional information** Known limitation: this does not address inconsistencies in return flows. When there're returns, units define in the pol and the one define in the sum of the picking can diverge, thus this pr won't fix that. opw-5512172 Forward-Port-Of: odoo/odoo#263294 Forward-Port-Of: odoo/odoo#248626
This update resolves a problem where Odoo failed to authenticate certain foreign KSeF certificates, causing authentication errors. The fix automatically detects the correct identifier type for the certificates, ensuring seamless integration with the Polish tax authority's KSeF system. This improves the reliability of tax reporting for users in Poland.
Original PR description
### Description of the issue/feature this PR addresses: **Issue**: During KSeF authentication, some foreign qualified certificates causes a crash with error _"Failed to authenticate with XAdES: 400…
### Description of the issue/feature this PR addresses: **Issue**: During KSeF authentication, some foreign qualified certificates causes a crash with error _"Failed to authenticate with XAdES: 400 Client Error: Bad Request for url: https://api.ksef.mf.gov.pl/v2/auth/xades-signature"_ This is due to Odoo not handling different `SubjectIdentifierType` **Solution**: Implement a try/except block to safely check for the NIP in the certificate's subject string, defaulting the identifier type to `certificateFingerprint` when the NIP is missing or a ValueError is caught. ### Current behavior before PR: The `SubjectIdentifierType` is hardcoded as `certificateSubject`, and does not handle `certificateFingerprint` at all. This causes there to be an error when trying to authenticate with the KSeF server using XAdES signature. ### Desired behavior after PR is merged: The sign_authentication_challenge method will now safely evaluate the subject string. It assigns `certificateSubject` only if the NIP is verified to be in the subject string. If the NIP is absent or a ValueError occurs during parsing, the system safely falls back to using `certificateFingerprint`. This prevents tracebacks and ensures the correct XML payload is sent to the KSeF server. opw-6125243 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#265390
5 changes
Resolved issues and error corrections
This update fixes a potential crash during bank statement imports by ensuring the correct journal is selected based on currency and IBAN. The system now automatically finds the best match, preventing errors and improving the reliability of importing bank statement data. This enhances data accuracy and reduces potential user issues.
Original PR description
Behavior before: The import flow could crash with an "Expected singleton" error if multiple journals shared an IBAN. Additionally, the system blindly accepted the current context ('self') as the…
Behavior before:
The import flow could crash with an "Expected singleton" error if multiple
journals shared an IBAN. Additionally, the system blindly accepted the
current context ('self') as the target journal, even if its currency or
bank account mismatched the statement, often leading to avoidable
UserErrors.
Behavior after:
The system now validates 'self' against the statement's currency and IBAN
before assignment. If a mismatch is found, it automatically searches for
the correct journal. The search is now restricted by currency and includes
a limit=1 to prevent crashes and ensure accurate selection.
Root Cause:
In _find_additional_data(), 'journal = self' was assigned without validation.
Furthermore, the fallback search lacked a record limit and currency matching
logic, allowing multiple records to be returned when duplicates or
multi-currency setups existed.
Fix:
- Added validation for the initial 'self' candidate (currency and IBAN match).
- Refined the search domain to include currency matching (journal or
company fallback).
- Added limit=1 to the search to guarantee a singleton recordset.
opw-5462037
Forward-Port-Of: odoo/enterprise#117394
Forward-Port-Of: odoo/enterprise#115475This update optimizes a key query in the sales commission reporting process. By removing an unnecessary bit shift, the system now handles significantly larger sales commission data, expanding its capabilities and avoiding potential limitations. This change improves report generation speed and accuracy.
Original PR description
The combined query for sale.commission.achievement.report originally performs several bitwise shifts, starting with the max AML ID. This is done to create a composite number ID for the combined IDs.…
The combined query for sale.commission.achievement.report originally performs several bitwise shifts, starting with the max AML ID. This is done to create a composite number ID for the combined IDs. `MAX(aml.id)::bigint <<20) | max(rules.id)::bigint <<10 | rules.user_id <<10` This shifts the max aml.id 40 bits to the left. Example: Let's say MAX(aml.id) = 1; we will set the other variables to 1, as they often have little impact on the total size of the number. 1 << 20 = 1048576 1048576 | 1 = 1048577 1048577 << 10 = 1099512676352 1099512676352 | 1 = 1099512676353 1099512676353 << 10 = 1152922604119523328 With this format, the highest guaranteed AML ID this query can handle is under 838,861. The last 10-bit shift is unnecessary and increases the result. If we remove the last shift, the AMD ID this query can handle becomes much higher. `MAX(aml.id)::bigint <<20) | max(rules.id)::bigint <<10 | rules.user_id` | | AML Max | RULES.ID Max |RULES.USER_ID Max| | --------------------- | ------ | ------ | ------ | | Before | 838,861 | 1,048,576 | 1,024 | | After | 858,993,459 |1,048,576 | 1,024| opw-6124026 Forward-Port-Of: odoo/enterprise#114711
This update corrects a visual inconsistency in the project timesheet display. Previously, the 'Time Remaining' value wasn't highlighted in red when negative, even though the label was. This fix ensures that negative time remaining values are correctly displayed with a red color, improving clarity and accuracy for users.
Original PR description
**Steps to reproduce:** - Open project shared form view. - Go to the Timesheets tab. - Observe the Time Remaining value. **Issue:** - The Time Remaining label is red properly but its value does not becomes red even when the value is negative. **Fix:** In hr_timesheet, the remaining_hours field has a decoration-danger applied In sale_timesheet_enterprise, this field is overridden as portal_remaining_hours So, Added the corresponding decoration-danger on portal_remaining_hours. task-5404009 Forward-Port-Of: odoo/enterprise#114836 Forward-Port-Of: odoo/enterprise#113632
This update clarifies the labels for vehicle deductibility rates within the Enterprise module. The previous labels were inaccurate, representing the deductible portion instead of the non-deductible amount. This change ensures accurate reporting and financial calculations related to vehicle expenses.
Original PR description
The "Deductibility Rates" and "Deductibility (%)" labels are wrong for vehicles as they are supposed to represent the non-deductible part. This commit fixes these labels. task-6121629 Forward-Port-Of: odoo/enterprise#116878
This update corrects a bug where merging duplicate records caused multiple XML IDs to point to the same master record, compromising the system's ability to uniquely identify data. The fix ensures that each record has a single, unique XML ID, maintaining data integrity and reliability. This resolves a potential issue with data tracking and reporting.
Original PR description
When merging duplicate records, the merged record's XML ID was moved onto the master. Since the master already had its own XML ID, it ended up with several XML IDs pointing at it, breaking the assumption that an XML ID is a unique identifier for a single record. task-6186726
2 changes
Resolved issues and error corrections
This update fixes an error that occurred when selecting shift templates on planning slots, specifically when dealing with long leave periods. The change ensures the system falls back to a previously calculated end date if the standard calculation fails, preventing the application from crashing. This improves the reliability of shift planning.
Original PR description
Currently, an error occurs when a user selects a shift template on a planning slot. **Steps to Reproduce:** - Install the `Planning` module with demo data. - Create a `Resource Time Off` record with…
Currently, an error occurs when a user selects a shift template on a planning slot. **Steps to Reproduce:** - Install the `Planning` module with demo data. - Create a `Resource Time Off` record with `start` and `end date` separated by more than `1400 days (around 3.9 years)`, and Set the Working Hours field to Standard 40 hours/week. - Go to `Planning` > `Configuration` > `Shift Templates`, open an `existing record` or create a `new one`, and set the `Working Days` to more than 1 day. - Create a new `planning slot`, Assign the resource `Abigail Peterson`, and select the above `shift template`. `AttributeError: 'bool' object has no attribute 'replace'` This error occurs because when the user sets the shift template, the compute method runs to calculate the start and end datetimes [1]. It computes the end datetime by adding the template duration in working days from the given start datetime using the resource working calendar within a searchable range of around 1400 days [2]. During this computation, leaves and non-working days are skipped [3]. If no valid working interval is found within the searchable range, then it returns False [4], which raises the error [5]. This commit ensures that if plan_days returns False, the computation falls back to the previously calculated end date. [1]: https://github.com/odoo/enterprise/blob/6ae5d3df6e9305416e4d6f74259cd01753025f42/planning/models/planning.py#L662-L671 [2]: https://github.com/odoo/odoo/blob/a439bd305112f6efc752ce900f7782e7faaf7312/addons/resource/models/resource_calendar.py#L826-L835 [3]: https://github.com/odoo/odoo/blob/a439bd305112f6efc752ce900f7782e7faaf7312/addons/resource/models/resource_calendar.py#L533-L537 [4]: https://github.com/odoo/odoo/blob/a439bd305112f6efc752ce900f7782e7faaf7312/addons/resource/models/resource_calendar.py#L835 [5]- https://github.com/odoo/enterprise/blob/6ae5d3df6e9305416e4d6f74259cd01753025f42/planning/models/planning.py#L653-L654 sentry-7472958590 Forward-Port-Of: odoo/enterprise#117073
This update corrects a bug where portal users could inadvertently delete documents they didn't own. The fix ensures that portal users can only delete documents they own, preventing unintended data loss during the system's automatic trash collection process. The change simplifies the code and improves stability.
Original PR description
Reproduce: with rpc call as portal user, you can archive documents you have access to. This is not desired as this may lead to records being deleted when the cron collects the trash, but we only wanted to support portal users deleting only records they own. What we did when calling toggle_active should be done for all calls to `write` with `active`. It also removes the need for `_raise_if_unauthorized_archive` and `_unlink_except_unauthorized`. Task-6205627 Forward-Port-Of: odoo/enterprise#116886
3 changes
Resolved issues and error corrections
This update corrects a bug where the tax amount on purchase bills was incorrectly reset to a default value (2.25) instead of the manually set amount (100). The issue stemmed from a recomputation of tax lines within the bill processing, triggered by the bill confirmation. This fix ensures the tax amount accurately reflects the user's manual input.
Original PR description
Issue is really similar to commit 21877c09863222a237fe99334787ac46935dcca4 except here the compensations amls are created in _stock_account_prepare_anglo_saxon_in_lines_vals because of a difference…
Issue is really similar to commit 21877c09863222a237fe99334787ac46935dcca4 except here the compensations amls are created in _stock_account_prepare_anglo_saxon_in_lines_vals because of a difference between bill price and product cost **Steps to reproduce:** - create storable product with category standard auto - on the category, set an account in the field 'price difference account' - set a cost of 10 - set a purchase tax - confirm a PO for 1 @ 15 and validate receipt - create bill, set a date, save - on the Bill set the total tax at 100 (it's bellow 'untaxed amount' on the bottom right of the bill and should be 2.25 before you change it, if the tax is 15%) - confirm the bill **Current behavior:** tax was reset to 2.25 **Expected behavior:** It should stay 100 as it was manually set **Cause of the issue:** The total tax amount is computed based on the tax lines in Journal Items https://github.com/odoo/odoo/blob/2744396733bb3ad60813e9e093d67192c0d38b36/addons/account/models/account_move.py#L1171 So the problem is actually that a recomputation of the balance of the tax account.move.line (the one with the account "tax paid" in journal items) is triggered when we confirm the Bill. That's because: When we confirm the bill, _stock_account_prepare_anglo_saxon_in_lines_vals() creates two amls : - one debiting 5 on the account set in the field 'price difference account' - one crediting 5 in the stock interim received account (This makes sense and is there to realign with the fact that, on the account move linked to the svl, the amount credited from stock interim received is rightfully 10 because that's cost of the product and it's a standard price product) When we create those amls from, the create method from account.move.lines calls super() inside a context manager calling _sync_dynamic_lines(). https://github.com/odoo/odoo/blob/5583cbcebae00d8122dce5ce929b650929966a90/addons/account/models/account_move_line.py#L1628-L1635 the yield of sync_dynamic_lines() is inside a context manager calling _sync_tax_lines. https://github.com/odoo/odoo/blob/5583cbcebae00d8122dce5ce929b650929966a90/addons/account/models/account_move.py#L3250 Therefore, the first half of sync_tax_lines() (untill the yield) is ran before the call to super and the rest (from the yield) is ran after the call to super. Because we added two lines in the account.move, get_changed_lines will return those 2 new line and because there is a tax_ids on the new lines round_from_tax will be False. https://github.com/odoo/odoo/blob/5583cbcebae00d8122dce5ce929b650929966a90/addons/account/models/account_move.py#L3034-L3041 Therefore we won't reach continue. https://github.com/odoo/odoo/blob/73d73c5c6606e0b34c754bfc4de035840951dd3b/addons/account/models/account_move.py#L3055-L3059 And the tax line will be recomputed using _prepare_tax_line() https://github.com/odoo/odoo/blob/73d73c5c6606e0b34c754bfc4de035840951dd3b/addons/account/models/account_move.py#L3065 Here is why there is a tax_ids on the new lines : The field is precompute so if we don't set a value for it, _compute_tax_ids will be ran to compute it. As the account move on which the lines are added is a bill, the tax_ids will the supplier_tax_id of the product. https://github.com/odoo/odoo/blob/73d73c5c6606e0b34c754bfc4de035840951dd3b/addons/account/models/account_move_line.py#L898-L901 **fix** There is no need for a tax_ids on these lines as they are not meant to (and should'nt) impact the taxes. opw-6014710
A recent update to Odoo's PDF processing caused errors when downloading signed documents. This fix corrects a misplacement of the PDF compression step, ensuring compatibility with newer versions of the pypdf library. This resolves an issue that prevented successful document downloads from the Sign app.
Original PR description
This [related PR] introduced a compression pass after calls to mergePage(). However in newer versions of pypdf (>=3.5.2), compress_content_streams() can only be called on pages of PdfWriter. An error would be raised when called on pages of a PdfReader. Steps to reproduce ----- 1. Run Odoo with pypdf>=3.5.2 2. Sign and download a document in the Sign app 3. Traceback occurs Fix ---- This commit moves the compression to the writer object, after the merged page has been added. Related pr: https://github.com/odoo/odoo/pull/261879 runbot-937761 Forward-Port-Of: odoo/odoo#265304
A recent update to the Sign app caused errors when downloading documents. This fix resolves a compatibility issue with a newer version of the pypdf library, ensuring documents can be downloaded correctly. The change ensures compression happens only on the page being written to, preventing errors.
Original PR description
This [related PR] introduced a compression pass after calls to mergePage(). However in newer versions of pypdf (>=3.5.2), compress_content_streams() can only be called on pages of PdfWriter. An error would be raised when called on pages of a PdfReader. Steps to reproduce ----- 1. Run Odoo with pypdf>=3.5.2 2. Sign and download a document in the Sign app 3. Traceback occurs Fix ---- This commit moves the compression to the writer object, after the merged page has been added. Related pr: https://github.com/odoo/odoo/pull/261879 runbot-937761 Forward-Port-Of: odoo/enterprise#117756
8 changes
Resolved issues and error corrections
This update corrects a previous change that allowed branch companies to be incorrectly designated as payment providers. This restriction is necessary due to limitations with account journals and ensures accurate financial reporting. The change prevents potential errors and maintains data integrity within the payment processing system.
Original PR description
Issue: --- Branch companies can be selected as payment provider company, which should be restricted due to the limitation on account jounral. Steps to reproduce: 1- Create a branch company. 2- Add a website to the branch company. 3- Enable a payment provider in the parent company. 4- Duplicate the provider for the branch company and set branch as the company. 5- Navigate to the shop and add a product to cart. 6- Checkout and pay. In the SO, you can check that the payment provider from parent is used. Cause: --- This is introduced after https://github.com/odoo/odoo/commit/b093786714e9e8567cf75abf78ac3d954a3d89b2. That fix ensures providers from parent company to be returned as the branch compatible provider. However, that fix didn't restrict the branch companies to be selected as provider company which we shouldn't allow. #263869 opw-6013978
A bug prevented the Newsletter option from appearing when the website was translated into Catalan. This was due to incorrect translation settings being saved. This update permanently disables translation for those settings, ensuring correct visibility when the website mass mailing module is updated.
Original PR description
Scenario: - install catalan on website - insert newsletter widget - edit the newsletter widget in catalan Result: the Newsletter option is not visible Cause: the _selector, _target, _exclude are translatable in the XML and wrong translation values were saved on translate.odoo.com for catalan. Fix: I have suggested in translate.odoo.com to remove the wrong translations, but this PR makes them completely non-translatable (this will only be applied when website_mass_mailing is updated). opw-5149937
This update resolves two issues related to Odoo's eTransport functionality. Previously, errors occurred during transport setup with specific warehouse and token configurations, resulting in technical tracebacks. Now, the system will display a clear validation message on the delivery document instead, improving the user experience and preventing data inconsistencies.
Original PR description
This commit fixes two corner case bugs:
1. Transport on National Territory with a warehouse in another country
- Setup eTransport data in settings
- Create a delivery to a Romanian customer
- in eTransport tab -> choose operation type: Transport on National
Territory
- Go to configuration -> warehouses -> change the address of the
warehouse to an address not in Romania
- send the eTransport
2. Sending to eTransport with invalid tokens
- Setup eTransport data in settings
- Remove a character from one of the tokens
- send a valid Delivery to eTransport
we get a traceback for both cases but we want a validation message on the
created document instead.
task-6217207This update resolves an issue where non-administrator users were encountering access errors when working with the online payment method in the Point of Sale system. The change grants read-only access to the relevant payment provider data for POS managers, ensuring they can correctly manage payment methods without requiring administrative privileges. This improves usability and prevents disruptions for users in the Point of Sale workflow.
Original PR description
Only admin users have read access to the `payment.provider` model. Opening the PoS payment method form as a non-admin would raise an access error because the `online_payment_provider_ids` many2many field tries to fetch `payment.provider` records on form load. Grant read-only access on `payment.provider` to `group_pos_manager` so POS admins can use the field. Restrict the field's group in the form view to `point_of_sale.group_pos_manager,base.group_system` so it is not rendered for users without either role. opw-6208656 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves an issue where translated text was incorrectly displayed as HTML spans within blog post placeholders. By stripping these translation spans, the system now reliably shows the intended plain text placeholder content, ensuring consistent and accurate formatting across multiple languages. This improves the user experience for international blog readers.
Original PR description
Since placeholder attribute is translated, for non-form elements placeholder attributes that contain a translation <span/> need to be unwrapped to restore the plain text value. Steps to reproduce the issue: - Have website and website_blog installed - Add a second language - Open a blog post in your second lanuage - Start translating - Remove the blog title => Shown placeholder text is <span ...> task-5190459
This update resolves an issue where Odoo experienced silent errors during Google Calendar synchronization when events were simultaneously updated with new attendees and start time changes. The fix prevents these errors from occurring, ensuring more reliable syncing of recurring events with Google Calendar. This improves the overall stability of the integration.
Original PR description
When a recurrence is updated in Google Calendar simultaneously with a new attendee and a changed start time, Odoo silently logs MissingError during the post-commit Google API callback Steps to reproduce: 1. Have a recurring event already synced between Odoo and Google Calendar 2. In Google Calendar, open the recurrence and edit "all events": - Add a new attendee - Change the start time 3. Trigger a Google Calendar sync 4. MissingError exceptions appear in server logs, one per event in the recurrence opw-6024835
This update resolves an issue where downloading signed documents through the Sign app would occasionally fail due to a problem with how PDF files were being compressed. The fix ensures compression happens correctly after the page is merged, addressing a compatibility issue with newer versions of the pypdf library.
Original PR description
This [related PR] introduced a compression pass after calls to mergePage(). However in newer versions of pypdf (>=3.5.2), compress_content_streams() can only be called on pages of PdfWriter. An error would be raised when called on pages of a PdfReader. Steps to reproduce ----- 1. Run Odoo with pypdf>=3.5.2 2. Sign and download a document in the Sign app 3. Traceback occurs Fix ---- This commit moves the compression to the writer object, after the merged page has been added. Related pr: https://github.com/odoo/odoo/pull/261879 runbot-937761
This update fixes an issue where Italian electronic vendor bills weren't correctly applying pension fund taxes (Cassa Previdenziale) during import. The fix adjusts the XML parsing process to handle invoices generated by third-party software that don't always include optional reference tags, ensuring accurate tax calculations for Italian businesses.
Original PR description
### Issue before this commit: When importing an Italian electronic vendor bill using the AssoSoftware standard, pension fund taxes (Cassa Previdenziale) are not applied to the invoice lines. ###…
### Issue before this commit: When importing an Italian electronic vendor bill using the AssoSoftware standard, pension fund taxes (Cassa Previdenziale) are not applied to the invoice lines. ### Steps to reproduce the issue: 1. Download Accounting and l10n_it_edi_witholding 2. Change VAT number of IT company with the one in the xml 3. Go to Taxes > 4%F.Pens. > Advanced Options and change Pension Fund Type with TC02 4. Import xml of the ticket in vendor bills 5. P.Fund tax is not assigned ### Cause of the issue: The issue is caused by the following line: https://github.com/odoo/odoo/blob/669b9b84f4d5c8765dc4b451d5da6a95dbb9ded8/addons/l10n_it_edi_withholding/models/account_move.py#L247 Currently, the parser strictly expects the optional <RiferimentoTesto> tag alongside <TipoDato>AswCassPre</TipoDato>. However, several third-party software providers generate valid XML files containing only the AswCassPre block without any optional child tags. ### Reason to introduce the fix: Ensure that the pension fund tax mapped to the line's VAT rate is correctly applied whenever the AswCassPre data type is present, even if the optional reference tags are omitted. opw-6189225 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr