Daily updates from Odoo
Thursday, June 25, 2026
202 changes
19 changes
Resolved issues and error corrections
This update resolves a technical issue impacting the processing of Mexican tax invoices (CFDI). The system was struggling to handle complex cancellation scenarios due to a limitation in the database index. Switching to a different index type allows for smoother and more efficient handling of these invoices, particularly those with multiple related documents.
Original PR description
The field `l10n_mx_edi_cfdi_origin` can contain a large number of associated UUIDs, especially in complex cancellation scenarios. The default B-tree index fails when this field exceeds 2704 bytes, which occurs after approximately 20 UUIDs. By switching to a trigram index, we avoid the entry size limit of PostgreSQL's B-tree nodes. This ensures that invoices with many related documents can be processed while maintaining efficient search performance for partial matches on this field. **Video before the fix:** https://youtu.be/24u0HbxwIH8 **Video after the fix:** https://youtu.be/sUelv1HZMvI Forward-Port-Of: odoo/enterprise#118868
This update fixes an issue where the sandwich rule incorrectly excluded public holidays from leave calculations. Now, when 'Include Public Holidays as Working Day' is selected, the system accurately determines the correct leave duration, including weekend days as part of the calculation. A new test case has been added to ensure this fix works as expected.
Original PR description
Problem: When a time off type is configured with "Include Public Holidays as Working Day", the sandwich rule was still treating public holidays as non-working days. This caused the sandwiched weekend days to not be included in the leave duration. Example: Employee applies leave from May 15 (Friday, Public Holiday) to May 18 (Monday). Expected duration is 4 days since May 15 is a working day and May 16-17 (weekend) should be sandwiched. Instead, only 1 day was calculated. Fix: Now when "Include Public Holidays as Working Day" is enabled, the correct number of days are calculated in the sandwich rule. Also added a test case to verify that public holidays are correctly treated as working days during sandwich rule evaluation. Task-4570118 Forward-Port-Of: odoo/odoo#271261 Forward-Port-Of: odoo/odoo#266624
The Time Off Balance report was incorrectly calculating remaining days when overlapping allocations existed. This fix ensures the report accurately reflects the remaining time off by correctly deducting leave days from allocations based on their overlap periods. This prevents overestimation of available time off.
Original PR description
The Time Off Balance report shows incorrect remaining days when overlapping allocations exist and a leave only overlaps the later one. ### **Steps to reproduce:** 1) Install time off app. 2) Create a…
The Time Off Balance report shows incorrect remaining days when overlapping allocations exist and a leave only overlaps the later one. ### **Steps to reproduce:** 1) Install time off app. 2) Create a simple time off type. - Create Allocation A (10 days, 01-01-2024 to 31-12-2025) - Create Allocation B (10 days, 01-01-2025 to 31-12-2026) 3) Create a leave of 1 day on 01-01-2026 4) Open the Balance report ### **Observed Behavior:** The report shows 20 remaining days. ### **Expected Behavior:** The report should show 19 remaining days (20 allocated - 1 taken). ### **Cause:** In the taken_per_allocation CTE at [1], each leave is joined to every allocation it overlaps. The [fifo_balances] CTE then uses the formula: ``` GREATEST(alloc_days - GREATEST(taken - prior_cumulative_alloc, 0), 0) ``` This subtracts the prior allocation capacity (A = 10 days) from the taken count (B = 1 day). Since 1 - 10 = -9, GREATEST(-9, 0) = 0, so zero days are deducted from B. The formula wrongly assumes that prior allocations can absorb leaves that do not overlap with them. [1]- https://github.com/odoo/odoo/blob/f0fa79fa21d2005dd5cd132c18b2be45424166a6/addons/hr_holidays/report/hr_leave_employee_type_report.py#L126-L142 [fifo_balances]: https://github.com/odoo/odoo/blob/f0fa79fa21d2005dd5cd132c18b2be45424166a6/addons/hr_holidays/report/hr_leave_employee_type_report.py#L145-L164 ### **Fix:** Ensure that leaves are only deducted from allocations they actually overlap by calculating the balance using the delta of cumulative leaves within an overlap group. This prevents earlier allocations from absorbing leaves that occur outside their validity period. **opw-6150161** Forward-Port-Of: odoo/odoo#271596 Forward-Port-Of: odoo/odoo#263029
This update ensures the Clickall tool, used for automated accounting dashboard testing, correctly handles the new version 2 (v2) of Odoo Fin's favorite institutions endpoint. By adding a mock, we prevent the tool from making direct requests to production servers, maintaining a safe and isolated testing environment.
Original PR description
This commit follows up on [1] by extending the Odoo Fin request mock to cover the new version 2 (v2) favorite institutions endpoint. Previously, a mock was introduced to prevent the Clickall tool from making real external HTTP requests to `production.odoofin.com` when displaying the accounting dashboard. This update ensures that the newly introduced v2 URL is also safely intercepted, keeping the automated tests fully isolated from production servers. runbot-234936 [1] : https://github.com/odoo/odoo/commit/c6451015f1b01c3e1defe4a576989fd4bfdf2cdb Forward-Port-Of: odoo/odoo#271804
This update fixes a previous issue where commission losses were incorrectly calculated for employees on long-term sickness or partial incapacity leave. The change ensures that these employees are not subject to commission deductions, aligning with standard payroll practices. This update improves accuracy and fairness in commission calculations for a specific employee group.
Original PR description
Partial incapacity and long term sickness are not elligible to loss on commissions. Forward-Port-Of: odoo/enterprise#121514
This update fixes an issue where changing the quantity of a Purchase Order Line (POL) in Multi-Step Routes incorrectly updated the associated receipt quantity. The fix ensures that quantity adjustments are accurately reflected, preventing discrepancies between the sale order and the purchase order receipt.
Original PR description
### Steps to reproduce: - In the settings enable: Multi-Steps Routes - Inventory > Configuration > Warehouse Management > Routes - Unarchive MTO - Create a storable product P with MTO buy and a set…
### Steps to reproduce: - In the settings enable: Multi-Steps Routes - Inventory > Configuration > Warehouse Management > Routes - Unarchive MTO - Create a storable product P with MTO buy and a set vendor - Create and confirm a sale order for 1 unit of P - Confirm the assocaited PO and change the pol quantity from 1 to 10 > the associated receipt is updated from 1 to 10 - Change the pol quantity from 10 to 7 #### > The quantity on the receipt is updated from 10 to 16. ### Cause of the issue: Changing the quantity of the POL will adapt the picking related quantity via these lines: https://github.com/odoo/odoo/blob/3bf89b4f467390807c20f7b007a875a77542e76f/addons/purchase_stock/models/purchase_order_line.py#L115-L117 https://github.com/odoo/odoo/blob/3bf89b4f467390807c20f7b007a875a77542e76f/addons/purchase_stock/models/purchase_order_line.py#L342-L349 by creating new stock moves to be merged: https://github.com/odoo/odoo/blob/3bf89b4f467390807c20f7b007a875a77542e76f/addons/purchase_stock/models/purchase_order_line.py#L220-L251 Now, the issue is that this flows relies both on a negative `qty_to_attach` of `1 - 10 = -9` and a positive `qty_to_push` of `7 - 1 = 6`. However, the `qty_to_attach` is only used if is positive: https://github.com/odoo/odoo/blob/3bf89b4f467390807c20f7b007a875a77542e76f/addons/purchase_stock/models/purchase_order_line.py#L243-L251 The receipt is therefore updated by a `+6` move to push but not by the `-9` move to attach. Leading to a 10 -> 16 rather than 10 -> 7 result. opw-6218307 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#270547 Forward-Port-Of: odoo/odoo#264994
This change optimizes the automated posting of invoices by preventing the cron job from repeatedly rescheduling entire batches when individual invoices fail to post. Previously, a batch failure triggered thousands of unnecessary retries. Now, failed invoices are simply marked as unpostable, reducing system load and improving performance.
Original PR description
Before this change, cron jobs triggering `_autopost_draft_entries` would gracefully handle batch-level failures by logging the error and retry one by one. As a result, `_process_job`, with success 0 done and remaining number, marked the cron run as partially completed and triggered `_reschedule_asap`. When a batch contained only problematic records, the cron job could be rescheduled thousands of times per day. With this change, if a move in the batch fails to post, we set its `auto_post` to `no`, together with the existing message-posting logic in the chatter, to prevent repeated retries for failed records. Related ticket: opw-6303194 opw-5364851 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#271509
This update fixes a visual bug where outdated cluster bubbles remained visible on the company map after zooming or panning. The issue stemmed from a technical error in how the map library handled removing old cluster icons. This change ensures that clusters are properly updated and removed, providing a cleaner and more accurate map display for users.
Original PR description
Steps to reproduce: =================== 1. Install website_customer, set a Google Maps API key and publish a few companies with coordinates 2. Open /customers 3. Open the map and zoom in a few times…
Steps to reproduce: =================== 1. Install website_customer, set a Google Maps API key and publish a few companies with coordinates 2. Open /customers 3. Open the map and zoom in a few times => stale blue cluster bubbles remain on the map Cause: ====== On the partner map, zooming or panning left old cluster bubbles behind: the blue count icons piled up and never disappeared, even at the closest zoom level. `ClusterIcon` is meant to be a google.maps.OverlayView. The bundled `markerclusterer.js` wires that up by copying every enumerable https://github.com/odoo/odoo/blob/aed1619c34b1f65bd9a3d155fe76a82d404ef5e7/addons/website_google_map/static/src/lib/markerclusterer.js#L213-L221 OverlayView.prototype member onto ClusterIcon.prototype. Google Maps now ships its own OverlayView.prototype.remove, and that copy overwrites ClusterIcon's own `remove()` with it, As a result, when a cluster icon is removed, `ClusterIcon.remove()` is never executed. Consequently, `ClusterIcon.prototype.onRemove()` is not triggered, the cluster icon's DOM element is never detached from the map, https://github.com/odoo/odoo/blob/aed1619c34b1f65bd9a3d155fe76a82d404ef5e7/addons/website_google_map/static/src/lib/markerclusterer.js#L1167 and stale cluster bubbles accumulate after every redraw, zoom, or pan operation. Solution: ========= Inherit from OverlayView through the prototype chain instead of copying it, so ClusterIcon's own remove() is kept and actually detaches the icon. opw-6128531 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#270733
This update resolves a problem where the Italian POS fiscal printer would intermittently stop printing orders due to unsupported characters in product or payment method names. The fix replaces these characters with spaces, ensuring complete and accurate printing of fiscal receipts, as outlined in official EPSON documentation.
Original PR description
Steps to reproduce: - Setup an Italian fiscal printer - Modify the name of a product to use the non-blocking space character "\ "; - In the POS, create an order with the product. Error: the fiscal device will stop midway in the printing process and return an incomplete response to the frontend. The issue can also be reproduce if the character is included in the payment method name or the POS config name. Solution: When formating the xml command, replace all non-supported character by a space character. The non-supported character list is provided by the official [EPSON fiscal printer documentation](https://support.epson.net/setupnavi/?PINF=bsmanual&OSC=WS&LG2=EN&MKN=FP-90III%20RT) in the document "ePOS Fiscal Print Solution Development Guide". Other: Rename the file "dispaly_text.xml" to "display_text.xml". [opw-6244089](https://www.odoo.com/odoo/project/49/tasks/6244089) Forward-Port-Of: odoo/enterprise#121538 Forward-Port-Of: odoo/enterprise#120169
This update resolves an issue where attendees received duplicate emails when rescheduling meetings. The fix prevents a nested calendar event write, which was causing the original and subsequent updates to trigger multiple notifications. This ensures attendees only receive one notification for meeting date changes.
Original PR description
Steps to reproduce: 1. Install CRM, Calendar, and Contacts. 2. Create a contact with an email address you can receive emails on. 3. Configure an outgoing email server. 4. Open a CRM lead and create a…
Steps to reproduce: 1. Install CRM, Calendar, and Contacts. 2. Create a contact with an email address you can receive emails on. 3. Configure an outgoing email server. 4. Open a CRM lead and create a meeting activity using the calendar. 5. Add the created contact as an attendee of the meeting. 6. Return to the lead and click the Reschedule button on the activity. 7. Select the same meeting and change its start date to a future date. Issue: - Attendees receive the meeting date-change email twice. Root cause: - When a calendar event linked to an activity is rescheduled, the event write syncs the new start date to the related activity through `_sync_activities`. That activity write was not marked as calendar-originated after commit https://github.com/odoo/odoo/commit/bc090486bd7810b1b0af1bae398255a2d6615f09, so `mail.activity.write` treated the updated deadline as an activity-originated change and wrote back to the same calendar event. https://github.com/odoo/odoo/blob/8cbb0fe91a35fcdb4a7e4e1a7e8afe40b1691f11/addons/calendar/models/calendar_event.py#L779 https://github.com/odoo/odoo/blob/8cbb0fe91a35fcdb4a7e4e1a7e8afe40b1691f11/addons/calendar/models/mail_activity.py#L24-L33 - This created a nested calendar event write. Both the nested write and the original write then triggered attendee date-change notifications, resulting in duplicate emails. Solution: - Pass the existing `calendar_event_meeting_update` context flag when syncing calendar event changes to linked activities. This prevents the activity sync from writing back to the event while preserving activity-to-event rescheduling. opw-6209956 Forward-Port-Of: odoo/odoo#269950 Forward-Port-Of: odoo/odoo#266675
This update fixes a display issue in the Helpdesk module where ticket labels in list and form views didn't match the labels shown in the Kanban view. The fix removes outdated label fields from the views, ensuring all ticket views show the correct, up-to-date state selections.
Original PR description
Steps to reproduce: ------------------------ 1. Install Helpdesk 2. Go to All Tickets and check the kanban state selection value 3. Go to Settings > Field Selection and search for kanban_state in…
Steps to reproduce:
------------------------
1. Install Helpdesk
2. Go to All Tickets and check the kanban state selection value
3. Go to Settings > Field Selection and search for kanban_state in `helpdesk.ticket` model
4. Change one of the state selection values (e.g., "Ready" to "Testing Ready")
5. Go back and check the state selection value in list and form views
Current behavior:
-----------------------
Kanban view correctly shows the updated label (e.g., "Testing Ready"),
but list and form views still display the old default value (e.g., "Ready").
Root cause:
---------------
The [state_selection](https://github.com/odoo/odoo/blob/c09cefdb0ed68b1b7367b77b18a5ee5d66c94900/addons/web/static/src/views/fields/state_selection/state_selection_field.js#L57-L65) widget uses `legend_${state}` field values when available.
Since list and form views included these legend fields, the widget resolved labels from them
instead of the actual selection values, causing inconsistent display.
Fix:
-----
Remove `legend_normal`, `legend_blocked`, and `legend_done` fields from the list and form views,
So the widget falls back to the real selection labels, consistent with how the kanban view behaves.
Reference commit: https://github.com/odoo/enterprise/commit/65f3b88254e3a66e2c5dcb5142d30f6b1996d999
opw-6238765
Forward-Port-Of: odoo/enterprise#119707This update resolves an issue where users without fleet access could not import UBL invoices referencing vehicles. Now, users with vendor bill import permissions can successfully import UBL invoices containing vehicle references, improving data import flexibility. This ensures accurate recording of transactions regardless of user access rights.
Original PR description
When a user has no rights to access the fleet models but is allowed to import vendor bills, he should be able to import a bill (UBL) with referenced vehicle(s) inside. task-6289956 Forward-Port-Of: odoo/odoo#269447
This update resolves a bug where JSON data couldn't be displayed when clicked in the l10n_in_edi module. The issue stemmed from a change in how binary fields handle data, requiring a conversion to the correct binary format. Now, JSON data is correctly displayed.
Original PR description
**Description of the issue this PR addresses:** This issue was introduced after the refactoring of binary fields [odoo/odoo#244421](https://github.com/odoo/odoo/pull/244421) ,where Binary fields now expect proper binary data and treat string values as base64. The JSON data was passed as a string to a binary field. After the BinaryValue change, this string was treated as base64, which caused a decoding error. **Before this Commit:** Clicking the JSON button resulted in an error: `binascii.Error: Only base64 data is allowed` Due to this, the JSON data could not be viewed. **After this Commit:** JSON data is now converted into the correct binary format using Odoo’s binary handling `(odoo.tools.Binary)` and it displays correctly. [Related Commit](https://github.com/odoo/odoo/commit/41fe2ebdb9cc37341362d7af829c087a5f72f9f1#diff-d3b35dffff8313ee07a08bceb336f03d6130bf001e3b0daa32b098cefcf95c3b) [Full Error Details ](https://pastebin.com/v12sD2vf)
This update resolves a technical issue that could cause errors in the planning module when start and end dates are not specified. By adding a check, the system now avoids attempting planning operations when this critical information is missing, ensuring smoother and more reliable planning processes. This improves the overall stability of the Enterprise version.
Original PR description
Add a guarding condition to the auto-plan or send behavior to avoid doing those operations when no start/end dates are defined --- Task-6312650
This update resolves a potential issue during Odoo upgrades where errors could occur when rules were being processed. The fix prevents errors when fields needed for rule evaluation aren't immediately available, ensuring smoother and more reliable upgrades. This improves the overall stability of the Odoo system.
Original PR description
In a [recent fix], the `_get_all_rules()` method was changed to skip the models that are not yet loaded (during upgrades). However, some rules can be added to an existing model by another module. In that case, the rule is processed even though the fields used in that rule are not yet loaded. This leads to a traceback during upgrades because `optimize()` is trying to access those fields. This commit adds the rule without pre-evaluating it if an `ValueError` is raised during the optimization step. [recent fix]: https://github.com/odoo/odoo/pull/267676
This update resolves a bug in the testing process for SEPA Direct Debit payments. The test was failing because the payment status was incorrectly identified as 'reconciled' instead of 'paid'. This change ensures the payment is validated only when it's in the correct 'paid' state, improving test reliability.
Original PR description
The `test_expiry` test creates a payment via the `pay_with_mandate` method. Depending on eg. the installed modules, the resulting payment ends up either `paid` or `reconciled`. Afterwards, the test tries to validate the payment, which requires that it not be in the `reconciled` state. This causes an error linked below. This PR adds a condition to ensure the payment is in the `paid` state before attempting to validate it. Error: https://runbot.odoo.com/odoo/error/240557 Forward-Port-Of: odoo/enterprise#112224
This update fixes a minor issue within the Odoo composer tool that prevented users from correctly placing the cursor at the end of lines when adding mentions. The fix adds a special character to ensure proper browser handling of text editing, improving the user experience. This ensures users can accurately format their messages.
Original PR description
### Purpose of this PR: - Inserting a mention in the composer results in a paragraph ending with a bare `<a>` element and no trailing text node. This causes the browser to mishandle the End key, moving the caret to the start of the next paragraph instead of the end of the current line. - Fix by appending a \uFEFF (zero-width no-break space) text node. task-6295924 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#271802 Forward-Port-Of: odoo/odoo#269699
This update fixes an issue where the VAT displayed in the product information popup was incorrect, leading to an inaccurate total price. The fix ensures that the product's tax rate is correctly calculated based on the pricelist and fiscal position settings, resulting in the correct total price being shown.
Original PR description
Steps to reproduce: ------------------- 1. Create a product with a tax (e.g. 15%). 2. Create a pricelist that changes the price (e.g. 100 to 200). 3. Create a fiscal position mapping the tax (e.g.…
Steps to reproduce: ------------------- 1. Create a product with a tax (e.g. 15%). 2. Create a pricelist that changes the price (e.g. 100 to 200). 3. Create a fiscal position mapping the tax (e.g. 15% to 30%). 4. Add the pricelist and the fiscal position in PoS. 5. Add the product to the cart, and select the tax and the pricelist created in the previous steps. 6. Long press on the product to see its info. The price should be 200 now after selecting the pricelist. Also the tax should be 30% bc of the FP mapping, i.e. total price should be 200 + 30% = 260. However, we observe that VAT shows 15 (15%) instead of 60 (30%), and Price incl. Tax shows 230 instead of 260. What's happening: ----------------- On the frontend, `getTaxDetails()` is called with no options, so it uses the product `list_price` (100) and `taxes_id` (15%), giving VAT = 15. Alos, on the backned, `self.taxes_id` is used directly to compute the taxes, even though the pricelist price is correct (200), fiscal position is ignored, hence 200 + 15% = 230 instead of 200 + 30% = 260. The fix: -------- On frontend, we pass the pricelist and fiscal position to `getTaxDetails`, and compute the tax name from the mapped taxes. On the backend, we read the `fiscal_position_id` from the context and apply the tax mapping, so the correct taxes are used. opw-6200632 Forward-Port-Of: odoo/odoo#271396 Forward-Port-Of: odoo/odoo#266012
This update fixes a potential issue where changes to knowledge articles (sharing, favorites, editing) weren't reliably applied. The update ensures the correct article is loaded before any modifications are made, enhancing the user experience and data consistency. This improves the reliability of the knowledge base.
Original PR description
With this commit, We ensure we're in the correct article before making any changes (share, add to favorites, edit) using `waitUntil`. We've added a `checkArticle` function to ensure the article is in the correct place in the menu. runbot-error-id~234645 Forward-Port-Of: odoo/enterprise#110642 Forward-Port-Of: odoo/enterprise#110123
22 changes
Resolved issues and error corrections
This update fixes an issue where self-invoicing URLs on receipts were incorrectly displayed. Now, the URLs are generated accurately, ensuring proper integration with invoicing systems. This improves the accuracy of self-invoicing processes for our point-of-sale operations.
Original PR description
Before this commit: ------------------------- - The self-invoicing URL on the receipt was displayed as `undefined/pos/ticket`. After this commit: ------------------------- - The self-invoicing URL is now generated correctly and displayed properly on the receipt. Task-6271261 Forward-Port-Of: odoo/odoo#271611 Forward-Port-Of: odoo/odoo#270052
This update resolves an issue where outdated cluster bubbles remained visible on the company map after zooming or panning. The fix corrects a technical error in how the map's cluster icons were managed, ensuring that old icons are properly removed when the map updates. This improves the visual clarity and accuracy of the map for users.
Original PR description
Steps to reproduce: =================== 1. Install website_customer, set a Google Maps API key and publish a few companies with coordinates 2. Open /customers 3. Open the map and zoom in a few times…
Steps to reproduce: =================== 1. Install website_customer, set a Google Maps API key and publish a few companies with coordinates 2. Open /customers 3. Open the map and zoom in a few times => stale blue cluster bubbles remain on the map Cause: ====== On the partner map, zooming or panning left old cluster bubbles behind: the blue count icons piled up and never disappeared, even at the closest zoom level. `ClusterIcon` is meant to be a google.maps.OverlayView. The bundled `markerclusterer.js` wires that up by copying every enumerable https://github.com/odoo/odoo/blob/aed1619c34b1f65bd9a3d155fe76a82d404ef5e7/addons/website_google_map/static/src/lib/markerclusterer.js#L213-L221 OverlayView.prototype member onto ClusterIcon.prototype. Google Maps now ships its own OverlayView.prototype.remove, and that copy overwrites ClusterIcon's own `remove()` with it, As a result, when a cluster icon is removed, `ClusterIcon.remove()` is never executed. Consequently, `ClusterIcon.prototype.onRemove()` is not triggered, the cluster icon's DOM element is never detached from the map, https://github.com/odoo/odoo/blob/aed1619c34b1f65bd9a3d155fe76a82d404ef5e7/addons/website_google_map/static/src/lib/markerclusterer.js#L1167 and stale cluster bubbles accumulate after every redraw, zoom, or pan operation. Solution: ========= Inherit from OverlayView through the prototype chain instead of copying it, so ClusterIcon's own remove() is kept and actually detaches the icon. opw-6128531 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#270733
This update ensures the Clickall tool, used for automated accounting dashboard testing, correctly handles requests to the new Odoo Fin v2 favorite institutions endpoint. By extending the existing request mock, we maintain isolation from production servers and prevent potential issues during testing, ensuring reliable automated test results.
Original PR description
This commit follows up on [1] by extending the Odoo Fin request mock to cover the new version 2 (v2) favorite institutions endpoint. Previously, a mock was introduced to prevent the Clickall tool from making real external HTTP requests to `production.odoofin.com` when displaying the accounting dashboard. This update ensures that the newly introduced v2 URL is also safely intercepted, keeping the automated tests fully isolated from production servers. runbot-234936 [1] : https://github.com/odoo/odoo/commit/c6451015f1b01c3e1defe4a576989fd4bfdf2cdb Forward-Port-Of: odoo/odoo#271804
This update fixes an issue where changing the quantity of a Purchase Order Line (POL) in MTO scenarios didn't accurately reflect the updated stock quantities. The fix ensures that receipt quantities are correctly adjusted when the POL quantity is modified, preventing discrepancies between sales and purchase records. This improves inventory accuracy and reporting.
Original PR description
### Steps to reproduce: - In the settings enable: Multi-Steps Routes - Inventory > Configuration > Warehouse Management > Routes - Unarchive MTO - Create a storable product P with MTO buy and a set…
### Steps to reproduce: - In the settings enable: Multi-Steps Routes - Inventory > Configuration > Warehouse Management > Routes - Unarchive MTO - Create a storable product P with MTO buy and a set vendor - Create and confirm a sale order for 1 unit of P - Confirm the assocaited PO and change the pol quantity from 1 to 10 > the associated receipt is updated from 1 to 10 - Change the pol quantity from 10 to 7 #### > The quantity on the receipt is updated from 10 to 16. ### Cause of the issue: Changing the quantity of the POL will adapt the picking related quantity via these lines: https://github.com/odoo/odoo/blob/3bf89b4f467390807c20f7b007a875a77542e76f/addons/purchase_stock/models/purchase_order_line.py#L115-L117 https://github.com/odoo/odoo/blob/3bf89b4f467390807c20f7b007a875a77542e76f/addons/purchase_stock/models/purchase_order_line.py#L342-L349 by creating new stock moves to be merged: https://github.com/odoo/odoo/blob/3bf89b4f467390807c20f7b007a875a77542e76f/addons/purchase_stock/models/purchase_order_line.py#L220-L251 Now, the issue is that this flows relies both on a negative `qty_to_attach` of `1 - 10 = -9` and a positive `qty_to_push` of `7 - 1 = 6`. However, the `qty_to_attach` is only used if is positive: https://github.com/odoo/odoo/blob/3bf89b4f467390807c20f7b007a875a77542e76f/addons/purchase_stock/models/purchase_order_line.py#L243-L251 The receipt is therefore updated by a `+6` move to push but not by the `-9` move to attach. Leading to a 10 -> 16 rather than 10 -> 7 result. opw-6218307 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#270547 Forward-Port-Of: odoo/odoo#264994
This change optimizes the automated posting process by preventing the cron job from repeatedly rescheduling entire batches of transactions when individual records fail to post. Previously, failures triggered thousands of unnecessary retries. Now, failed transactions are marked as 'no-post' to stop further attempts, improving system performance and stability.
Original PR description
Before this change, cron jobs triggering `_autopost_draft_entries` would gracefully handle batch-level failures by logging the error and retry one by one. As a result, `_process_job`, with success 0 done and remaining number, marked the cron run as partially completed and triggered `_reschedule_asap`. When a batch contained only problematic records, the cron job could be rescheduled thousands of times per day. With this change, if a move in the batch fails to post, we set its `auto_post` to `no`, together with the existing message-posting logic in the chatter, to prevent repeated retries for failed records. Related ticket: opw-6303194 opw-5364851 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#271509
This update resolves an issue where event titles were sometimes saved as blank ('(no title)') when created quickly through the calendar. The fix ensures that all event data, including the title, is saved correctly, regardless of how the event was created. This improves the user experience and prevents data inconsistencies.
Original PR description
When creating an event using the quick create form from the calendar view if the user saves the record while the title is still being edited (using alt+c) the record will be saved with the default title: "(no title)" The code currently relies on the record data being up to date by the time onRecordSave is reached. However in the case of a text field, it is only saved when blurred. While there is a mechanism to blur the field when saving using a hotkey, it is completely asynchronous from the save logic of the form. To ensure all fields have comitted their data at save time, the framework has a mechanism to "request changes" which notifies all fields to update the record with their latest value and waits for them to do so. We can simply reuse this mechanism to ensure the data is up to date at recordSave time already, as we don't expect fields to have any changes after it. task-6321702 Forward-Port-Of: odoo/odoo#271473
This update fixes an issue where the composer in Odoo (used for creating emails) wasn't correctly handling text editing after inserting mentions. Specifically, it added a small character (a zero-width no-break space) to ensure the cursor moved to the end of the line, improving the user experience. This ensures users can accurately edit and format their emails.
Original PR description
### Purpose of this PR: - Inserting a mention in the composer results in a paragraph ending with a bare `<a>` element and no trailing text node. This causes the browser to mishandle the End key, moving the caret to the start of the next paragraph instead of the end of the current line. - Fix by appending a \uFEFF (zero-width no-break space) text node. task-6295924 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#271160 Forward-Port-Of: odoo/odoo#269699
This update resolves an issue where Purchase Orders remained flagged as 'Late Receipts' even after a backorder was cancelled. The fix ensures that cancelled backorders are no longer incorrectly considered as pending receipts, improving the accuracy of the 'Late Receipts' filter and streamlining the purchasing process.
Original PR description
Steps to reproduce: ------------------- - Create a Purchase Order with an expected Arrival date in the past - Confirm the Purchase Order - Validate the receipt partially and create a backorder -…
Steps to reproduce: ------------------- - Create a Purchase Order with an expected Arrival date in the past - Confirm the Purchase Order - Validate the receipt partially and create a backorder - Cancel the generated backorder - Open the Purchase Orders list and check the 'Late Receipts' Issue: ------ The Purchase Order still appears in the 'Late Receipts' filter even though there is no remaining receipt to process. Cause: ------ The 'Late Receipts' filter relies on the computed search field `is_late`: https://github.com/odoo/odoo/blob/324df67c099ab18c6fe7c8f77212cf809debf383/addons/purchase/views/purchase_views.xml#L439 The search domain for this field is generated by `purchase.order._search_is_late()`: https://github.com/odoo/odoo/blob/324df67c099ab18c6fe7c8f77212cf809debf383/addons/purchase/models/purchase_order.py#L176 In `purchase_stock`, `_get_domain_is_late()` extends the base domain to identify Purchase Orders that still have receipts pending: https://github.com/odoo/odoo/blob/324df67c099ab18c6fe7c8f77212cf809debf383/addons/purchase_stock/models/purchase_order.py#L264-L267 After a partial receipt: - the original receipt is in state `done`, - a backorder is created and linked to the Purchase Order, - the backorder is later cancelled and moves to state `cancel`, - the Purchase Order line still has `qty_received < product_qty`. The existing domain excludes only `done` pickings when determining whether a receipt is still pending. As a result, a cancelled backorder is still treated as an unfinished receipt, causing the Purchase Order to remain visible in the 'Late Receipts' filter. Fix: ---- Exclude both `done` and `cancel` pickings when determining whether a Purchase Order has pending receipts. A cancelled backorder indicates that the remaining quantity will not be received through that transfer. Therefore, once all related pickings are either completed or cancelled, the Purchase Order should no longer be considered late. --- opw-6266046 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#268488
This update resolves an issue where a key feature of our website tours was intermittently failing. The fix ensures the tour correctly identifies the target element before the drag-and-drop action, making the tour more reliable and consistent for users. This improves the overall user experience.
Original PR description
The tour `conditional_visibility_4` has non-deterministic failure, that appears to be caused by the `drag_and_drop` step dragging the element that was the target before the click of the previous step. This commit adds a step to ensure the target is the expected element before the "drag" step starts. runbot-242425
This update resolves a bug where the 'Suggest Forecasted Demand' button disappeared when the 'Forecasted Stock' row was hidden in the Master Production Schedule. This ensures the button is always visible, allowing users to accurately adjust forecasted demand. This fix improves the usability of the planning module.
Original PR description
Steps to reproduce:
1. Install Manufacturing.
2. Enable 'Master Production Schedule' in the Settings.
3. Go to [Manufacturing -> Planning -> Master Production Schedule].
4. Ensure 'Demand Forecast' and 'Forecasted Stock' rows are enabled from the dropdown.
5. Observe the edit pencil button next to 'Forecasted Demand' is visible.
6. Hide 'Forecasted Stock' using the rows filter dropdown.
Issue:
The edit pencil button ("Suggest Forecasted Demand") next to the 'Forecasted Demand' row disappears when the 'Forecasted Stock' row is hidden.
Expected behavior:
The edit pencil visibility should not be affected by the 'Forecasted Stock' row.
opw-6240596
Forward-Port-Of: odoo/enterprise#120208This update fixes an issue where quality alerts weren't created when receiving inbound emails without a company assigned. The fix ensures that a default company ID is used, preventing errors and guaranteeing that all email-based quality alerts are properly recorded. This improves the reliability of our quality tracking system.
Original PR description
Steps to reproduce 1. Install quality 2. Create an incoming email server 3. Go to Quality > Configuration > Quality Teams > Team > add alias email 4. Do not fill the company field 5. Send email to this alias 6. Fetch emails from incoming email server Issue: - Record is not created in the quality alert Root cause: - For the Quality alert model, the field `company_id` is required, but while we fetch emails We haven't set the `company_id` on the quality alert team, resulting in trying to insert a null value on the quality alert model. Solution: - Give a default value to company_id. - Raise a validation error on not having a company_id - Update alias default values on changing company_id opw-5917791 Forward-Port-Of: odoo/enterprise#118516 Forward-Port-Of: odoo/enterprise#109947
This update ensures that all tax unit members, not just the main company, have read access to tax return checks. This allows for quicker resolution of issues related to failing checks, improving overall operational efficiency and reducing potential delays.
Original PR description
Before this commit: Tax Unit Members other than main company have read access to tax returns but don't have read access to tax return checks. After this commit: Tax Unit members other than main company are given read access to tax return checks also, so they can fix checks failing because of them. task-5951364 Forward-Port-Of: odoo/enterprise#113118
This update resolves a technical issue preventing receipt printing in the Italian POS module. Previously, a race condition caused the printer to become blocked after the first receipt, requiring a page refresh. The fix now ties printing to the 'Skip Preview Screen' option, ensuring reliable receipt generation.
Original PR description
Module: l10n_it_pos Steps to reproduce: - In the POS settings, enable "Automatic Receipt Printing"; - Enable "ePos Printer" to make the "Skip Preview Screen" option appear; - Disable "Skip Preview…
Module: l10n_it_pos Steps to reproduce: - In the POS settings, enable "Automatic Receipt Printing"; - Enable "ePos Printer" to make the "Skip Preview Screen" option appear; - Disable "Skip Preview Screen"; - Disable "ePos Printer"; - Set up an Italian Fiscal Printer; - Open a POS session and process a first order. Issue: After the first receipt, no other messages (price display, receipt, open register) are sent to the fiscal printer. A page reload is required. Issue: After the first receipt, no other messages (price display, receipt, open register) are sent to the fiscal printer. A page reload is required. Cause: When "Automatic Receipt Printing" is true but "Skip Preview Screen" is false, a race condition occurs. `afterOrderValidation` triggers a print job while simultaneously transitioning to the `ReceiptScreen`. When the `ReceiptScreen` mounts, it triggers a second fiscal print job before the first has resolved. This creates a deadlock in `toHtml` of `renderService`, permanently blocking the printer queue. Solution: Since the italian localisation sending the receipt to the fiscal printer is mandatory, the printing route is now tied to the "Skip Preview Screen" option. Enterprise PR: https://github.com/odoo/enterprise/pull/112654 [opw-5979212](https://www.odoo.com/odoo/project/49/tasks/5979212) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#271191 Forward-Port-Of: odoo/odoo#256932
This update resolves a bug that prevented receipt printing after the initial order in the Italian POS module. The fix ensures receipts are consistently printed by tying the printing process to the 'Skip Preview Screen' option, simplifying the setup for Italian users. Redundant settings have been removed to improve stability.
Original PR description
Module: l10n_it_pos Steps to reproduce: - In the POS settings, enable "Automatic Receipt Printing"; - Enable "ePos Printer" to make the "Skip Preview Screen" option appear; - Disable "Skip Preview…
Module: l10n_it_pos Steps to reproduce: - In the POS settings, enable "Automatic Receipt Printing"; - Enable "ePos Printer" to make the "Skip Preview Screen" option appear; - Disable "Skip Preview Screen"; - Disable "ePos Printer"; - Set up an Italian Fiscal Printer; - Open a POS session and process a first order. Issue: After the first receipt, no other messages (price display, receipt, open register) are sent to the fiscal printer. A page reload is required. Cause: When "Automatic Receipt Printing" is true but "Skip Preview Screen" is false, a race condition occurs. `afterOrderValidation` triggers a print job while simultaneously transitioning to the `ReceiptScreen`. When the `ReceiptScreen` mounts, it triggers a second fiscal print job before the first has resolved. This creates a deadlock in `toHtml` of `renderService`, permanently blocking the printer queue. Solution: Since the italian localisation sending the receipt to the fiscal printer is mandatory, the printing route is now tied to the "Skip Preview Screen" option. UI settings are adjusted to hide the redundant auto-print checkbox when an IT fiscal printer is configured. Community PR: https://github.com/odoo/odoo/pull/256932 [opw-5979212](https://www.odoo.com/odoo/project/49/tasks/5979212) Forward-Port-Of: odoo/enterprise#121257 Forward-Port-Of: odoo/enterprise#112654
This update fixes a display issue in the Helpdesk module where ticket labels in list and form views didn't match the labels shown in the Kanban view. The fix removes outdated label fields from the views, ensuring all ticket views now accurately reflect the selected state values. This improves consistency and clarity for users.
Original PR description
Steps to reproduce: ------------------------ 1. Install Helpdesk 2. Go to All Tickets and check the kanban state selection value 3. Go to Settings > Field Selection and search for kanban_state in…
Steps to reproduce:
------------------------
1. Install Helpdesk
2. Go to All Tickets and check the kanban state selection value
3. Go to Settings > Field Selection and search for kanban_state in `helpdesk.ticket` model
4. Change one of the state selection values (e.g., "Ready" to "Testing Ready")
5. Go back and check the state selection value in list and form views
Current behavior:
-----------------------
Kanban view correctly shows the updated label (e.g., "Testing Ready"),
but list and form views still display the old default value (e.g., "Ready").
Root cause:
---------------
The [state_selection](https://github.com/odoo/odoo/blob/c09cefdb0ed68b1b7367b77b18a5ee5d66c94900/addons/web/static/src/views/fields/state_selection/state_selection_field.js#L57-L65) widget uses `legend_${state}` field values when available.
Since list and form views included these legend fields, the widget resolved labels from them
instead of the actual selection values, causing inconsistent display.
Fix:
-----
Remove `legend_normal`, `legend_blocked`, and `legend_done` fields from the list and form views,
So the widget falls back to the real selection labels, consistent with how the kanban view behaves.
Reference commit: https://github.com/odoo/enterprise/commit/65f3b88254e3a66e2c5dcb5142d30f6b1996d999
opw-6238765
Forward-Port-Of: odoo/enterprise#119707This update fixes a display issue where the Incoterm (shipping term) wasn't showing on purchase quotation reports. After a recent code update, the fix ensures that this important information is now correctly presented, improving clarity for purchasing teams. This ensures accurate reporting and better understanding of shipping costs.
Original PR description
After a refactor the incoterm and location didn't show on the purchase quotation Task-id: 6206523
This update fixes an issue where custom inline shadows weren't correctly recognized by the HTML builder, leading to incorrect shadow displays. Now, elements with inline shadows are properly detected, and cleaning custom shadows also removes Bootstrap shadow classes. This ensures consistent and accurate shadow rendering across Odoo.
Original PR description
Before this PR, , since [1], elements with an inline `box-shadow` and no custom shadow class were not detected as custom shadows by the builder option. This could make existing snippets show the wrong shadow state. After this PR, elements with an inline `box-shadow` are treated as custom shadows by the builder option, and cleaning the custom shadow also removes Bootstrap shadow classes. [1]: https://github.com/odoo/odoo/commit/55890082db7879bef3a976c84ab336bdacf76818 task-6251151
This update fixes a bug in the Point of Sale ticket screen that allowed users to repeatedly refund orders, even fully refunded ones. The change prevents users from increasing the quantity of a refund order, ensuring that refunds are processed correctly and avoiding potential financial discrepancies. This improves the reliability of the refund process.
Original PR description
In the ticket screen, clicking an order line selected it for refund and incremented its quantity without checking whether the line could actually be refunded. As a result, a refund order (whose lines carry a negative quantity) could itself be refunded, and already fully refunded lines could be refunded again. opw-6314527 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update corrects a bug in the Mod349 report, ensuring that invoices marked as paid within the selected period are now correctly included. The previous version incorrectly removed these invoices due to a flaw in the report's filtering logic. This change ensures accurate reporting of financial data.
Original PR description
The mod349 report engine has been refactored to use tax tags (commit : 5f36778288a1b60245acec74677421666448351f). To avoid redundancies, the query used to get the invoice lines to include is designed to remove the amounts that have been reconciled with a credit note during the selected period. However, the current query removes the lines from any invoice that is reconciled with a move created in the period. As a result, invoices that have been paid in the period are also removed from the report. opw-6250491
A technical issue in the 'test_product_level_discount' tour was intermittently failing. This update ensures the order status update request is fully processed before the tour searches for the order, preventing incorrect results. Applying a 'Paid' filter to the ticket screen guarantees the tour searches the correct order list.
Original PR description
The tour `test_product_level_discount` was failing intermittently because the order status update request was not fully processed before the nextstep executed. As a result, the tour searched for the order in the wrong ticket list. This commit adds a proper wait for the backend request after updating the order status and applies the Paid filter on the ticket screen to ensure the tour searches in the correct order list. Runbot Error: [241140](https://runbot.odoo.com/odoo/runbot.build.error/241140)
This update fixes an error in the Austrian localization of Odoo Enterprise 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 data accuracy for Austrian users.
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 resolves an issue where the CoA reload process could inadvertently create duplicate reports. The CoA framework is now responsible for managing existing records, ensuring data integrity and preventing redundant report generation. This change improves system efficiency and accuracy.
Original PR description
It is the burden of the CoA framework to check for that. See community commit for more information. Forward-Port-Of: odoo/enterprise#121643
4 changes
Resolved issues and error corrections
This update resolves an issue where new modules could fail to install correctly when containing data for deleted records. The fix corrects a technical error within the `l10n_sa_edi` module, ensuring smoother and more reliable module installations. This prevents data loss and improves the overall stability of the system.
Original PR description
Installing a new module should be safe even when the module contains new data for records that have been deleted. It is not the responsibility of the localization to make sure of that. The fix in `l10n_sa_edi` had 2 issues: * calling `self.env.ref` instead of `self.ref` * Checking for the existence of records even in the case of installing the CoA for the first time on a company, which obviously doesn't contain anything. This results in always ignoring the data.
This update resolves an issue where the CoA reload process unintentionally modified existing financial reports. The CoA framework is now responsible for managing these records, ensuring data integrity and preventing unexpected changes. This change improves the stability and reliability of financial reporting within the system.
Original PR description
It is the burden of the CoA framework to check for that. See community commit for more information.
This update resolves a technical error preventing the Spanish E-Invoice module (`l10n_es_edi_verifactu`) from functioning correctly during upgrades. The fix ensures the necessary 'certificate' module is loaded first, preventing a system error that blocked the module's operation. This ensures a smoother upgrade process and reliable functionality for users.
Original PR description
### Issue `l10n_es_edi_verifactu` builds an inheritance on `certificate.certificate` and loads that module's views/demo, but only declares `depends: ['l10n_es']`. With `certificate` not guaranteed to…
### Issue `l10n_es_edi_verifactu` builds an inheritance on `certificate.certificate` and loads that module's views/demo, but only declares `depends: ['l10n_es']`. With `certificate` not guaranteed to load first, building the registry without it already present raises: ``` TypeError: Model 'certificate.certificate' does not exist in registry. ``` ### Cause `models/certificate.py` → `_inherit = 'certificate.certificate'`; manifest `data` loads `views/certificate_certificate_views.xml` and `demo/demo_certificate.xml`. Yet `certificate` is absent from `depends`. Every sibling (`l10n_es_edi_facturae`/`sii`/`tbai`, `l10n_sa_edi`) already depends on `certificate`. Present since the module was added in `02f8d5525eb7`. ### Notes - Opened on **18.0** so it **forward-ports to 19.0** (both stable branches carry the bug). `master` already has the equivalent change via #234729 — the forward-port there should be a no-op. - Surfaced via an 18.0→19.0 OpenUpgrade migration that force-updates `verifactu` before `certificate` loads; also reproducible on a plain install where `certificate` isn't otherwise pulled in first. Forward-Port-Of: odoo/odoo#271827 Forward-Port-Of: odoo/odoo#271496
This update fixes an issue where quality alerts weren't being created when receiving emails without a company assigned. The fix ensures that a default company is now automatically applied, preventing errors and guaranteeing that all incoming emails are properly recorded within the quality alert system. This improves data accuracy and reporting.
Original PR description
Steps to reproduce 1. Install quality 2. Create an incoming email server 3. Go to Quality > Configuration > Quality Teams > Team > add alias email 4. Do not fill the company field 5. Send email to this alias 6. Fetch emails from incoming email server Issue: - Record is not created in the quality alert Root cause: - For the Quality alert model, the field `company_id` is required, but while we fetch emails We haven't set the `company_id` on the quality alert team, resulting in trying to insert a null value on the quality alert model. Solution: - Give a default value to company_id. - Raise a validation error on not having a company_id - Update alias default values on changing company_id opw-5917791 Forward-Port-Of: odoo/enterprise#118516 Forward-Port-Of: odoo/enterprise#109947
1 change
Resolved issues and error corrections
This update corrects a display issue in the Helpdesk module where ticket labels in list and form views didn't always reflect the most current state selection. The fix removes outdated label fields from the views, ensuring all views show the correct, up-to-date state labels, matching the kanban view.
Original PR description
Steps to reproduce: ------------------------ 1. Install Helpdesk 2. Go to All Tickets and check the kanban state selection value 3. Go to Settings > Field Selection and search for kanban_state in…
Steps to reproduce:
------------------------
1. Install Helpdesk
2. Go to All Tickets and check the kanban state selection value
3. Go to Settings > Field Selection and search for kanban_state in `helpdesk.ticket` model
4. Change one of the state selection values (e.g., "Ready" to "Testing Ready")
5. Go back and check the state selection value in list and form views
Current behavior:
-----------------------
Kanban view correctly shows the updated label (e.g., "Testing Ready"),
but list and form views still display the old default value (e.g., "Ready").
Root cause:
---------------
The [state_selection](https://github.com/odoo/odoo/blob/c09cefdb0ed68b1b7367b77b18a5ee5d66c94900/addons/web/static/src/views/fields/state_selection/state_selection_field.js#L57-L65) widget uses `legend_${state}` field values when available.
Since list and form views included these legend fields, the widget resolved labels from them
instead of the actual selection values, causing inconsistent display.
Fix:
-----
Remove `legend_normal`, `legend_blocked`, and `legend_done` fields from the list and form views,
So the widget falls back to the real selection labels, consistent with how the kanban view behaves.
Reference commit: https://github.com/odoo/enterprise/commit/65f3b88254e3a66e2c5dcb5142d30f6b1996d999
opw-6238765
Forward-Port-Of: odoo/enterprise#11970712 changes
Resolved issues and error corrections
This update streamlines the calculation of French VAT within the Odoo system. By removing unnecessary dependencies on account move data, the system now computes VAT more efficiently, reducing potential delays and improving overall performance. This change addresses a previous build error and prevents unnecessary recalculations when partner information is updated.
Original PR description
- This removes dependency on account move fields to company : Build error 939448 - This removes dependency on account move fields to commercial_partner_id fields (avoid recompute all moves on partner info change) Forward-Port-Of: odoo/odoo#271822 Forward-Port-Of: odoo/odoo#269701
This update corrects a problem within the planning module's automated testing process. The fix ensures that test data is self-contained, preventing issues with undo operations affecting previously allocated hours. This improves the reliability of our planning test suite.
Original PR description
Fix by creating the planning role directly within the test, making it self-contained. runbot error-939985 Forward-Port-Of: odoo/enterprise#121111
This update resolves an issue where users with sales permissions couldn't modify production orders. The fix ensures that sales users have the necessary access to update production order details, streamlining workflows and improving user flexibility. This was caused by a security rule preventing access to the order data.
Original PR description
### Steps to reproduce: - Ensure `sale_stock_renting` is installed - Enable Multi-Steps Routes > Unarchive MTO - Create a product P with a BoM and the routes MTO + manufacture - Create anc confirm a…
### Steps to reproduce: - Ensure `sale_stock_renting` is installed - Enable Multi-Steps Routes > Unarchive MTO - Create a product P with a BoM and the routes MTO + manufacture - Create anc confirm a sale order for A unit of P - Log in with an other user with with mrp User rights and sales User: Own Documents Only (he should not have access to the SO) - Open the MO, add a component line and save #### > Access Error: Blame the following rule: - Personal Order ### Cause of the issue: Writing on the `move_raw_ids` will trigger a call of the `_autoconfirm_production` in order to confirm the newly created move: https://github.com/odoo/odoo/blob/e447f4849056a0aab35966fb6ba595ebaadb79ab/addons/mrp/models/mrp_production.py#L990-L991 https://github.com/odoo/odoo/blob/e447f4849056a0aab35966fb6ba595ebaadb79ab/addons/mrp/models/mrp_production.py#L1422-L1423 During this confirmation process, one calls the `_merge_moves` method in order to merge this new move (if relevant) to any already existing one. https://github.com/odoo/odoo/blob/e447f4849056a0aab35966fb6ba595ebaadb79ab/addons/stock/models/stock_move.py#L1575-L1576 Now, the issue is that, `sale_stock_renting` modeule overrides the method `_prepare_merge_moves_distinct_fields` determining the fields relevant to the merge by requiring a read access to the `is_rental_order` compute field of the `sale_order` linked to the MO: https://github.com/odoo/enterprise/blob/b66097122ba3a758734ac6fb2b26579c35cb72c2/sale_stock_renting/models/stock_move.py#L34-L40 However, due to the 'Personal Orders' ir.rule, the user does not have a read access to this record: https://github.com/odoo/odoo/blob/e447f4849056a0aab35966fb6ba595ebaadb79ab/addons/sale/security/ir_rules.xml#L44-L49 Enterprise: https://github.com/odoo/enterprise/pull/121135 opw-6275658 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#271371 Forward-Port-Of: odoo/odoo#271017
This update resolves an issue preventing sales users with 'Own Documents Only' access from modifying production orders. The fix adjusts security rules to grant necessary read access, ensuring sales users can correctly update production order details when renting stock.
Original PR description
### Steps to reproduce: - Ensure `sale_stock_renting` is installed - Enable Multi-Steps Routes > Unarchive MTO - Create a product P with a BoM and the routes MTO + manufacture - Create anc confirm a…
### Steps to reproduce: - Ensure `sale_stock_renting` is installed - Enable Multi-Steps Routes > Unarchive MTO - Create a product P with a BoM and the routes MTO + manufacture - Create anc confirm a sale order for A unit of P - Log in with an other user with with mrp User rights and sales User: Own Documents Only (he should not have access to the SO) - Open the MO, add a component line and save #### > Access Error: Blame the following rule: - Personal Order ### Cause of the issue: Writing on the `move_raw_ids` will trigger a call of the `_autoconfirm_production` in order to confirm the newly created move: https://github.com/odoo/odoo/blob/e447f4849056a0aab35966fb6ba595ebaadb79ab/addons/mrp/models/mrp_production.py#L990-L991 https://github.com/odoo/odoo/blob/e447f4849056a0aab35966fb6ba595ebaadb79ab/addons/mrp/models/mrp_production.py#L1422-L1423 During this confirmation process, one calls the `_merge_moves` method in order to merge this new move (if relevant) to any already existing one. https://github.com/odoo/odoo/blob/e447f4849056a0aab35966fb6ba595ebaadb79ab/addons/stock/models/stock_move.py#L1575-L1576 Now, the issue is that, `sale_stock_renting` module overrides the method `_prepare_merge_moves_distinct_fields` determining the fields relevant to the merge by requiring a read access to the `is_rental_order` compute field of the `sale_order` linked to the MO: https://github.com/odoo/enterprise/blob/b66097122ba3a758734ac6fb2b26579c35cb72c2/sale_stock_renting/models/stock_move.py#L34-L40 However, due to the 'Personal Orders' ir.rule, the user does not have a read access to this record: https://github.com/odoo/odoo/blob/e447f4849056a0aab35966fb6ba595ebaadb79ab/addons/sale/security/ir_rules.xml#L44-L49 Community: https://github.com/odoo/odoo/pull/271017 opw-6275658 Forward-Port-Of: odoo/enterprise#121135
This update fixes a display issue in Helpdesk where ticket state labels in list and form views didn't reflect the most recent changes made in the Kanban view. The fix removes outdated reference fields, ensuring all views show the correct, up-to-date state labels for improved consistency and accuracy.
Original PR description
Steps to reproduce: ------------------------ 1. Install Helpdesk 2. Go to All Tickets and check the kanban state selection value 3. Go to Settings > Field Selection and search for kanban_state in…
Steps to reproduce:
------------------------
1. Install Helpdesk
2. Go to All Tickets and check the kanban state selection value
3. Go to Settings > Field Selection and search for kanban_state in `helpdesk.ticket` model
4. Change one of the state selection values (e.g., "Ready" to "Testing Ready")
5. Go back and check the state selection value in list and form views
Current behavior:
-----------------------
Kanban view correctly shows the updated label (e.g., "Testing Ready"),
but list and form views still display the old default value (e.g., "Ready").
Root cause:
---------------
The [state_selection](https://github.com/odoo/odoo/blob/c09cefdb0ed68b1b7367b77b18a5ee5d66c94900/addons/web/static/src/views/fields/state_selection/state_selection_field.js#L57-L65) widget uses `legend_${state}` field values when available.
Since list and form views included these legend fields, the widget resolved labels from them
instead of the actual selection values, causing inconsistent display.
Fix:
-----
Remove `legend_normal`, `legend_blocked`, and `legend_done` fields from the list and form views,
So the widget falls back to the real selection labels, consistent with how the kanban view behaves.
Reference commit: https://github.com/odoo/enterprise/commit/65f3b88254e3a66e2c5dcb5142d30f6b1996d999
opw-6238765
Forward-Port-Of: odoo/enterprise#119707This update ensures that custom reports attached to invoices display their intended names in email attachments, rather than using a default CFDI-based filename. The change resolves an issue caused by how the system handles localization overrides, improving the clarity and accuracy of invoice attachments for users.
Original PR description
Steps to reproduce: * Install `l10n_mx_edi` (or `l10n_sa_edi`). * Go to **Accounting → Customers → Invoices**. * Open **Studio** and, from the top bar, go to **Reports**. * Duplicate the standard…
Steps to reproduce: * Install `l10n_mx_edi` (or `l10n_sa_edi`). * Go to **Accounting → Customers → Invoices**. * Open **Studio** and, from the top bar, go to **Reports**. * Duplicate the standard **Invoice PDF** report. * Open the duplicated report and make any modification to it. * Enable **Developer Mode**. * Go to **Settings → Technical → Actions → Reports** and update the custom report's **Printed Report Name**. * Go to **Settings → Technical → Email → Templates** and create a new invoice email template. * Add the custom report to the template's **Dynamic Reports**. * Create and confirm an invoice for a **Mexican company**. * Click **Send** and select the newly created email template. Observed behavior: * The custom report attachment uses the CFDI-based filename instead of its own report name, making it appear as a duplicate of the standard invoice attachment. Cause: * `_get_placeholder_mail_template_dynamic_attachments_data` relied on the `invoice_report` context key to pass the extra report into `_get_invoice_report_filename`. However, localization overrides (e.g. `l10n_mx_edi`, `l10n_sa_edi`) unconditionally return their own filename without checking the context, so the extra report's `print_report_name` was never evaluated. Fix: * Introduce `_get_invoice_mail_template_dynamic_report_filename` on `account.move` that directly evaluates a given report's `print_report_name`, bypassing the localization override chain. * Call this new method in `_get_placeholder_mail_template_dynamic_attachments_data` instead of the context-based `_get_invoice_report_filename` call. This avoids the need to patch every localization override and cleanly separates the concern of naming dynamic report attachments from the main invoice report filename logic. opw-6228268 Forward-Port-Of: odoo/odoo#271489
This update resolves a bug that prevented the translate button from working correctly when adding new records within related fields (like survey answers). The fix ensures that the translate button is hidden when a record is newly created and doesn't have a unique ID, preventing database errors and improving the user experience. This ensures translations can be applied correctly after saving new data.
Original PR description
The translate button next to a translatable field saves the record before opening the translation dialog for its id. Since https://github.com/odoo/odoo/commit/a85ca9679e3855936afc66b034d05d75f672dd26…
The translate button next to a translatable field saves the record before opening the translation dialog for its id. Since https://github.com/odoo/odoo/commit/a85ca9679e3855936afc66b034d05d75f672dd26 it saves record.model.root rather than the record itself. When the field belongs to a new record still edited inside an x2many, for example an answer added in the survey question popup, saving the root only saves the parent and the new line keeps no database id. The dialog then opens with the id set to false and calls update_field_translations on it, which builds WHERE id = false and the database rejects it with operator does not exist: integer = boolean. Such a record gets no id of its own, and after a save and reload there is no reliable way to match the saved line back to the one that was clicked, so the dialog can never open for it. A canTranslate getter in TranslationButton returns false for a new record whose model root is another record, which is exactly a line still edited inside an x2many, and the template only renders the button when it is true. The variant in editable lists, where model.root is a list rather than a record, was handled in https://github.com/odoo/odoo/commit/cb34b318004c3ca9db755d8dbbad429609220df3. Steps to reproduce: 1. Activate a second language in Settings > Translations > Languages 2. Open the Surveys app and create a survey 3. Add a question, then in the Answers tab add a line and type a value 4. Click the EN button next to the answer, fill the second language, and Save => RPC error operator does not exist: integer = boolean from WHERE id = false Ticket [link](https://www.odoo.com/odoo/project.task/6260427) opw-6260427 Forward-Port-Of: odoo/odoo#270410 Forward-Port-Of: odoo/odoo#267781
This fix resolves an issue where forecasting availability was incorrect after a product was scrapped following a subcontractor resupply. The update ensures that the forecast accurately reflects the available stock after the resupply, preventing inaccurate availability calculations. This improves the reliability of inventory planning.
Original PR description
[FIX] stock,*: properly compute forecast availability after PO resupply scrap * : mrp_subcontracting_purchase # How to reproduce - Enable Subcontracting in the settings - Create Product A with : -…
[FIX] stock,*: properly compute forecast availability after PO resupply scrap * : mrp_subcontracting_purchase # How to reproduce - Enable Subcontracting in the settings - Create Product A with : - Quantity : > 0 - Routes : Buy & Resupply Subcontractor on Order - Create Product B - Create BOM for that Product with - BOM Type : Subcontracting - Subcontractors : any - Component : Product A - Create a PO for Product B - Confirm the PO Order - Use the Resupply smart button - Click on the gear icons > Scrap - Scrap Product A # The problem A traceback will appear. # Cause There are two main ways to get the picking type's code of a move. Either : - `product_code` which is a related field to `picking_id.picking_type_id.code` : https://github.com/odoo/odoo/blob/0442c66d26b0c23313f17c566b16e34e7b22c2b6/addons/stock/models/stock_move.py#L174 - `picking_type_id.code` where `picking_type_id` is a computed field : https://github.com/odoo/odoo/blob/0442c66d26b0c23313f17c566b16e34e7b22c2b6/addons/stock/models/stock_move.py#L283-L287 When we scrap the products, we call the `do_scrap()` function that creates a new scrap move : https://github.com/odoo/odoo/blob/0442c66d26b0c23313f17c566b16e34e7b22c2b6/addons/stock/models/stock_scrap.py#L158 When we do so, the create move's `picking_code` wil be the code of the picking type of the current picking (The subcontractor resupply) : https://github.com/odoo/odoo/blob/0442c66d26b0c23313f17c566b16e34e7b22c2b6/addons/stock/models/stock_scrap.py#L151 But `picking_type_id.code` will be different because there is a `default_picking_type_id` value set in the context by : https://github.com/odoo/odoo/blob/0442c66d26b0c23313f17c566b16e34e7b22c2b6/addons/purchase_stock/models/purchase_order.py#L223 In our case, theses values end up not being the same. Later, when we compute the forecast information of the move, we prefetch virtual available keys and put the moves in a dict based on those keys. The computation of the virtual available key is based on the `picking_code` of the move : https://github.com/odoo/odoo/blob/0442c66d26b0c23313f17c566b16e34e7b22c2b6/addons/stock/models/stock_move.py#L488-L490 https://github.com/odoo/odoo/blob/0442c66d26b0c23313f17c566b16e34e7b22c2b6/addons/stock/models/stock_move.py#L496-L499 When later we try to fetch back the move, we compute the virtual available key based on `picking_type_id.code` : https://github.com/odoo/odoo/blob/0442c66d26b0c23313f17c566b16e34e7b22c2b6/addons/stock/models/stock_move.py#L529-L536 But since `picking_code` and `picking_type_id.code` are different, the output `key_virtual_available` is also different. Essentially, we add the move in the dict with key A and then try to fetch it back using key B, which gives us a KeyError. opw-6145887
This update fixes an issue where flexible work schedules were incorrectly calculating expected hours due to timezone differences. The fix ensures accurate hour tracking by considering the full date and time, preventing overestimation of expected work time when employees work in significantly different time zones.
Original PR description
**Problem:** When the time zone of an employee's schedule is different from the employee's time zone, and that the employee's time zone has more than 9 hours of difference with UTC. and the schedule…
**Problem:**
When the time zone of an employee's schedule is different from the employee's time zone, and that the employee's time zone has more than 9 hours of difference with UTC. and the schedule is flexible and is set to 40h per week. When we open the Attendances app, the expected hours for this employee show 48h.
**Steps to reproduce:**
- Create an employee with a flexible 40h/week schedule and a contract.
- Set employee timezone to Asia/Pyongyang and the working schedule timezone to Europe/Brussels.
- Open Attendances > Overview > Dashboard in week view.
- denominator shows 48h or any other number than 40h.
**Cause:**
In flexible calendars, weekly expected hours are computed by iterating within `[start_dt, end_dt]`. and That logic truncated bounds to `.date()`, assuming `end_dt - 1 second` would always move to the previous day.
That assumption breaks when employee timezone differs from schedule timezone and the employee timezone is far from UTC (like Asia/Pyongyang). so, `end_datetime` is no longer near midnight in local time, so subtracting one second keeps the same date. The loop then includes one extra day and allocates an extra 8h, showing 48h expected instead of 40h in Attendances.
**Fix:**
This change keeps full datetime bounds (instead of truncating to date), so comparisons preserve timezone offset and time of day precision. This prevents the extra day and restores correct weekly expected hours. The original code before this 332cb43 was like this:
```python
start_date = start_datetime.date()
end_datetime_adjusted = end_datetime - relativedelta(seconds=1)
end_date = end_datetime_adjusted.date()
```
this will not work as `.date()` will do the same problem of the extra day allocation.
Affected from 18.0 -> 18.4
Fixed in 19.0+ by this
Backport of https://github.com/odoo/odoo/pull/252847
opw-6171432
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#268346
Forward-Port-Of: odoo/odoo#262805This update ensures that invoice data is accurately reflected after vendor bills are imported and automatically completed from purchase orders. Previously, changes to invoice lines, taxes, and payment terms caused stale data in EPD lines, leading to discrepancies. Now, the system correctly updates all invoice details, maintaining consistency between invoices and journal entries.
Original PR description
When a vendor bill is imported and auto-completed from a purchase order, then invoice lines, taxes, fiscal position, and payment terms can change. Existing EPD dynamic lines that lose their epd_key are skipped by sync and keep stale tax tags and amounts, causing mismatches between Invoice Lines and Journal Items. This commit makes EPD sync include keyless existing EPD lines so they are rewritten or removed during dynamic recomputation after PO auto-complete. Journal items remain consistent with the final invoice lines, taxes, and early discount configuration. Ticket [link](https://www.odoo.com/odoo/project.task/6047505) opw-6047505 Forward-Port-Of: odoo/odoo#271631 Forward-Port-Of: odoo/odoo#265539
This update optimizes a key process within our stock management system, specifically the `_compute_forecast_information` function. By removing an inefficient loop, we’ve significantly reduced processing time when dealing with large quantities of stock data, leading to faster Manufacturing Order access. This improves overall system responsiveness.
Original PR description
Before this commit, database with large amounts of `stock.move` records could face slow downs when trying to access Manufacturing Orders. While this is partially due to very heavy computations being…
Before this commit, database with large amounts of `stock.move` records could face slow downs when trying to access Manufacturing Orders. While this is partially due to very heavy computations being done, another factor was the use of a loop in `_compute_forecast_information`. This loop would iterate over a recordset of `stock.move` records and put them into a dictionary, sorted by location. As the size of the recordset grew, this loop would take longer and longer. Here, we remove this loop and instead use a built in method to speed things up. ## Benchmarks: |Record count|Time before|Queries before|Time after|Queries after| |------------|-----------|--------------|----------|-------------| |6,262 |0.13s |68 |0.12s |68 | |68,882 |0.60s |112 |0.58s |109 | |432,317 |5.49s |398 |3.68s |309 | |757,702 |15.33s |1,141 |5.79s |599 | [opw-6310415](https://www.odoo.com/odoo/action-6450/6310415?debug=assets) Forward-Port-Of: odoo/odoo#271677
This update ensures that partner bank accounts are usable within all child companies, even if the partner is associated with a parent company. Previously, this functionality was limited, causing potential disruptions for users managing multiple company branches. This change improves efficiency and simplifies bank account management across the Odoo system.
Original PR description
Even when a partner has the 'company_id' filled with the parent company, his bank account should be usable in the child companies. This was done in odoo/odoo#262173 from 19.2 but we need to backport it in stable task-6309694 Forward-Port-Of: odoo/odoo#271470
3 changes
Resolved issues and error corrections
A minor typo in the system's redirection logic for signatures has been corrected. This ensures users are correctly directed to the correct page for managing their signatures, improving the user experience. This fix prevents potential confusion and ensures proper functionality.
Original PR description
There was a typo when forward-porting PR 116949, the redirection should be /my/signatures instead of /my/signature/signatures.
This update resolves an issue where undoing a planning action incorrectly removed allocated hours. The fix creates the necessary planning role directly within the test environment, ensuring the undo operation functions as expected and maintains accurate time tracking. This improves the reliability of the planning module.
Original PR description
Fix by creating the planning role directly within the test, making it self-contained. runbot error-939985 Forward-Port-Of: odoo/enterprise#121111
This update fixes a display inconsistency in Helpdesk ticket views. Previously, list and form views showed the default state label instead of the updated one seen in the Kanban view. The fix removes outdated field references, ensuring all views now accurately reflect the selected state.
Original PR description
Steps to reproduce: ------------------------ 1. Install Helpdesk 2. Go to All Tickets and check the kanban state selection value 3. Go to Settings > Field Selection and search for kanban_state in…
Steps to reproduce:
------------------------
1. Install Helpdesk
2. Go to All Tickets and check the kanban state selection value
3. Go to Settings > Field Selection and search for kanban_state in `helpdesk.ticket` model
4. Change one of the state selection values (e.g., "Ready" to "Testing Ready")
5. Go back and check the state selection value in list and form views
Current behavior:
-----------------------
Kanban view correctly shows the updated label (e.g., "Testing Ready"),
but list and form views still display the old default value (e.g., "Ready").
Root cause:
---------------
The [state_selection](https://github.com/odoo/odoo/blob/c09cefdb0ed68b1b7367b77b18a5ee5d66c94900/addons/web/static/src/views/fields/state_selection/state_selection_field.js#L57-L65) widget uses `legend_${state}` field values when available.
Since list and form views included these legend fields, the widget resolved labels from them
instead of the actual selection values, causing inconsistent display.
Fix:
-----
Remove `legend_normal`, `legend_blocked`, and `legend_done` fields from the list and form views,
So the widget falls back to the real selection labels, consistent with how the kanban view behaves.
Reference commit: https://github.com/odoo/enterprise/commit/65f3b88254e3a66e2c5dcb5142d30f6b1996d999
opw-6238765
Forward-Port-Of: odoo/enterprise#11970714 changes
Resolved issues and error corrections
A recent update to Odoo's user interface broke the way certain fields, specifically the VAT field, are displayed. This fix corrects the broken XPath expressions, ensuring the VAT field is correctly rendered across multiple Odoo localization modules. This resolves a display issue impacting financial reporting.
Original PR description
The refactor of identifiers on both the partner and company views broke some xpaths. This commits aims at repairing those. See https://github.com/odoo/odoo/pull/262274 See https://github.com/odoo/enterprise/pull/115838 task-none
This update resolves a critical issue where salary rounding wasn't correctly applied in Belgian payroll tests due to a missing company country setting. Additionally, a fix was implemented to address overlapping test data in scheduling tests, preventing errors and ensuring accurate shift splitting. These changes improve the reliability of payroll calculations and scheduling functionality.
This update resolves an issue where sign templates with auto-filled fields would incorrectly display placeholders instead of the actual values, or fail to generate documents. The fix ensures falsy auto-filled values are properly preserved, preventing errors and guaranteeing accurate sign document generation.
Original PR description
Version: - 19.0 Steps to reproduce: - Create a sign template with a readonly sign item linked to an auto field. - Use a reference record where the linked field value is empty or False. - Send the…
Version: - 19.0 Steps to reproduce: - Create a sign template with a readonly sign item linked to an auto field. - Use a reference record where the linked field value is empty or False. - Send the document for signing. - Complete the signing flow. Issue: - Readonly sign items linked to auto-filled values could not properly handle falsy values. Empty values could trigger the error "Some required items are not filled" and completed sign requests displayed the sign item placeholder instead of the actual auto-filled value. - completed document generation could fail when rendering falsy values for textarea sign items. Cause: - Falsy auto-filled values were ignored during constant item population and replaced by the sign item placeholder. Additionally, readonly constant items were included in required field validation and completed sign requests continued to display placeholders when the stored value was empty. - document rendering assumed sign item values were always strings for textarea sign items but when auto field is empty it value can be False. Fix: - Preserve falsy values when populating readonly constant items, exclude constant items from signer validation, and hide placeholders for empty auto-filled constant items when displaying completed sign requests. - Normalize falsy values to prevent crashes and allow completed documents to be generated correctly. Forward-Port-Of: odoo/enterprise#121299 Forward-Port-Of: odoo/enterprise#121009
This update fixes a scheduling issue with semi-monthly payrolls. Previously, payslips were incorrectly aligned with the month's halves, resulting in overlapping periods. The change now ensures payslips start on the 16th of the month, accurately reflecting the payroll schedule.
Original PR description
Issue: ---------------------------------------- The start date of semi-monthly payslips on second half of the month is the 15 which is also the end date of the first half of the month. Steps to reproduce: ---------------------------------------- - Have an employee with a semi-monthly payroll - When in the first half of the month, create a payslip for this employee - The payslip is from 1st to 15th - Do the same when in the second half of the month - The payslip is from 15th to end of the month Cause: ---------------------------------------- In `_schedule_period_start()` we set the start date to th 15th for semi-monthly payslips. Solution: ---------------------------------------- Set it to the 16th. opw-6281556 Forward-Port-Of: odoo/enterprise#120887 Forward-Port-Of: odoo/enterprise#120172
This update fixes an issue where the system incorrectly rejected zero measurements from caliper devices in IoT data. This ensures accurate reporting of measurements, particularly when a device isn't detecting anything. The update also includes a minor typo correction.
Original PR description
Fix a check on the IoT response that incorrectly rejected valid measurements of 0 from caliper devices Also fix a typo opw-6184669 Forward-Port-Of: odoo/enterprise#121226 Forward-Port-Of: odoo/enterprise#121116
This update resolves an issue where users were encountering access errors when using the timesheet suggestion dropdown. The fix prevents the timer from suggesting tasks the user no longer has permission to view, ensuring a smoother timesheet experience. This improves usability and prevents potential disruptions for users.
Original PR description
Steps to reproduce: - 1. Log in as a user who can see their own timesheets and has already logged time on tasks that are now in projects they can no longer read (e.g. Marc Demo in the demo data). 2. Open the Timesheets timer in the systray and check in. 3. Click the task field to open the suggestions dropdown. Issue: - An access error is raised when the task dropdown is opened. Cause: - The timer's `project.task` `name_search` override suggests recently used tasks via `account.analytic.line.sudo()._get_recently_used_records()`. The sudo surfaces task ids the user can no longer read. `name_search` returns them, raising the access error. Fix: - Filter the aggregation result so only tasks the user can read are returned. task-6319815 Forward-Port-Of: odoo/enterprise#121345
A minor typo in the payroll warning system was causing incorrect alerts. This update corrects the typo, ensuring that payroll warnings are accurately identified and displayed to users. This resolves a potential disruption to payroll reporting.
Original PR description
The DMFA submission payroll warning was incorrectly matched by _get_payroll_translation because of a small typo task-6326554
This update resolves an issue where PrintRec components could receive incorrect data values. Previously, these components weren't properly validated, which could lead to unexpected behavior. This fix ensures data integrity for PrintRec components, particularly when used in production environments.
Original PR description
This commit fixes the props validation of PrintRec* components since they can receive `false` on some property. Before the components were not validated because they were mounted with a production mode app.
This update resolves a technical issue impacting work order duration calculations. A recent code change shifted a related function, but a critical component – accounting for travel time – was missed. This fix, triggered by a runbot error, ensures accurate work order duration reporting.
Original PR description
get_duration was moved from mrp_workorder to mrp in odoo/odoo#267113 and odoo/enterprise#118753 However, _intervals_duration missed the trip This solves runbot error 940411
This update enhances the helpdesk system by adding tests to ensure auto-reminder emails are sent correctly before tickets are automatically closed. It also corrects a calculation error in the reminder timer, preventing delays in sending these important notifications. This improves the efficiency of our support process and ensures timely communication with customers.
Original PR description
- add tests for the auto reminder email before auto-closing tickets - fix issue with the reminder timer calculation --- task-5438678 Forward-Port-Of: odoo/enterprise#120540
This update resolves a technical issue impacting the performance of the Gantt chart within the Enterprise module. Specifically, a variable name was corrected to enhance the functionality and stability of the underlying planning service. This change ensures smoother chart operation for users.
Original PR description
task-6200248
This update corrects a bug in how appointment invitations are sent, ensuring they are only triggered for 'booked' or 'requested' appointments. Previously, invitations were incorrectly sent for cancelled appointments or when status was updated. This ensures accurate and timely appointment notifications for users.
Original PR description
This PR fix three issues related to the sending of the appointment invitations. Each one has its own commit: - Commit 1 sends invitations only if the event either "booked" or "request". Previously they were sent even if the appointment was cancelled. - Commit 2 prevents the sending of regular invitations and always sends appointment invitation to new attendees of existing booked appointments. - Commit 3 sent appointment invitations if the status of an existing event is set "request". It also add the status change in the log as it would have been if it was done at the creation. Community PR: https://github.com/odoo/odoo/pull/260073 Task-6139036 Forward-Port-Of: odoo/enterprise#121381 Forward-Port-Of: odoo/enterprise#114304
This update resolves a stability issue in the point-of-sale tour. Previously, the tour could fail due to asynchronous order processing, leading to duplicate requests. By adding a delay to ensure requests are fully completed, this fix prevents race conditions and improves the reliability of the tour.
Original PR description
The tour could fail because `sendOrderInPreparationUpdateLastChange` is asynchronous when sending the order to the kitchen. The test was continuing to the next steps before the request was fully resolved, which could lead to sending the order again while the previous call was still in progress. This commit updates the tour to explicitly wait for the async call to complete before continuing, by adding a delay step after clicking the order button. This prevents race conditions during the test. --- Runbot Error: https://runbot.odoo.com/odoo/runbot.build.error/181846 Forward-Port-Of: odoo/enterprise#121237 Forward-Port-Of: odoo/enterprise#110909
A recent update to the Odoo Enterprise system (version 19.2 and later) caused a test for the 'hr_holidays_gantt' module to fail. This was due to an issue with a payroll-related field in the test's configuration. This fix ensures the test runs successfully, maintaining the functionality of the holiday Gantt chart.
Original PR description
__ ## Error description When the test runs with only the module `hr_holidays_gantt` installed, it fails. ## Origin of the issue There's a payroll related field in the `read_specification` variable. ### Note The error is only triggered since 19.2. __ original commit: https://github.com/odoo/odoo/pull/256636 Forward-Port-Of: odoo/enterprise#121119
9 changes
Resolved issues and error corrections
This update ensures the preparation time is accurately displayed in the backend order view, even when only a single item is being prepared. Previously, the system didn't update the preparation time field when a single orderline was present, leading to inaccurate order tracking. This fix guarantees consistent preparation time calculations for all orders.
Original PR description
## Steps to reproduce: - Open the restaurant and the linked preparation display - Send a single product to the kitchen - On the preparation display, click on the line - In the backend go to the order…
## Steps to reproduce: - Open the restaurant and the linked preparation display - Send a single product to the kitchen - On the preparation display, click on the line - In the backend go to the order - The Preparation Time field will be empty ## Why the fix: With the current implementation, we only update the **preparation_time** on the orderline if we still have some orderlines to make, and if we don't, we change the state to the next stage in the preparation display https://github.com/odoo/enterprise/blob/a14d1b8ed84aae4e274a674c6aa24130a378bef5/pos_enterprise/static/src/app/components/order/order.js#L112-L116 This means that if there is a single orderline on the order, clicking on the line will only move it to the next stage, and won't trigger the backend calculation to update the preparation_time. We now always trigger the calculation of the preparation_time when a line is clicked, as it is weird for it to be triggered only when we have multiple lines waiting. It needs to be done in an asynchronous manner, as concurrent database calls would cause wrong values if we called **syncStateStatus** and **changeStateStageAnimation** at the same time. opw-6283017
This update resolves an issue where foreign currency vendor bills were incorrectly flagged as 'Partially matched' by the GSTR-2B reporting system. The fix ensures that amounts are correctly converted to the company's base currency (INR) during reconciliation, leading to accurate GSTR-2B matching.
Original PR description
**Steps to reproduce:** * Install the **l10n_in_reports** module. * Go to **Accounting → Configuration → Settings**, and enable **Multi-Currencies**. * Activate a foreign currency (e.g., USD) and set…
**Steps to reproduce:** * Install the **l10n_in_reports** module. * Go to **Accounting → Configuration → Settings**, and enable **Multi-Currencies**. * Activate a foreign currency (e.g., USD) and set an exchange rate. * Create a new vendor bill for an Indian vendor, setting the currency to USD. * Add lines to the bill and apply IGST/GST taxes, then confirm the bill. * Go to **Accounting → Reporting → GST Return Period** and initiate GSTR-2B matching for the period corresponding to the bill (using a valid JSON payload where the amounts are correctly reported in INR). **Observed behavior:** * The vendor bill is incorrectly marked as "Partially matched" instead of "Fully matched", accompanied by an exception stating that the total amount as per GSTR-2B does not match. **Cause:** * The GSTR-2B data fetched from the GST portal always reports values in the company's base currency (INR). * The `match_bills` method was directly comparing the GSTR-2B INR amounts ( `bill_total` and `bill_taxable_value`) against the bill's `amount_total` and `amount_untaxed` fields. * Because these fields return values in the document's foreign currency (e.g., USD), the mismatch triggers an exception and flags the bill as partially matched. **Fix:** * Modified the matching logic to compare GSTR-2B values against `abs(amount_total_signed)` and `abs(amount_untaxed_signed)`. * This ensures that the amounts evaluated during reconciliation are always correctly converted and compared in the company's base currency (INR). opw-6311097 Forward-Port-Of: odoo/enterprise#121563 Forward-Port-Of: odoo/enterprise#120967
This update resolves an error that occurred when the 'Company Car (To order)' option was enabled in the salary configurator, specifically when the module wasn't set up with demo data. The fix ensures the system checks for both the option being enabled and a car model selected before attempting to process the data, preventing a critical error.
Original PR description
## Steps to Reproduce: 1. Install `l10n_be_hr_contract_salary` without demo data. 2. Create a Belgian company and switch to it. 3. Create an employee. 4. Create a contract for the employee. 5. Click Generate Offer and open the Salary Configurator. 6. Enable the 'Company Car (To order)' option. ## Error: `AttributeError: 'NoneType' object has no attribute 'split'` ## Cause: When the salary configurator is used without demo data, no car model is selected. The method assumes that select_wishlist_car_total_depreciated_cost always contains a value and directly calls split() on it, resulting in an error, when the field is None. ## Fix: This commit checks that both the company car option is enabled and a car model has been selected before trying to extract the model ID. sentry-7554712017 Forward-Port-Of: odoo/enterprise#121527 Forward-Port-Of: odoo/enterprise#121138
This update resolves an issue where the system was incorrectly registering only the last scanned serial number when creating manufacturing orders with serial-tracked products. The fix ensures that all scanned serial numbers are accurately recorded on the manufacturing order, allowing for proper production tracking. This improves the reliability of the barcode MRP process.
Original PR description
Steps to reproduce ------------------ Serial-tracked finished product: 1. Create a serial-tracked finished product and an un-tracked component. 2. Create a Manufacturing Order with quantity 2 and…
Steps to reproduce ------------------ Serial-tracked finished product: 1. Create a serial-tracked finished product and an un-tracked component. 2. Create a Manufacturing Order with quantity 2 and confirm it. 3. Open the Barcode app, scan the MO, then scan a first serial number SN_X1. 4. Scan a second serial number SN_X2. 5. Validate. Lot-tracked finished product: 1. Create a lot-tracked finished product with a one-component BoM and an existing lot LOT_A. 2. Create a Manufacturing Order and confirm it. 3. Open the Barcode app, scan the MO, then scan the existing lot LOT_A. 4. Scan a different, not-yet-existing lot LOT_B. 5. Validate. Issue ----- Only the last scanned serial is registered on the MO, and validation then fails because the count of producing serials does not match qty_producing for a serial-tracked finished product. updateLine overwrote lot_producing_ids with [args.lot_id] on every scan, so the first serial was dropped when the second one was scanned, and the same branch never staged a freshly typed lot_name, so a brand-new serial typed on a serial-tracked MO was lost before reaching the backend. https://github.com/odoo/enterprise/blob/4a2f1da5466740b7758d1962e5241620845d616b/stock_barcode_mrp/static/src/models/barcode_mrp_model.js#L407 Two behaviours of the shared barcode dispatcher make a single accumulating branch insufficient. The final-product line must keep exposing a producing lot, otherwise the base hasUnassignedQty check counts a scanned serial as zero once a quantity is already set, leaving qty_producing stuck below the demand. https://github.com/odoo/enterprise/blob/f622064871bf55b93890606d16407c50cf4419a6/stock_barcode/static/src/models/barcode_model.js#L1446 But exposing a producing lot makes the dispatcher treat the next serial as a conflicting tracking number, since the base _canOverrideTrackingNumber considers a different lot name non-overridable. https://github.com/odoo/enterprise/blob/f622064871bf55b93890606d16407c50cf4419a6/stock_barcode/static/src/models/barcode_model.js#L796-L798 So the scan is diverted to a new line through the override gate instead of updating the header line. https://github.com/odoo/enterprise/blob/f622064871bf55b93890606d16407c50cf4419a6/stock_barcode/static/src/models/barcode_model.js#L1585 For a lot-tracked finished product the producing lot can be corrected by scanning a different value, but the lot branch only stored a freshly typed value in lot_name and overwrote lot_producing_ids with the single existing lot. https://github.com/odoo/enterprise/blob/4a2f1da5466740b7758d1962e5241620845d616b/stock_barcode_mrp/static/src/models/barcode_mrp_model.js#L404-L407 The header reads its lot from lot_producing_ids whenever that relation is set and only falls back to lot_name when it is empty. https://github.com/odoo/enterprise/blob/4a2f1da5466740b7758d1962e5241620845d616b/stock_barcode_mrp/static/src/components/header.js#L45-L58 The save path only promotes lot_name to a producing lot when lot_producing_ids is empty, so scanning an existing lot then a new one neither displayed nor recorded the new lot and the finished product was produced under the old lot. https://github.com/odoo/enterprise/blob/4a2f1da5466740b7758d1962e5241620845d616b/stock_barcode_mrp/static/src/models/barcode_mrp_model.js#L628 Solution -------- Accumulate scanned serials by appending to lot_producing_ids instead of replacing it, and stage a freshly typed lot_name as a new producing lot when the finished product is tracked by serial, so every serial reaches the backend. Keep the final-product line exposing the last producing lot so each scanned serial is still counted as one unit instead of resetting the quantity to zero once several serials are registered. Override _canOverrideTrackingNumber for the final-product line so a serial scan updates the header line rather than being diverted to a new line, which is the only valid path for the finished product since it is a single header line backed by the lot_producing_ids relation. Persist the producing serials with explicit x2many commands, separating already-existing lots from freshly typed ones, so both are written on the MO. Reject a serial that is already registered on the MO so the same number cannot be produced twice in one session. For a lot-tracked finished product, build a producing lot from the scanned value, using the existing lot or a freshly typed lot name, and store it in lot_producing_ids so the new lot is both displayed and persisted through the same x2many commands as the serial case. Leave the produced quantity unchanged when the scanned lot differs from the one already registered, since replacing the lot is a correction and not an extra unit, and keep incrementing it when the same lot is scanned again. opw-6189620
This update enhances access to tax return checks for all members of a tax unit, allowing for quicker resolution of issues. It also includes a warning banner if a user's active companies don't match the tax return, and disables the status update button if the user lacks write access, preventing errors.
Original PR description
[FIX] account_reports: show return checks to every tax unit member Before this commit: Tax Unit Members other than main company have read access to tax returns but don't have read access to tax…
[FIX] account_reports: show return checks to every tax unit member Before this commit: Tax Unit Members other than main company have read access to tax returns but don't have read access to tax return checks. After this commit: Tax Unit members other than main company are given read access to tax return checks also, so they can fix checks failing because of them. *** [IMP] account_reports: Warn on company mismatch in tax returns Adds a warning banner to the return kanban view, when the user's active companies do not match the companies on the return. Backport of: https://github.com/odoo/enterprise/commit/48fea3df68ec2cc9ed1ba538e1b480210611bcde *** [IMP] account_reports: disable check status button if don't have write access Before this commit: Only main company of tax unit have write access on check, so when main company is not selected and user tries to change status of check, access error is thrown. After this commit: Disable check status button if user don't have write access on check. *** task-5951364
This update resolves an issue where the website generator tool in version 19.0 was limited to importing only 100 pages. This change ensures the tool accurately imports the correct number of pages, improving website creation functionality. This fix addresses a limitation impacting website design and content management.
Original PR description
The tool for 19.0 could only import up to 100 pages so matching it with the comment.
This update resolves an issue where automatic bank reconciliation rules incorrectly replaced original payment references with account names when multiple statement lines used the same account. Previously, this created an inconsistent user experience. The fix ensures that the original payment reference is preserved, providing a more accurate and reliable reconciliation process.
Original PR description
### Issue: When creating an automatic reconciliation rule by assigning the same account to multiple bank statement lines, the rule incorrectly overrides the original payment reference of subsequent…
### Issue: When creating an automatic reconciliation rule by assigning the same account to multiple bank statement lines, the rule incorrectly overrides the original payment reference of subsequent lines with the account name This creates an inconsistent user experience Using the "Set Account" button directly keeps the statement line payment reference as the journal item label However, clicking the automatically generated reconciliation model button replaces that reference with the account name Before the fix, clicking the automated rule button on a third matching line overrides its label with the account name instead of keeping its unique reference ### Cause: In `_create_reconciliation_rule`, when an automatic model is generated, the dictionary used to create the counterpart line explicitly set `label` to `rule_data['account'].name` When a reconciliation model line has a specific label defined, Odoo uses it to replace the statement line `payment_ref` on the generated counterpart move lines Removing this default value allows the system to fall back on the original payment reference ### Steps to reproduce: - Install `account_accountant` - Go to the Bank Reconciliation widget from the Accounting Dashboard - Create 2 statement lines without partners (e.g., Ref: "Test Ref 1" and "Test Ref 2") - Set the same account on both lines using Set Account - This automatically creates a Reconciliation Rule named after the account - Create a 3rd statement line with a matching reference (e.g., "Test Ref 3") - Click the newly available automatic reconciliation button for this line Before the fix, checking the generated entry label shows the account name instead of "Test Ref 3" To check unfold the details, click on the pencil icon of a line opw-6246833
This update corrects a bug where quality checks remained active after merging multiple manufacturing orders. Previously, the merge process didn't trigger the necessary cleanup, leaving lingering quality checks. This fix ensures that pending quality checks are automatically removed when manufacturing orders are merged, streamlining the workflow and preventing unnecessary data.
Original PR description
Version: -------- - 18.0+ Steps to reproduce: ------------------- - Install `quality_mrp` - Create a manufactured product with a BoM - Create a Quality Point for the `Manufacturing` operation of that…
Version: -------- - 18.0+ Steps to reproduce: ------------------- - Install `quality_mrp` - Create a manufactured product with a BoM - Create a Quality Point for the `Manufacturing` operation of that product - Create and confirm multiple Manufacturing Orders - Verify that each MO generates a quality check - From the MO list view, select the MOs and merge them from the gear menu(merge) Issue: ------ When Manufacturing Orders are merged, All MOs are cancelled but it keep their quality checks in the 'To Do' state. As a result: - The quality checks remain linked to cancelled MOs - The 'Quality Checks' smart button is still displayed on cancelled MOs Expected behavior: ------------------ - Pending quality checks should be deleted when the MO is cancelled - The 'Quality Checks' smart button should no longer be displayed Cause: ------ A previous fix introduced logic to remove pending quality checks when a Manufacturing Order is cancelled: odoo-dev@db93bd2 This logic was implemented in `action_cancel()` by unlinking quality checks associated with the cancelled MO: https://github.com/odoo/enterprise/blob/20bc0eb5c2cec67eecd3b44450934e23370b48f2/quality_mrp/models/mrp_production.py#L94-L97 However, when MOs are merged, the merge flow does not call `action_cancel()`. Instead, it directly invokes `_action_cancel()` on the source Manufacturing Orders: https://github.com/odoo/odoo/blob/aca0b7289c68fc7a75d47ab313f5f791ebf30f7d/addons/mrp/models/mrp_production.py#L2480 Since the quality check cleanup is implemented only in `action_cancel()`, it is bypassed during the merge process. As a result, the source MOs are cancelled but their pending quality checks remain in place. --- opw-6260735 Forward-Port-Of: odoo/enterprise#121536 Forward-Port-Of: odoo/enterprise#119525
This update fixes a display inconsistency in Helpdesk tickets. Previously, list and form views showed the default state label instead of the selected one. This change ensures all views – including kanban, list, and form – accurately reflect the current state selection, improving data clarity and user experience.
Original PR description
Steps to reproduce: ------------------------ 1. Install Helpdesk 2. Go to All Tickets and check the kanban state selection value 3. Go to Settings > Field Selection and search for kanban_state in…
Steps to reproduce:
------------------------
1. Install Helpdesk
2. Go to All Tickets and check the kanban state selection value
3. Go to Settings > Field Selection and search for kanban_state in `helpdesk.ticket` model
4. Change one of the state selection values (e.g., "Ready" to "Testing Ready")
5. Go back and check the state selection value in list and form views
Current behavior:
-----------------------
Kanban view correctly shows the updated label (e.g., "Testing Ready"),
but list and form views still display the old default value (e.g., "Ready").
Root cause:
---------------
The [state_selection](https://github.com/odoo/odoo/blob/c09cefdb0ed68b1b7367b77b18a5ee5d66c94900/addons/web/static/src/views/fields/state_selection/state_selection_field.js#L57-L65) widget uses `legend_${state}` field values when available.
Since list and form views included these legend fields, the widget resolved labels from them
instead of the actual selection values, causing inconsistent display.
Fix:
-----
Remove `legend_normal`, `legend_blocked`, and `legend_done` fields from the list and form views,
So the widget falls back to the real selection labels, consistent with how the kanban view behaves.
Reference commit: https://github.com/odoo/enterprise/commit/65f3b88254e3a66e2c5dcb5142d30f6b1996d999
opw-6238765
Forward-Port-Of: odoo/enterprise#11970713 changes
Resolved issues and error corrections
This update enables the automatic sending of a ‘payment_sent’ message (CDV 211) from purchase invoices through the PDP. Previously, this notification was only available for sales invoices. This ensures suppliers are promptly informed of payment status, streamlining the financial process and improving data accuracy.
Original PR description
## Summary - Enable outbound CDV 211 (`payment_sent`) from purchase invoices in `l10n_fr_pdp`. - Wizard exposes `payment_sent` for purchase documents with MPA payload and payment date. - Cron sends…
## Summary - Enable outbound CDV 211 (`payment_sent`) from purchase invoices in `l10n_fr_pdp`. - Wizard exposes `payment_sent` for purchase documents with MPA payload and payment date. - Cron sends PD for sales and `payment_sent` for purchases; lifecycle residual computed separately per type. ## Multi-repo issues - odoo/odoo#268018 — CDV 211 `payment_sent` on purchase bills ## Related PRs - *(Odoo CE only — no Akretion/OCA changes for this campaign)* ## Test plan - [ ] `odoo-bin -d test --test-tags=/l10n_fr_pdp:TestPdpMessages.test_purchase_payment_sent_lifecycle --stop-after-init` ## Merge order 1. Merge this PR on `odoo/odoo` 18.0 when approved. ## Reviewers & code owners - Requested review: @smetl @chklop - PDP / lifecycle context: @malb-odoo @baje @videc @sveaw --- ## Résumé - Émission sortante du CDV 211 (`payment_sent`) depuis les factures fournisseur dans `l10n_fr_pdp`. - Assistant : `payment_sent` sur les achats avec charge MPA et date de paiement. - Cron : PD pour les ventes, `payment_sent` pour les achats ; résidu de cycle de vie calculé séparément. ## Issues multi-dépôts - odoo/odoo#268018 — CDV 211 `payment_sent` sur factures fournisseur ## PR associées - *(Odoo CE uniquement — pas de changement Akretion/OCA)* ## Tests - [ ] `odoo-bin -d test --test-tags=/l10n_fr_pdp:TestPdpMessages.test_purchase_payment_sent_lifecycle --stop-after-init` ## Ordre de fusion 1. Fusionner cette PR sur `odoo/odoo` 18.0 après revue. ## Revue & auteurs du code - Review demandée : @smetl @chklop - Contexte PDP / cycle de vie : @malb-odoo @baje @videc @sveaw Fixes #268018
This update resolves an issue where importing UBL files containing invoice lines with zero quantity and amount would cause a division-by-zero error, leading to import failures. The fix ensures the system handles these zero-value lines correctly, improving the reliability of UBL import processes.
Original PR description
**PROBLEM** When importing a ubl with a line with an invoiced qty of 0 and an amount of 0, there is division by zero. **STEP TO REPRODUCE** 1. upload a ubl file with an empty line as a vendor bill (there is one in the bugfix ticket). 2. notice the import fails because of a division by zero. The division by zero was introduced by https://github.com/odoo/odoo/pull/265261 opw-6260558
This update corrects a test failure within the French invoicing module (l10n_fr_pdp) that occurred when only the basic Invoicing module was installed. The fix adds the necessary 'in_payment' state, which was present in the full 'enterprise' version of the Accounting module. This ensures the test suite runs correctly and avoids potential disruptions.
Original PR description
The `in_payment` state does not exist in community with only the Invoicing module installed. It is added in `enterprise` in the Accounting module. runbot.build.error-939451
This update corrects a previous issue where the GT Document Type field was incorrectly required when creating vendor bills for vendors outside of Guatemala. The change ensures the field is only mandatory for Guatemalan vendors, streamlining the billing process and improving usability for international transactions. This resolves a user experience problem.
Original PR description
Currently, the GT Document Type field is required when creating vendor bills for non-Guatemalan vendors. **Steps to reproduce:** - Install the `l10n_gt_edi` module and switch to a GT Company. -…
Currently, the GT Document Type field is required when creating vendor bills for non-Guatemalan vendors. **Steps to reproduce:** - Install the `l10n_gt_edi` module and switch to a GT Company. - Create a new vendor bill for a vendor whose country is not Guatemala. **Observation:** The `GT Document Type` field is required even though the selected vendor is not based in Guatemala. **Root Cause:** At [1], `_compute_l10n_gt_edi_available_doc_types` only checks the company country and ignores the vendor's country, causing GT available document types to be computed for foreign vendors as well. As a result, `l10n_gt_edi_available_doc_types` is populated and the view at [2] incorrectly makes `l10n_gt_edi_doc_type` required. **Fix:** This commit ensures the GT Document Type field is only required for Guatemalan vendors. [1]: https://github.com/odoo/enterprise/blob/7a80db5b5550bf75e4ce5337e869c42386c8a71c/l10n_gt_edi/models/account_move.py#L144-L171 [2]: https://github.com/odoo/enterprise/blob/7a80db5b5550bf75e4ce5337e869c42386c8a71c/l10n_gt_edi/views/account_move_views.xml#L27 opw-6315872
This update fixes an issue where closing the NemHandel registration wizard left outdated proxy information, causing problems when reopening it. Now, closing the wizard properly removes the proxy, ensuring a fresh start each time and preventing data inconsistencies. This improves the user experience for NemHandel registration.
Original PR description
Closing the NemHandel registration wizard (via the 'X' button / esc button) previously persisted the IAP proxy user. This caused issues when reopening the wizard, as stale proxy data prevented a clean retry. Now, closing the wizard triggers the same logic as the deregister button: the proxy user is deleted from the IAP/Odoo instance. This ensures that reopening the wizard always starts a fresh registration with editable values. Task-6075214 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update fixes an issue where duplicating a purchase order receipt incorrectly inflated the received quantity on the original purchase order. The change ensures that only the quantity of the initial delivery is counted, resolving a discrepancy in how received quantities are calculated. This improves the accuracy of purchase order tracking.
Original PR description
On a Purchase Order, if you duplicate the delivery, change its Operation Type and validate it, it will still count towards the received quantity on the po. Steps to reproduce: ------------------- *…
On a Purchase Order, if you duplicate the delivery, change its Operation Type and validate it, it will still count towards the received quantity on the po. Steps to reproduce: ------------------- * Create a PO and confirm it * Open the receipt, validate and duplicate it * Go on the duplicated receipt and change its Operation Type * Confirm the duplicated receipt. -> the Received Qty on the Po counted the duplicated and modified transfer. Observation: ------------- When we duplicate a stock.picking, we will call ```copy``` and copy all its ```move_ids``` (stock.move), and in stock.move we will copy the ```purchase_line_id``` : https://github.com/odoo/odoo/blob/754898c58fded0e3c3c30702f15258f1dadcfa6c/odoo/models.py#L5868 https://github.com/odoo/odoo/blob/754898c58fded0e3c3c30702f15258f1dadcfa6c/odoo/models.py#L5881-L5892 https://github.com/odoo/odoo/blob/3e6d93bef49bb2718e8aa1756f95c2a6117c8d55/addons/purchase_stock/models/stock_move.py#L13-L15 the ```purchase_line_id``` will keep the link with the pol. The fields are copied since they have ```copy=True``` https://github.com/odoo/odoo/blob/754898c58fded0e3c3c30702f15258f1dadcfa6c/addons/stock/models/stock_picking.py#L614 https://github.com/odoo/odoo/blob/754898c58fded0e3c3c30702f15258f1dadcfa6c/odoo/fields.py#L304 Because new stock moves are linked directly to the Purchase Order Line (POL), the qty_received calculation aggregates all associated move quantities. https://github.com/odoo/odoo/blob/cfc63060926db4cec773c159b8ecf97dc0b36d1a/addons/purchase_stock/models/purchase_order_line.py#L73-L76 opw-6088239
This update resolves an issue where the system incorrectly imported invoice quantities from UBL files. Specifically, it ensures that the 'invoiced_quantity' and 'base_quantity' values in imported invoices accurately reflect the quantities specified in the original UBL document. This prevents discrepancies in order data.
Original PR description
…ase_quantity equal to zero **STEP TO REPRODUCE** 1. Import the 2fact ubl from the bugfix ticket. 2. Notice some line are imported with quantity = 1, but the quantity invoiced in the ubl is 0. opw-6260558
This update fixes a crash that occurred when Odoo's subscription module was run outside of its normal web environment (like in tests or cron jobs). The fix ensures the system correctly handles situations where an active HTTP request isn't present, preventing a runtime error.
Original PR description
When executing code outside of a web thread (such as in unit tests, cron jobs, or CLI commands), an actual HTTP request does not exist, leaving the global `request` proxy unbound. In these scenarios, the unbound proxy evaluates to False. Because of Python's `and` evaluation, the expression `request and request.params...` returned the unbound proxy itself instead of None. This caused a RuntimeError later when the proxy was compared to other values. We now explicitly check `request.env` to verify an active request exists, properly falling back to None when there is no HTTP context. runbot-938513
This update resolves an issue where the HTML editor's paste functionality was unreliable, leading to errors when saving selections. The fix ensures that selections are correctly updated during paste operations and after restoring previous editor states, improving the overall user experience and data integrity.
Original PR description
### Steps to reproduce: - Insert a file using /file command and upload a file. - Type any powerbox command (e.g. /file, /media) - Press Enter to select the command - IndexSizeError: Failed to execute…
### Steps to reproduce: - Insert a file using /file command and upload a file. - Type any powerbox command (e.g. /file, /media) - Press Enter to select the command - IndexSizeError: Failed to execute 'setBaseAndExtent' on 'Selection': There is no child at offset 5. ### Description of the issue/feature this PR addresses: - makeSavePoint() of history_plugin uses preserveSelection() to save current selection. However, preserved selections remain registered in the cursor update mechanism and continue to be updated when the editor adjusts cursors during DOM changes. - During normalization, updateFeffs() updates all preserved cursors. Because the savepoint selection is stored using preserveSelection(), it is updated as well and can become inconsistent with the DOM state that the savepoint later restores, resulting in an IndexSizeError. ### Solution (backport-https://github.com/odoo/odoo/commit/1eb0e6de8f566d260ecb6c0dae3436e87ffe8436): - Update preserved cursors after steps restoration so they stay in sync with the restored DOM state. - Stage the selection in the clipboard plugin after `before_paste_handlers`, ensuring the selection reflects the final adjusted state before pasting. - Fix `selectFullText` to trigger `pointerup` to have a correct staged selection. task-6298761 --- 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 system incorrectly processed Viettel S-Invoice XML files, specifically when invoices were delivered in a double-zipped format. The fix now correctly handles both single and double-zipped invoices, ensuring seamless integration with the Viettel e-Invoicing platform and preventing errors.
Original PR description
Description of the issue/feature this PR addresses: The actual XML extraction hardcoded the double-zipped case by reading only the first entry of the outer zip (`zip_file.infolist()[0]`), assuming it was always a nested zip containing the XML. This made it fail when: - The XML was directly in the outer zip (single-zipped). - The zip contained multiple files and the first nested zip didn't hold the XML. Current behavior before PR: After sending an Invoice to Viettel S-Invoice, the e-Invoicing platform would return a ZIP containing one XML file. The XML File being double-unzipped, a traceback is raised. Desired behavior after PR is merged: The fix rewrites _recursive_zip_xml_file_data to actually be recursive. Invoices can be sent to Viettel S-Invoice without raising a traceback. opw-[6249929](https://www.odoo.com/odoo/project.task/6249929?debug=1) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update ensures that custom reports attached to invoices display their intended names in email attachments, rather than a default CFDI-based filename. The fix addresses an issue where localization overrides were preventing the correct report name from being used, leading to duplicate attachments. This improves the clarity and usability of invoice attachments.
Original PR description
Steps to reproduce: * Install `l10n_mx_edi` (or `l10n_sa_edi`). * Go to **Accounting → Customers → Invoices**. * Open **Studio** and, from the top bar, go to **Reports**. * Duplicate the standard…
Steps to reproduce: * Install `l10n_mx_edi` (or `l10n_sa_edi`). * Go to **Accounting → Customers → Invoices**. * Open **Studio** and, from the top bar, go to **Reports**. * Duplicate the standard **Invoice PDF** report. * Open the duplicated report and make any modification to it. * Enable **Developer Mode**. * Go to **Settings → Technical → Actions → Reports** and update the custom report's **Printed Report Name**. * Go to **Settings → Technical → Email → Templates** and create a new invoice email template. * Add the custom report to the template's **Dynamic Reports**. * Create and confirm an invoice for a **Mexican company**. * Click **Send** and select the newly created email template. Observed behavior: * The custom report attachment uses the CFDI-based filename instead of its own report name, making it appear as a duplicate of the standard invoice attachment. Cause: * `_get_placeholder_mail_template_dynamic_attachments_data` relied on the `invoice_report` context key to pass the extra report into `_get_invoice_report_filename`. However, localization overrides (e.g. `l10n_mx_edi`, `l10n_sa_edi`) unconditionally return their own filename without checking the context, so the extra report's `print_report_name` was never evaluated. Fix: * Introduce `_get_invoice_mail_template_dynamic_report_filename` on `account.move` that directly evaluates a given report's `print_report_name`, bypassing the localization override chain. * Call this new method in `_get_placeholder_mail_template_dynamic_attachments_data` instead of the context-based `_get_invoice_report_filename` call. This avoids the need to patch every localization override and cleanly separates the concern of naming dynamic report attachments from the main invoice report filename logic. opw-6228268
This update optimizes a key process within our stock management system, specifically the `_compute_forecast_information` function. By removing an inefficient loop, we’ve significantly reduced the time it takes to access Manufacturing Orders, particularly for databases with many stock records. This results in faster response times and a smoother user experience.
Original PR description
Before this commit, database with large amounts of `stock.move` records could face slow downs when trying to access Manufacturing Orders. While this is partially due to very heavy computations being…
Before this commit, database with large amounts of `stock.move` records could face slow downs when trying to access Manufacturing Orders. While this is partially due to very heavy computations being done, another factor was the use of a loop in `_compute_forecast_information`. This loop would iterate over a recordset of `stock.move` records and put them into a dictionary, sorted by location. As the size of the recordset grew, this loop would take longer and longer. Here, we remove this loop and instead use a built in method to speed things up. ## Benchmarks: |Record count|Time before|Queries before|Time after|Queries after| |------------|-----------|--------------|----------|-------------| |6,262 |0.13s |68 |0.12s |68 | |68,882 |0.60s |112 |0.58s |109 | |432,317 |5.49s |398 |3.68s |309 | |757,702 |15.33s |1,141 |5.79s |599 | [opw-6310415](https://www.odoo.com/odoo/action-6450/6310415?debug=assets) Forward-Port-Of: odoo/odoo#271677
This update ensures that partner bank accounts are usable within all child companies, even if the partner is associated with a parent company. Previously, this restriction limited functionality. This change improves efficiency and simplifies processes for users managing multiple company branches.
Original PR description
Even when a partner has the 'company_id' filled with the parent company, his bank account should be usable in the child companies. This was done in odoo/odoo#262173 from 19.2 but we need to backport it in stable task-6309694 Forward-Port-Of: odoo/odoo#271470
3 changes
Resolved issues and error corrections
This update resolves a technical issue where the Intrastat report generation would fail when a company record lacked a country ID. The fix ensures a safer fallback mechanism in the SQL query, preventing errors and improving report reliability. This ensures accurate reporting for all companies.
Original PR description
When there is no `country_id` on the company we get `False`. The generated query then fail at: ``` ... CASE WHEN (code.country_id IS NULL OR code.country_id = false) THEN code.code ELSE NULL END AS commodity_code, ... ``` with: ``` ERROR: operator does not exist: integer = boolean LINE 12: ... WHEN (code.country_id IS NULL OR code.country_id = false) T... ```
This update fixes an issue where recurring subscription revenue was incorrectly displayed as 'To Invoice' even after invoices were fully processed. The change ensures that invoiced amounts are accurately deducted from revenue calculations, providing a more precise view of subscription income. This improves financial reporting accuracy.
Original PR description
**Steps to reproduce:** - Create a Sale Order for a service product with a recurring plan - Confirm it - Go to the Project Dashboard and observe MRR shown under "To Invoice" - Create an invoice for the subscription and post it - Go back to the dashboard **Issue:** Even after fully invoicing a subscription, its value is still shown under `to_invoice` in the revenues section. **Fix:** The profitability computation was not deducting the already invoiced amount from the total expected revenue. We now subtract the `amount_invoiced` from `amount_to_invoice`, ensuring that fully invoiced subscriptions no longer appear under `to_invoice`. task- 4797525
This update resolves an issue where creating and modifying contact records with blog posts would sometimes cause an error. The fix ensures that website URL calculations are skipped for temporary blog posts, preventing the system from attempting to generate URLs for records that don't yet have a permanent ID. This improves the stability and reliability of the contact form.
Original PR description
Steps to reproduce: 1. Install Blog, Contacts, and Studio 2. Open Contact form page and a new page with many2many field "Blog Post" 3. Save and create a contact record with email and a blog post. 4. Save and try to modify the email. Issue: `ValueError: Cannot slug non-existent record` Cause: - Since[1] Invisible fields also trigger `onchange` and compute methods during view processing. In this flow, `blog.post` records can be handled as transient `NewId` records. `_compute_website_url` was calling `slug(blog_post)` unconditionally, but `slug()` only accepts persisted records with a real id. Thus ValueError Solution: - Skip the website URL computation for non-persisted blog posts. - backport of https://github.com/odoo/odoo/commit/62ced8ac646fc781da24346f12c5dc9b9a0c592d [1] - https://github.com/odoo/odoo/commit/db63cb770365be1f81ba051fe6ca5a246dbc9036 opw-6175092