Daily updates from Odoo
Tuesday, February 3, 2026
62 changes
19 changes
Resolved issues and error corrections
This update ensures that dates sent to ECPay (a payment gateway) are correctly formatted in Taiwan's time zone. Previously, dates were stored in UTC, leading to errors when ECPay searched for invoices. This fix prevents invoice retrieval failures and ensures accurate processing.
Original PR description
sending to ECPay The date store in Odoo is in utc format, we need to convert it to tw time when sending the date to ECPay. The APIs are using the date to search for the invoices, if the date is not correct, it cannot find the invoices and return error. task-5884616 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#246504 Forward-Port-Of: odoo/odoo#246039
This update ensures Odoo correctly processes refund notifications from QFPay. QFPay recently changed the notification type for refunds, and this fix adjusts Odoo's system to recognize and handle these 'refund' notifications accurately. This ensures that refunds are processed correctly and reported accurately within Odoo.
Original PR description
QFPay changed the notify_type for refund notifications from "cancel" to "refund". https://sdk.qfapi.com/docs/common-api/async-notifications/ --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#245834
This update resolves a crash that occurred when users selected taxes within Journal Entry items in the mobile view. The fix replaces a problematic widget with a standard one, ensuring tax changes are saved correctly and preventing the web client from freezing. This improves stability for mobile users.
Original PR description
**Steps to reproduce:** * Install the **Accounting** module. * Open a **Journal Entry** in mobile view. * Add a **Journal Item**, opening it in a form dialog. * Select a tax in the **Taxes Applied**…
**Steps to reproduce:** * Install the **Accounting** module. * Open a **Journal Entry** in mobile view. * Add a **Journal Item**, opening it in a form dialog. * Select a tax in the **Taxes Applied** field. * Click on the **Save and close** button. **Observed behavior:** * The web client crashes with `TypeError: Cannot read properties of undefined (reading 'resId')`. **Cause:** * The `autosave_many2many_tags` widget triggers `model.root.save()` immediately when a tag is selected. * When executing this save from within a transient dialog (common in mobile views), the client fails to correctly handle the record reload/synchronization leading to a crash when accessing `resId`. **Fix:** * Replace the autosave widget with the standard `many2many_tags` widget for **Journal Items** for form. * Tax changes are now kept locally in the dialog and saved only when the user explicitly saves and closes it. **Note:** * The crash happens when `autosave_many2many_tags` calls `model.root.save()` on a **new** `account.move` from within a dialog. * In QUnit tests, the mock server (`mockWebSave`) [1](https://github.com/odoo/odoo/blob/ca4d74c2a5d749ff8d41cd2fff80a73ba550a843/addons/web/static/tests/helpers/mock_server.js#L627). which creates records [2.](https://github.com/odoo/odoo/blob/ca4d74c2a5d749ff8d41cd2fff80a73ba550a843/addons/web/static/tests/helpers/mock_server.js#L1936) in-memory and does not trigger form reloads or component destruction. * As a result, the crash cannot be reproduced in tests. opw-5497342 Forward-Port-Of: odoo/odoo#246699 Forward-Port-Of: odoo/odoo#246084
This update fixes an issue where the total quantity and value were incorrectly calculated in the Avco report when the report was displayed in multiple pages. The fix prevents errors when processing records not visible on the current page, ensuring accurate reporting of inventory values. This improves the reliability of the Avco audit report.
Original PR description
**Problem:** when there is multiple pages for the avco reports the total value and quantity are not correctly computed **Steps to reproduce:** - create an avco storable product with a cost of 10 -…
**Problem:** when there is multiple pages for the avco reports the total value and quantity are not correctly computed **Steps to reproduce:** - create an avco storable product with a cost of 10 - create and validate 3 in moves for a quantiy of 1 each - navigate to Inventory/ Stock and search your product - click on the unit cost - (see how the total quantity is 3 and total value is 30) - change the view to display only the first 2 records (write 1-2/4 on the top write) **Current behavior:** the total quantity is now 2 and total value 20 **Expected behavior:** it should still be 3 and 30 **Cause of the issue:** inside _compute_cumulative_fields, we start with a total_value and total_quantity of 0, then those variables are increased or decreased by each record in records https://github.com/odoo/odoo/blob/89cc95266fa0d9a0fd4caae9abe1effbfea1a41a/addons/stock_account/report/stock_avco_audit_report.py#L94-L104 but records is computed based on self which contains the lines displayed on the view https://github.com/odoo/odoo/blob/89cc95266fa0d9a0fd4caae9abe1effbfea1a41a/addons/stock_account/report/stock_avco_audit_report.py#L91 **fix** I need to add an if statement to avoid writing on the records not displayed on the view because this causes an access_error opw-5421925 Forward-Port-Of: odoo/odoo#244070
This update resolves an issue where auto-batching wasn't triggered for deliveries with partially assigned moves. The fix ensures that a batch transfer is created automatically when a delivery is ready, regardless of the initial stock levels, improving inventory management efficiency. This change corrects a bug impacting delivery processing.
Original PR description
### Steps to reproduce: - In the settings enable: Batch, Wave & Cluster transfers - Inventory > Configuration > > Warehouse Management > Operation types - Enable Auto-batches, Batch grouping by…
### Steps to reproduce: - In the settings enable: Batch, Wave & Cluster transfers - Inventory > Configuration > > Warehouse Management > Operation types - Enable Auto-batches, Batch grouping by partner on Delivery orders - Create and confirm a delivery for 2 units of a storable product that you do not have in stock. - Change the quantity of the move to 1 unit #### > The delivery is not auto-batched ### Expected behavior: As the delivery becomes ready a batch transfer containing your delivery should be created. This is by the way what happens if you had at least 1 unit in stock when you confirm the deliver. ### Cause of the issue: The auto-batching is suppose to be applied on assigned pickings via the `_find_auto_batch` method: https://github.com/odoo/odoo/blob/604d07ab324caa5f3aa6f3baa9902c2137ea24db/addons/stock_picking_batch/models/stock_picking.py#L194-L198 That being said a picking is only batchable if it is Ready hence his state is 'assigned'. Now, the issue is that the `_find_auto_batch` is only callable in two places in our workflow: First at confirmation: https://github.com/odoo/odoo/blob/604d07ab324caa5f3aa6f3baa9902c2137ea24db/addons/stock_picking_batch/models/stock_picking.py#L138-L142 Which will fail in our case but wokrs in the use case where you have at least one unit in stock since the delivery is respectively not "assigned" or "assigned" at this point. And, else, wehn the sate of a move of the delivery is assigned: https://github.com/odoo/odoo/blob/604d07ab324caa5f3aa6f3baa9902c2137ea24db/addons/stock_picking_batch/models/stock_move.py#L30-L38 Now, the only issue with this call is that the picking becomes assigned if a move is partially assigned: https://github.com/odoo/odoo/blob/604d07ab324caa5f3aa6f3baa9902c2137ea24db/addons/stock/models/stock_picking.py#L841-L845 But since the move is not "assigned" but only "partially_vailable" this will not trigger a call of the `_find_auto_batch`. opw-5441718 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#246164 Forward-Port-Of: odoo/odoo#245542
This update resolves a technical issue causing live chat tabs to occasionally freeze or consume excessive CPU resources. The fix prevents conflicting updates to local storage, ensuring a smoother and more reliable chat experience for users. It addresses a race condition related to how live chat data was being synchronized across tabs.
Original PR description
A bad pattern has been used for some time in discuss for fields stored in localStorage. The field updates via the `onUpdate` function in the current tab and writes to localStorage. Other tabs use the `storage` event to update their field. This pattern can cause race conditions, leading to loops, high CPU usage, and freezes. When a tab receives a storage event, it may write back an outdated value, triggering further writes and conflicts across tabs. Storage events should be treated as read-only. Only user actions should update the local storage. This commit fixes the problematic fields. Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#246588 Forward-Port-Of: odoo/odoo#245717
This update refines how the HTML editor handles selections, particularly within nested editing contexts. The change resolves issues where nested edits could corrupt cursor states, ensuring consistent and reliable selection management across the editor. This improves the overall stability and usability of the HTML editor.
Original PR description
Summary: Refactor `preserveSelection()` to use a stack-based approach (`preservedCursors` array) instead of a single cursor reference. This allows nested calls to `preserveSelection()` to operate…
Summary:
Refactor `preserveSelection()` to use a stack-based approach (`preservedCursors` array) instead of a single cursor reference. This allows nested calls to `preserveSelection()` to operate independently while keeping cursor updates synchronized across active contexts.
Problem:
Using a single stored cursor caused issues in nested calls to `preserveSelection()`:
1. **State overwrite:** Inner calls could overwrite or clear the outer cursor.
2. **Stale references:** If an inner function replaced a DOM node, the outer cursor could still point to a removed node and fail on restore.
Solution:
Use an array of cursor subscribers
- **Shared updates:** When calling `remapNode` on a cursor, it iterates over all active subscribers in the stack. This ensures node replacements performed in inner contexts also update outer cursor references.
- **Scoped cleanup:** `restore()` now removes only the corresponding cursor instance from the stack, ensuring proper lifecycle management.
Example:
The key improvement is that outer scopes receive updates performed by inner scopes.
```javascript
// Function A (outer)
function wrapperFunction() {
const cursor = this.preserveSelection();
replaceTextWithSpan();
cursor.restore();
}
// Function B (inner)
function replaceTextWithSpan() {
const innerCursor = this.preserveSelection();
const oldNode = document.querySelector('text');
const newNode = document.createElement('span');
oldNode.replaceWith(newNode);
innerCursor.remapNode(oldNode, newNode);
innerCursor.restore();
}
```
opw-5386862
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#244758
Forward-Port-Of: odoo/odoo#238989This update fixes an issue where new CRM contacts created using the quick create feature weren't automatically linked to the company's address. The fix ensures that when a company is selected, the new contact's address is correctly populated, improving data accuracy and streamlining CRM workflows. This enhancement impacts the Sales and CRM applications.
Original PR description
**Steps to reproduce:** - Install Sales/CRM apps - Go to CRM app - Create new opportunity card - Set a company (`commercial_partner_id`) - Create a new contact using `quick_create` - The new contact is linked to the company but it doesn't inherit the company address **Issue:** Kanban quick create of crm app was modified to allow a company field, which is used as `default_parent_id` when creating a new partner from the card. This properly set the partner `parent_id` and `commercial_partner_id` but without applying the logic of `_fields_sync()` which also added the address (only for quick_create). **Fix:** Check if a default value was given for `parent_id` in `_fields_sync()`. related: https://github.com/odoo/odoo/commit/a6c3ebc21c066ab4d5711f535ca5fc858e6485b0 opw-4932114 Forward-Port-Of: odoo/odoo#229234
This update fixes an issue where multiple product filters were not consistently saved during pagination, leading to incorrect product listings. The change ensures that all selected filters are correctly passed to the URL, maintaining accurate filtering across different pages. This improves the user experience and ensures products are displayed as intended.
Original PR description
Current behavior: When a user selects multiple filters (attributes) that result in multiple pages of products, navigating to the second page causes some filters to be lost. Specifically, only the…
Current behavior:
When a user selects multiple filters (attributes) that result in multiple pages of products, navigating to the second page causes some filters to be lost. Specifically, only the last selected attribute value is kept in the URL of the pager.
This happens because the `/shop` controller processes query parameters using a standard Python dictionary (**post). Since a dictionary cannot hold duplicate keys, an URL like `?attrib=1&attrib=2` is reduced to `{'attrib': '2'}`, losing all previous values.
Steps to reproduce:
1. Install `website_sale`.
2. Reduce "Products per Page" (e.g., to 4) to easily trigger pagination.
3. Go to the /shop page.
4. Select a first attribute (e.g., Color: White).
5. Select a second attribute (e.g., Size: M).
6. Ensure the result spans at least two pages.
7. Click on page "2".
8. Observation: The second attribute filter is lost, and the product list changes incorrectly.
Fix:
Ensure that `attribute_values` are stored as a list within the `url_args` passed to the pager. Since Odoo's `website.pager` uses `url_encode` internally, passing a list of values for a single key correctly generates repeated parameters in the resulting URL (e.g., `attrib=1&attrib=2`).
opw-4152637
Forward-Port-Of: odoo/odoo#245784
Forward-Port-Of: odoo/odoo#244941This update makes it easier to manage channel members by displaying the '...' action (for options) directly on member items within the 'Members' panel. This enhancement, similar to the 'Discuss' sidebar, ensures actions are readily discoverable, especially on mobile devices. Additionally, the ability to remove guests from the member list has been added, addressing a previous limitation.
Original PR description
Before this commit, the channel member actions were hard to find: - Click on Members panel. - Click on Member to open popover card. - Click on "..." in top-right corner of card. This is hard because…
Before this commit, the channel member actions were hard to find: - Click on Members panel. - Click on Member to open popover card. - Click on "..." in top-right corner of card. This is hard because only this avatar card from this menu has the "..." button, and the actions are hidden in this menu. This is easy to miss since avatar cards in message list or other places don't have this "...", and since the actions are hidden there many people could easily miss these actions. This commit improves the visibility of action by their showing as a "..." on the member item on hover in the "Members" panel. This works like the "..." button in the discuss left sidebar, where the button is shown on mouse-hover. Mobile view (small or mobile device) shows the button all the time next to member, making the discoverability of the action very clear. Task-5871730 Before / After <img width="589" height="385" alt="Screenshot 2026-01-23 at 14 45 17" src="https://github.com/user-attachments/assets/bca66975-13cd-423a-a43d-9eb2be03741a" /> <img width="249" height="270" alt="Screenshot 2026-01-26 at 11 56 09" src="https://github.com/user-attachments/assets/edfe34c9-6b4c-4394-b532-7f79f9653b4a" /> ---- This PR also makes channel member actions available in guest items, so we can now "Remove Member" on guests too. <img width="252" height="296" alt="Screenshot 2026-01-27 at 18 25 54" src="https://github.com/user-attachments/assets/ee4b1271-0529-4e96-bda1-e621d7592555" />
This update fixes a bug related to how Odoo handles responses from the Zatca system when obtaining CCSID or PCSID information. Previously, missing error messages caused confusing tracebacks for users. Now, the system checks CSR field lengths and displays a helpful message to the user, ensuring smoother Zatca onboarding.
Original PR description
Previously, it was assumed that if no 'error' or 'errors' key was present that means we've received a valid response for obtaining CCSID or PCSID. But sometimes the error is not sent with those keys, and the binarySecurityToken is missing, therefore a traceback is shown to the user because the invalid requests passes through the validation unnoticed. This kind of response is the result of a new change introduced by zatca requiring csr fields to be at most 64 characters long. This commit improves the error handling mechanism of CSID responses, to show the user an informative message, and handles the length check for csr fields on the client side before sending to zatca. task-5347269 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#246714 Forward-Port-Of: odoo/odoo#244507
This update resolves an issue where canceling multiple Point of Sale orders would cause a system crash. The fix ensures correct argument formatting for order cancellation, allowing users to reliably cancel multiple orders at once. This improves the stability and usability of the Point of Sale module.
Original PR description
In 3f95dd4, we can call `action_pos_order_cancel` with either one or more orders; In the case of calling it with multiple orders, we were passing as argument an array of order ids as params for the python method, but since the method only expects a single argumetn, `self`, it will crash if we passed an array. The fix is to pass `[[1, 2, 3]]` instead of `[1, 2, 3]` for multiple orders. This still works for a single order too as both `[1]` and `[[1]]` works. Forward-Port-Of: odoo/odoo#246803
This update resolves a bug where the timer stopped appearing for survey participants after submitting their answers in live sessions. The fix ensures the timer correctly displays for the intended duration, regardless of whether the participant is in a live session, improving the survey experience. This change was made to ensure consistent functionality across all survey types.
Original PR description
Description of the issue/feature this PR addresses: Fixes timer not showing to participants of a live session after submitting an answer. Current behavior before PR: Steps to reproduce: Create a…
Description of the issue/feature this PR addresses: Fixes timer not showing to participants of a live session after submitting an answer. Current behavior before PR: Steps to reproduce: Create a Survey with two questions of any type. Set some Question Time Limit on both. Create Live Session for that Survey. Access Live Session as a participant. Start Survey as the host. The first question appears to the participant, with the timer on the top right. Answer the question as the participant and click Submit or press Enter. On the host side move to the next question. Bug: timer for the second question does not appear to the participant. Desired behavior after PR is merged: Fix: The logic to hide the timer is on `survey_form.js`. In the `_nextScreen` function. Specifically, when `options.isFinish` is set to `true`. It is set to `true` in the `_onSubmit` function. This function triggers when the participant submits an answer. The fix: only set that flag to `true` if there isn't a session in progress. This aligns with the other calls to `_nextScreen` for live sessions. That is, when a timer expires and the form is submitted: `'isFinish': !this.options.sessionInProgress` and when a notification is received for the session: `isFinish: nextPageEvent.type === 'end_session'` Meaning that for live sessions the only time `isFinish` should be set to `true`, is when the `end_session` notification is received. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#246789 Forward-Port-Of: odoo/odoo#241086
This update resolves an issue preventing website designers with 'Editor and Designer' access from optimizing the SEO settings for product categories. The fix grants necessary write permissions to category records, allowing designers to implement SEO best practices directly within the website. This improves the functionality for our website design team.
Original PR description
### Issue: Due to this issue, website designer cannot optimize seo on category. #### Steps to reproduce: 1- Create a `eCommerce Category`. 2- In demo user, set Sale access to `All Documents` and Website access to `Editor and Designer`. 3- Login with demo user and navigate to website. 4- In shop page, open category. 5- From site tab, click on `Optimize SEO`. You get access error. Expected: You should be able to optimize seo with `Editor and Designer` access. ### Cause: The user needs write access on record in order to optimize seo: https://github.com/odoo/odoo/blob/ec5da99ca3f52420e7d973c3cf07167bd4104ffa/addons/website/controllers/main.py#L831-L834 opw-5443854 Forward-Port-Of: odoo/odoo#246900 Forward-Port-Of: odoo/odoo#244724
This update resolves an issue where website previews with hover-triggered animations experienced a noticeable delay. The fix eliminates this delay and ensures previews revert instantly as the user types, preventing data loss. This improves the overall user experience and responsiveness of the website builder.
Original PR description
With commit aa3a2a694930d077aab5ff55e72655cc453a64ff, the delay of one animation frame in the preview of `templatePreviewableWebsiteConfig` is not necessary anymore. This was the only preview with a delay that can be triggered by hovering a button (the others needs to open a dropdown or input in text field). With commit be032732d1f5d1f7b28da3fa7bf19bffbef4a46d, previews are reverted as soon as the user starts typing, to avoid loosing the typed text when the preview is reverted. But this does not handle completely previews that are async: they may revert just after the first character is typed, and thus loose that character. This commit eliminates async preview that can be triggered while keeping focus in the editor. task-5493193 Forward-Port-Of: odoo/odoo#243727
This update resolves an issue where public users couldn't access their carts after a sale order's expiration date. The fix corrects a location within the code where the expiration status was incorrectly checked, preventing users from viewing or modifying their carts when the order was no longer valid. This ensures a smoother customer experience for sales transactions.
Original PR description
### Issue: Due to this issue public and portal users cannot access their carts once the so is expired. #### Steps to reproduce: 1- Using a public user, add a product to cart. 2- Using the admin user, go to the sale order created for the cart. 3- Change the date to an earlier date. 4- Back to public user, try to access the cart. You will see the error message: `The sale order has expired.` ### Cause: This regression is due to #245772. `_get_payment_values` is not the right place to check if the so is expired, as it is also used inside `_get_express_shop_payment_values`. opw-5903033 Forward-Port-Of: odoo/odoo#246962
This update resolves an issue where customers using self-service invoicing with Peppol received duplicate invoices repeatedly. The root cause was a technical glitch in how Odoo handles invoice creation with EDI API calls, leading to rollback and subsequent redundant sending. This fix ensures invoices are sent only once, improving efficiency and accuracy for Peppol customers.
Original PR description
Steps to reproduce: - Set up a test company with Peppol enabled - Create a Peppol customer and ensure they can receive invoices - In the POS settings, enable the “Self-service invoicing” option - Create a POS order linked to the Peppol customer - Log in as this customer - Enter the POS order information to access the invoice download view (from /pos/ticket) - Repeatedly click the “Request invoice” button - On the Peppol side, you will notice that the same invoice is sent as many times as the button is clicked Why ? This error is not really Peppol related, it can actually happen with all EDI making API call: the transaction is rolled-back when Odoo tries to create multiple invoices with a serialization error but the API call happened so, in this cas, the invoice is sent over Peppol. opw-5469467 Forward-Port-Of: odoo/odoo#246731
This update ensures that documents are correctly accessed when users click links to them, regardless of the initial view (like a systray notification or a discussion thread). Previously, the system wasn't consistently opening the document's form view, leading to a frustrating user experience. This fix resolves these inconsistencies and provides a smoother access flow.
Original PR description
Users do not want to access the form view of the document by default. This PR solves three cases for accessing documents.document records that were not covered before: * From the basic path pattern `odoo/x/documents.document/<id>` * From a systray notification "Open Form View" * when we are not yet in Documents * when we already are in Documents * From the Discuss app, on the record's thread Tests for most of these are included. Additionally, make sure the document is selected on accessing from `_get_access_action`. Task-5386466 Forward-Port-Of: odoo/enterprise#106009 Forward-Port-Of: odoo/enterprise#104622
This update corrects a bug where canceled refunds were incorrectly included in global invoices generated from Point of Sale (PoS) orders. The fix filters out canceled refund lines during invoice generation, ensuring accurate reporting. This improves invoice accuracy and data integrity for Mexican VAT reporting.
Original PR description
When generating global invoices for orders in the PoS, refund of those orders are also included in the global invoice. However, if the refund has been canceled, it should not be included in the global invoice. Steps to reproduce: ------------------- * Create a PoS order and validate it. * Go to the backend and create a refund for that order. * Cancel the refund. * Go to the PoS order list and select the original order * Click on "Generate Global Invoice" > Observation: The canceled refund is included in the global invoice. Why the fix: ------------ We simply filter out the canceled orders when searching for refunded order lines. opw-5492576 Forward-Port-Of: odoo/enterprise#105959 Forward-Port-Of: odoo/enterprise#105868
2 changes
Resolved issues and error corrections
This update corrects a bug where canceled refunds were incorrectly included in global invoices generated from Point of Sale (PoS) orders. The fix filters out canceled refund lines during invoice generation, ensuring accurate invoice totals. This improves the reliability of financial reporting for Mexican businesses using the PoS system.
Original PR description
When generating global invoices for orders in the PoS, refund of those orders are also included in the global invoice. However, if the refund has been canceled, it should not be included in the global invoice. Steps to reproduce: ------------------- * Create a PoS order and validate it. * Go to the backend and create a refund for that order. * Cancel the refund. * Go to the PoS order list and select the original order * Click on "Generate Global Invoice" > Observation: The canceled refund is included in the global invoice. Why the fix: ------------ We simply filter out the canceled orders when searching for refunded order lines. opw-5492576 Forward-Port-Of: odoo/enterprise#105959 Forward-Port-Of: odoo/enterprise#105868
This update fixes an error in how secondary contract payrolls are calculated for Kenyan companies. The issue stemmed from an undefined variable, which has now been corrected to use the total taxable gross amount. This ensures accurate payroll processing for employees on secondary contracts.
Original PR description
Steps to reproduce: With a Kenyan company, create an employee. Check the "Secondary Contract" on the employee form view. Create a payslip and compute. There is an error in the payslip computation. Cause: There is an undefined variable "remaining_gross". Fix: Replace it by the total taxable gross. Task: 5462310 Forward-Port-Of: odoo/enterprise#103229
9 changes
Resolved issues and error corrections
This update ensures Odoo correctly generates ZATCA XML files for non-Saudi partners by making the 'additional buyer ID' visible when operating in Saudi Arabia. It prioritizes VAT as the buyer ID if available, and uses the 'additional identification number' as a backup, ensuring compliance with Saudi regulations.
Original PR description
This commit makes l10n_sa_additional_identification_number visible for non-Saudi individuals and company partners when the active company is in Saudi Arabia and keeps the identification scheme fixed to OTH, keeping it invisible. When generating ZATCA XML for non-Saudi partners, VAT is used as the primary buyer ID if present, and fall back to the additional identification number when VAT is missing. task-4525956 Forward-Port-Of: odoo/odoo#245832
This update corrects a problem where the carrier type selection was incorrectly disabled after validating a mobile barcode. The fix ensures the carrier number input remains editable when the carrier type is changed, allowing users to accurately select and input their carrier information during the order process. This prevents data loss and improves the checkout experience.
Original PR description
carrier type After the user clicks on "Validate" button to validate the mobile barcode, the carrier type selection is disabled and the carrier type pass to the SO is None. This commit fixes the issue by instead of disabling the carrier type selection, we just set the input box of carrier number to readonly and set back the carrier number to not readonly when the user changes the carrier type to ensure the carrier number input is editable. task-5880421 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#246438 Forward-Port-Of: odoo/odoo#246053
This change reverts a recent update that prevented public holidays from being correctly applied to work schedules without a company assigned. This resulted in public holidays not appearing in the Time Off dashboard and incorrectly including them in requested time off durations. The fix will be implemented directly in the 'project' module to avoid impacting other Odoo modules.
Original PR description
Revert of https://github.com/odoo/odoo/commit/a95af8b78a94a795e05a0adf299837adc0ef2117 and https://github.com/odoo/odoo/commit/f4f9ecb3e4801b3d382abc24c478fe5e533c9bf8 **Steps to reproduce** 1.…
Revert of https://github.com/odoo/odoo/commit/a95af8b78a94a795e05a0adf299837adc0ef2117 and
https://github.com/odoo/odoo/commit/f4f9ecb3e4801b3d382abc24c478fe5e533c9bf8
**Steps to reproduce**
1. Remove the company of the Working Schedule (needs to be done in
a multi-company environment from the UI) used by an employee.
2. Using the company of this employee, create a Public Holiday
(for the employee's schedule or all schedules).
Issues:
- the public holiday doesn't appear in the Time Off dashboard
- when taking a time off on that day, the public holiday is
included in the duration
**Cause**
After the fix in https://github.com/odoo/odoo/commit/a95af8b78a94a795e05a0adf299837adc0ef2117 , it will lead
to a search domain for public holidays of `('company_id', 'in', [False])`
when the working schedule has no company, ignoring any public
holidays with a company set. This is especially problematic since the
company of the public holiday is always forced.
https://github.com/odoo/odoo/blob/7bce5f3f95429a4d4ba034a66c350ee2a5868567/addons/resource/models/resource_calendar_leaves.py#L49-L51
**Solution**
Since the intent of the original fix https://github.com/odoo/odoo/commit/f4f9ecb3e4801b3d382abc24c478fe5e533c9bf8
was to correct an issue related to the computation of some `project.task`
fields calling a resource method (`get_work_duration_data`), we can revert
the fix and later fix the original issue directly in `project`, without
impacting `hr`/`resource` modules.
opw-5496999
opw-5401425
Forward-Port-Of: odoo/odoo#244052This update fixes an issue where purchase orders generated through the MTO route were incorrectly using expired vendor information. Now, the system prioritizes vendors with active contracts, ensuring purchase orders are based on current supplier availability. This prevents the creation of purchase orders with outdated supplier details, improving order accuracy and supply chain efficiency.
Original PR description
_______________________________________ ## Short functional explanation of the error Let's say we have a products that has 2 suppliers. In the list of suppliers, the first one set has an expired…
_______________________________________ ## Short functional explanation of the error Let's say we have a products that has 2 suppliers. In the list of suppliers, the first one set has an expired date. If we generate a PO from an SO with the MTO route, the assigned supplier for this product will be the first one set in the list, therefore having an expired date. ## Reproduction Steps 1. Go to Inventory > Configuration > settings. Check the option Multi-Step routes. 2. Click on Configuration > routes and unarchive the Replenish On Order (MTO) route. 3. Create or use an already existing product. Go to the Inventory tab, and under Operations, check the routes Replenish on Order (MTO) and Buy. 4. Click on the Purchase tab. There, set a first vendor for which the end date is earlier than today. For the second one, set an end date for which the date is later than today. 5. Go to Sales and create a new quotation. Set a customer and add a line with the product you just set. Click confirm. A smart button 'Purchase' should appear. Click on it. ### Expected behavior The assigned vendor of the PO should be the second vendor as it isn't expired yet. ### Unexpected behavior The assigned vendor is the first vendor, expired. ## Origin of the issue When generating a PO from an SO, the partner is the person ordering the product, not the vendor. Therefore, when this code is executed: https://github.com/odoo/odoo/blob/6b677319c47baacb5bee829b7e41448dec4136eb/addons/purchase_stock/models/stock_rule.py#L62-L66 no corresponding supplier is found, as ```self._get_partner_id(procurement.values, rule)``` returns the customer and not the vendor. This leads us to the fallback: https://github.com/odoo/odoo/blob/6b677319c47baacb5bee829b7e41448dec4136eb/addons/purchase_stock/models/stock_rule.py#L68-L72 which doesn't take into account the end date of vendors. __ opw-5030849 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#245313 Forward-Port-Of: odoo/odoo#225684
This update corrects a bug where canceled refunds were incorrectly included in global invoices generated from Point of Sale (PoS) orders. The fix filters out canceled refund lines during invoice generation, ensuring accurate reporting and invoicing for Mexican VAT (EDI) transactions. This improves data integrity and compliance.
Original PR description
When generating global invoices for orders in the PoS, refund of those orders are also included in the global invoice. However, if the refund has been canceled, it should not be included in the global invoice. Steps to reproduce: ------------------- * Create a PoS order and validate it. * Go to the backend and create a refund for that order. * Cancel the refund. * Go to the PoS order list and select the original order * Click on "Generate Global Invoice" > Observation: The canceled refund is included in the global invoice. Why the fix: ------------ We simply filter out the canceled orders when searching for refunded order lines. opw-5492576 Forward-Port-Of: odoo/enterprise#105959 Forward-Port-Of: odoo/enterprise#105868
This update resolves a bug where the timer stopped appearing for survey participants after submitting their answers in live sessions. The fix ensures the timer correctly displays for the intended time limit, improving the participant experience and data accuracy. This change was made to align the survey logic with live session behavior.
Original PR description
Description of the issue/feature this PR addresses: Fixes timer not showing to participants of a live session after submitting an answer. Current behavior before PR: Steps to reproduce: Create a…
Description of the issue/feature this PR addresses: Fixes timer not showing to participants of a live session after submitting an answer. Current behavior before PR: Steps to reproduce: Create a Survey with two questions of any type. Set some Question Time Limit on both. Create Live Session for that Survey. Access Live Session as a participant. Start Survey as the host. The first question appears to the participant, with the timer on the top right. Answer the question as the participant and click Submit or press Enter. On the host side move to the next question. Bug: timer for the second question does not appear to the participant. Desired behavior after PR is merged: Fix: The logic to hide the timer is on `survey_form.js`. In the `_nextScreen` function. Specifically, when `options.isFinish` is set to `true`. It is set to `true` in the `_onSubmit` function. This function triggers when the participant submits an answer. The fix: only set that flag to `true` if there isn't a session in progress. This aligns with the other calls to `_nextScreen` for live sessions. That is, when a timer expires and the form is submitted: `'isFinish': !this.options.sessionInProgress` and when a notification is received for the session: `isFinish: nextPageEvent.type === 'end_session'` Meaning that for live sessions the only time `isFinish` should be set to `true`, is when the `end_session` notification is received. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#246147 Forward-Port-Of: odoo/odoo#241086
This update resolves an issue where customers receiving invoices through Peppol were receiving multiple copies of the same invoice. The root cause was a technical glitch in how Odoo handles invoice creation with EDI API calls, leading to repeated sending. This fix ensures invoices are sent only once, improving efficiency and accuracy for Peppol customers.
Original PR description
Steps to reproduce: - Set up a test company with Peppol enabled - Create a Peppol customer and ensure they can receive invoices - In the POS settings, enable the “Self-service invoicing” option - Create a POS order linked to the Peppol customer - Log in as this customer - Enter the POS order information to access the invoice download view (from /pos/ticket) - Repeatedly click the “Request invoice” button - On the Peppol side, you will notice that the same invoice is sent as many times as the button is clicked Why ? This error is not really Peppol related, it can actually happen with all EDI making API call: the transaction is rolled-back when Odoo tries to create multiple invoices with a serialization error but the API call happened so, in this cas, the invoice is sent over Peppol. opw-5469467 Forward-Port-Of: odoo/odoo#246731
This update resolves an access error that occurred when cancelling subscriptions for internal users (like 'Mitchel Admin'). The fix uses 'sudo' to allow necessary changes to the partner record, ensuring the cancellation process functions correctly. This prevents disruptions to subscription management.
Original PR description
*: sale_subscription_partnership To reproduce: ============= 1/ be sure Marc Demo has only sales admin righ 2/ as admin create a subscription with customer = Mitchel Admin (or other internal user) and confirm it (only confirm, do not invoice) 3/ as demo, cancel the SO => Acccess error on res.user Problem: ======== When cancelling a subscription we want to write some fields on the partner related to the SO. If the partner is an internal user, and the current user has no access to write on res.users, we get an access error. Solution: ========= Use sudo when writing on the partner when cancelling a subscription. opw-5857627
This update resolves an error in the calculation of secondary contract payslips for Kenyan companies. The fix replaces a missing variable with the total taxable gross, ensuring accurate payroll processing for employees on secondary contracts. This improves the reliability of payroll reporting for our Kenyan customers.
Original PR description
Steps to reproduce: With a Kenyan company, create an employee. Check the "Secondary Contract" on the employee form view. Create a payslip and compute. There is an error in the payslip computation. Cause: There is an undefined variable "remaining_gross". Fix: Replace it by the total taxable gross. Task: 5462310 Forward-Port-Of: odoo/enterprise#103229
6 changes
Resolved issues and error corrections
This update resolves an issue where the FAIA report incorrectly classified partners as suppliers instead of customers, particularly when credit notes were involved. The change allows a partner to be both a customer and supplier, ensuring accurate reporting of balances and improving the reliability of the SAFT report.
Original PR description
1. Create a contact (with minimal details). 2. Create a customer invoice for that contact **last month** with `quantity = 300`. 3. Create a credit note for that invoice **this month**. 4. Create…
1. Create a contact (with minimal details). 2. Create a customer invoice for that contact **last month** with `quantity = 300`. 3. Create a credit note for that invoice **this month**. 4. Create another customer invoice for the same contact **this month** with `quantity = 100`. In the FAIA report (XML), within the General Ledger section, the partner is incorrectly classified as a supplier instead of a customer. In the method _saft_fill_report_partner_ledger_values from account_saft, he partner type is determined based on whether the balance is negative. However, a negative balance can result from a credit note, where the partner is still a customer and not a supplier. Furthermore, a partner can be both a supplier and a customer. This commit allows a partner to be both a customer and a supplier. If both receivable and payable are 0 we set the partner type to customer to keep the behavior from e9640caf29e967fe7d8c6fe303b5a8d7a866437e opw-5360924 Forward-Port-Of: odoo/enterprise#105405 Forward-Port-Of: odoo/enterprise#100749
A recent error message appearing during payment processing for Avatax-enabled Point of Sale (POS) orders has been resolved. This was caused by an outdated method that no longer existed. The fix removes this unused method, ensuring smooth and reliable payment processing for Avatax users.
Original PR description
Step to reproduce: - configure pos for Avatax from settings - open pos and settle a order - notice a error message on payment page Cause: - error is due to usage of `replaceDataByKey` which is removed in [1] [1] https://github.com/odoo/odoo/commit/3e94fe90ded58d498f0098cd9ed8679cbe500b8f Fix: - we removed the method as now we do not rely on it. opw-5089351 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/enterprise#102101
This update resolves an issue where subscriptions with zero-quantity lines resulted in invoices being incorrectly set to the subscription's start date. The fix ensures that invoice dates are accurately calculated, even when subscriptions include both positive and negative quantities, preventing delayed invoicing.
Original PR description
### Issue: When creating a subscription with several lines whose quantities add up to zero, the next invoice date is not updated and set to the start date. ### Steps to reproduce: - Install…
### Issue: When creating a subscription with several lines whose quantities add up to zero, the next invoice date is not updated and set to the start date. ### Steps to reproduce: - Install 'sale_subscription' - Create a new Subscription with two lines and a tart data several months in the past - One with a quantity of 1 and a higher price - The other with a quantity of -1 - It can be the same service product with invoicing based on ordered quantity - Confirm the Subscription - Click "Create Invoice" and confirm the invoice - Back to the Subscription, the next invoice date was not updated. ### Cause: In `_get_max_invoiced_date()` to compute the invoiced periods we check the quantity corresponding to this period. But if an invoice has two lines with opposite quantities, they will cancel each other out at this line: https://github.com/odoo/enterprise/blob/c2ac44f492ec53083864f07ff5bfbff9458ddf2a/sale_subscription/models/account_move_line.py#L131 So the method will return not return the date in `invoice_dates`. Later, if `_get_max_invoiced_date()` returns nothing for `last_invoice_end_date` then `next_invoice_date` is set to `start_date`: https://github.com/odoo/enterprise/blob/c2ac44f492ec53083864f07ff5bfbff9458ddf2a/sale_subscription/models/account_move.py#L66-L67 ### Solution: The goal was to not include invoices that were fully refunded for the `last_invoice_end_date`. This is why `_get_max_invoiced_date()` substract the quantities from refunds. To make this work we can take the absolute value of the quantity returned by the compute method before giving it the wanted sign based on if it's an invoice or a refund. opw-5360930 Forward-Port-Of: odoo/enterprise#103705
This update resolves rounding errors that were causing invoices to be rejected by the Mexican Electronic Domicile Identification (EDI) system. The fix involves changes to how discounts, taxes, and line items are calculated, particularly for combined invoices, ensuring accurate EDI compliance. Multiple related fixes were backported from version 18.3.
Original PR description
l10n_mx_edi* = l10n_mx_edi, l10n_mx_edi_pos, l10n_mx_edi_extended **STEP TO REPRODUCE** 1. Create a invoice with: - product price = 72.89 - discount = 10% - tax = 16% 2. Duplicate the invoice until…
l10n_mx_edi* = l10n_mx_edi, l10n_mx_edi_pos, l10n_mx_edi_extended
**STEP TO REPRODUCE**
1. Create a invoice with:
- product price = 72.89
- discount = 10%
- tax = 16%
2. Duplicate the invoice until you have 5 of them.
3. Create a global invoice with the 5 invoices, and send it.
4. The invoice will be refused by the EDI due to rounding issue.
This PR is a backport of multiples fixes done in 18.3 in which all rounding errors are fixed.
Each of them iterate upon the previous one, so they are all needed. The most important changes in thoses fixes are:
- for global invoices, deduce the discount on the base line instead of creating a 'descuento' (to avoid any problem with rounding when combining multiples invoices).
- changes in how the negative lines are dispatched.
- using raw values for 'conceptos' and 'impuestos' (5 digit precision) and changing how we compute things to solve rounding issue.
Tests files are modified accordingly, you can launch the tests with the external flag (need to be set in tests/common.py).
Backported PR (non-exhaustive):
https://github.com/odoo/enterprise/pull/92727
https://github.com/odoo/enterprise/pull/99395
https://github.com/odoo/enterprise/pull/90434
opw-5382423
Forward-Port-Of: odoo/enterprise#105615This update resolves an error in the calculation of secondary contract payslips for Kenyan companies. The fix replaces a missing variable with the total taxable gross, ensuring accurate payroll processing for employees on secondary contracts. This improves the reliability of payroll reporting for our Kenyan clients.
Original PR description
Steps to reproduce: With a Kenyan company, create an employee. Check the "Secondary Contract" on the employee form view. Create a payslip and compute. There is an error in the payslip computation. Cause: There is an undefined variable "remaining_gross". Fix: Replace it by the total taxable gross. Task: 5462310 Forward-Port-Of: odoo/enterprise#103229
This update fixes an issue where subscription invoices were being generated prematurely when a section or note was added to the subscription. The fix ensures that invoice dates align with the expected end-of-period billing, regardless of whether a section or note is present. This improves accuracy and consistency in subscription billing.
Original PR description
**Steps to reproduce** - Have a subscription service product with invoicing policy set to "Based on delivered quantity (manual)". - Create a new monhtly subscription with this product and add a section or a note. - Confirm the subscription. Actual: next invoice date is today. Expected: same as without section/note, next invoice date should be at end of the period. **Cause** `_is_postpaid_line` should only be called on actual product lines. Related: https://github.com/odoo/enterprise/commit/d8a7f7cc2d9d11e42ed24db1b0f7a3c08c7fac1c opw-5478394 Forward-Port-Of: odoo/enterprise#104892
7 changes
Resolved issues and error corrections
This update fixes a bug in our VoIP system that prevented users from initiating multiple calls simultaneously and displayed incorrect session status. The change ensures calls are tracked earlier, limiting active sessions to two, and provides clearer notifications to the user. It also simplifies terminology for better clarity.
Original PR description
Previously, SIP sessions were only considered active after the associated call was ready. This led to two issues: incoming invitations that were terminated before call readiness could block the UI with already ended sessions, and users could initiate multiple concurrent calls due to makeCall not being guarded. This change pushes sessions as early as possible and notifies the user when a call cannot be started, ensuring that no more than two sessions can be active at any time. Additionally, the activeSession terminology has been replaced with frontSession and backSession.
This update fixes an issue where credit notes didn't properly reverse commissions. The change ensures that a negative commission line is created for credit notes, accurately reflecting refunds and enabling correct commission calculations. This improves financial reporting accuracy.
Original PR description
**Steps to reproduce:** * Install the **Accounting** and **partner_commission** modules. * Create a contact and set a **commission plan (e.g. 50%)** in the *Partner Assignment* tab. * Create and…
**Steps to reproduce:** * Install the **Accounting** and **partner_commission** modules. * Create a contact and set a **commission plan (e.g. 50%)** in the *Partner Assignment* tab. * Create and confirm a customer invoice with multiple lines (e.g. 750, 750). * Then go to **Dashboard → Transactions**, create a new transaction (e.g. 750) and reconcile it with the created invoice. * Create a **credit note** from the invoice and confirm it. * Open the contact and access **Purchase Orders** from the stat button. **Observed behavior:** * Only the commission line from the original invoice appears in the partner purchase order. * No **negative commission line** is created for the credit note. **Cause:** * Credit notes reused the original commission linkage instead of generating a dedicated commission entry. * This prevented commission reversal from being recorded for refunds. **Fix:** * Generate a **separate commission line** with a negative amount for each credit note. * Assign a dedicated `commission_po_line_id` to credit notes. * Copy only the `referrer_id` to credit notes, not the original commission line reference. opw-5357773 Forward-Port-Of: odoo/enterprise#103328
This update resolves an issue preventing Odoo payments using Swedbank's Bankgiro accounts. Swedbank requires a specific 'RfdDocAmt' field in the payment XML, which was missing in Odoo's generated batches. Adding this field ensures successful payment processing and avoids rejection by the bank.
Original PR description
**PROBLEM** Swedbank requires the RfdDocAmt Element for Bankgiro account. [documentation](https://internetbank.swedbank.se/ConditionsEarchive/download?bankid=1111&id=WEBDOC-PRODE211415244). Payment batches generated by Odoo don't contains this fields, meaning they are refused by the bank. **REPRO STEPS** We can't reproduce the error the client have because it would require a valid bankgiro account. To generate the payment batch xml you have to: 1. Install l10n_se. 2. Create a vendor bank account of type bankgiro. 3. Create a vendor payment with this vendor bank account. 4. Create a batch payment and validate it. 5. There should be a xml in the chatter, you can look at it to see there is no RfdDocAmt element. opw-5427505 Forward-Port-Of: odoo/enterprise#104777
This update resolves an issue where confirming one upsell within a subscription didn't properly cancel the remaining alternative quotations. Now, confirming any upsell automatically cancels all related upsells, ensuring accurate subscription management and preventing unnecessary charges.
Original PR description
Currently, when creating multiple upsells for a specific subscription, confirming one of them leaves the others in the sent state instead of cancelling them. This fix ensures that all other upsells for the same subscription are cancelled once one upsell is confirmed. task-5270139 Forward-Port-Of: odoo/enterprise#105694 Forward-Port-Of: odoo/enterprise#100058
This update resolves an issue that prevented the subscription preview from displaying correctly when using sections and subsections. The fix ensures that all related invoice lines are properly processed, preventing a technical error that caused the preview to fail. This improves the user experience for subscription management.
Original PR description
Steps to reproduce: ------------------- 1. Install sale_subscription with demo data. 2. Create a new subscription and add a Section and a Subsection. 3. Add a recurring product (Invoice_policy =…
Steps to reproduce:
-------------------
1. Install sale_subscription with demo data.
2. Create a new subscription and add a Section and a Subsection.
3. Add a recurring product (Invoice_policy = 'order') and configure a recurring plan.
4. Confirm the subscription and click Preview.
Issue:
------
```python
Traceback (most recent call last):
The error occurred while rendering the template sale_subscription.subscription_portal_content and evaluating the following expression: <t t-set="collapse_prices" t-value="current_section.collapse_prices or line.collapse_prices"/>
Error while rendering the template:
AttributeError: 'NoneType' object has no attribute 'collapse_prices'
Template: sale_subscription.subscription_portal_content
Reference: 1713
Path: /t/div[4]/section[1]/div[1]/table/tbody/t[4]/t[11]/t[3]
Element: <t t-set="collapse_prices" t-value="current_section.collapse_prices or line.collapse_prices"/>
From: (1712, '/t/t', '<t t-call="portal.portal_layout"/>')
(1712, '/t/t/body/div[1]/div/div[2]/div[11]/div/t', '<t t-call="#{sale_order._get_name_portal_content_view()}"/>')
(1713, '/t/div[4]/section[1]/div[1]/table/tbody/t[4]/t[11]/t[3]', '<t t-set="collapse_prices" t-value="current_section.collapse_prices or line.collapse_prices"/>')
```
Cause:
------
`_get_invoiceable_lines` does not treat subsection lines as children of their parent section.
As a result, `lines_to_report` contains a subsection without its corresponding section,
leaving current_section set to None and causing the traceback when accessing current_section.collapse_prices.
Solution:
---------
Ensure subsection lines are appended together with their parent section
when an invoiceable line is encountered
Related community PR: https://github.com/odoo/odoo/pull/241634
opw-5367739
Forward-Port-Of: odoo/enterprise#103686This update optimizes the project timesheet report to address performance issues caused by a previous change. By using a more efficient query structure with a CROSS LATERAL JOIN, the report now loads much faster, especially with large datasets. This improves the user experience and ensures the report remains responsive.
Original PR description
After this commit https://github.com/odoo-dev/enterprise/commit/6c33bde74342b634d9f6fbda4ef407ffe9bac54f we introduced a new left join which seems that it slowed down the query a lot. So the report…
After this commit https://github.com/odoo-dev/enterprise/commit/6c33bde74342b634d9f6fbda4ef407ffe9bac54f we introduced a new left join which seems that it slowed down the query a lot. So the report doesn't load at all if we have a lot of records. In this PR we are introducing CROSS LATERAL JOIN as we want to generate only the the relevant dates not all dates between the min starting date and max ending date of all slots. Query plan after modification https://explain.dalibo.com/plan/eh5293ba2354f43c The testing cardinality of the tables: `planning.slot` 7178 rows `hr.employee` 332 rows `resource.resource` 332 rows `resource_calendar_leaves` 4061 rows `account_analytic_line` 267376 rows `generate_series()` will produce 206417 rows | Before | After | |-----------------------------------------|-------| | Query keep being active with no results | ~2s | opw-5089052 Forward-Port-Of: odoo/enterprise#105696 Forward-Port-Of: odoo/enterprise#102283
This update corrects a bug that caused multiple overtime lines to be incorrectly combined, leading to inaccurate time tracking. The fix ensures that each overtime line is allocated separately, accurately reflecting employee overtime hours. This improves the reliability of overtime reporting.
Original PR description
To reproduce: ============= 1. Create an new Overtime Ruleset using these options: - The rule is based on: Timing - With tolerance in favor of the employer of: 00:00 - If the employer works: Outside…
To reproduce: ============= 1. Create an new Overtime Ruleset using these options: - The rule is based on: Timing - With tolerance in favor of the employer of: 00:00 - If the employer works: Outside of a specific schedule - Schedule: 40/hour work week - Pay extra hours: with rate of 100% - Work entry type to use: Overtime Hours - Give back as time off 2. Create an employee or edit an existing employee to use the overtime ruleset in the settings of the form view of the employee. 3. Navigate to attendance and create a new entry for that employee. 4. Make clock in time and clock out time run through a Friday. For example: Clock in: 12/22/2025 12:00:00 AM Clock out: 12/26/2025 6:30:00 AM 5. Then edit the entry to run through the Saturday or Sunday. For example: Clock out: 12/27/2025 6:30:00 AM 6. Navigate to Work Entries and navigate to the month or week that that entry was made at. 7. There should be a traceback error for more than one overtime line related to that specific entry. Problem: ======== When allocating multiple overtime lines to consecutive time periods, the `_set_real_overtime_intervals` method was merging them into single intervals with recordsets of overtime lines (e.g., hr.attendance.overtime.line(102, 106, 103, 104)) instead of keeping each overtime line in its own separate interval. This happened because the allocation logic incorrectly calculated the position within intervals and subtracted the wrong duration from remaining overtime, causing the `|=` merge operator to combine adjacent allocations into recordsets. Solution: ========= Refactored the overtime allocation loop to maintain singletons opw-[5468598](https://www.odoo.com/web#id=5468598&view_type=form&model=project.task) Forward-Port-Of: odoo/enterprise#105555
5 changes
Resolved issues and error corrections
A crash in the Accounting module's Working Files feature, triggered during mass edits, has been resolved. The fix utilizes optional chaining to safely handle situations where configuration data is temporarily unavailable, preventing the web client from freezing.
Original PR description
**Steps to reproduce:** * Install **Accounting** with the **account_reports** module. * Go to **Accounting → Review → Working Files**. * Create or open an audit. * Open any line under **To Review**. * Set the status to **No Error** individually. * Select multiple lines and set the status to **Error** using mass edit. **Observed behavior:** * The web client crashes with `TypeError: Cannot read properties of undefined (reading 'viewType')`. **Cause:** * The status badge component assumes `env.config` is always defined. * When mass editing, the component is rendered in a context where `this.env.config` is undefined, causing the crash. **Fix:** * Add optional chaining (`?.`) to safely access `viewType`: `this.env.config?.viewType` instead of `this.env.config.viewType`. * This ensures the component handles contexts where `env.config` is undefined. opw-5481071
This update fixes a potential issue in the US payroll module by establishing a standardized way to manage city information for employees. Instead of free-form editing, a linked list of cities is now used, ensuring data consistency and accuracy for tax reporting. This improves the reliability of payroll calculations within the US.
Original PR description
**Description:** In United States we load all cities in the L10N package. idea was to make the city field on employee personal address a M2O referring to the list and not something freely editable. **Implementation:** . Add l10_us_private_city_id which's a M2O field referring to the list and not something freely editable. task-5877610
This update resolves an issue preventing the 'compare' button from appearing on the website's rental product selection page. The fix ensures users can now correctly compare rental options, improving the overall user experience. It also adds a waiting step to ensure the comparison process completes reliably.
Original PR description
This commit fixes the issue where the "compare" button wasn't visible in the view. Now, the compare button is accessible within the process. Additionally, it addresses the indeterminacy by adding a step where the comparison bar is explicitly waited for before adding a product. runbot-error-id~231524
This update corrects a bug where canceled refunds were incorrectly included in global invoices generated from Point of Sale (PoS) orders. The fix filters out canceled refund lines during invoice generation, ensuring accurate invoice totals. This improves the reliability of financial reporting for Mexican VAT (EDI) transactions.
Original PR description
When generating global invoices for orders in the PoS, refund of those orders are also included in the global invoice. However, if the refund has been canceled, it should not be included in the global invoice. Steps to reproduce: ------------------- * Create a PoS order and validate it. * Go to the backend and create a refund for that order. * Cancel the refund. * Go to the PoS order list and select the original order * Click on "Generate Global Invoice" > Observation: The canceled refund is included in the global invoice. Why the fix: ------------ We simply filter out the canceled orders when searching for refunded order lines. opw-5492576 Forward-Port-Of: odoo/enterprise#105959 Forward-Port-Of: odoo/enterprise#105868
This update resolves an issue where CFDI payroll validation failed when no deductions were present in the Mexican payroll structure. The fix ensures that the CFDI report accurately reflects the absence of deductions, aligning with official Mexican tax regulations. This prevents validation errors and ensures compliance.
Original PR description
…eductions Currently, if users modify the MX Payroll structure in order to have no deductions in the final payroll, CFDI validation for the payroll entry will fail. Steps to reproduce: - Set up…
…eductions
Currently, if users modify the MX Payroll structure in order to have no deductions in the final payroll, CFDI validation for the payroll entry will fail.
Steps to reproduce:
- Set up Payroll Structure "Mexico: Regular Pay" with Salary Rules:
- Used subsidy:
- Code: SUBSIDY
- Category: Allowance
- CFDI Concept: (O02) Employment Subsidy (Effectively Delivered to the Worker)
- Deduction:
- Code: DEDUCTION
- Category: Deduction
- CFDI Concept: (D04) Others
- Net Salary:
- Code: NET
- Category: Net
- CFDI Concept: (P01) Salaries, Wages, Stripes, and Day Labor
- Formula: `result = payslip.paid_amount`
- In Payroll > Payslips, Click 'New Off-Cycle'
- Select employee, compute sheet, create draft journal entry and post it
- Back to the payslip, mark as paid and generate CFDI
Issue:
CFDI Validation will fail with error
`Code : 301 Message : Error en complemento Nómina. [Error #NOM38] El atributo Nomina.TotalDeducciones, no debe existir. Folio: 0002. Serie: SLR/2025/12.`
It occurs because, according to the official specs [1] attribute `TotalDeducciones` should not be reported in case there are no deductions
[1] http://omawww.sat.gob.mx/tramitesyservicios/Paginas/documentos/GuiallenadoNomina311221.pdf
opw-53487899 changes
Resolved issues and error corrections
This update fixes an error in the POS module's calculation of unpaid amounts during online payments. When 'Automatic Invoice' is enabled, the system was incorrectly subtracting both the invoice total and paid amounts, leading to an inaccurate unpaid amount figure. The fix ensures the correct calculation by skipping duplicate invoice references during the total amount computation.
Original PR description
**Steps to produce:** - Install `pos_sale` module. - Enable `Automatic Invoice` in settings - Create a new SO with product price 1000. - In `Other Info`, set `Online Payment` to 30%. - Preview > make…
**Steps to produce:** - Install `pos_sale` module. - Enable `Automatic Invoice` in settings - Create a new SO with product price 1000. - In `Other Info`, set `Online Payment` to 30%. - Preview > make payment. **Issue:** - The computed value of amount_unpaid is 400, whereas it should be 700. **Root cause:** - When Automatic Invoice is enabled and an online payment is made, the invoice is automatically created and amount_paid is also updated. - At [1], the logic subtracts both the total invoice amount and amount_paid from the actual total, which results in an incorrect calculation. **Solution:** - When an online payment is made, a transaction is created and linked to an invoice. - While computing the total invoice amount, if the transaction’s invoice ID is encountered again, it should be skipped to avoid double-counting. [1]https://github.com/odoo/odoo/blob/75f6be6744006ed1a3c0857881822723f90f5d4a/addons/pos_sale/models/sale_order.py#L46-L51 I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves a bug where images added to email templates were being unexpectedly deleted upon saving. The issue stemmed from a problem with how the editor tracked changes, leading to incorrect history management. The fix ensures images are saved correctly without being removed during the save process.
Original PR description
**Steps to reproduce:** - Install Email Marketing app - Create a new campaign with Subject and Recipients - Set plain text mail body - Add one image using /img or /image command - Save the template -…
**Steps to reproduce:**
- Install Email Marketing app
- Create a new campaign with Subject and Recipients
- Set plain text mail body
- Add one image using /img or /image command
- Save the template
- Remove the image
- Save the template
- Try to re-add an image, on save it will be deleted everytime
**Issue:**
During `commitChanges`, the history of the editor is in a wrong state which triggers a cleanup on
`this.wysiwyg.odooEditor.historyRevertCurrentStep();`.
This is caused by the `await saveCallback(element);` of `_onMediaDialogSave` which never resolve and never call its follow-up:
```js
this.odooEditor.historyUnpauseSteps();
this.odooEditor.historyStep();
```
The resolve is event-dependent and doesn't seem to be triggered in current versions:
`const event = $.Event("image_changed", {_complete: resolve});`
**Fix:**
Check that the current element is listening to the given event.
Might not be the proper fix as I wasn't able to reproduce the expected behavior with `image_changed` event.
related PR: https://github.com/odoo/odoo/pull/205594
opw-5245367This update fixes an issue where the overtime indicator displayed incorrect hours when employees worked across multiple companies. The fix ensures that the employee's company is correctly considered during timesheet calculations, accurately reflecting actual work hours and preventing inaccurate overtime reporting. This improves the reliability of time tracking data.
Original PR description
Steps to reproduce: ------------------------- 1. Install Timesheets and Time Off. 2. Create an employee and create a Time Off in the past week, then approve it. 3. Open All Timesheets for that employee and observe the overtime indicator. 4. Enable a multi-company environment by creating another company. 5. Remove the `company_id` from the employee’s working schedule (40h/week). Issue: ---------- The overtime indicator shows an incorrect value. It displays 40h instead of the expected 32h. Cause: ---------- Since there is no company defined on the working schedule, `self.company_id.id` becomes False. The actual leave records are linked with the employee’s company, so the search results in an empty recordset. As a result, the employee leave is ignored. Solution: -------------- Take the resource company into account when building the domain, before falling back to the calendar company. opw-5499737
This update corrects a bug where the overtime indicator displayed incorrect hours (40h) when employees worked across multiple companies. The fix ensures that the system correctly considers the employee's company affiliation when calculating overtime, resulting in accurate time tracking across all company setups. This improves the reliability of time reporting.
Original PR description
Steps to reproduce: ------------------------- 1. Install Timesheets and Time Off. 2. Create an employee and create a Time Off in the past week, then approve it. 3. Open All Timesheets for that…
Steps to reproduce: ------------------------- 1. Install Timesheets and Time Off. 2. Create an employee and create a Time Off in the past week, then approve it. 3. Open All Timesheets for that employee and observe the overtime indicator. 4. Enable a multi-company environment by creating another company. 5. Remove the `company_id` from the employee’s working schedule (40h/week). Issue: ---------- The overtime indicator shows an incorrect value. It displays 40h instead of the expected 32h. Cause: ---------- Since there is no company defined on the working schedule, `self.company_id.id` becomes False. The actual leave records are linked with the employee’s company, so the search results in an empty recordset. As a result, the employee leave is ignored. Solution: -------------- Take the resource company into account when building the domain, before falling back to the calendar company. opw-5499737 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This pull request addresses several key issues within the account_edi_ubl_cii module, primarily focusing on ensuring correct export of UBL invoice data according to PEPPOL standards. Specifically, it fixes inconsistencies in `DeliveryParty` node structure, adds support for intrastat commodity codes, and updates allowance charge reasons for improved accuracy and compliance with business expert group requirements.
Original PR description
#### [FIX] account_edi_ubl_cii: `DeliveryParty` export Follow-up to commit 0b3c12670e5f606a36e7d94982656ed998d67322 In the aforementioned commit we added the `DeliveryParty` node under the `Delivery`…
#### [FIX] account_edi_ubl_cii: `DeliveryParty` export
Follow-up to commit 0b3c12670e5f606a36e7d94982656ed998d67322
In the aforementioned commit we added the `DeliveryParty` node under
the `Delivery` tag.
But there are 2 remaining issues with it.
- In BIS 3.0 the `DeliveryParty` tag has only one child `PartyName` (which is mandatory)
https://docs.peppol.eu/poacc/billing/3.0/syntax/ubl-invoice/cac-Delivery/cac-DeliveryParty/
This was done for the version with the new helpers (`account_edi_ubl_cii.use_new_dict_to_xml_helpers`)
but not the version without the helpers.
- For UBL 2.0 the `DeliveryParty` tag was added for the version
without the new helpers but not the version with the helpers.
That is fixed in this commit.
#### [FIX] account_edi_ubl_cii: export intrastat commodity code
Currently we do not export the intrastat commodity code of products.
But a field for it is available after installing `account_intrastat`.
After this commit the intrastat code is exported in the tag
`cac:CommodityClassification/cbc:ItemClassificationCode[@listID="HS"]`.
#### [FIX] account_edi_ubl_cii: update AllowanceChargeReasonCode for EPD
Currently we are using the code `66` ("New outlet discount") as
`AllowanceChargeReasonCode` for early payment discounts.
After this commit we use `64` ("Special agreement") since it seems
more fitting / general.
#### [FIX] account_edi_ubl_cii: BEG test cases: minimal invoice
This commit adds a test corresponding to the test case "Testcase01" / "Minimal invoice"
from the business expert group.
https://efacture.belgium.be/fr/article/business-expert-group-ressources
#### [FIX] account_edi_ubl_cii: BEG test cases: multi-currency
This commit adds the following nodes to the BIS 3.0 XML in case
the document currency is different from the company currency.
- `cbc:TaxCurrencyCode`: gives the company currency (it is supposed to
be the currency in which the taxes for the invoice will be paid)
- A second `cac:TaxTotal` node that only contains a `cbc:TaxAmount` node
giving the total tax amount in company currency / the currency specified
by `cbc:TaxCurrencyCode`.
See here:
- https://docs.peppol.eu/poacc/billing/3.0/bis/#_vat_accounting_currency
Some local formats had this information already. The logic was removed
there. The affected modules were:
- `l10n_anz_ubl_pint`
- `l10n_jp_ubl_pint`
- `l10n_my_ubl_pint`
- `l10n_ro_edi`
See also here:
- https://docs.peppol.eu/poac/aunz/pint-aunz/bis/#_tax_in_accounting_currency
- https://docs.peppol.eu/poac/my/pint-my/bis/#_tax_in_accounting_currency
- https://docs.peppol.eu/poac/sg/2024-Q2/pint-sg/bis/#_invoice_totals_in_gst_accounting_currency
This is in line with the following test cases from the business
expert group. They were added as tests in this commit
(https://efacture.belgium.be/fr/article/business-expert-group-ressources)
- "Testcase 10": "Invoice in USD and EUR vat"
- "Testcase 11": "Invoice in USD and EUR vat and 2021"kkjkkj
#### [FIX] account_edi_ubl_cii: PaymentMeansCode from payment method
Currently the `PaymentMeans/PaymentMeansCode` node is filled
w/o considering the "Preferred Payment Method Line" (`preferred_payment_method_line_id`)
set on the move.
We choose
- for invoices: 30 ('credit transfer') or ZZZ ('mutually
defined') depending on whether a bank account is set.
- for bills: 57 ('standing agreement')
After this commit we use the Code of the Payment Method of the
"Preferred Payment Method Line" to determine the the PaymentMeansCode
We also add the following Payment Methods so that the user has more choices.
- Credit Card
- Debit Card
- Bankgiro
- Standing Agreement
- SEPA Credit Transfer
#### [FIX] account_edi_ubl_cii: BEG test cases: cash discount
Consier a paid invoice for which we granted an early payment discount.
in case the XML is generated after the invoice is paid (discounted amount)
we do not account for that fact in the XML generation.
The total amounts in the `cac:LegalMonetaryTotal` node are not adjusted
- The `cbc:TaxExclusiveAmount` and `cbc:TaxInclusiveAmount` and
`cbc:PrepaidAmount` should reflect the reduced amounts
- This is i.e. problmeatic for the `cbc:PrepaidAmount`. It would show
the total (unreduced) amount of the invoice; more than was actually paid.
In the XML for an unpaid invoice there are
The `cac:AllowanceCharge` node(s) representing the potential early payment discount and
`cac:AllowanceCharge` node(s) raising the total back to the unreduced amount.
In case the early payment discount was applied the latter node(s) can
/ should be removed.
This is in line with "Testcase06" from the business expert group.
(https://efacture.belgium.be/fr/article/business-expert-group-ressources)
The following examples were added as tests in this commit
- "Testcase05": "Cash Discount" (not paid yet)
- "Testcase06": "Discount with cash payment" (XML generated after paid
and epd applied)
#### [FIX] account_edi_ubl_cii: sale order discount as AllowanceCharge
Global discounts from sales orders are just displayed as invoice
lines on the inovice.
Currently they are treated the same as any other invoice lines for
the XML generation.
But they should be displayed as an `AllowanceCharge` instead.
After this commit that is the case.
The `AllowanceCharge` node has
- `AllowanceChargeReasonCode`: `95`
- `AllowanceChargeReason`: `Global discount`
To add a global discount follow theses steps
1. Ensure `sales` is installed
2. Go to Settings -> Sales -> Pricing section and enable "Discounts"
3. On a Quotation / Sale Order there should now be a "Discount"
right above the widget displaying the total amounts.
Click it.
4. Select "Global Discount" and a percentage.
5. A line using a special discount product is added.
6. Click "Create Invoice"
7. The same line is now on the invoice
#### references
task-4885680This update resolves a bug that occurred when generating invoices with multiple tax lines, specifically within the Belgian localization and Peppol integration. The issue stemmed from incorrect aggregation of tax amounts, leading to a division-by-zero error. The fix ensures accurate tax calculations during invoice creation.
Original PR description
Steps: - Belgian localisation - Activate peppol - Have two fixed sales taxes (T1 3.5 and T2 4.5) - Have 4 product: - P1: Any sale price, taxes 21% and T1 - P2: Any sale price, taxes 21% and T2 - P3: sale price 0, taxes 0% and T1 - Create an invoice, with following invoice lines: - P1, quantity 2 - P2, quantity 2 - P3, quantity -4 - Confirm and send it to peppol -> Traceback (ZeroDivisionError) The reason is that we try to extract emptying taxes like "Vidanges" and aggregate them into new base lines, but we treat all these taxes as they are the same but they are not always the same. Therefore we aggregate both price unit and quantity and we try to divide the aggregated price by the aggregated quantity. In our case we end up with a price unit of 2 (9 + 7 - 14) and a quantity of 0 (2 + 2 + -4) which leads to a zero division error. The fix adds a grouping function in order to group the extra lines by taxes before aggregating them. opw-5384928
This update ensures that freight costs are accurately reflected in international delivery customs documents generated by Sendcloud. Previously, these costs were missing, leading to potential discrepancies in customs declarations. This change aligns with Sendcloud's API specifications and improves the accuracy of international shipping documentation.
Original PR description
Issue ----- For international deliveries, the customs document does not include the freight costs. Steps to reproduce ----- - Create an international sale (eg BE -> US) - Validate delivery - Open the commercial invoice > Freight costs is set to 0 Change ----- The `freight_costs` should be included in the `customs_information` field of the request (along with all customs-related data, as other fields have been deprecated) https://api.sendcloud.dev/docs/sendcloud-public-api/branches/v2/parcels/operations/create-a-parcel#:~:text=object%2E-,customs%5Finformation ----- Ticket: opw-5486742
A client reported issues processing payments via Bankgiro (Swedish bank giro). This pull request corrects a typo and adjusts the order of data fields in the payment processing, ensuring Bankgiro payments now function correctly. This resolves a reported payment failure.
Original PR description
After PR: https://github.com/odoo/enterprise/pull/104777 The client reported that payment with bankgiro account doesn't works. Here are the problems found: - Typo : Should be `RfrdDocAmt` instead of `RfdDocAmt` - RfrdDocAmt should be inserted before CdtrRefInf - CdtNoteAmt should be before RmtdAmt opw-5427505
This update corrects a critical issue where WhatsApp messages to blacklisted numbers were sometimes being sent incorrectly due to a misunderstanding of phone number formats. The fix ensures that all blacklisted numbers, regardless of the recipient's country, are correctly identified and blocked, improving message delivery reliability.
Original PR description
Sending a WhatsApp message to a blacklisted number fails to be blocked if the recipient's phone number country differs from the sender company's country. ### Steps to reproduce 1. Configure a…
Sending a WhatsApp message to a blacklisted number fails to be blocked if the recipient's phone number country differs from the sender company's country.
### Steps to reproduce
1. Configure a WhatsApp account.
2. Set the Company's country to Germany (+49).
3. Create a Contact with a Belgian phone number (e.g. +32456001122).
4. Send a template message to this contact.
5. Have the contact reply with "STOP" to opt-out (this correctly adds +32456001122 to the blacklist).
6. Send another message to the contact.
- Expected: The message is blocked.
- Actual: The message is sent successfully.
### Root cause
The blacklist search logic relies on implicit phone number sanitization which behaves incorrectly for international numbers without a `+` prefix.
1. `whatsapp.message` stores numbers as `CountryCode + NationalNumber` without a `+` (e.g. "32456001122").
2. `phone.blacklist` stores numbers in E.164 format with a `+` (e.g. "+32456001122").
3. When searching `phone.blacklist` with "32456001122", the system interprets it as a local number for the Company's country (Germany) because of the missing `+`.
4. It reformats the search term to German E.164 ("+4932456001122").
5. The query fails to match the actual blacklisted number ("+32456001122"), allowing the message to pass.
### Fix
Explicitly prepend a `+` to the recipient's number before searching the blacklist. This forces the validation logic to parse the number as international (E.164), bypassing the company-country bias and ensuring the search term matches the stored blacklisted number.
opw-5401789
Forward-Port-Of: odoo/enterprise#1045565 changes
Resolved issues and error corrections
This update fixes an issue where WhatsApp messages to blacklisted numbers wouldn't be blocked if the recipient's country differed from the sender's company country. The fix ensures that all international phone numbers are correctly processed as international (E.164) during blacklist checks, preventing messages from being sent to blocked numbers regardless of location.
Original PR description
Sending a WhatsApp message to a blacklisted number fails to be blocked if the recipient's phone number country differs from the sender company's country. ### Steps to reproduce 1. Configure a…
Sending a WhatsApp message to a blacklisted number fails to be blocked if the recipient's phone number country differs from the sender company's country.
### Steps to reproduce
1. Configure a WhatsApp account.
2. Set the Company's country to Germany (+49).
3. Create a Contact with a Belgian phone number (e.g. +32456001122).
4. Send a template message to this contact.
5. Have the contact reply with "STOP" to opt-out (this correctly adds +32456001122 to the blacklist).
6. Send another message to the contact.
- Expected: The message is blocked.
- Actual: The message is sent successfully.
### Root cause
The blacklist search logic relies on implicit phone number sanitization which behaves incorrectly for international numbers without a `+` prefix.
1. `whatsapp.message` stores numbers as `CountryCode + NationalNumber` without a `+` (e.g. "32456001122").
2. `phone.blacklist` stores numbers in E.164 format with a `+` (e.g. "+32456001122").
3. When searching `phone.blacklist` with "32456001122", the system interprets it as a local number for the Company's country (Germany) because of the missing `+`.
4. It reformats the search term to German E.164 ("+4932456001122").
5. The query fails to match the actual blacklisted number ("+32456001122"), allowing the message to pass.
### Fix
Explicitly prepend a `+` to the recipient's number before searching the blacklist. This forces the validation logic to parse the number as international (E.164), bypassing the company-country bias and ensuring the search term matches the stored blacklisted number.
opw-5401789This update optimizes how new messages are processed within the Odoo platform. Previously, each tab repeatedly sent channel updates, leading to performance issues and errors. Now, only one tab sends these updates, significantly reducing load and improving overall system performance.
Original PR description
Before this commit, each tab was sending a channel_fetched when receiving a new message. This would result in serialization error on the backend as well as performance reduction in case of high load of messages. After this PR, only one tab will send the `channel_fetched` using the `multi_tab` service. task-5180400 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves an issue where the web editor would sometimes fail to save changes after applying history. The fix ensures a smoother and more reliable saving process for users editing HTML content within Odoo. This improves the overall user experience and prevents data loss.
Original PR description
backport of https://github.com/odoo/odoo/pull/216370 __ opw-5405048
This update allows users to reset Vendor Bills (e-invoices) created from ANAF to a draft state, even if they've already been processed with an EDI. This change improves the flexibility of managing e-invoices within the accounting system. Future versions (18.0+) will consolidate this functionality into the `l10n_ro_edi` module.
Original PR description
Adjusting the visibility check for "Reset to draft" button to allow Vendor Bills received from ANAF to be reset even when they have a EDI state. Will require to be shifted to `l10n_ro_edi` in 18.0+ as the efactura module is merged into it. task-5892651 --- 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 processing refund orders containing multiple products. Previously, the system would encounter a technical issue preventing refunds with many items. This fix ensures refunds with multiple products are processed correctly, improving the reliability of the Point of Sale system.
Original PR description
Description of the issue/feature this PR addresses: When you create a refund order, and there's many products theres an error Current behavior before PR: Error, this is the traceback. ``` RPC_ERROR…
Description of the issue/feature this PR addresses: When you create a refund order, and there's many products theres an error
Current behavior before PR: Error, this is the traceback.
```
RPC_ERROR
Odoo Server Error
Traceback (most recent call last):
File "/home/odoo/src/odoo/odoo/models.py", line 5896, in ensure_one
_id, = self._ids
ValueError: too many values to unpack (expected 1)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/odoo/src/odoo/odoo/http.py", line 1803, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "/home/odoo/src/odoo/odoo/service/model.py", line 152, in retrying
result = func()
File "/home/odoo/src/odoo/odoo/http.py", line 1831, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "/home/odoo/src/odoo/odoo/http.py", line 2035, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "/home/odoo/src/odoo/addons/website/models/ir_http.py", line 235, in _dispatch
response = super()._dispatch(endpoint)
File "/home/odoo/src/odoo/odoo/addons/base/models/ir_http.py", line 221, in _dispatch
result = endpoint(**request.params)
File "/home/odoo/src/odoo/odoo/http.py", line 772, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "/home/odoo/src/odoo/addons/web/controllers/dataset.py", line 29, in call_button
action = self._call_kw(model, method, args, kwargs)
File "/home/odoo/src/odoo/addons/web/controllers/dataset.py", line 21, in _call_kw
return call_kw(Model, method, args, kwargs)
File "/home/odoo/src/odoo/odoo/api.py", line 484, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/home/odoo/src/odoo/odoo/api.py", line 469, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "/home/odoo/src/odoo/addons/point_of_sale/wizard/pos_payment.py", line 70, in check
order._process_saved_order(False)
File "/home/odoo/src/odoo/addons/point_of_sale/models/pos_order.py", line 184, in _process_saved_order
self._compute_total_cost_in_real_time()
File "/home/odoo/src/odoo/addons/point_of_sale/models/pos_order.py", line 412, in _compute_total_cost_in_real_time
lines._compute_total_cost(stock_moves)
File "/home/odoo/src/odoo/addons/point_of_sale/models/pos_order.py", line 1537, in _compute_total_cost
product_cost = self.refunded_orderline_id.total_cost / self.refunded_orderline_id.qty
File "/home/odoo/src/odoo/odoo/fields.py", line 1148, in __get__
record.ensure_one()
File "/home/odoo/src/odoo/odoo/models.py", line 5899, in ensure_one
raise ValueError("Expected singleton: %s" % self)
ValueError: Expected singleton: pos.order.line(16923, 16924, 16925)
```
Desired behavior after PR is merged:
No traceback error?
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr