Daily updates from Odoo
Wednesday, May 20, 2026
100 changes
18 changes
Enhancements to existing features
This update ensures the "Save Order" button remains visible in the Point of Sale interface. This allows users to seamlessly continue working on their orders across different devices and within the same session, improving efficiency and reducing frustration.
Original PR description
The "Save Order" button is now always available, allowing users to easily save and resume their orders on different devices within the same session. task-id: 5966678 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#261809 Forward-Port-Of: odoo/odoo#250405
Resolved issues and error corrections
This update fixes a validation error that occurred when using cash basis accounting with payable or receivable accounts. The change restricts users from selecting these account types as transition accounts, ensuring consistent and accurate accounting records. This prevents errors during invoice processing and improves overall system stability.
Original PR description
## **Issue** When a cash basis tax is configured with a payable/receivable transition account, tax journal items are generated on that account without a due date. Since payable/receivable accounts…
## **Issue** When a cash basis tax is configured with a payable/receivable transition account, tax journal items are generated on that account without a due date. Since payable/receivable accounts require a due date on journal items, this leads to a validation error during move creation: "Any journal item on a payable account must have a due date and vice versa." ## **Steps to reproduce:** 1. Install the Accounting and Inter-Company modules. 2. Create an additional company so that there are a total of two companies, then switch to Company 1. 3. Create a product with a price and assign a tax to it. 4. Navigate to Accounting → Configuration → Settings and enable Cash Basis accounting. 5. Go to Accounting → Configuration → Taxes and open the purchase tax (or the tax assigned to the product). 6. In the Tax Computation section, ensure that Group of Taxes is not selected. 7. Under the Advanced Options tab, set Tax Exigibility to Based on Payment. 8. Set the Cash Basis Transition Account to a payable account. 9. Open Company Settings, select Company 1, go to the Inter-Company Transactions section, and enable Synchronize invoices/bills. 10. Switch to Company 2 and create an invoice using the same product. Select the contact that is the partner of Company 1. 11. Confirm the invoice. The following error is raised: "Any journal item on a payable account must have a due date and vice versa." ## **With This Commit:** Added a domain on the Cash Basis Transition Account field to prevent users from selecting payable or receivable accounts, avoiding invalid configurations and runtime validation errors. opw-6189615 Forward-Port-Of: odoo/odoo#264777 Forward-Port-Of: odoo/odoo#263792
This update fixes a bug that allowed users to create multiple leave requests for the same day, even after approving and rejecting them. The fix ensures that the system accurately detects and prevents conflicting leave requests, improving data integrity and reducing potential scheduling errors. This change was made as part of a broader effort to enhance the reliability of the holiday calendar.
Original PR description
Steps to reproduce:- - Navigate to Time off Dashboard calendar view. - Create a leave. First approve it then refuse it. - Now on the same day create a leave and approve it. - Now re-approve the…
Steps to reproduce:- - Navigate to Time off Dashboard calendar view. - Create a leave. First approve it then refuse it. - Now on the same day create a leave and approve it. - Now re-approve the previously refused leave from step 2. - System will let user to create 2 leave of same types on same day! Cause:- In `_compute_dashboard_warning_message`, refused/cancelled leaves were excluded from warning computation. When approving a refused request, the warning message was not set, allowing the constraint check to pass even when conflicting approved requests existed for the same period. Fix:- 1. Refactored `_compute_dashboard_warning_message` to only compute warnings for active leaves (non-refused/cancelled) while still detecting conflicts with already approved requests 2. Updated `_check_date` constraint to skip validation for refused/ cancelled leaves, but enforce it when state changes to validate 3. Added 'state' to constraint triggers to ensure validation runs when approving previously refused requests task-[6181717](https://www.odoo.com/odoo/project/1251/tasks/6181717) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#265192 Forward-Port-Of: odoo/odoo#262703
This update prevents users from archiving Point of Sale (POS) configurations while an active sales session is running. This change ensures data consistency and avoids potential disruptions to sales transactions. The update includes a new test case to verify this protection.
Original PR description
Add 'active' to _get_forbidden_change_fields to block archiving a Point of Sale configuration while a session is still open. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#247177 Forward-Port-Of: odoo/odoo#246760
This update fixes an error in the Luxembourg Annual VAT Declaration report that resulted in incorrect calculations for Appendix E 1a. The fix ensures that all necessary tax data is included accurately, leading to more reliable financial reporting. This improves the accuracy of VAT reporting for Luxembourg businesses.
Original PR description
### Issue: The formula `L10N_LU_TAX_163` in the Luxembourg Annual VAT Declaration was incorrect: - `L10N_LU_TAX_791.year_start` was added twice - `L10N_LU_TAX_993.year_start` was missing As a result, the computed total in Appendix E 1a was incorrect ### Steps to reproduce: - Install `l10n_lu_reports` - Open the `Report: Annual VAT Declaration (LU)` - Go to `Appendix E` - Use the `Start of Financial year` pencil icons to manually set values for fields `791` and `993` - Check the computed value of field `163` After the fix, both values are included exactly once in the formula opw-6158950 Forward-Port-Of: odoo/enterprise#117214
This update clarifies the extra costs associated with combo selections in the point-of-sale system. Previously, customers were unclear about additional charges, leading to confusion and inquiries. This change ensures accurate pricing is displayed, improving the customer experience and reducing potential misunderstandings.
Original PR description
The display for the extra price during the combo selection was not very clear. The customer were not aware of the additional cost that were applied when choosing some elements that were not included but extra. This led to customer asking cashier if there was a problem because they were paying "too much" when the computation was actually correct but not clear enough. task-id: 6142095 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#261264 Forward-Port-Of: odoo/odoo#260705
A recent change in how sale orders are confirmed was causing stock move deadlines to be incorrectly set to the earliest lead time, rather than the individual line lead times. This meant deliveries were being scheduled too early. The fix removes the automatic assignment of a commitment date, allowing deadlines to be calculated correctly based on each order line's lead time.
Original PR description
Version: -------- - saas-19.1+ Step to reproduce: ---------------------- * Install *sale_management* and *stock* modules. * Create a Sale Order with at least two order lines. * Set different…
Version:
--------
- saas-19.1+
Step to reproduce:
----------------------
* Install *sale_management* and *stock* modules.
* Create a Sale Order with at least two order lines.
* Set different *Customer Lead Time* (it is optional hide by default)
on each line:
* Line A: 5 days
* Line B: 10 days
* Confirm the Sale Order.
* Open the generated Delivery Order.
* Enable the *Deadline* field on stock moves (it is optional hide by default).
* Check the *Deadline* value for each move
issue:
-----
* Both stock moves have the same *Deadline*, corresponding to the minimum
lead time (earliest date), instead of their respective values.
Root cause:
-----------
1. User confirms a Sale Order with two lines:
- Line A: customer_lead = 5 → _expected_date() = order_date + 5
- Line B: customer_lead = 10 → _expected_date() = order_date + 10
2. sale.order.action_confirm()
└─ Before calling `_action_confirm()`, the method set:
`order.commitment_date = order.expected_date`
where `expected_date = min(all line._expected_date()) = order_date + 5`
3. sale.order._action_confirm()
└─ calls order_line._action_launch_stock_rule()
https://github.com/odoo/odoo/blob/00edcf55380431c454857b2749f2fe4930b1e758/addons/sale_stock/models/sale_order.py#L209
4. sale.order.line._action_launch_stock_rule()
└─ per line: calls line._prepare_procurement_values()
5. sale.order.line._prepare_procurement_values()
└─ date_deadline = self.order_id.commitment_date or self._expected_date()
Because commitment_date was force-set in step 2, BOTH lines resolve to
order_date + 5 instead of their individual values.
https://github.com/odoo/odoo/blob/00edcf55380431c454857b2749f2fe4930b1e758/addons/sale_stock/models/sale_order_line.py#L281
NOTE:
------
This issue originates from changes introduced in task: https://www.odoo.com/odoo/project/966/tasks/4687135
That task aimed to add the Promise Date to Purchase Order Lines and, during
confirmation, assign it as the expected arrival date.
* This behavior works correctly in Purchase Orders because the Promise Date is
applied at the purchase order line level and aligned with each
line’s expected arrival date. It does not participate in the computation of
date_deadline.
- In the purchase flow:
The incoming stock move date_deadline is directly derived from each line’s
expected arrival date.
https://github.com/odoo/odoo/blob/00edcf55380431c454857b2749f2fe4930b1e758/addons/purchase_stock/models/purchase_order_line.py#L308
There is no dependency on a promise date.
As a result, deadlines remain per-line and accurate.
However, in the Sale Order flow, the same approach introduces an issue.
Here:
The Promise Date (commitment_date) exists at the order level, not at line level.
During confirmation, it is set using the minimum of all line expected dates.
The delivery stock move date_deadline depends on this commitment_date.
As a consequence:
Setting a single order-level promise date overrides all per-line expected dates.
All stock moves receive the same (minimum) deadline.
Additionally, this is not aligned with the business logic:
Example:
Line A → lead time = 5 days
Line B → lead time = 10 days
Current behavior sets deadline = min(5, 10) = 5 days for all moves,
which incorrectly forces later deliveries to be scheduled earlier than intended.
Solution:
---------
* Remove the automatic assignment of commitment_date = expected_date in action_confirm().
commitment_date is a user-defined promised delivery date and should not be
implicitly set during confirmation. By leaving it unset, procurement values
correctly fall back to line._expected_date(), restoring per-line deadline
computation.
---
opw-6106045
Forward-Port-Of: odoo/odoo#258911This update fixes an issue where freight charges were incorrectly applied to all pickings, particularly with backorders. The solution ensures freight costs are accurately reflected only in the initial, confirmed picking, aligning with how delivery costs should be invoiced to customers.
Original PR description
Commit 28b840b introduced logic to include `freight_costs` in the customs document generated bySendcloud. It introduced 2 new issues as a result: 1. When creating backorders, the `freight_costs` are…
Commit 28b840b introduced logic to include `freight_costs` in the customs document generated bySendcloud. It introduced 2 new issues as a result: 1. When creating backorders, the `freight_costs` are not divided but instead propagated to all of the pickings. 2. When there is no SO, we were taking the total value of all delivered goods, which doesn't make much sense considering the `freight_costs` field should be the cost of the delivery itself. Solution ----- For the first problem, there are a couple things to keep in mind: - the total `freight_costs` declared to the customs entity should be the amount invoiced to the customer - products can be added and removed from the picking after the SO has been confirmed - actual delivery cost can change between invoice date and actual delivery date - picking can be split into multiple packages at the user's discretion Considering all of the above, we will simply forward the invoiced amount with the first confirmed picking and none of the backorders. ----- Ticket: opw-6013387 Forward-Port-Of: odoo/enterprise#117115 Forward-Port-Of: odoo/enterprise#111304
This update fixes an issue preventing proper asset depreciation configuration within the l10n_mx module. The changes ensure accurate monthly depreciation calculations and correct linking of asset accounts, resolving errors in the automatic depreciation flow. This ensures compliance with Mexican accounting standards.
Original PR description
**Steps to reproduce:** * Install `l10n_mx` module. * Go to Accounting > Assets and create a new asset. * Attempt to select a Fixed Asset account in the corresponding field. **Observed behavior:** *…
**Steps to reproduce:** * Install `l10n_mx` module. * Go to Accounting > Assets and create a new asset. * Attempt to select a Fixed Asset account in the corresponding field. **Observed behavior:** * No existing Fixed Asset accounts correctly show up in the selection. * Even if an asset goes through by force-creating an account, the automatic depreciation flow fails because the depreciation models generate a single yearly entry instead of monthly, and the depreciation/expense accounts have incorrect account types. **Cause:** * The chart of accounts had Accumulated Depreciation template accounts (e.g., `171.05.01`) set to `expense_depreciation` instead of `asset_non_current`, rendering them unavailable for the Accumulated Depreciation field. * The Depreciation Expense accounts (e.g., `613.05.01`) were conversely set as `expense_direct_cost` instead of `expense_depreciation`. * The main Fixed Asset accounts (e.g., `156.01.01`) were completely missing the explicit mappings for `asset_depreciation_account_id` and `asset_expense_account_id` within the CSV definition. * The depreciation models in `account.depreciation.model-mx.csv` were configured with a `method_period` of `12`, resulting in yearly rather than standard monthly entries. **Fix:** * Modify `account.account-mx.csv` to convert all `171.xx/183.xx` accounts to `asset_non_current` and all `613.xx/614.xx` accounts to `expense_depreciation`. * Introduce the `asset_depreciation_account_id` and `asset_expense_account_id` columns into the `account.account-mx.csv` file, properly linking each Fixed Asset account to its correct depreciation targets. * Update `account.depreciation.model-mx.csv` to use a `method_period` of `1` (monthly) and convert the `method_number` logic from yearly durations to full month durations (12, 36, 60, and 120 months respectively) for creating accurately timed entries. opw-6091214 Forward-Port-Of: odoo/odoo#259781
This update resolves errors in the Live Chat dashboard that were causing incorrect data and preventing certain features from working. The change replaces a data field in the spreadsheet with a new percentage-based metric, ensuring accurate reporting and improved dashboard functionality. This fix enhances the reliability of Live Chat performance data.
Original PR description
* = spreadsheet_dashboard_im_livechat Before this commit, in the Live Chat dashboard: 1. Many cells would be in error state. 2. Clicking the "Sessions by Day of Week" header in order to access the pivot view would result in a traceback. This happens since [1], where the `rating` field of `im_livechat.report.channel` got converted from Integer to Selection, without updating the usage in the Dashboard spreadsheet. This causes the `varchar` `rating` field to be averaged, resulting in errors. This commit fixes the issues by: 1. Replacing `rating` for `rating_percentage` in the Dashboard spreadsheet. 2. Adding a `_read_group_select` that provides a value of `rating:avg` for backwards compatibility of existing spreadsheets. [1] https://github.com/odoo/odoo/pull/246279 task-6230207
This update resolves a problem where backorders couldn't be created after merging production orders, leading to an error. The fix ensures that production groups are not deleted prematurely, preventing this issue. This improves the reliability of the backorder process.
Original PR description
# How to reproduce - Create 2 MO's A & B, both having the same product_id & bom_id - Split MO A into two MO's A1 & A2 - Merge MO's A1 & B # The issue MO A2 no longer has a production group (visible…
# How to reproduce - Create 2 MO's A & B, both having the same product_id & bom_id - Split MO A into two MO's A1 & A2 - Merge MO's A1 & B # The issue MO A2 no longer has a production group (visible via Studio). If the user tries to partially produce the MO and create a backorder, a traceback popup appears with : "ValueError: max() iterable argument is empty" # Cause The traceback is triggered because we use the `max()` function on `self.production_group_id.production_ids` when creating the backorder, but `production_ids` is an empty recordset since `production_group_id` is also empty. https://github.com/odoo/odoo/blob/0d8eaeeb971f2f670aebb1b72ed03f4a2d5e0105/addons/mrp/models/mrp_production.py#L1936 The production group is empty because when merging two MO's we delete it without paying attention to other remaining links. https://github.com/odoo/odoo/blob/394a30f8a2814d460cfe220b5017e7ac95d8cddc/addons/mrp/models/mrp_production.py#L2555 Note : the production groups were introduced by this commit (https://github.com/odoo/odoo/commit/2713876dbc70d3984e584a9037a2206dcda4e84a) # Proposed solution When merging, we unlink the original MO's from their production group. Then, we check every altered production group : if they are not linked to any MO anymore, we delete them. opw-6055376 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#256600
This update resolves a crash during KSeF certificate authentication caused by Odoo not properly handling different certificate types. The fix automatically determines the correct identifier type, ensuring successful authentication and compliance with Polish tax regulations. This improves the reliability of the Odoo system for businesses using KSeF.
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. Ticket [link](https://www.odoo.com/odoo/project.task/6125243) opw-6125243 Forward-Port-Of: odoo/odoo#264851
This update fixes a potential crash during bank statement imports caused by incorrect journal selection. The system now automatically validates currency and IBAN matches, ensuring the correct journal is used and preventing user errors. This improves the reliability and accuracy of importing bank statement data.
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 aligns MPF contribution rules in Hong Kong with a standard age range (18 to under 65), ensuring accurate payroll calculations. It simplifies contribution eligibility checks and brings consistency across EEMC/ERMC contributions, resolving a previous inconsistency in reporting. This change improves the accuracy of MPF reporting and simplifies compliance.
Original PR description
### Before: - Mandatory MPF rules only checked the upper age bound (< 65 from period start). - Employees under 18 could still be considered eligible for EEMC/ERMC contributions. - eMPF reporting had a separate 16-year age check. - Employees younger than 16 were excluded from the eMPF report, even when they had voluntary contributions. ### After: - Mandatory MPF rules now apply a full age gate (18 to under 65) across the payslip period. - EEMC and ERMC use the same eligibility condition for consistent contribution behavior. - The eMPF reporting age check is now aligned to 18. - Employees under 18 remain excluded from eMPF reporting unless they have actual MPF contributions. - Under-18 employees with voluntary contributions are now included in the eMPF report, matching the existing over-65 voluntary contribution behavior. --- Task-6141664
This update resolves an issue causing the Odoo tour to become unpredictable. The fix ensures the sliding panel fully closes before proceeding, preventing a race condition that previously disrupted the tour flow. This enhances the user experience and ensures consistent tour functionality.
Original PR description
This commit stabilizes the tour flow by ensuring the sliding panel is fully closed before proceeding to the next step. Issue: The tour steps selects a shape, which triggers [hideSlidingPanel]. That…
This commit stabilizes the tour flow by ensuring the sliding panel is fully closed before proceeding to the next step. Issue: The tour steps selects a shape, which triggers [hideSlidingPanel]. That function focuses a `BuilderButton` after a timeout. This introduced a race condition: if the timeout executes before the tour interacts with the `OverlayButtons`, the overlay gets hidden due to the `focusin` event registered on the builder (outside the iframe) [1], which ultimately hides the overlay buttons. The issue made the tour undeterministic following commit [2], which removed several intermediary steps between the shape selection and the failing step. Fix: Wait for the sliding panel to fully close before continuing the tour flow. [hideSlidingPanel]: https://github.com/odoo/odoo/blob/saas-19.3/addons/html_builder/static/src/core/building_blocks/builder_sliding_panel.js#L73-L81 [1]: https://github.com/odoo/odoo/blob/saas-19.3/addons/html_editor/static/src/core/selection_plugin.js#L265 [2]: https://github.com/odoo/odoo/commit/fa328f4e1798a9547e9df749c4144478357e1764 runbot-[242702](https://runbot.odoo.com/odoo/error/242702)
This update fixes an issue where the Point of Sale (PoS) displayed incorrect order totals due to delays in processing. The change ensures the correct order price is calculated and displayed on the feedback screen, preventing zero amounts and improving the user experience. It also includes safeguards to prevent order validation errors.
Original PR description
We now call manually `setOrderPrices` on order validation to ensure `amount_total` is set on the order before displaying the feedback screen which depends on it. The issue is that requests to the FdM delay the call to this method, making the PoS display `0` as the amount is `undefined` in the meantime. We also ensure the PoS doesn't finalize the validation if an error occurs. see odoo/odoo#244298 Forward-Port-Of: odoo/enterprise#117594 Forward-Port-Of: odoo/enterprise#104468
This update fixes an issue where returned subcontracted products were incorrectly routed to the subcontractor's location instead of the user's stock. When returning products 'for exchange', the system now correctly directs returned items to the subcontractor's location and new deliveries to the user's stock, ensuring accurate inventory tracking during the subcontracting process. This prevents misallocation of stock and improves reporting accuracy.
Original PR description
## Issue When making a request for quotation for a subcontracted product and returning the delivery "for exchange", the new incoming delivery does not have the correct destination. Instead of having…
## Issue
When making a request for quotation for a subcontracted product and returning the delivery "for exchange", the new incoming delivery does not have the correct destination. Instead of having the stock of the user, the destination of the new incoming delivery is the same as its source: the subcontracting location.
<img width="1254" height="257" alt="5479900" src="https://github.com/user-attachments/assets/c7e6d392-8328-4a03-a71e-466e768f448b" />
## Steps to reproduce
1. Install MRP Subcontracting (`mrp_subcontracting`) and Purchase (`purchase`)
2. In Settings, enable *Subcontracting*
3. Create a Product P and a subcontracting BoM with Subcontractor S
4. Create a Request for Quotation
- Vendor: Subcontractor S
- Product: Product P (any quantity > 0)
5. Confirm the RFQ, receive the PO, validate the picking
6. On the validated picking, click *Return*, set the quantity of products to return, and click *Return for Exchange*
- This creates two new pickings, one to return the product(s) we received, and one to receive new products
7. Validate the two new pickings
8. **In Inventory > Reporting > Moves History, the very last `stock.move.line` has the same location in the *From* (`location_id`) and the *To* (`location_dest_id`) columns**
## Cause
The `location_dest_id` of the new `stock.move` is updated in `StockReturnPickingLine._prepare_move_default_values`.
https://github.com/odoo/odoo/blob/fb534f1eadcb8ef74e2ee6fd5b68872dddb978e3/addons/mrp_subcontracting/wizard/stock_picking_return.py#L20-L25
The condition added by https://github.com/odoo/odoo/commit/5404b426aac9 sets the destination of all returned subcontracted moves to the subcontractor location. This is incorrect when using "return for exchange", as in this case, the return move is directed towards the user's stock. In fact, when using "return for exchange", the following pickings are created:
| id | name | return_id | |
|:--:|--------------|:---------:|---|
| 1 | WH/IN/00001 | | Initial RFQ delivery |
| 2 | WH/OUT/00001 | 1 | Return of the initial RFQ delivery |
| 3 | WH/IN/00002 | 2 | New products delivery to replace the initial delivery. The stock.move.line of this stock.picking has a wrong `location_dest_id` |
## Fix
In the context of return for exchanges, the returned item must be directed to the *Subcontracting Location* while the new item must be directed to the *Stock*. In the `_prepare_move_default_values`, we should only set the `location_dest_it` to the subcontractor location for outgoing pickings.
opw-5479900
Forward-Port-Of: odoo/odoo#265071
Forward-Port-Of: odoo/odoo#245905This update fixes an issue where project update descriptions incorrectly showed inflated budget totals after budget revisions. The fix ensures that only the active, confirmed budget revision is used, providing accurate budget information for project updates. This improves the clarity and reliability of project financial reporting.
Original PR description
**Problem:** When a project analytic budget is revised, the project update description shows an inflated total budget — the sum of both the original and the revised amounts — instead of reflecting…
**Problem:** When a project analytic budget is revised, the project update description shows an inflated total budget — the sum of both the original and the revised amounts — instead of reflecting only the active (confirmed) revision. **Steps to reproduce:** 1. Create a project with an analytic account 2. Create an analytic budget of $10,000 and confirm it 3. Create a revision of that budget for $15,000 and confirm it 4. Create a new project update 5. The update shows "$25,000" as the total budget instead of "$15,000" **Current behavior:** The project update displays the sum of all budget revisions ($25,000), regardless of their state. **Expected behavior:** Only the active confirmed budget ($15,000) should be used. **Cause of the issue:** `_compute_budget` queries all `budget.line` records matching the project's analytic account without filtering by the parent `budget.analytic` state. When a budget is revised, the original transitions to state `revised` while the new one becomes `confirmed`. Because `_compute_budget` has no state filter, it sums both, producing an inflated `total_budget_amount`. This field is then used in the project update template to compute the displayed budget total and percentage. By contrast, `_get_budget_items` — used for the detail rows — already applies `state in ['confirmed', 'done']`, so the two methods were inconsistent. **Fix:** Applying the same state filter to `_compute_budget` as already present in `_get_budget_items` ensures both methods draw from the same set of active budgets, keeping the project update totals consistent with the budget detail rows. opw-6128855 Forward-Port-Of: odoo/enterprise#117490 Forward-Port-Of: odoo/enterprise#115285
19 changes
Enhancements to existing features
This update streamlines the invoicing process by automatically reconciling invoices created from sales orders. Previously, this required manual steps; now, the system directly links invoices to sales orders, improving efficiency and reducing the risk of errors. This enhancement is part of a larger effort to simplify financial workflows within the Odoo Enterprise system.
Original PR description
This commit will allow to automatically reconcile the invoice create from the sale order by passing a context key that will be used in the create_invoices function. task-5502964 Forward-Port-Of: odoo/enterprise#108546
Resolved issues and error corrections
This update fixes a validation error that occurred when using cash basis accounting with payable/receivable transition accounts. The change restricts users from selecting these account types, ensuring journal items always have required due dates and preventing accounting inconsistencies. This improves data accuracy and stability.
Original PR description
## **Issue** When a cash basis tax is configured with a payable/receivable transition account, tax journal items are generated on that account without a due date. Since payable/receivable accounts…
## **Issue** When a cash basis tax is configured with a payable/receivable transition account, tax journal items are generated on that account without a due date. Since payable/receivable accounts require a due date on journal items, this leads to a validation error during move creation: "Any journal item on a payable account must have a due date and vice versa." ## **Steps to reproduce:** 1. Install the Accounting and Inter-Company modules. 2. Create an additional company so that there are a total of two companies, then switch to Company 1. 3. Create a product with a price and assign a tax to it. 4. Navigate to Accounting → Configuration → Settings and enable Cash Basis accounting. 5. Go to Accounting → Configuration → Taxes and open the purchase tax (or the tax assigned to the product). 6. In the Tax Computation section, ensure that Group of Taxes is not selected. 7. Under the Advanced Options tab, set Tax Exigibility to Based on Payment. 8. Set the Cash Basis Transition Account to a payable account. 9. Open Company Settings, select Company 1, go to the Inter-Company Transactions section, and enable Synchronize invoices/bills. 10. Switch to Company 2 and create an invoice using the same product. Select the contact that is the partner of Company 1. 11. Confirm the invoice. The following error is raised: "Any journal item on a payable account must have a due date and vice versa." ## **With This Commit:** Added a domain on the Cash Basis Transition Account field to prevent users from selecting payable or receivable accounts, avoiding invalid configurations and runtime validation errors. opw-6189615 Forward-Port-Of: odoo/odoo#264777 Forward-Port-Of: odoo/odoo#263792
A recent change incorrectly set a single deadline for all stock moves on a Sale Order, regardless of the individual line lead times. This resulted in inaccurate delivery dates. This fix removes the automatic assignment of a commitment date, allowing deadlines to be correctly calculated based on each line's expected delivery time.
Original PR description
Version: -------- - saas-19.1+ Step to reproduce: ---------------------- * Install *sale_management* and *stock* modules. * Create a Sale Order with at least two order lines. * Set different…
Version:
--------
- saas-19.1+
Step to reproduce:
----------------------
* Install *sale_management* and *stock* modules.
* Create a Sale Order with at least two order lines.
* Set different *Customer Lead Time* (it is optional hide by default)
on each line:
* Line A: 5 days
* Line B: 10 days
* Confirm the Sale Order.
* Open the generated Delivery Order.
* Enable the *Deadline* field on stock moves (it is optional hide by default).
* Check the *Deadline* value for each move
issue:
-----
* Both stock moves have the same *Deadline*, corresponding to the minimum
lead time (earliest date), instead of their respective values.
Root cause:
-----------
1. User confirms a Sale Order with two lines:
- Line A: customer_lead = 5 → _expected_date() = order_date + 5
- Line B: customer_lead = 10 → _expected_date() = order_date + 10
2. sale.order.action_confirm()
└─ Before calling `_action_confirm()`, the method set:
`order.commitment_date = order.expected_date`
where `expected_date = min(all line._expected_date()) = order_date + 5`
3. sale.order._action_confirm()
└─ calls order_line._action_launch_stock_rule()
https://github.com/odoo/odoo/blob/00edcf55380431c454857b2749f2fe4930b1e758/addons/sale_stock/models/sale_order.py#L209
4. sale.order.line._action_launch_stock_rule()
└─ per line: calls line._prepare_procurement_values()
5. sale.order.line._prepare_procurement_values()
└─ date_deadline = self.order_id.commitment_date or self._expected_date()
Because commitment_date was force-set in step 2, BOTH lines resolve to
order_date + 5 instead of their individual values.
https://github.com/odoo/odoo/blob/00edcf55380431c454857b2749f2fe4930b1e758/addons/sale_stock/models/sale_order_line.py#L281
NOTE:
------
This issue originates from changes introduced in task: https://www.odoo.com/odoo/project/966/tasks/4687135
That task aimed to add the Promise Date to Purchase Order Lines and, during
confirmation, assign it as the expected arrival date.
* This behavior works correctly in Purchase Orders because the Promise Date is
applied at the purchase order line level and aligned with each
line’s expected arrival date. It does not participate in the computation of
date_deadline.
- In the purchase flow:
The incoming stock move date_deadline is directly derived from each line’s
expected arrival date.
https://github.com/odoo/odoo/blob/00edcf55380431c454857b2749f2fe4930b1e758/addons/purchase_stock/models/purchase_order_line.py#L308
There is no dependency on a promise date.
As a result, deadlines remain per-line and accurate.
However, in the Sale Order flow, the same approach introduces an issue.
Here:
The Promise Date (commitment_date) exists at the order level, not at line level.
During confirmation, it is set using the minimum of all line expected dates.
The delivery stock move date_deadline depends on this commitment_date.
As a consequence:
Setting a single order-level promise date overrides all per-line expected dates.
All stock moves receive the same (minimum) deadline.
Additionally, this is not aligned with the business logic:
Example:
Line A → lead time = 5 days
Line B → lead time = 10 days
Current behavior sets deadline = min(5, 10) = 5 days for all moves,
which incorrectly forces later deliveries to be scheduled earlier than intended.
Solution:
---------
* Remove the automatic assignment of commitment_date = expected_date in action_confirm().
commitment_date is a user-defined promised delivery date and should not be
implicitly set during confirmation. By leaving it unset, procurement values
correctly fall back to line._expected_date(), restoring per-line deadline
computation.
---
opw-6106045
Forward-Port-Of: odoo/odoo#258911This update corrects a problem where the partner view was incorrectly trying to modify a field added by the mail module. This prevented the base module from upgrading properly. The fix ensures the partner view correctly inherits the necessary fields from the mail module, resolving a parsing error and ensuring smooth upgrades.
Original PR description
The `partner_pages_tree_view` was attempting to modify `activity_ids` field attributes, but this field is added by the mail module in a sibling inheritance branch…
The `partner_pages_tree_view` was attempting to modify `activity_ids` field attributes, but this field is added by the mail module in a sibling inheritance branch ([mail.res_partner_view_tree_inherit_mail]), making it unreachable from the [`partnership.view_res_partner_grade_tree`] ancestry chain:
```py
base.view_partner_tree → partnership.view_res_partner_grade_tree → partner_pages_tree_view
base.view_partner_tree → mail.res_partner_view_tree_inherit_mail ← activity_ids lives here
```
This caused a ParseError during base module upgrade:
```py
File "/home/odoo/odoo/odoo/odoo/tools/convert.py", line 639, in _tag_root
raise ParseError(msg) from None # Restart with "--log-handler odoo.tools.convert:DEBUG" for complete traceback
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
odoo.tools.convert.ParseError: while parsing /home/odoo/odoo/odoo/odoo/addons/base/views/res_partner_views.xml:13
Error while parsing or validating view:
Element '<field name="activity_ids">' cannot be located in parent view
View error context:
{'file': '/home/odoo/odoo/odoo/odoo/addons/base/views/res_partner_views.xml',
'line': 1,
'name': 'Partner Pages List',
'view': ir.ui.view(2148,),
'view.model': 'res.partner',
'view.parent': ir.ui.view(2108,),
'xmlid': 'website_crm_partner_assign.partner_pages_tree_view'}
```
**Steps to reproduce:**
- In a v19.1 db install `website_crm_partner_assign`
- Go to apps and search base module and click upgrade
**Fix:**
Make the partner view from partnership inherit from the one defined in mail instead of the one defined in base.
opw-6186684
[mail.res_partner_view_tree_inherit_mail]: https://github.com/odoo/odoo/blob/saas-19.3/addons/mail/views/res_partner_views.xml#L58C21-L67
[`partnership.view_res_partner_grade_tree`]: https://github.com/odoo/odoo/blob/f3b317310b84edb073009f7d15d7fec002f3ccf0/addons/partnership/views/res_partner_views.xml#L48-L57
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#264639This update prevents users from archiving Point of Sale (POS) configurations while a sale is currently being processed. This change ensures data integrity and avoids potential disruptions to active transactions. The update includes a new test case to verify this protection.
Original PR description
Add 'active' to _get_forbidden_change_fields to block archiving a Point of Sale configuration while a session is still open. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#247177 Forward-Port-Of: odoo/odoo#246760
This update enhances the account reports functionality by adding a confirmation dialog before deleting working files, preventing accidental data loss. It also restricts access to this feature for non-accountant users, improving data security and usability. These changes ensure a more reliable and controlled experience when generating and managing reports.
Original PR description
contains: [FIX] account_reports: Working files delete button: - hide it for non-accountant - add confirmation dialog [FIX] account_reports: Working file should always open in cycle view [FIX] account_reports: Always show embedded actions in Working files task-5880319 Forward-Port-Of: odoo/enterprise#115596
This update fixes an error in the Luxembourg Annual VAT Declaration report that resulted in incorrect calculations for Appendix E 1a. The fix ensures that VAT tax codes are included accurately in the formula, leading to correct financial reporting. This improves the reliability of the report for Luxembourg businesses.
Original PR description
### Issue: The formula `L10N_LU_TAX_163` in the Luxembourg Annual VAT Declaration was incorrect: - `L10N_LU_TAX_791.year_start` was added twice - `L10N_LU_TAX_993.year_start` was missing As a result, the computed total in Appendix E 1a was incorrect ### Steps to reproduce: - Install `l10n_lu_reports` - Open the `Report: Annual VAT Declaration (LU)` - Go to `Appendix E` - Use the `Start of Financial year` pencil icons to manually set values for fields `791` and `993` - Check the computed value of field `163` After the fix, both values are included exactly once in the formula opw-6158950 Forward-Port-Of: odoo/enterprise#117214
This update corrects a bug where attendance records were disappearing after a public holiday was added. The issue stemmed from a mismatch in time zones when comparing attendance dates with holiday dates. The fix ensures that attendance records are accurately displayed regardless of the employee's local time zone.
Original PR description
**Steps to reproduce in runbot:** 1. Install hr_holidays_attendance. 2. Create an employee with a contract start date (e.g., April 1st). 3. Set the timezone(for both user and emp working schedule) to…
**Steps to reproduce in runbot:** 1. Install hr_holidays_attendance. 2. Create an employee with a contract start date (e.g., April 1st). 3. Set the timezone(for both user and emp working schedule) to Europe/Brussels. 4. Create an attendance record (e.g., April 15th). 5. Go to Reporting > Time Off Ledger and remove all filters. -> Attendance is correctly shown for all dates from April 1st 6. Create a public holiday on April 16th starting at 00:00. 7. Check the Time Off Ledger again. **Issue:** The attendance entry for April 15th disappears after adding the public holiday. **Cause:** Calendar leave datetime fields (date_from/date_to) are stored in UTC but compared against attendance dates without converting to the employee's resource calendar timezone, causing date boundaries to shift and records to be incorrectly excluded. https://github.com/odoo/odoo/blob/b293ce50e0fc9355ffd233557f079916b514eac7/addons/hr_holidays_attendance/report/hr_leave_attendance_report.py#L133-L144 **Solution:** Convert calendar leave datetimes to the employee timezone before casting to date, ensuring comparisons reflect the correct local boundaries. **NOTE:** This issue is mainly reproducible on runbot since its server timezone is GMT. On local machines configured with UTC, the stored datetime values already align with the expected conversions, so the date shift does not occur. opw-6118043 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#262179
This update fixes an issue where freight charges were incorrectly applied to all pickings, particularly with backorders. The change ensures freight costs are accurately reflected only in the initial, confirmed picking, aligning with how delivery costs should be invoiced to customers.
Original PR description
Commit 28b840b introduced logic to include `freight_costs` in the customs document generated bySendcloud. It introduced 2 new issues as a result: 1. When creating backorders, the `freight_costs` are…
Commit 28b840b introduced logic to include `freight_costs` in the customs document generated bySendcloud. It introduced 2 new issues as a result: 1. When creating backorders, the `freight_costs` are not divided but instead propagated to all of the pickings. 2. When there is no SO, we were taking the total value of all delivered goods, which doesn't make much sense considering the `freight_costs` field should be the cost of the delivery itself. Solution ----- For the first problem, there are a couple things to keep in mind: - the total `freight_costs` declared to the customs entity should be the amount invoiced to the customer - products can be added and removed from the picking after the SO has been confirmed - actual delivery cost can change between invoice date and actual delivery date - picking can be split into multiple packages at the user's discretion Considering all of the above, we will simply forward the invoiced amount with the first confirmed picking and none of the backorders. ----- Ticket: opw-6013387 Forward-Port-Of: odoo/enterprise#117115 Forward-Port-Of: odoo/enterprise#111304
This update fixes an issue where the Point of Sale (PoS) displayed incorrect order totals due to delays in price calculations. By manually triggering the price calculation process during order validation, the system now accurately reflects the total amount, ensuring accurate feedback screens for customers. This prevents order validation failures and improves the overall PoS experience.
Original PR description
We now call manually `setOrderPrices` on order validation to ensure `amount_total` is set on the order before displaying the feedback screen which depends on it. The issue is that requests to the FdM delay the call to this method, making the PoS display `0` as the amount is `undefined` in the meantime. We also ensure the PoS doesn't finalize the validation if an error occurs. see odoo/odoo#244298 Forward-Port-Of: odoo/enterprise#117594 Forward-Port-Of: odoo/enterprise#104468
This update fixes an error preventing branch companies from accessing and using bank accounts configured for their parent companies. Previously, attempts to pay invoices from branch accounts resulted in an access error. The change ensures branch companies have proper access to the bank accounts they're linked to, improving payment functionality.
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-prThis update resolves an issue where backorders couldn't be created after merging production orders, leading to a software error. The fix ensures that production groups are correctly managed during merging, preventing empty recordsets and subsequent errors. This improves the reliability of the backorder creation process.
Original PR description
# How to reproduce - Create 2 MO's A & B, both having the same product_id & bom_id - Split MO A into two MO's A1 & A2 - Merge MO's A1 & B # The issue MO A2 no longer has a production group (visible…
# How to reproduce - Create 2 MO's A & B, both having the same product_id & bom_id - Split MO A into two MO's A1 & A2 - Merge MO's A1 & B # The issue MO A2 no longer has a production group (visible via Studio). If the user tries to partially produce the MO and create a backorder, a traceback popup appears with : "ValueError: max() iterable argument is empty" # Cause The traceback is triggered because we use the `max()` function on `self.production_group_id.production_ids` when creating the backorder, but `production_ids` is an empty recordset since `production_group_id` is also empty. https://github.com/odoo/odoo/blob/0d8eaeeb971f2f670aebb1b72ed03f4a2d5e0105/addons/mrp/models/mrp_production.py#L1936 The production group is empty because when merging two MO's we delete it without paying attention to other remaining links. https://github.com/odoo/odoo/blob/394a30f8a2814d460cfe220b5017e7ac95d8cddc/addons/mrp/models/mrp_production.py#L2555 Note : the production groups were introduced by this commit (https://github.com/odoo/odoo/commit/2713876dbc70d3984e584a9037a2206dcda4e84a) # Proposed solution When merging, we unlink the original MO's from their production group. Then, we check every altered production group : if they are not linked to any MO anymore, we delete them. opw-6055376 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#256600
This update resolves a crash during KSeF certificate authentication caused by Odoo's inability to handle different certificate types. The fix automatically determines the correct identifier type, ensuring successful authentication with the KSeF server and allowing users to properly utilize the Polish tax system features.
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. Ticket [link](https://www.odoo.com/odoo/project.task/6125243) opw-6125243 Forward-Port-Of: odoo/odoo#264851
This update resolves an issue where Croatian invoices with alphanumeric characters in the business premises label (e.g., 'v1') were causing system errors. The fix modifies a key parsing rule to correctly recognize and process these labels, ensuring invoices are processed without errors. This improves the reliability of the Croatian fiscalization process.
Original PR description
### Description of the issue/feature this PR addresses: The business premises label on Croatian invoices can legitimately contain alphanumeric characters (e.g., "v1"), as noted in the field's…
### Description of the issue/feature this PR addresses: The business premises label on Croatian invoices can legitimately contain alphanumeric characters (e.g., "v1"), as noted in the field's tooltip. However, the regex pattern inside `_get_l10n_hr_fiscalization_number` used to extract the sequence parts strictly expected digits (`\d+`) for the premises label segment. Because of this, if an invoice was generated with an alphanumeric sequence like `INV-2026-0001/v1/1`, the regex failed to match and returned `False`, leading to a traceback when the system attempted to process the fiscalization number. This commit updates the regex to correctly accept alphanumeric characters for the premises label, ensuring the sequence parses successfully. opw-6129009 ### Steps to reproduce: - Settings > Users & Companies > Companies > New > set Address country to Croatia - Select the newly created Croatian company - Apps > Activate l10n_hr_edi module - Accounting > Configuration > Accounting > Journals > click Sales journal > change “Business premises label” to “v1” - Contacts > New > set Address country to Croatia - Accounting > Customers > Invoices > New > select the newly created contact and choose any product > Confirm ### Current behavior before PR: Traceback error when attempting to confirm an invoice when both the company and the customer have their country code set to 'HR'. This is because `_get_l10n_hr_fiscalization_number` does not accept alphabet characters in the premises label section of the regex. ### Desired behavior after PR is merged: - No traceback error when confirming the invoice - `_get_l10n_hr_fiscalization_number` correctly parses the fiscalization number Forward-Port-Of: odoo/odoo#263650
This update resolves a problem where the Brazil localization module (`l10n_br`) was incorrectly referencing a changed element in the address form. Upgrading to version 19.2 corrected the inheritance path, ensuring the Brazil module functions correctly with the updated address form. This prevents errors and maintains the proper display of address fields for Brazilian users.
Original PR description
Issue: ------ `l10n_br.address_form_fields` inherits from `portal.address_form_fields` but targets a `<select>` element that was moved to `portal_address_extended.address_extended_form_fields` in…
Issue: ------ `l10n_br.address_form_fields` inherits from `portal.address_form_fields` but targets a `<select>` element that was moved to `portal_address_extended.address_extended_form_fields` in [saas~19.2]. Traceback: ---------- ```py Error while parsing or validating view: Element '<xpath expr="//select[@name='city_id']/option[not(@value='')]">' cannot be located in parent view ``` Steps to reproduce: ------------------- 1. Install `l10n_br` in v19 2. Upgrade to v19.2 3. Upgrade the `l10n_br` module → Traceback Root cause: ----------- The view is adapting an element owned by a sibling view, making the inheritance hierarchy conceptually wrong and fragile. Solution: --------- Update the `inherit_id` of `l10n_br.address_form_fields` to `portal_address_extended.address_extended_form_fields` so it correctly inherits from the view that owns the targeted element. opw: [6125901] [saas~19.2]: https://github.com/odoo/odoo/commit/026c6f9f2a388ee509a135c53e38f5bb3d08ff73 [6125901]: https://www.odoo.com/odoo/70/tasks/6125901?debug=1 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 error that occurred when users removed the 'Source Entity Id Type' field in the Super Contributions reporting module. The fix ensures the system correctly handles this removal, preventing a data processing error and maintaining accurate reporting. This improves the stability of the Australian payroll functionality.
Original PR description
Currently an error occurs when the user removes the Source Entity Id Type on Super Contributions. **Steps to Reproduce:** - Install `l10n_au_hr_payroll_account` with demo data. - Switch to an…
Currently an error occurs when the user removes the Source Entity Id Type on Super Contributions. **Steps to Reproduce:** - Install `l10n_au_hr_payroll_account` with demo data. - Switch to an `Australian` company. - Go to `Payroll` > `Reporting` > `Australia` > `Super Contributions`. - Open an existing record or create a new one. - Remove the `Source Entity Id Type` value and click anywhere. `ValueError: Compute method failed to assign l10n_au.super.stream(<NewId origin=1>,).source_entity_id` After [change] in the selection field behavior, when the user removes the Source Entity Id Type, the compute method is triggered to compute the Source Entity ID. However, the condition in the compute method is not match, so no value is assigned. As a result, the method fails and raises an error. This commit ensures that if the condition is not match, the Source Entity ID is explicitly set to False. [1]- https://github.com/odoo/enterprise/blob/9d523d7aabffda277e1ef734caf2b0e434545dca/l10n_au_hr_payroll_account/models/l10n_au_super_stream.py#L61-L65 [change]: https://github.com/odoo/odoo/pull/214422/changes/8d2a42ac419fdf7943a0c11beb8c5de6c6f85bef Forward-Port-Of: odoo/enterprise#115466
This update fixes an issue where returned subcontracted products were incorrectly routed to the subcontractor's location instead of the user's stock. When returning products 'for exchange', the system now correctly directs returned items to the subcontractor's location and new incoming items to the user's stock, ensuring accurate inventory tracking. This prevents misallocation of stock and streamlines the subcontracting process.
Original PR description
## Issue When making a request for quotation for a subcontracted product and returning the delivery "for exchange", the new incoming delivery does not have the correct destination. Instead of having…
## Issue
When making a request for quotation for a subcontracted product and returning the delivery "for exchange", the new incoming delivery does not have the correct destination. Instead of having the stock of the user, the destination of the new incoming delivery is the same as its source: the subcontracting location.
<img width="1254" height="257" alt="5479900" src="https://github.com/user-attachments/assets/c7e6d392-8328-4a03-a71e-466e768f448b" />
## Steps to reproduce
1. Install MRP Subcontracting (`mrp_subcontracting`) and Purchase (`purchase`)
2. In Settings, enable *Subcontracting*
3. Create a Product P and a subcontracting BoM with Subcontractor S
4. Create a Request for Quotation
- Vendor: Subcontractor S
- Product: Product P (any quantity > 0)
5. Confirm the RFQ, receive the PO, validate the picking
6. On the validated picking, click *Return*, set the quantity of products to return, and click *Return for Exchange*
- This creates two new pickings, one to return the product(s) we received, and one to receive new products
7. Validate the two new pickings
8. **In Inventory > Reporting > Moves History, the very last `stock.move.line` has the same location in the *From* (`location_id`) and the *To* (`location_dest_id`) columns**
## Cause
The `location_dest_id` of the new `stock.move` is updated in `StockReturnPickingLine._prepare_move_default_values`.
https://github.com/odoo/odoo/blob/fb534f1eadcb8ef74e2ee6fd5b68872dddb978e3/addons/mrp_subcontracting/wizard/stock_picking_return.py#L20-L25
The condition added by https://github.com/odoo/odoo/commit/5404b426aac9 sets the destination of all returned subcontracted moves to the subcontractor location. This is incorrect when using "return for exchange", as in this case, the return move is directed towards the user's stock. In fact, when using "return for exchange", the following pickings are created:
| id | name | return_id | |
|:--:|--------------|:---------:|---|
| 1 | WH/IN/00001 | | Initial RFQ delivery |
| 2 | WH/OUT/00001 | 1 | Return of the initial RFQ delivery |
| 3 | WH/IN/00002 | 2 | New products delivery to replace the initial delivery. The stock.move.line of this stock.picking has a wrong `location_dest_id` |
## Fix
In the context of return for exchanges, the returned item must be directed to the *Subcontracting Location* while the new item must be directed to the *Stock*. In the `_prepare_move_default_values`, we should only set the `location_dest_it` to the subcontractor location for outgoing pickings.
opw-5479900
Forward-Port-Of: odoo/odoo#265071
Forward-Port-Of: odoo/odoo#245905This update fixes a limitation in the sale commission report that previously restricted the range of AML IDs it could process. Removing an unnecessary bit shift significantly expands the system's capacity to handle larger data sets, improving report performance. This change ensures the report can accurately process a wider range of sales commission data.
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 fixes an issue where project update descriptions incorrectly showed inflated budget totals after budget revisions. The fix ensures that only the active, confirmed budget revision is used, providing accurate budget information for project updates. This improves the reliability of project cost tracking.
Original PR description
**Problem:** When a project analytic budget is revised, the project update description shows an inflated total budget — the sum of both the original and the revised amounts — instead of reflecting…
**Problem:** When a project analytic budget is revised, the project update description shows an inflated total budget — the sum of both the original and the revised amounts — instead of reflecting only the active (confirmed) revision. **Steps to reproduce:** 1. Create a project with an analytic account 2. Create an analytic budget of $10,000 and confirm it 3. Create a revision of that budget for $15,000 and confirm it 4. Create a new project update 5. The update shows "$25,000" as the total budget instead of "$15,000" **Current behavior:** The project update displays the sum of all budget revisions ($25,000), regardless of their state. **Expected behavior:** Only the active confirmed budget ($15,000) should be used. **Cause of the issue:** `_compute_budget` queries all `budget.line` records matching the project's analytic account without filtering by the parent `budget.analytic` state. When a budget is revised, the original transitions to state `revised` while the new one becomes `confirmed`. Because `_compute_budget` has no state filter, it sums both, producing an inflated `total_budget_amount`. This field is then used in the project update template to compute the displayed budget total and percentage. By contrast, `_get_budget_items` — used for the detail rows — already applies `state in ['confirmed', 'done']`, so the two methods were inconsistent. **Fix:** Applying the same state filter to `_compute_budget` as already present in `_get_budget_items` ensures both methods draw from the same set of active budgets, keeping the project update totals consistent with the budget detail rows. opw-6128855 Forward-Port-Of: odoo/enterprise#117490 Forward-Port-Of: odoo/enterprise#115285
15 changes
Enhancements to existing features
This update streamlines the invoicing process by automatically reconciling invoices created from sales orders. Previously, this required manual steps; now, the system directly links invoices to sales orders, improving efficiency and reducing potential errors. This change enhances the accuracy of financial reporting and simplifies reconciliation workflows.
Original PR description
This commit will allow to automatically reconcile the invoice create from the sale order by passing a context key that will be used in the create_invoices function. task-5502964 Forward-Port-Of: odoo/enterprise#108546
Resolved issues and error corrections
This update enhances the account reports feature by adding a confirmation dialog before deleting working files, preventing accidental data loss. It also restricts access to this feature for non-accountant users, improving data security and usability. These changes ensure a more controlled and secure experience for generating and managing account reports.
Original PR description
contains: [FIX] account_reports: Working files delete button: - hide it for non-accountant - add confirmation dialog [FIX] account_reports: Working file should always open in cycle view [FIX] account_reports: Always show embedded actions in Working files task-5880319 Forward-Port-Of: odoo/enterprise#115596
This update fixes an error in the Luxembourg Annual VAT Declaration report that resulted in incorrect calculations for Appendix E 1a. The fix ensures that all necessary tax data is included accurately in the formula, leading to more reliable financial reporting. This improves the accuracy of VAT reporting for Luxembourg businesses.
Original PR description
### Issue: The formula `L10N_LU_TAX_163` in the Luxembourg Annual VAT Declaration was incorrect: - `L10N_LU_TAX_791.year_start` was added twice - `L10N_LU_TAX_993.year_start` was missing As a result, the computed total in Appendix E 1a was incorrect ### Steps to reproduce: - Install `l10n_lu_reports` - Open the `Report: Annual VAT Declaration (LU)` - Go to `Appendix E` - Use the `Start of Financial year` pencil icons to manually set values for fields `791` and `993` - Check the computed value of field `163` After the fix, both values are included exactly once in the formula opw-6158950 Forward-Port-Of: odoo/enterprise#117214
This update fixes an issue where freight charges were incorrectly applied to all pickings, particularly with backorders. The change ensures freight costs are accurately reflected only on the initial, confirmed picking, aligning with how delivery costs should be billed to customers.
Original PR description
Commit 28b840b introduced logic to include `freight_costs` in the customs document generated bySendcloud. It introduced 2 new issues as a result: 1. When creating backorders, the `freight_costs` are…
Commit 28b840b introduced logic to include `freight_costs` in the customs document generated bySendcloud. It introduced 2 new issues as a result: 1. When creating backorders, the `freight_costs` are not divided but instead propagated to all of the pickings. 2. When there is no SO, we were taking the total value of all delivered goods, which doesn't make much sense considering the `freight_costs` field should be the cost of the delivery itself. Solution ----- For the first problem, there are a couple things to keep in mind: - the total `freight_costs` declared to the customs entity should be the amount invoiced to the customer - products can be added and removed from the picking after the SO has been confirmed - actual delivery cost can change between invoice date and actual delivery date - picking can be split into multiple packages at the user's discretion Considering all of the above, we will simply forward the invoiced amount with the first confirmed picking and none of the backorders. ----- Ticket: opw-6013387 Forward-Port-Of: odoo/enterprise#117115 Forward-Port-Of: odoo/enterprise#111304
This update resolves a problem where a production group would disappear after merging MOs, causing errors when creating backorders. The fix ensures production groups are maintained correctly during the merging process, preventing the 'max() iterable argument is empty' error. This improves the reliability of the backorder creation feature.
Original PR description
# How to reproduce - Create 2 MO's A & B, both having the same product_id & bom_id - Split MO A into two MO's A1 & A2 - Merge MO's A1 & B # The issue MO A2 no longer has a production group (visible…
# How to reproduce - Create 2 MO's A & B, both having the same product_id & bom_id - Split MO A into two MO's A1 & A2 - Merge MO's A1 & B # The issue MO A2 no longer has a production group (visible via Studio). If the user tries to partially produce the MO and create a backorder, a traceback popup appears with : "ValueError: max() iterable argument is empty" # Cause The traceback is triggered because we use the `max()` function on `self.production_group_id.production_ids` when creating the backorder, but `production_ids` is an empty recordset since `production_group_id` is also empty. https://github.com/odoo/odoo/blob/0d8eaeeb971f2f670aebb1b72ed03f4a2d5e0105/addons/mrp/models/mrp_production.py#L1936 The production group is empty because when merging two MO's we delete it without paying attention to other remaining links. https://github.com/odoo/odoo/blob/394a30f8a2814d460cfe220b5017e7ac95d8cddc/addons/mrp/models/mrp_production.py#L2555 Note : the production groups were introduced by this commit (https://github.com/odoo/odoo/commit/2713876dbc70d3984e584a9037a2206dcda4e84a) # Proposed solution When merging, we unlink the original MO's from their production group. Then, we check every altered production group : if they are not linked to any MO anymore, we delete them. opw-6055376 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#256600
This update resolves a crash during KSeF certificate authentication caused by Odoo's inability to handle different certificate types. The fix automatically determines the correct identifier type, ensuring successful authentication with the KSeF server and enabling proper tax reporting.
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. Ticket [link](https://www.odoo.com/odoo/project.task/6125243) opw-6125243 Forward-Port-Of: odoo/odoo#264851
This update resolves an issue where Croatian invoices with alphanumeric characters in the business premises label (e.g., 'v1') were causing system errors. The fix modifies a key parsing rule to correctly recognize these labels, ensuring invoices are processed without errors. This improves the reliability of invoice generation for Croatian businesses.
Original PR description
### Description of the issue/feature this PR addresses: The business premises label on Croatian invoices can legitimately contain alphanumeric characters (e.g., "v1"), as noted in the field's…
### Description of the issue/feature this PR addresses: The business premises label on Croatian invoices can legitimately contain alphanumeric characters (e.g., "v1"), as noted in the field's tooltip. However, the regex pattern inside `_get_l10n_hr_fiscalization_number` used to extract the sequence parts strictly expected digits (`\d+`) for the premises label segment. Because of this, if an invoice was generated with an alphanumeric sequence like `INV-2026-0001/v1/1`, the regex failed to match and returned `False`, leading to a traceback when the system attempted to process the fiscalization number. This commit updates the regex to correctly accept alphanumeric characters for the premises label, ensuring the sequence parses successfully. opw-6129009 ### Steps to reproduce: - Settings > Users & Companies > Companies > New > set Address country to Croatia - Select the newly created Croatian company - Apps > Activate l10n_hr_edi module - Accounting > Configuration > Accounting > Journals > click Sales journal > change “Business premises label” to “v1” - Contacts > New > set Address country to Croatia - Accounting > Customers > Invoices > New > select the newly created contact and choose any product > Confirm ### Current behavior before PR: Traceback error when attempting to confirm an invoice when both the company and the customer have their country code set to 'HR'. This is because `_get_l10n_hr_fiscalization_number` does not accept alphabet characters in the premises label section of the regex. ### Desired behavior after PR is merged: - No traceback error when confirming the invoice - `_get_l10n_hr_fiscalization_number` correctly parses the fiscalization number Forward-Port-Of: odoo/odoo#263650
This update fixes an error in the Austrian localization module that incorrectly used a fixed 15-day rule for VAT and EC sales list reporting deadlines. The fix now accurately reflects the official Austrian filing deadlines, ensuring compliance and preventing potential penalties. This improves the accuracy of financial reporting for Austrian businesses using Odoo Enterprise.
Original PR description
**[FIX] l10n_at_reports: correct Austrian return deadlines** The Austrian localization used a fixed `15 days` rule for both VAT returns and EC sales lists. This does not match the filing deadlines: the VAT return is due on the 15th day of the second following month while the EC sales list is due by the end of the following month (sources below). This fix replaces the hardcoded day offset with month-based deadline computation sources: https://www.usp.gv.at/themen/steuern-finanzen/umsatzsteuer-ueberblick/weitere-informationen-zur-umsatzsteuer/umsaetze-mit-auslandsbezug/zusammenfassende-meldung-zm.html https://www.usp.gv.at/en/themen/steuern-finanzen/umsatzsteuer-ueberblick/weitere-informationen-zur-umsatzsteuer/entstehen-der-steuerschuld-und-pflichten/umsatzsteuervoranmeldung.html opw-6147343 Forward-Port-Of: odoo/enterprise#116212
This update fixes an error that occurred when selecting shift templates on planning slots, preventing a system crash. The change ensures that if the calculation fails due to a long time range, the system reverts to a previously calculated end date, ensuring accurate 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 fixes an error in how VAT carryover reimbursements are calculated when claiming unclaimed tax amounts. The previous calculation incorrectly used data from the previous month's tax report, leading to inaccurate reimbursement move amounts. This ensures accurate VAT reporting and reimbursement processing.
Original PR description
When generating a VAT return with an unclaimed tax amount carried to the next month, the carryover reimbursement move amounts are computed with an incorrect ratio. Steps to reproduce: - Create and…
When generating a VAT return with an unclaimed tax amount carried to the next month, the carryover reimbursement move amounts are computed with an incorrect ratio. Steps to reproduce: - Create and post a bill in May containing a VAT amount. - Create and post a bill in June containing a VAT amount. - Create a VAT return for May to carry over the VAT amount to the next month. - Create a VAT return for June, requesting the full VAT amount to be reimbursed. - Validate and send the June VAT return. - Check the generated reimbursement move Issue: Line values does not correspond to anything real/tangible. It occurs because when computing the ratio for the move we check the last tax report entry, where we find the amount of tax from the past months and a line balancing the last month that should not be taken into account. The "Balance tax current account (receivable)" line from the tax closing entry is mistakenly picked up as a tax carried forward line, throwing off the amounts. opw-5961836 Forward-Port-Of: odoo/enterprise#116930 Forward-Port-Of: odoo/enterprise#115451
This update fixes an error in the project dashboard that was incorrectly displaying revenue figures due to a miscalculation of recurring subscription plans. The fix ensures that revenue is accurately reflected based on the selected yearly subscription, resolving discrepancies in reported income and invoices.
Original PR description
__ ## Short functional explanation of the error When checking the dashboard on a project we created with a yearly subscription, the values shown are incorrect. ## Reproduction Steps 1. Create a new…
__ ## Short functional explanation of the error When checking the dashboard on a project we created with a yearly subscription, the values shown are incorrect. ## Reproduction Steps 1. Create a new product. Check the Subscription field and set the Product type as Service. On the Create on Order field, set Project & Task. Then, in the Recurring Price tab, add a Monthly plan with price 50 and yearly plan with price 40. 2. Create a new Quotation. Set a customer and add the product you just created in an Order line. Set the Quantity to 100 and set the recurring plan as Yearly. You'll see the amount be at 4000, and the total amount at 4600 with taxes. Click on Confirm. 3. Create an invoice and confirm it. 4. Click on the Project smart button. Then, on the top right, click on the view menu > Top Menu. Select Dashboard and click on it. ### Expected behavior On the dashboard, we should see the Revenues under Profitability at 4000. To invoice should be left at 0 and Invoiced should be at 4000. Expected should be at 4000. ### Unexpected behavior On the dashboard, To Invoice is at 333, and Expected is at 4333. This corresponds to our invoice + 4000/12 -> monthly recurring plan, with the price of the yearly plan! ## Origin of the issue We always add the `recurring_monthly` value when showing the profitability, no matter the recurring plan: https://github.com/odoo/enterprise/blob/cdc0d5d57f6b27a6bb5e451d48bdbef4e3dde5cb/project_sale_subscription/models/project_project.py#L86 We should only add the `recurring_monthly` value for as many monthly subscriptions we have, not for *all* the subscriptions. __ opw-5916688 Forward-Port-Of: odoo/enterprise#113918
This update resolves an issue where unsent Italian fiscal receipts were incorrectly transmitted as refunds to the printer. The fix ensures that actual orders are printed correctly, preventing potential reporting errors and compliance issues related to Italian tax regulations. This improves the reliability of the POS system for Italian businesses.
Original PR description
Steps to reproduce: - Set up an Italian fiscal printer; - In the POS, process an order and simulate an unsent receipt (e.g., by disconnecting the device from the network); - Navigate to the "Orders" screen and select the unsent order; - Click "Print receipt" Issue: The order isn't properly loaded. Because there is no order line, it is considered as a refund and is transmitted to the fiscal printer with a "RETURN " header instead of the actual fiscal receipt. [opw-5270697](https://www.odoo.com/odoo/project.task/5270697) Forward-Port-Of: odoo/enterprise#117043
This update fixes a problem where adding rental products to the cart would fail due to mismatched date calculations. The fix ensures that rental product durations are correctly handled, regardless of whether they're priced by days or hours, preventing errors when adding items to the cart. This improves the overall rental experience for customers.
Original PR description
Steps to reproduce: =================== 1. Go to the shop page and use the rental date picker to select a start and end date with hours. 2. Find a rental product configured with "Days" pricing. 3.…
Steps to reproduce: =================== 1. Go to the shop page and use the rental date picker to select a start and end date with hours. 2. Find a rental product configured with "Days" pricing. 3. Add to card directly from the product card 4. Add a rental product from product image that has date type value date 5. Go to that product details page. 6. Click add to cart -> Invalid operation, You cannot mix different rental periods... Cause: ====== When adding a product from the shop list view, the system uses the default start/end dates (from the rental period) exactly as first added. However, the "Add to Cart" logic on the product details page attempts to adapt the selected dates to the product's specific rental unit (e.g., normalizing the time component for 'Day' pricing). This re-calculation creates a timestamp mismatch between the item already in the cart (from the shop view) and the new item being added (from the details page). Solution: ========= The add-to-cart flow has been updated to correctly utilize the default duration values (the globally selected dates) if they exist. opw-5450576 Forward-Port-Of: odoo/enterprise#103373
This update fixes an issue where project update descriptions incorrectly showed inflated budget totals after budget revisions. The fix ensures that only the active, confirmed budget revision is used, providing accurate budget information for project updates. This improves the reliability of project cost reporting.
Original PR description
**Problem:** When a project analytic budget is revised, the project update description shows an inflated total budget — the sum of both the original and the revised amounts — instead of reflecting…
**Problem:** When a project analytic budget is revised, the project update description shows an inflated total budget — the sum of both the original and the revised amounts — instead of reflecting only the active (confirmed) revision. **Steps to reproduce:** 1. Create a project with an analytic account 2. Create an analytic budget of $10,000 and confirm it 3. Create a revision of that budget for $15,000 and confirm it 4. Create a new project update 5. The update shows "$25,000" as the total budget instead of "$15,000" **Current behavior:** The project update displays the sum of all budget revisions ($25,000), regardless of their state. **Expected behavior:** Only the active confirmed budget ($15,000) should be used. **Cause of the issue:** `_compute_budget` queries all `budget.line` records matching the project's analytic account without filtering by the parent `budget.analytic` state. When a budget is revised, the original transitions to state `revised` while the new one becomes `confirmed`. Because `_compute_budget` has no state filter, it sums both, producing an inflated `total_budget_amount`. This field is then used in the project update template to compute the displayed budget total and percentage. By contrast, `_get_budget_items` — used for the detail rows — already applies `state in ['confirmed', 'done']`, so the two methods were inconsistent. **Fix:** Applying the same state filter to `_compute_budget` as already present in `_get_budget_items` ensures both methods draw from the same set of active budgets, keeping the project update totals consistent with the budget detail rows. opw-6128855 Forward-Port-Of: odoo/enterprise#117490 Forward-Port-Of: odoo/enterprise#115285
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
2 changes
Resolved issues and error corrections
This update fixes an error in the Luxembourg Annual VAT Declaration report that resulted in inaccurate calculations for Appendix E 1a. The fix ensures that key financial data is correctly included in the formula, guaranteeing accurate reporting for Luxembourg businesses. This improves the reliability of the VAT declaration process.
Original PR description
### Issue: The formula `L10N_LU_TAX_163` in the Luxembourg Annual VAT Declaration was incorrect: - `L10N_LU_TAX_791.year_start` was added twice - `L10N_LU_TAX_993.year_start` was missing As a result, the computed total in Appendix E 1a was incorrect ### Steps to reproduce: - Install `l10n_lu_reports` - Open the `Report: Annual VAT Declaration (LU)` - Go to `Appendix E` - Use the `Start of Financial year` pencil icons to manually set values for fields `791` and `993` - Check the computed value of field `163` After the fix, both values are included exactly once in the formula opw-6158950 Forward-Port-Of: odoo/enterprise#117214
This update fixes an error that occurred when selecting shift templates on planning slots, specifically when dealing with long periods of leave. The change ensures the system gracefully falls back to a previously calculated end date if the template duration cannot be accurately determined, 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
9 changes
Resolved issues and error corrections
This update fixes an error in the Luxembourg Annual VAT Declaration report that resulted in incorrect calculations for Appendix E 1a. The fix ensures that all relevant tax data is included accurately, improving the reliability of the report and its compliance with Luxembourg regulations. This resolves a discrepancy in the reported VAT totals.
Original PR description
### Issue: The formula `L10N_LU_TAX_163` in the Luxembourg Annual VAT Declaration was incorrect: - `L10N_LU_TAX_791.year_start` was added twice - `L10N_LU_TAX_993.year_start` was missing As a result, the computed total in Appendix E 1a was incorrect ### Steps to reproduce: - Install `l10n_lu_reports` - Open the `Report: Annual VAT Declaration (LU)` - Go to `Appendix E` - Use the `Start of Financial year` pencil icons to manually set values for fields `791` and `993` - Check the computed value of field `163` After the fix, both values are included exactly once in the formula opw-6158950 Forward-Port-Of: odoo/enterprise#117214
This update fixes an issue where vendor bills were incorrectly using Swiss tax rates when the invoice originated from a Belgian company. The change ensures that the correct tax rate, based on the company's fiscal localization, is applied during the import process. This prevents errors and ensures accurate tax calculations for invoices.
Original PR description
**Steps to reproduce:** - Create a company in Belgium and set the fiscal localisation accordingly. - In the same company, create a fiscal position in Switzerland, set the foreign tax ID and then…
**Steps to reproduce:** - Create a company in Belgium and set the fiscal localisation accordingly. - In the same company, create a fiscal position in Switzerland, set the foreign tax ID and then generate the taxes for it. - Install the module account_edi_ubl_cii. - Create and invoice for a belgian customer, with one product line having a 0% tax. - Export the invoice as XML. - Go to taxes, filter by purchase, and make sure that the 0% switzerland tax has a higher sequence than the belgian 0% tax. - Import the previous invoice XML as a vendor bill. **Issue:** After importing the bill, the switzerland tax is used even though the fiscal localisation is belgian, which is wrong as it violates the constraint _validate_taxes_country **Solution:** Added a more selective domain to _import_fill_invoice_line_taxes opw-5467936 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#263560 Forward-Port-Of: odoo/odoo#255848
This update ensures that event tickets are correctly created when selling event tickets through the POS system while offline. Previously, a page reload would cause the system to lose the ticket information. Now, the system retains event registration details until the order is fully synced with the server, guaranteeing accurate ticket generation.
Original PR description
When selling event tickets in POS while offline, the order could be synced later but without creating event registrations (tickets) after a page reload. Steps to reproduce: ------------------- * Open…
When selling event tickets in POS while offline, the order could be synced later but without creating event registrations (tickets) after a page reload. Steps to reproduce: ------------------- * Open a POS session with `pos_event` * Sell an event ticket * Switch to offline mode * Validate payment while offline (order becomes paid but unsynced) * Reload/close and reopen POS, then reconnect * Let the order sync > Observation: The `pos.order` is created on the backend, but `event.registration` and `event.registration.answer` are missing so tickets are not generated. Why the fix: ------------ `pos_event` used `order.finalized` as IndexedDB cleanup condition for `event.registration` and `event.registration.answer`. For paid-but-unsynced orders, `finalized` is already true, so those records can be removed from IndexedDB too early. After reload, the order is restored/synced but without its event registration payload. Implementation: --------------- Use `order.canBeRemovedFromIndexedDB` instead of `order.finalized` for `event.registration` and `event.registration.answer` retention rules, so records are kept locally until the order is truly synced (server id assigned) or canceled. Test Note: --------------- Use case is hard to simulate exactly. Add a basic unit test to assert both registration models are kept for paid unsynced orders and only removable once synced. opw-6056079 Forward-Port-Of: odoo/odoo#263912 Forward-Port-Of: odoo/odoo#256615
This update resolves an issue where the Point of Sale system incorrectly applied AvaTax fiscal positions even when AvaTax wasn't activated in the POS. The fix ensures that AvaTax fiscal positions are only used when AvaTax is enabled, preventing incorrect tax calculations for customers. This improves the accuracy of sales tax processing.
Original PR description
**Steps to reproduce:** - Install Accounting and Point of Sale - In Accounting settings, activate "AvaTax" - Configure the AvaTax fiscal position and activate "Detect Automatically" option - Make…
**Steps to reproduce:** - Install Accounting and Point of Sale - In Accounting settings, activate "AvaTax" - Configure the AvaTax fiscal position and activate "Detect Automatically" option - Make sure that the other fiscal positions don't have that option set or that they are ordered after the AvaTax one - Go to the settings of a point of Sale - Activate "Flexible Taxes" and configure "Default" and "Allowed" - Make sure that AvaTax fiscal position is not allowed - Do not activate "AvaTax PoS Integration" - Open a POS session - Select a customer with an address in the US and without fiscal position - Check the fiscal position **Issue:** The selected fiscal position is the AvaTax one even though AvaTax is not activated in the POS. **Cause:** We force the use of a fiscal position if it is configured on a customer. In this case, as no fiscal position is configured on the customer, we try to retrieve one that matches the condition and the AvaTax one is selected. **Solution:** When searching for the fiscal position of a customer, if AvaTax is not configured in the POS and if its fiscal positions are not allowed in POS, we ignore the fiscal positions using AvaTax. opw-6154089 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update corrects a bug where the POS system incorrectly defaulted to using AvaTax fiscal positions, even when AvaTax wasn't activated in the POS. The fix ensures that the POS only uses AvaTax fiscal positions if AvaTax is enabled in the accounting settings, aligning with user preferences and improving data accuracy.
Original PR description
**Steps to reproduce:** - Install Accounting and Point of Sale - In Accounting settings, activate "AvaTax" - Configure the AvaTax fiscal position and activate "Detect Automatically" option - Make…
**Steps to reproduce:** - Install Accounting and Point of Sale - In Accounting settings, activate "AvaTax" - Configure the AvaTax fiscal position and activate "Detect Automatically" option - Make sure that the other fiscal positions don't have that option set or that they are ordered after the AvaTax one - Go to the settings of a point of Sale - Activate "Flexible Taxes" and configure "Default" and "Allowed" - Make sure that AvaTax fiscal position is not allowed - Do not activate "AvaTax PoS Integration" - Open a POS session - Select a customer with an address in the US and without fiscal position - Check the fiscal position **Issue:** The selected fiscal position is the AvaTax one even though AvaTax is not activated in the POS. **Cause:** We force the use of a fiscal position if it is configured on a customer. In this case, as no fiscal position is configured on the customer, we try to retrieve one that matches the condition and the AvaTax one is selected. **Solution:** When searching for the fiscal position of a customer, if AvaTax is not configured in the POS and if its fiscal positions are not allowed in POS, we ignore the fiscal positions using AvaTax. opw-6154089
This update fixes a bug that caused duplicate partner creation during EDI import of Swiss VAT documents. The change adds logic to correctly match both formatted and unformatted Swiss VAT numbers, ensuring accurate partner identification and preventing import errors. This improves data integrity and streamlines the import process.
Original PR description
### Issue: When importing EDI documents such as Peppol files, Swiss VAT numbers are often provided in a flat format (e.g., CHE530781296TVA), while existing Odoo partners usually store them in the…
### Issue: When importing EDI documents such as Peppol files, Swiss VAT numbers are often provided in a flat format (e.g., CHE530781296TVA), while existing Odoo partners usually store them in the official formatted version (e.g., CHE-530.781.296 TVA) This mismatch prevents proper partner matching and may create duplicate partners during import ### Cause: `_retrieve_partner` lacks Swiss-specific VAT normalization logic in `_import_retrieve_customer_from_vat()` As a result, the matching process fails to: - match formatted and unformatted Swiss VAT numbers - properly handle language suffixes such as `TVA`, `MWST`, or `IVA` If `base_vat` is installed, and the imported XML VAT is `CHE530781296TVA`, a new partner will be created with the structure format `CHE-530.781.296 TVA` As the match won't be made new partner will be created at each import ### Steps to reproduce: - Install `account` - Create a Vendor (Name: Test CH Vendor, Country: Switzerland, Tax ID: CHE-530.781.296 TVA) - Import the bill [CH_bill_to_import.xml](https://github.com/user-attachments/files/27202997/CH_bill_to_import.xml) from the ticket Before the fix, the existing partner is not matched and a duplicate partner is created opw-6072239
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 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 an error in the Luxembourg Annual VAT Declaration report that resulted in incorrect calculations for Appendix E 1a. The fix ensures that key financial data is accurately included in the report formula, improving the reliability of VAT reporting for Luxembourg businesses. This resolves a discrepancy in the reported total.
Original PR description
### Issue: The formula `L10N_LU_TAX_163` in the Luxembourg Annual VAT Declaration was incorrect: - `L10N_LU_TAX_791.year_start` was added twice - `L10N_LU_TAX_993.year_start` was missing As a result, the computed total in Appendix E 1a was incorrect ### Steps to reproduce: - Install `l10n_lu_reports` - Open the `Report: Annual VAT Declaration (LU)` - Go to `Appendix E` - Use the `Start of Financial year` pencil icons to manually set values for fields `791` and `993` - Check the computed value of field `163` After the fix, both values are included exactly once in the formula opw-6158950 Forward-Port-Of: odoo/enterprise#117214
This update resolves an issue where signed PDF documents lost their original bookmarks and links. The fix ensures that signed documents remain fully navigable and consistent with the original PDF, preserving document structure and integrity for users.
Original PR description
Version - 18.0 Steps to reproduce: 1. Upload a PDF document containing bookmarks and internal/external links. 2. Sign the document and download the signed PDF. 3. Open the downloaded file and check the bookmarks and links. Issue: When a signed document was downloaded, the original PDF bookmarks And the links were not working. This broke structured navigation and affected document integrity. Fix: The PDF signing process has been updated to preserve the original bookmarks and ensure internal and external links remain functional after signing. Impact: - Signed documents remain navigable and consistent with the original PDF. - Preserves document structure and integrity. Task- 4915124 Forward-Port-Of: odoo/enterprise#108684
This update fixes an error that occurred when selecting shift templates on planning slots, specifically when dealing with long periods of leave. The change ensures the system falls back to a previously calculated end date if the template's 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 resolves an issue where cancelled food delivery orders continued to show as 'Draft' in the Point of Sale system. The fix synchronizes PoS order states with delivery cancellations, ensuring that preparation displays accurately reflect the cancelled status. This improves order visibility and prevents confusion for staff.
Original PR description
pos*: pos_urban_piper, pos_enterprise When a food delivery order is cancelled from the aggregator side, the PoS order remains active on the frontend instead of reflecting the cancelled state. Steps to reproduce: - Configure UrbanPiper with Atlas - Place an order via Atlas - Open the order from the notification bar - Cancel the order from Atlas Issues: - Cancelled orders continue to appear in `Draft` - Accepted/preparation orders are not cancelled on the preparation display Fix: - Synchronise the PoS order state with the delivery state on cancellation - Update preparation display orders when delivery orders are cancelled Task-6217704 Forward-Port-Of: odoo/enterprise#117374
This update resolves an issue where removing orderline notes on the preparation display would incorrectly mark the line as cancelled and create a new one. The fix ensures that note history is recorded regardless of whether the note is confirmed, allowing the system to accurately update existing orderlines instead of creating duplicates.
Original PR description
Steps to reproduce: --------- 1. Create an order with an orderline general note. 2. Send the order to the preparation display. 3. Remove the note from orderline. 4. Resend the order Issue: --------------- Removing the note changes the preparation line key, so the preparation display marks the old line as cancelled and creates a new one instead of updating the existing line. Cause: ----------- The note history was only recorded when the note was confirmed. If the user simply removes/clears the note, no note history entry is generated, so the backend cannot match the previous key with the updated key. Fix: ---------- Record note history even when the note is discarded (not only when confirmed. This allows the backend to match the old and new keys and update the line instead of cancelling it. Task-6101501 Related PR - https://github.com/odoo/odoo/pull/258632 Forward-Port-Of: odoo/enterprise#113514
13 changes
New functionality added to Odoo
This update adds the ability to generate official PDF certificates for Philippine withholding taxes (BIR 2306 & 2307) based on partner and date range selections. This ensures compliance with BIR requirements for creditable and final withholding taxes, streamlining reporting for businesses operating in the Philippines.
Original PR description
In this commit: Added support for Philippines withholding tax certificate generation to comply with BIR requirements for creditable and final withholding taxes. This includes: - New report variants for BIR 2306 (Final Withholding Tax) and 2307 (Expanded Withholding Tax) - The ability to generate and download official PDF certificates for specific partners and date ranges. Related PR : https://github.com/odoo/odoo/pull/234343 Related PR : https://github.com/odoo/upgrade/pull/8775 task-4844002
This update introduces a new 'frontdesk_partnership' module that allows frontdesk access to be restricted to partners with active memberships. It also includes an auto-checkout feature, automatically checking out visitors after a set time period, streamlining the frontdesk process and improving visitor management.
Original PR description
This PR introduces the frontdesk_partnership module, that allows creating a frontdesk with the entry limited to partners having a membership. It is also possible to limit entry to one or several specific memberships. This also adds the auto-checkout feature to the frontdesk model. A certain time can be set on the frontdesk so that any visitor checking in will be automatically checked out after the time defined passed. Task-5428837
This update introduces support for the Phonestar VoIP provider within Odoo Enterprise. This enhancement expands communication capabilities for users, allowing them to integrate Phonestar's features into their business workflows. It represents a new feature addition to the Odoo Enterprise platform.
Original PR description
Task-6190383
This update introduces automated check templates that analyze financial accounts to provide clearer insights into potential issues. These templates now consider the aggregate status of related accounts, offering a more accurate assessment than previous methods. The goal is to enhance user understanding and allow for customization of these checks.
Original PR description
**[IMP] {account,l10n_in}_reports: rename return states for tax returns**
Rename states from infinitive to past tense verbs.
**[IMP] {account,l10n_be}_reports: add account-based automated check templates**
Introduce automated check templates based on account filters.
Unlike existing check models that return an 'anomaly' if records
exist or 'reviewed' if empty, account-based checks evaluate the
aggregate status of matching accounts.
The check result is determined by the "minimum" status found across
all accounts linked to the audited working file, following a specific
priority hierarchy: anomaly > todo > reviewed > supervised
Example: If a check matches multiple accounts where one is 'reviewed'
and the rest are 'supervised', the resulting check status will be 'reviewed'.
The goal with this change is first to allow users to better understand what
filtering is done for each check and enable the user to modify it.This update introduces a new way to pay business leaders with 'Presence Tokens,' which are taxed differently than standard salaries. The system now automatically calculates and deducts withholding tax based on token amounts, applying varying tax rates (27.25%, 32.30%, or 37.35%) to ensure accurate tax reporting for this specific remuneration type.
Original PR description
Purpose ======= You can get a specific kind of remuneration for business leaders : "Presence Token", it's taxed differently Specifications ============== Add a new salary rule Input "Presence Token" available on Payslip. This amount of money should be categorized "Base remuneration" and a new category "Token Tax" Add a new rule Presence Token Withholding Tax computed like this : Tokens amounts <= 500 → Tax is 27.25% of the amount Tokens amounts >= 500.01 to 650 → Tax is 32.30% of the amount Tokens amounts >= 650.01→ Tax is 37.35% of the amount This rule takes all rules with category Token Tax Presence Token Withholding Tax is substracted from Net Task-6106132
Enhancements to existing features
This update modernizes the web studio report editor's user interface, aligning it more closely with the company's website design. The changes include a reorganized layout with separate tabs for content editing, improved navigation, and a simplified sidebar for options and resources, enhancing the report creation experience.
Original PR description
This commit reworks the web_studio report editor UI layout and style to be more inline with the website editor. - Wysiwyg/Xml/Preview are now separate tabs - Save/Discard and Undo/Redo are in the sidebar - Options are now in groups in the sidebar - Resources are now in the sidebar as well instead of the hierarchical select Community: https://github.com/odoo/odoo/pull/242868 Task: [5150355](https://www.odoo.com/odoo/project/133/tasks/5150355)
This update introduces dashboard warnings related to payroll, mirroring the existing alerts for employee and payslip issues. This enhancement ensures users receive timely notifications about potential discrepancies or errors within the payroll system, improving accuracy and compliance.
Original PR description
In this commit, we created dashboard warnings based on existing employee + payslip's issues. task-5387328
This update enhances the AI agent's ability to utilize a wider range of content snippets, including video and alert blocks. The change avoids iframe creation for video snippets, improving the AI's content generation process and flexibility.
Original PR description
Before this commit, ai agent could read only normal snippets, now we enable inner snippets as well, so it can choose from those blocks too, e.g. video, or alert. For the video snippet, though, if there's no source link, AI will try to insert an iframe, which will be removed by sanitization, so we update the prompt to have it avoid adding iframes, but instead add an embedded url to data-oe-expression, so the iframe can be generated by an interaction. task-6150746
Resolved issues and error corrections
This update resolves an issue where kitchen tickets were incorrectly printed after a platform order was cancelled, regardless of where the cancellation occurred (Odoo PoS or the provider platform). Now, cancelled platform orders will no longer trigger kitchen ticket printing, improving order accuracy and reducing unnecessary printing.
Original PR description
This fixes platform orders should not send to kitchen printer when the platform orders being cancelled. Currently accepting platform orders will not send to kitchen printer. However when cancelling platform orders on either provider platform, or within Odoo PoS. It will print a kitchen ticket of customer note. task-6071740 Forward-Port-Of: odoo/enterprise#114171
This update fixes an error in the Luxembourg Annual VAT Declaration report that resulted in incorrect calculations for Appendix E 1a. The fix ensures that VAT tax codes are included accurately in the formula, resolving a discrepancy in the reported total. This ensures accurate VAT reporting for Luxembourg businesses.
Original PR description
### Issue: The formula `L10N_LU_TAX_163` in the Luxembourg Annual VAT Declaration was incorrect: - `L10N_LU_TAX_791.year_start` was added twice - `L10N_LU_TAX_993.year_start` was missing As a result, the computed total in Appendix E 1a was incorrect ### Steps to reproduce: - Install `l10n_lu_reports` - Open the `Report: Annual VAT Declaration (LU)` - Go to `Appendix E` - Use the `Start of Financial year` pencil icons to manually set values for fields `791` and `993` - Check the computed value of field `163` After the fix, both values are included exactly once in the formula opw-6158950 Forward-Port-Of: odoo/enterprise#117214
This update fixes an issue where freight charges were incorrectly applied to all pickings, particularly with backorders. The change ensures freight costs are only included in the first confirmed picking, aligning with the correct invoicing process and accurately reflecting delivery costs.
Original PR description
Commit 28b840b introduced logic to include `freight_costs` in the customs document generated bySendcloud. It introduced 2 new issues as a result: 1. When creating backorders, the `freight_costs` are…
Commit 28b840b introduced logic to include `freight_costs` in the customs document generated bySendcloud. It introduced 2 new issues as a result: 1. When creating backorders, the `freight_costs` are not divided but instead propagated to all of the pickings. 2. When there is no SO, we were taking the total value of all delivered goods, which doesn't make much sense considering the `freight_costs` field should be the cost of the delivery itself. Solution ----- For the first problem, there are a couple things to keep in mind: - the total `freight_costs` declared to the customs entity should be the amount invoiced to the customer - products can be added and removed from the picking after the SO has been confirmed - actual delivery cost can change between invoice date and actual delivery date - picking can be split into multiple packages at the user's discretion Considering all of the above, we will simply forward the invoiced amount with the first confirmed picking and none of the backorders. ----- Ticket: opw-6013387 Forward-Port-Of: odoo/enterprise#117115 Forward-Port-Of: odoo/enterprise#111304
This update ensures that the first variant image displayed on the external website matches the first variant selected in the product configurator and shop category page. It corrects a previous issue where the website wasn't consistently showing the correct initial variant, leading to a potentially confusing customer experience.
Original PR description
When generating a product, set product.template.attribute.value sequences so that the variant that shows first in the external website is also first by _get_first_possible_variant_id(). This ensures the correct variant image appears on the shop category page and is pre-selected in the product configurator. Forward-Port-Of: odoo/enterprise#117701
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#1154758 changes
Resolved issues and error corrections
This update ensures that quality checks remain accessible on the Shop Floor, regardless of whether ‘Auto-close Production’ is enabled. Previously, disabling this setting hid the quality check button, preventing users from completing critical steps. Now, the system correctly displays quality checks, streamlining the production process and ensuring all necessary tests are performed.
Original PR description
### *Why this commit*: --- Ensures Quality Checks Shop Floor regardless of the "Auto-close Production" setting. ### *Steps to Reproduce* --- 1. Define a product tracked by Serial Numbers with a…
### *Why this commit*: --- Ensures Quality Checks Shop Floor regardless of the "Auto-close Production" setting. ### *Steps to Reproduce* --- 1. Define a product tracked by Serial Numbers with a Manufacturing BoM. 2. Create a Quality Control Point for the product on the Manufacturing operation. 3. In Inventory Configuration, disable "Auto-close Production" on the Manufacturing operation type. 4. Create a Manufacturing Order (MO) and open it in the Shop Floor view. 5. If the MO has no operations, try to use Mass Produce. ### *Before this PR* --- When auto_close_production was set to False, the Shop Floor card footer incorrectly hid the Quality Checks button. This blocked users completing mandatory quality check steps. ### *After this PR* --- The visibility logic for Shop Floor actions is now decoupled from the closing permission. The workflow follows this corrected sequence: Quality Checks: Remain accessible to ensure all mandatory tests are passed before production progresses. Close Production: Only appears if "Auto-close Production" is enabled on the operation type. Mass Produce: allow serial registration and backorder creation even if the MO cannot be closed from the Shop Floor. OPW: 5473839 Forward-Port-Of: odoo/enterprise#103926
This update fixes an issue where project update descriptions incorrectly showed inflated budget totals after budget revisions. The fix ensures that only the active, confirmed budget revision is used, providing accurate budget information for project updates. This improves the reliability of project cost tracking.
Original PR description
**Problem:** When a project analytic budget is revised, the project update description shows an inflated total budget — the sum of both the original and the revised amounts — instead of reflecting…
**Problem:** When a project analytic budget is revised, the project update description shows an inflated total budget — the sum of both the original and the revised amounts — instead of reflecting only the active (confirmed) revision. **Steps to reproduce:** 1. Create a project with an analytic account 2. Create an analytic budget of $10,000 and confirm it 3. Create a revision of that budget for $15,000 and confirm it 4. Create a new project update 5. The update shows "$25,000" as the total budget instead of "$15,000" **Current behavior:** The project update displays the sum of all budget revisions ($25,000), regardless of their state. **Expected behavior:** Only the active confirmed budget ($15,000) should be used. **Cause of the issue:** `_compute_budget` queries all `budget.line` records matching the project's analytic account without filtering by the parent `budget.analytic` state. When a budget is revised, the original transitions to state `revised` while the new one becomes `confirmed`. Because `_compute_budget` has no state filter, it sums both, producing an inflated `total_budget_amount`. This field is then used in the project update template to compute the displayed budget total and percentage. By contrast, `_get_budget_items` — used for the detail rows — already applies `state in ['confirmed', 'done']`, so the two methods were inconsistent. **Fix:** Applying the same state filter to `_compute_budget` as already present in `_get_budget_items` ensures both methods draw from the same set of active budgets, keeping the project update totals consistent with the budget detail rows. opw-6128855 Forward-Port-Of: odoo/enterprise#116670 Forward-Port-Of: odoo/enterprise#115285
This update fixes an error in how VAT reimbursements are calculated when carrying over unclaimed tax amounts. Previously, incorrect ratios were used, leading to inaccurate reimbursement move amounts. The fix ensures that only the intended carried-forward tax amounts are used in the calculation, improving financial reporting accuracy.
Original PR description
When generating a VAT return with an unclaimed tax amount carried to the next month, the carryover reimbursement move amounts are computed with an incorrect ratio. Steps to reproduce: - Create and…
When generating a VAT return with an unclaimed tax amount carried to the next month, the carryover reimbursement move amounts are computed with an incorrect ratio. Steps to reproduce: - Create and post a bill in May containing a VAT amount. - Create and post a bill in June containing a VAT amount. - Create a VAT return for May to carry over the VAT amount to the next month. - Create a VAT return for June, requesting the full VAT amount to be reimbursed. - Validate and send the June VAT return. - Check the generated reimbursement move Issue: Line values does not correspond to anything real/tangible. It occurs because when computing the ratio for the move we check the last tax report entry, where we find the amount of tax from the past months and a line balancing the last month that should not be taken into account. The "Balance tax current account (receivable)" line from the tax closing entry is mistakenly picked up as a tax carried forward line, throwing off the amounts. opw-5961836 Forward-Port-Of: odoo/enterprise#116822 Forward-Port-Of: odoo/enterprise#115451
This update fixes an error in the Luxembourg Annual VAT Declaration report that resulted in incorrect calculations for Appendix E 1a. The fix ensures that key financial data is included accurately, resolving a discrepancy in the reported VAT totals. This improves the reliability of the report for Luxembourg businesses.
Original PR description
### Issue: The formula `L10N_LU_TAX_163` in the Luxembourg Annual VAT Declaration was incorrect: - `L10N_LU_TAX_791.year_start` was added twice - `L10N_LU_TAX_993.year_start` was missing As a result, the computed total in Appendix E 1a was incorrect ### Steps to reproduce: - Install `l10n_lu_reports` - Open the `Report: Annual VAT Declaration (LU)` - Go to `Appendix E` - Use the `Start of Financial year` pencil icons to manually set values for fields `791` and `993` - Check the computed value of field `163` After the fix, both values are included exactly once in the formula opw-6158950 Forward-Port-Of: odoo/enterprise#117214
This update fixes an issue where freight charges were incorrectly applied to all pickings, particularly with backorders. The change ensures freight costs are only included in the initial picking, aligning with how delivery costs should be invoiced to customers and accounting for potential changes in delivery costs.
Original PR description
Commit 28b840b introduced logic to include `freight_costs` in the customs document generated bySendcloud. It introduced 2 new issues as a result: 1. When creating backorders, the `freight_costs` are…
Commit 28b840b introduced logic to include `freight_costs` in the customs document generated bySendcloud. It introduced 2 new issues as a result: 1. When creating backorders, the `freight_costs` are not divided but instead propagated to all of the pickings. 2. When there is no SO, we were taking the total value of all delivered goods, which doesn't make much sense considering the `freight_costs` field should be the cost of the delivery itself. Solution ----- For the first problem, there are a couple things to keep in mind: - the total `freight_costs` declared to the customs entity should be the amount invoiced to the customer - products can be added and removed from the picking after the SO has been confirmed - actual delivery cost can change between invoice date and actual delivery date - picking can be split into multiple packages at the user's discretion Considering all of the above, we will simply forward the invoiced amount with the first confirmed picking and none of the backorders. ----- Ticket: opw-6013387 Forward-Port-Of: odoo/enterprise#117115 Forward-Port-Of: odoo/enterprise#111304
This update resolves an issue where unsent Italian fiscal receipts were incorrectly transmitted as refunds to the printer. The fix ensures that actual orders are printed with the correct fiscal receipt data, preventing reporting errors and ensuring compliance. This improves the accuracy of sales records for Italian POS operations.
Original PR description
Steps to reproduce: - Set up an Italian fiscal printer; - In the POS, process an order and simulate an unsent receipt (e.g., by disconnecting the device from the network); - Navigate to the "Orders" screen and select the unsent order; - Click "Print receipt" Issue: The order isn't properly loaded. Because there is no order line, it is considered as a refund and is transmitted to the fiscal printer with a "RETURN " header instead of the actual fiscal receipt. [opw-5270697](https://www.odoo.com/odoo/project.task/5270697) Forward-Port-Of: odoo/enterprise#117043
This update resolves a performance issue in the ES VAT Books report where excessive journal items caused browser crashes. By implementing a 'load more' limit of 4000, the report now handles larger datasets more efficiently, improving user experience and stability.
Original PR description
The ES VAT Books report currently does not limit the number of lines loaded in the browser. This becomes more and more problematic as the volume of journal items listed in the report increases, ultimately leading to the browser being unable to render that many elements without crashing. Inspired by how this situation is handled in other reports and localizations, we now make use of the `load_more_limit` parameter and set a new default value of 4000 for it. Ticket: opw-5962456
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
9 changes
Resolved issues and error corrections
This update ensures Odoo correctly sets the `toStateCode` field for SEZ e-waybill transactions, aligning with API requirements. Previously, this was missing, causing errors and preventing successful e-waybill submissions. This fix improves compliance and avoids potential disruptions to shipping processes.
Original PR description
For SEZ transactions, the e-waybill API requires `toStateCode` to be set to 99. Previously, this value was not enforced, leading to API errors. This fix updates the logic to derive `toStateCode` based on the partner's GST treatment. When the transaction is identified as SEZ, `toStateCode` is correctly set to 99, ensuring compliance with e-waybill requirements and preventing API failures. task-6117694 Forward-Port-Of: odoo/odoo#259849
This update fixes an error in the Luxembourg Annual VAT Declaration report that resulted in incorrect calculations for Appendix E 1a. The fix ensures that VAT tax data is accurately included in the report formula, resolving a discrepancy in the reported totals. This improves the reliability of the financial reporting for Luxembourg businesses.
Original PR description
### Issue: The formula `L10N_LU_TAX_163` in the Luxembourg Annual VAT Declaration was incorrect: - `L10N_LU_TAX_791.year_start` was added twice - `L10N_LU_TAX_993.year_start` was missing As a result, the computed total in Appendix E 1a was incorrect ### Steps to reproduce: - Install `l10n_lu_reports` - Open the `Report: Annual VAT Declaration (LU)` - Go to `Appendix E` - Use the `Start of Financial year` pencil icons to manually set values for fields `791` and `993` - Check the computed value of field `163` After the fix, both values are included exactly once in the formula opw-6158950 Forward-Port-Of: odoo/enterprise#117214
This update resolves a bug where the Gantt view incorrectly displayed working hours on public holiday dates for flexible employees. The fix converts all time zone calculations to UTC, ensuring accurate holiday scheduling and preventing employees from being marked as available during holiday periods. This improves the accuracy of employee availability tracking.
Original PR description
[FIX] hr_attendance_gantt: fix gantt view with public holidays Bug reproduction: 1 - Select flex schedule employee (or change its schedule to 40h flex one) and make its contract before 01/01/2026 2 -…
[FIX] hr_attendance_gantt: fix gantt view with public holidays
Bug reproduction:
1 - Select flex schedule employee (or change its schedule to 40h flex one) and make its contract before 01/01/2026
2 - Create a new public holiday on 01/01/2026 (from 00.00 to 23.59 or 23.55 (depends on version, it does not matter))
3 - in attendance app the cell from 00.00 to 01.00 seems white for that day and for selected employee (this cell seems like not holiday and employee can work)
Bug cause:
1 - After a long traceback, _gantt_unavailability in hr_attendance_gantt/HrAttendance, if an employee is flexible then unavailable_intervals is calculated with the Brussel time zone
2 - All other unavailable intervals are converted to the UTC in the function of _gantt_unavailability except in the final lines of the function.
3 - When the employee is flexible and since the conversion is not done in the final lines, it remains 1 hour more (UTC+1), it is from 1 am to 1 am of next day instead of 0 am to 23.59.
Bug solution:
1 - I converted the timezone to UTC to solve the problem.
task - 6067070This update resolves a crash during KSeF (Polish e-tax) certificate authentication for foreign certificates. The fix intelligently determines the certificate type, handling variations in the certificate data to ensure successful authentication and avoid errors. This improves the reliability of the Odoo system when processing KSeF transactions.
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
This update corrects an issue where fully-discounted UBL invoices were being incorrectly excluded from import. Previously, lines with zero amounts were filtered out, even when representing supplier discounts or tax adjustments. This fix ensures that all invoice lines, including those with zero amounts due to discounts, are imported for accurate reconciliation and reporting.
Original PR description
`_import_ubl_invoice_add_base_lines` filters out every imported line whose `total_included_currency` is zero, on the assumption that a zero-amount line carries no useful information. This is correct for truly empty rows, but wrong for 100%-discounted lines, an ecotax or excise row, or a returnable-packaging entry nets to zero precisely because the supplier discounted it entirely, and the line still carries data the customer needs to reconcile the bill against the original document opw-6176349 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update optimizes the Point of Sale partner search to be faster and more responsive, especially when many partners are loaded. By limiting the displayed results and increasing the search input delay, the system now handles large searches more efficiently, providing a smoother user experience. This change focuses on performance and usability.
Original PR description
Before this commit, when high number of partners were loaded in the POS, searching for a partner was slow. The main issue was that all of the filtered partners based on the search query were being rendered, while in reality, if a query returns lots of results, the search query is not refined enough and the user is likely to type more characters to narrow down the search. So in this commit, we limit the number of rendered partners to 200, which is a reasonable number of results to display and does not cause performance issues. Moreover, the debounce time of the search input has been increased from 100ms to 500ms to further reduce the number of times the search function is called while the user is typing. opw-6215958 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update corrects a bug that prevented the Employees app from functioning correctly when employees have fully flexible contracts. The fix ensures that the system correctly handles contracts without a linked calendar, preventing UI errors and maintaining proper leave status calculations. This improves the usability of the HR module for all employees.
Original PR description
Steps to reproduce 1. Install hr_holidays and hr_contract. 2. Take a demo employee currently on a validated time off covering now. 3. Set the employee's running contract Working Schedule to empty…
Steps to reproduce 1. Install hr_holidays and hr_contract. 2. Take a demo employee currently on a validated time off covering now. 3. Set the employee's running contract Working Schedule to empty (fully flexible). 4. Run the "HR Contract: update state" cron (or otherwise leave the contract in state open / close, or draft + kanban Ready). 5. Open the Employees app or any view rendering that employee's chatter / follower panel. Issue A traceback "Expected singleton: resource.calendar()" is raised. If the employee's chatter is open, the failing compute is re-fired on every store refresh and the UI becomes unusable. For fully flexible contracts, hr.contract has no resource_calendar_id, so _get_calendar_periods appends period tuples with an empty calendar recordset (https://github.com/odoo/odoo/blob/c6d9fa5873eb759846e9be5b66eedb8b00c5ac11/addons/hr_contract/models/hr_employee.py#L184). _get_first_working_interval then forwarded that empty recordset to _work_intervals_batch, which calls ensure_one() and crashes. This regressed when _compute_leave_status was switched from a single calendar lookup to per-period iteration in https://github.com/odoo/odoo/commit/bf73b63eec56a822edec2d9ecfeb231a0fbfbbe8 which did not consider that a period in the chain can come from a contract with no calendar. Solution Fall back to the company's calendar when the period's calendar is empty, matching the guard already present from saas-18.4 onwards in https://github.com/odoo/odoo/commit/21f18b1a6fdbf1a01c3dda83acfa66addd01a759. opw-6168264
This update optimizes how Odoo searches for records with binary attachments. Previously, a slow search process generated a large list of attachment IDs, causing performance bottlenecks. By switching to a more efficient ‘NOT EXISTS’ query, Odoo now finds records much faster, especially in systems with many attachments.
Original PR description
Description of the issue/feature this PR addresses:
Searching for records without a binary attachment (e.g., `('binary_field', '=', False)`) previously generated a query using `NOT IN (SELECT res_id FROM ir_attachment...)`. On databases with a large `ir_attachment` table, materializing this entire list of IDs causes a significant performance bottleneck.
Replacing NOT IN with a NOT EXISTS allows PostgreSQL to short-circuit the evaluation as soon as it find a matching document, drastically reducing query execution time.
Backport of https://github.com/odoo/odoo/pull/252525
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-prThis 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
2 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
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