Daily updates from Odoo
Tuesday, June 2, 2026
56 changes · saas-19.2
Resolved issues and error corrections
This update addresses a requirement from the Peruvian tax authority (SUNAT) regarding delivery guides. Customers using the l10n_pe_edi_stock module now *must* include a 'carrier handover date' field to avoid validation errors. The update automatically handles this by reusing existing data, and provides a helpful message to users on older versions to update the module.
Original PR description
SUNAT R. S. N° 000108-2026/SUNAT and the GRE validation rules published on 2026-06-01 add field 34 "Fecha de entrega de bienes al transportista" (cac:LoadingTransportEvent/cbc:OccurrenceDate). It is required, and rejected with error 3617 when absent, only when the transport modality is '01' (public transport). Enforcement started 2026-06-01, so affected customers can no longer submit their delivery guides.
In our implementation the departure start date is equivalent to this date, so we reuse it instead of adding a new field. The node is gated to public transport to match the validation rule and avoid emitting it on private transport ('02') guides.
Because the new node only ships with this module version, customers on an older version keep hitting error 3617 from SUNAT. Detect that code in the SUNAT response and store an actionable message asking the user to update the module, instead of surfacing the raw rejection.
task-6266662
Forward-Port-Of: odoo/enterprise#119038This update corrects a bug that caused errors when date calculations involved missing or `None` offset values. The fix ensures accurate date movements by defaulting the offset to 0 when it's absent, preventing unintended date shifts. This improves the reliability of the AI agent's date processing.
Original PR description
Currently, an exception is raised when `offset` is `None` and is compared
with `MIN_OFFSET` or `MAX_OFFSET`.
Currently `offset = op.get("offset", 1)` to assign a default value of `1` when
the `offset` key was missing from `op`. However, this does not handle cases
where the `offset` key is present but its value is `None`.
This commit fixes the issue by defaulting `offset` to `0` when it is missing or
`None` in `op`. Using the default value ensures no date movement occurs
when `offset` is not explicitly provided.
Sentry-7448086997
Forward-Port-Of: odoo/enterprise#118466This update fixes an issue where project Kanban status colors weren't displaying correctly due to a mismatch between the frontend and stylesheet. The fix ensures that project status colors are accurately rendered by updating the stylesheet to recognize the calculated modulo colors (8-11 and 0).
Original PR description
### The Issue: The frontend Kanban view enforces a strict 12-color limit using a modulo 12 mathematical rule (which calculates the remainder after dividing by 12). When the frontend receives our high backend IDs (20-24), it runs this modulo math (e.g., 23 % 12) to force them into the allowed limit, converting them into the remainders: IDs 8, 9, 10, 11 and 0. Because stylesheet was still searching for the original high numbers (20-24) instead of these modulo results, the custom colors were completely ignored by the browser. ### The Fix: Updated the stylesheet to target the actual modulo-computed classes (.oe_kanban_color_8 through 11 and 0). Mapped these classes to their correct variables (-success, -info, -warning, -danger, -primary) and fixed the left border styling so the colors render properly. task-6064106 Forward-Port-Of: odoo/odoo#266693 Forward-Port-Of: odoo/odoo#256023
This update fixes a visual issue where alternating row colors were incorrectly applied, often resulting in the table header and first row having the same background. The change ensures consistent and correct alternating row colors for improved readability and a better user experience.
Original PR description
### Purpose of this PR: Previously, alternating row colors were applied on even rows. When a table header was enabled, the header row and first body row could end up sharing the same background color. This PR updates the alternating row logic to apply colors on odd rows instead. task-6204622 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#263497
This update corrects a problem where the QR code on E-Invoices would break when invoices had multiple lines, and a Mydata classification group was shrinking. The layout has been adjusted to ensure the QR code displays correctly regardless of the number of invoice lines, improving the E-Invoice generation process.
Original PR description
before this commit: - The QR code on the E-Invoice broke when multiple invoice lines were reduced the available space. - Mydata classification group is shrink. after this commit: - Adjusted the layout to ensure the QR code moves to a new page if there isn't enough space on the current page. - Fix Mydata classification shrink issue. task-6026681 Forward-Port-Of: odoo/odoo#266660
This update resolves an issue where branch users were unable to save new journal entries due to access restrictions. The fix adds elevated permissions to the query used to identify sequence gaps, allowing branch users to correctly create entries within their company's journal. This ensures branch users can fully utilize the accounting functionality.
Original PR description
**Steps to reproduce:** * Create a parent company with a branch company (Settings > Companies). * Create a user whose **only** allowed company is the branch. * While logged in as a parent-company…
**Steps to reproduce:** * Create a parent company with a branch company (Settings > Companies). * Create a user whose **only** allowed company is the branch. * While logged in as a parent-company admin, open the Miscellaneous Operations journal, find the first or second posted entry, reset it to draft, clear its name to a digits-only value (e.g. `0001`) and save – leaving it in draft state. This stores `sequence_prefix = ''` and `sequence_number = 1` in the database. * Log in as the branch-company user. * Navigate to Accounting > Journal Entries > New. * Set any date and save the draft entry (or simply write `name = '/'` on it). **Observed behavior:** * Saving fails with: `odoo.exceptions.AccessError: You are not allowed to access 'Journal Entry' (account.move) records.` **Cause:** * `_update_sequence_made_gap`, introduced in 19.0, detects sequence holes by running a raw SQL query that finds the two entries immediately before and after each move in the same journal with the same `sequence_prefix`. The query contains **no `company_id` filter**. * In a branch-company setup the parent's journal (`journal_id`) is shared across companies. When an early entry's `name` is cleared to a digits-only value its `sequence_prefix` becomes `''`. A new entry created by the branch user also starts with `name = '/'`, which gives it `sequence_prefix = ''` and `sequence_number = 0`. The SQL therefore returns the parent company's entry (`sequence_number = 1`, `sequence_prefix = ''`) as the `next_id` neighbour. * The IDs from that query are passed to a local `browse()` closure, which in 19.0 read: https://github.com/odoo/odoo/blob/af37df9bee34fe60c1e51896af23fc7fe9b76cfc/addons/account/models/account_move.py#L5770-L5771 * `self.browse()` inherits the **non-sudo** environment of the branch user. When the method subsequently writes `move_n1.made_sequence_gap = …` on the browsed parent-company record, the ORM record-rule check finds the branch user has no access to that company → **`AccessError`**. * This is a regression from 18.4 where the equivalent `_set_next_made_sequence_gap` explicitly used `.sudo()` when searching for neighbour moves: https://github.com/odoo/odoo/blob/22d84ae99bb79e7b1022367e6bc1b61cc8d9e8b1/addons/account/models/account_move.py#L5453-L5457 **Fix:** * Add `.sudo()` inside the `browse()` closure so that neighbouring moves are always accessed with elevated rights, regardless of the calling user's company context. * `made_sequence_gap` is a UI-only flag that indicates sequence holes; it carries no security or financial significance, making the sudo escalation safe. opw-6231085 Forward-Port-Of: odoo/odoo#266676
The WIP report now displays accurate information when using analytic items tracked only with projects, preventing misleading demo data from appearing. This change ensures users see the correct report preview, particularly when working with project-based analytics. It maintains the report editor's ability to preview the report accurately.
Original PR description
Currently, when printing the WIP report, demo data is displayed if no product or references are provided on the analytic item. ## Steps to produce: - Install Manufacturing and Accounting - Go to…
Currently, when printing the WIP report, demo data is displayed if no product or references are provided on the analytic item. ## Steps to produce: - Install Manufacturing and Accounting - Go to settings and Enable Analytic Accounting - Search Analytic items and create a new Analytic Item by providing a description and amount. - Gear Icon > print and open the WIP report ## Observed Behavior: The report displays a product (laptop) with a demo reference. This becomes problematic when an analytic item is tracked only with a project, as it still causes product and reference data to appear on the analytic item. This can mislead the user. ## Root cause: After this [commit](https://github.com/odoo/odoo/commit/967ac550e38bab915180647dea6eccb2ae1b3b31), demo data values were added to the report to support report editor previews in the web studio. This helps users understand how the report will look while they are editing it. However, although an account analytic line is defined at [1], no values for fields such as products and references are specified on the form. As a result, the template falls back to the preview values provided. [1]- https://github.com/odoo/odoo/blob/d66bb0d7b550b11876dbc7b9d87f5b2adc17dd74/addons/mrp_account/report/report_mrp_templates.xml#L32-L53 ## Solution: Using `data-oe-demo` instead of removing the fallback data appears to be the best approach, as it allows the report editor to continue using demo values for the report preview, as shown at [2] **Before:** <img width="871" height="340" alt="image" src="https://github.com/user-attachments/assets/91897dbd-65d8-4f70-8f22-ea38b42ba28d" /> **After:** <img width="815" height="380" alt="image" src="https://github.com/user-attachments/assets/ffcf509b-f534-47a8-be1d-53a798995443" /> [2]: https://github.com/odoo/enterprise/blob/a739c6c03c6629bad80f3fe61b1035ce156d59c6/web_studio/static/src/client_action/report_editor/report_iframe.scss#L65-L75 opw-6151563 Forward-Port-Of: odoo/odoo#262517
This update resolves a bug where users couldn't remove font colors after applying them in the To-Do editor. The fix ensures the system correctly identifies and targets the closest color element for resetting, regardless of nested styles. This improves the user experience and prevents unexpected color persistence.
Original PR description
### Steps to Reproduce :
- Go to To-Do → Create New
- Type something
- Apply font color → then background color.
- Try to remove the font color.
- You will not be able to remove the font color.
### Description of the issue/feature this PR addresses:
- In getFonts, the closestElement predicate was used to find the nearest `<font>` element.
For nested structures like:
```html
<font style='color: ...'>
<font style='background-color: ...'>test</font>
</font>
```
predicate would return inner `<font>` (background-color) since it is closest.
- As a result, when resetting the text color, the operation targeted the wrong element, and the outer color was not removed.
### Desired behavior after PR is merged:
- When resetting (i.e. mode is used), find the closest node that matches the specific mode. Then we apply or reset the color on that node.
task-6124432
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prThis update fixes an issue where intercompany sales and purchases with multiple identical products resulted in incorrect stock reservation during receipt picking. Specifically, the system was failing to properly reserve all units of a product when creating intercompany transactions with multiple lines. This ensures accurate stock tracking and prevents discrepancies between sales orders, purchase orders, and receipts.
Original PR description
…lit for same-product lines When doing an intercompany Sale->Purchase with multiple lines having the same products, the receipt picking would be incorrectly assigned: - Enable Inter-Company…
…lit for same-product lines
When doing an intercompany Sale->Purchase with multiple lines having the same products, the receipt picking would be incorrectly assigned:
- Enable Inter-Company Transactions on both companies (Create and validate)
- Create SO in company A to company B with 2 lines having the same product P, Confirm. => Delivery in company A, Purchase and Receipts in company will be created => The SO/PO/Delivery/Receipt will all have 2 lines
- Validate delivery => On the receipt, the 2 units of P are reserved on the 1st move, and the 2nd move is not reserved.
https://github.com/user-attachments/assets/b4816051-120e-4226-9228-fd552649d5ef
---
### Test result without fix:
```
2026-04-23 13:16:44,577 48027 INFO oes_test_18.0 odoo.addons.sale_purchase_stock_inter_company_rules.tests.test_inter_company_so_to_po: Starting TestInterCompanySaleToPurchaseWithStock.test_02_inter_company_multiple_lines_with_same_product ...
2026-04-23 13:16:44,949 48027 INFO oes_test_18.0 odoo.addons.sale_purchase_stock_inter_company_rules.tests.test_inter_company_so_to_po: ======================================================================
2026-04-23 13:16:44,949 48027 ERROR oes_test_18.0 odoo.addons.sale_purchase_stock_inter_company_rules.tests.test_inter_company_so_to_po: FAIL: TestInterCompanySaleToPurchaseWithStock.test_02_inter_company_multiple_lines_with_same_product
Traceback (most recent call last):
File "/home/odoo/Odoo/src/18.0/enterprise/sale_purchase_stock_inter_company_rules/tests/test_inter_company_so_to_po.py", line 109, in test_02_inter_company_multiple_lines_with_same_product
self.assertRecordValues(purchase_from_a.picking_ids.move_ids, [
File "/home/odoo/Odoo/src/18.0/odoo/odoo/tests/common.py", line 709, in assertRecordValues
self.assertSequenceEqual(expected_reformatted, record_reformatted, seq_type=list)
AssertionError: Lists differ: [{'pr[18 chars]0, 'quantity': 1.0}, {'product_uom_qty': 1.0, 'quantity': 1.0}] != [{'pr[18 chars]0, 'quantity': 2.0}, {'product_uom_qty': 1.0, 'quantity': 0.0}]
First differing element 0:
{'product_uom_qty': 1.0, 'quantity': 1.0}
{'product_uom_qty': 1.0, 'quantity': 2.0}
- [{'product_uom_qty': 1.0, 'quantity': 1.0},
? ^
+ [{'product_uom_qty': 1.0, 'quantity': 2.0},
? ^
- {'product_uom_qty': 1.0, 'quantity': 1.0}]
? ^
+ {'product_uom_qty': 1.0, 'quantity': 0.0}]
? ^
```
OPW-6145683
Forward-Port-Of: odoo/enterprise#118548
Forward-Port-Of: odoo/enterprise#114873This update clarifies the 'invalid_scope' error message displayed when a user lacks the necessary permissions to grant consent for a company. The change improves user understanding and helps ensure proper VAT compliance within the Odoo Enterprise application. This is a simple fix to enhance the user experience.
Original PR description
The invalid_scope error message means the user doesn't hav the legal rights to give consent for the given company. But the error message is not clear enough. This commit improve the error message clarity. task-6144883 Forward-Port-Of: odoo/enterprise#115650
This update fixes an issue where subscription products with one-time purchase options were incorrectly displaying recurring subscription prices in the product configurator. Now, the configurator accurately shows the one-time price when this option is selected, ensuring accurate pricing for subscription orders across the website and backend.
Original PR description
Version 19.1 steps to reproduce: - open sales and open a subscription product. enable accept one time and add another subscription product as an optional product. - open the website product page, select the one time price, and click add to cart. issue: when a subscription product that allows one time purchase is added to the cart or to a subscription order, the product configurator wizard was showing the recurring subscription price instead of the one time price. this issue was present both on the website frontend and in the backend subscription module. fix: the product configurator wizard now correctly shows the one time price when the accept one time option is selected, both on the website frontend and in the backend subscription flow. task: 6126684. Forward-Port-Of: odoo/enterprise#114862
This update resolves a technical issue where the headers in the DMFA report were incorrectly displayed. The 'Calculation Basis' and 'Contribution Type' headers were switched, which has now been corrected. This ensures accurate reporting for payroll calculations.
Original PR description
DMFA report had "Calculation Basis" and "Contribution Type" header switched. Got switched back correctly. task-6227590 Forward-Port-Of: odoo/enterprise#117740
This update resolves a minor issue in the testing of one2many fields, preventing a rare, non-deterministic behavior that could occasionally cause duplicate record creation. This enhancement ensures the stability and reliability of the field validation process, minimizing potential disruptions for users. It's a related fix to a previously reported issue.
Original PR description
This commit fixes a non deterministic one2many field test by ensuring that we don't quick create the record twice.
Before this commit, it might sometimes happen that the validation of the input ("Enter", by default) produced a second name_create. Note that in practice this is highly unlikely to happen as if the user presses Enter, the "Quick create" item in the dropdown only appears during a single frame, thus making impossible for the user to click on it.
It's the exact same issue as the one fixed by odoo/odoo#256582.
runbot error~242443
Description of the issue/feature this PR addresses:
Current behavior before PR:
Desired behavior after PR is merged:
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#267224
Forward-Port-Of: odoo/odoo#266344This update ensures that the l10n_id_reports module can be properly translated within Odoo. By adding the module to the Weblate configuration file (.weblate.json), the system now recognizes and supports translation workflows for this specific reporting module.
Original PR description
Enable translation management by adding the module entry to .weblate.json. task-6239169 Forward-Port-Of: odoo/enterprise#118931
This update resolves an issue where product variants weren't being created when a product template used a dynamic attribute with only one possible value. Previously, the system wouldn't add the variant to the order, leading to errors. This change ensures that all product variants are correctly generated, improving order processing and preventing errors.
Original PR description
When a product template has a dynamic attribute with only one value, `isConfigurable()` returns `false` (correctly suppressing the configurator popup), but `create_product_variant_from_pos` was never called, leaving the order line without a proper variant and causing error when trying to add it to the order. opw-6213957 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#265589 Forward-Port-Of: odoo/odoo#264134
This update corrects a technical oversight where a new module for Hungarian reports (l10n_hu_reports_a60) was developed but not properly integrated into the Weblate translation system. This ensures accurate translations are available for users in Hungary, improving the overall quality and usability of the Enterprise edition.
Original PR description
We added a new module here 379c5e9611f1f1c242027c1c134219966474de16 but forgot to add it to weblate.json for translation. no-task Forward-Port-Of: odoo/enterprise#118932
This update fixes an issue where invoices weren't sorting correctly on the customer portal based on their payment status. The fix ensures invoices are displayed in the correct order (e.g., In Payment, Not Paid, Paid) as viewed by customers, improving the user experience.
Original PR description
Steps to produce: --- - Install the `Accounting` module. - Create several invoices for a portal user with different payment states (e.g., In Payment, Not Paid, Paid). - Log in as the portal user. -…
Steps to produce: --- - Install the `Accounting` module. - Create several invoices for a portal user with different payment states (e.g., In Payment, Not Paid, Paid). - Log in as the portal user. - Navigate to the invoices list and attempt to sort by **Status**. Issue:- --- - Sorting by **Status** does not reflect the actual invoice payment status, resulting in incorrect ordering. Root cause: --- - At [1], the sorting field for Status is set to state, which corresponds to invoice states (Draft, Posted, Cancelled). However, the portal displays and expects sorting based on payment_state. Fix: --- - Update the sorting configuration to use payment_state instead of state, ensuring that invoices are sorted correctly according to their payment status on the portal. [1]https://github.com/odoo/odoo/blob/5b85287ec4ea9f1b51e0f33402900777dfeeb725/addons/account/controllers/portal.py#L46-L52 opw-6128998 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#262976
This update resolves a recurring issue in a key test for our web interface. Previously, a delay in the autocomplete process sometimes caused the test to fail. By ensuring all timers are executed, this fix guarantees the autocomplete search is always performed and verified, improving the reliability of our tests.
Original PR description
This test was sometimes failing, when the debounce delay (250ms) of the autocomplete ended before the end of the test, resulting in an unexepected "web_name_search" step. With this commit, we run all timers, thus ensuring the web_name_search to be always done, and we assert it. runbot error~937794 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#267407
This update resolves an issue where the PEPPOL response service was missing after a company registered as a receiver. The fix adds the necessary service information to the registration process, ensuring the service is correctly activated upon installation of the account_peppol_response module. This improves the seamless integration of PEPPOL for our business users.
Original PR description
To register as receiver we only call the `2/connect` route (and not any of the other `register*` routes). But currently that route does not update the supported services. Thus the response service is missing when the `account_peppol_response` module is installed before registering. We add the supported document identifiers to the `connect` call here. We change the route on IAP to update the services. task-None IAP PR: https://github.com/odoo/iap-apps/pull/1582 Forward-Port-Of: odoo/odoo#263747
This update resolves a visual glitch where a gradient color filter remained on website sections after the background image was removed. The fix directly removes the related filter element, ensuring a cleaner and more consistent appearance for website pages. This improves the user experience and prevents unexpected visual artifacts.
Original PR description
Steps to reproduce: - Edit a website page. - Select a section with a background image. - Set a gradient color filter on the background image. - Remove the background image. => The gradient color filter stays in the section DOM. After this commit, `removeBackgroundImage` directly removes the related `.o_we_bg_filter`. Forward-Port-Of: odoo/odoo#265025
This update fixes a technical issue that caused invoices sent to VeriFactu to fail due to an invalid sequence number. The fix prevents errors when users add prefixes or suffixes to sequence codes, ensuring invoices are correctly generated and sent. This improves the reliability of the VeriFactu integration.
Original PR description
**Steps to reproduce:** 1. Install l10n_es_edi_verifactu. 2. Switch to a ES company. 3. Create a customer invoice and send it to VeriFactu. 4. Enable Developer Mode. 5. Go to Settings > Technical >…
**Steps to reproduce:** 1. Install l10n_es_edi_verifactu. 2. Switch to a ES company. 3. Create a customer invoice and send it to VeriFactu. 4. Enable Developer Mode. 5. Go to Settings > Technical > Sequences & Identifiers > Sequences. 6. Search for the `Sequence Code: l10n_es_edi_verifactu` and open it. 7. Set a prefix or suffix using any alphabetical character. 8. Create a new invoice and send it to VeriFactu **Issue:** Traceback on sending Veri*Factu: `ValueError: invalid literal for int() with base 10: 'F260001'` **Cause:** The value returned by `ir.sequence.next_by_id()` may contain alphabetical characters (due to prefix/suffix), while the field `chain_index` expects an integer. The raw sequence value was directly assigned, causing the conversion to fail. **Fix:** Catch the ValueError raised by int() when the sequence value contains non-numeric characters (e.g. due to a prefix/suffix). Instead of crashing, surface a user-friendly error on the document telling the user to remove the prefix/suffix from the sequence configuration. **opw-6037528** Forward-Port-Of: odoo/odoo#255473
This update resolves an issue where users couldn't undo the insertion of a prompt banner within the AI editor. The fix ensures that undo functionality correctly removes prompt banners after they've been created, improving the user experience. This prevents unexpected banner persistence and maintains editor consistency.
Original PR description
Problem: After inserting a prompt banner, undo does not remove it. Cause: History commands were ignored when the selection was inside the prompt banner, preventing undo from handling banner insertion. Solution: Handle history commands even when the selection is inside the prompt banner. Steps to reproduce: - Insert a prompt banner using `/prompt` + Enter. - Press Ctrl + Z. - Observe that the banner is not removed. task-6230530 Forward-Port-Of: odoo/enterprise#117845
This update fixes an issue where the 'EDI Type' field for invoices imported from the Dian accounting system was incorrectly defaulted to '01' regardless of the purchase journal used. Now, imported invoices can correctly retain the original EDI type specified during bill creation, ensuring accurate accounting processing.
Original PR description
In l10n_co_edi on bills, the field l10n_co_edi_type can only be changed when the journal is DIAN Support Documents and not purchase. However when importing a XML, the field is not imported and is instead always computed to type 01. It should be possible to have imported bills using the Purchase journal and maintain their original type. (Take the xml on the ticket to reproduce the issue) opw-6203930 Forward-Port-Of: odoo/enterprise#118533
This update resolves a bug where a color filter applied to video backgrounds would disappear after navigating to another block. The fix ensures the color filter remains consistent when switching between blocks, improving the visual consistency of website designs. This enhancement impacts the user experience when using video backgrounds.
Original PR description
The color filter applied to a video background would disappear after selecting the block. Commit [1] fixed this problem, but only when the color filter is a gradient, but it didn't take into account just a plain color. This commit fixes it. Steps to reproduce: 1. Enter Edit mode on the website. 2. Drag and drop a snippet (e.g., "Intro"). 3. Set a video background for the block and apply a color filter with a custom color. 4. Click on another block then click back on the block with the video. -> The color filter is removed. [1]: https://github.com/odoo/odoo/commit/bd105a168df64c35ff09b9e51bcf83868fcfb378 task-6102345 Forward-Port-Of: odoo/odoo#264348
This update fixes an issue where UBL invoices weren't correctly linking to purchase orders. The change now uses a more precise filter based on purchase order sequences, ensuring invoices are accurately matched to related purchase orders during import. This improves the reliability of our UBL invoice processing.
Original PR description
[FIX] *: improve invoice origin keywords selection modules: account_edi_ubl_cii, purchase_edi_ubl_bis3 In UBL when importing a vendor bill, if the purchase order reference is not in the right node (OrderReference), we're used to take every word in the items descriptions as potential reference without applying any filter This commit apply a filter using the ir.sequence related to the purchase.order model With this, we only consider words following the sequence naming pattern to search for a related PO no-task Forward-Port-Of: odoo/odoo#266998 Forward-Port-Of: odoo/odoo#262678
This update resolves an issue where marking workorders as done would generate a traceback when no workorders were open. The fix ensures the system handles empty recordsets gracefully, preventing errors and maintaining stable operation. This improves the reliability of the MRP workorder process.
Original PR description
When calling on a empty recordset action_mark_as_done, it creates a traceback. **Observation** When calling action_mark_as_done, the method first loops over each workorder to perform various safety…
When calling on a empty recordset action_mark_as_done, it creates a traceback. **Observation** When calling action_mark_as_done, the method first loops over each workorder to perform various safety checks, and then calls button_finish to close all workorders: https://github.com/odoo/enterprise/blob/24008b550c5e7cf04cde2028c40f8a32d5b0e504/mrp_workorder/models/mrp_workorder.py#L881-L888 Inside button_finish, it retrieves all open workorders and marks them as done: - Retrieve open workorders: https://github.com/odoo/odoo/blob/36a1c6300f52f408b6af3f769e26686e07810e5a/addons/mrp/models/mrp_workorder.py#L659 - mark them as done: https://github.com/odoo/odoo/blob/36a1c6300f52f408b6af3f769e26686e07810e5a/addons/mrp/models/mrp_workorder.py#L675-L678 Returning to action_mark_as_done, it attempts to set the state to 'done' on the last workorder outside of the loop, referencing the loop variable: https://github.com/odoo/enterprise/blob/24008b550c5e7cf04cde2028c40f8a32d5b0e504/mrp_workorder/models/mrp_workorder.py#L894 -> If self is empty, the loop never executes. This leaves the loop variable empty, which ultimately triggers a traceback. opw-6239910 Forward-Port-Of: odoo/enterprise#118718 Forward-Port-Of: odoo/enterprise#118403
A test was failing due to a limitation in how the POS system loads partner data. This fix ensures that all partners are searched for, resolving the test failure and preventing potential issues with the tax calculation feature for US customers. This improves the reliability of the POS functionality.
Original PR description
**Issue:** `test_pos_fiscal_position_without_pos_avatax` test is failing with demo data because a US partner is created and searched for in the tour, but only the first 100 partners (alphabetically ordered) are loaded in the POS. Therefore, he's not found. runbot-938983 Forward-Port-Of: odoo/enterprise#118345
This update resolves a bug where shift calculations incorrectly displayed 0% allocated time for weekend shifts, preventing accurate hour allocation. Additionally, a test was modified to avoid running when demo data is present, ensuring consistent test execution. These changes improve the reliability of shift planning and testing processes.
Original PR description
## [FIX] planning_field_service: avoid division by 0 Before this commit, when the shift is created during the weekend, the allocated_percentage will be 0 percent because the resource assigned is not…
## [FIX] planning_field_service: avoid division by 0 Before this commit, when the shift is created during the weekend, the allocated_percentage will be 0 percent because the resource assigned is not supposed to work at that day and so a division by zero occured in the onchange of break_time field in planning.slot model. This commit checks if allocated_percentage is not equal to 0 before computing the new allocated hours when the user alters break_time field on a planning.slot. ## [FIX] planning_field_service: don't start test with onboarding tour with demo Before this commit, the planning_field_service_tour tour does not work when there is demo data because the tour will select the first slot in the gantt view which will be an open shift instead of a shift assigned to the current user because of that, the sign in button is not displayed as expected. This commit makes sure the test running the planning_field_service_tour tour is skipped when demo data are installed. runbot-error-242483
This update resolves an issue where sponsor logos weren't loading on the exhibitor detail page. The fix ensures the website uses the correct image sizes (up to 512px) for sponsor logos, preventing placeholder images from appearing. This improves the visual presentation of our event exhibitor listings.
Original PR description
The sponsor logo was failing to load on the exhibitor detail page because the generic image widget was auto-generating a srcset with image_1920, a size that does not exist on event.sponsor (max: image_512). The browser would pick image_1920 from the srcset and receive a placeholder instead of the actual logo. Fixed by adding 'preview_image': 'image_128' to the t-options of the sponsor image widget, capping the srcset to existing image variants. there's another issue with the same fix: odoo/odoo@6bd2de2 related to: odoo/odoo@36e680f opw-6218587
This update fixes an issue where restaurant order tickets were missing customer names. Previously, a change in the system's receipt printing process resulted in the display of order references instead of customer information. The fix ensures that customer names are now correctly included on direct-sale order tickets for restaurants, improving order clarity and customer experience.
Original PR description
Steps to reproduce ------------------ 1. Configure a kitchen printer for a restaurant 2. Open PoS, don't select a table, but select a customer 3. Select Take Out or Delivery 4. Add products in the kitchen printer's category 5. Send to the kitchen Observation -> the ticket shows the order reference, not the customer name! Why the issue: -------------- Before the receipt printer refactor https://github.com/odoo/odoo/commit/b1f17b6e61191cad6a932f923e76a0c406f91f13, the template was showing `order.getName()`, which returns `floating_order_name` (set to the partner name by `setPartner`). After the refactor, the template shows the raw `pos_reference` directly, hence the partner name is missing. Fix: ---- Show the table label when a table is set, otherwise `floating_order_name` which includes the customer name if it exists. opw-6208965
This update ensures that the background color of selected table cells is accurately displayed in the toolbar, resolving an issue where it wasn't showing correctly. The changes include improvements to how cell selections are handled and updated, ensuring a consistent and functional experience for users editing tables.
Original PR description
Before this commit: the background color of selected table cells isn't shown in the toolbar. After this commit: we have a background color processor in the table plugin to calculate the background color of selected cells. The color and background color are also properly reset to update the selected color when selecting an empty table cell. table_selectionchange_handlers is created to make sure the selected color is updated after it. task-5976046 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#266911 Forward-Port-Of: odoo/odoo#252011
A recent test failed due to an error in how the system searched for short URLs. This update corrects a logic flaw that caused duplicate links to be returned when similar code patterns were present. This ensures accurate and consistent link searching.
Original PR description
Problem ------ The test was trying to search for links that has specific code patterns in their short_url and distinguish links using this logic. However, it did not consider the case where the same code pattern might exist in two different urls. i.e `example/r/AbC` and `example/r/DbE` both contains `b`, so when searching for `b`, both urls will be returned. FIX ------ Testing the search on different code combinations for the short_url is not the subject of that unit test, it is sufficient to search for the exact codes and see if there are conflicting results. task-6254039 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#266709
This update resolves an issue preventing monthly companies from receiving their inventory valuation journal entries. The cron job's domain was incorrectly excluding monthly companies, leading to missed valuations. Now, both daily and monthly companies are processed as intended, ensuring accurate inventory accounting at month-end.
Original PR description
#### Description of the issue/feature this PR addresses: The "Stock Account: Inventory Valuation Closing" cron is meant to post valuation journal entries for companies configured with periodic…
#### Description of the issue/feature this PR addresses: The "Stock Account: Inventory Valuation Closing" cron is meant to post valuation journal entries for companies configured with periodic inventory valuation. Due to a faulty domain in ResCompany._cron_post_stock_valuation, monthly companies are never processed, and on the last day of the month daily companies are also skipped. As a result, no inventory valuation journal entries are ever generated by this cron for periodic-valuation companies. #### Current behavior before PR: The cron's domain requires inventory_period = 'daily', which excludes monthly companies on every non-last day of the month. On the last day of the month, an extra AND clause is added requiring inventory_period = 'monthly'. Combined with the existing 'daily' clause, this produces a contradiction (period = 'daily' AND period = 'monthly') that matches no records, so daily companies are dropped on that day as well. Net effect: monthly companies are never processed, and daily companies are skipped on month-end. #### Desired behavior after PR is merged: On a non-last day of the month, the cron processes companies with inventory_period = 'daily'. On the last day of the month, the cron processes both 'daily' and 'monthly' companies, so monthly valuation entries are posted at month-end without dropping daily companies. opw-6115649 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#264782 Forward-Port-Of: odoo/odoo#264298
This update fixes an issue where UBL files weren't correctly applying tax rates during import. Previously, the system used a simplified cache key that could lead to incorrect tax assignments for similar lines. This change ensures that the imported UBL file's tax information is accurately reflected, improving data consistency.
Original PR description
When we import a UBL file, we call the `_import_retrieve_tax` method to fetch taxes to indicate on lines.
During the process, we use cache to avoid performing the search a second time if a new line is the same as a previous one.
https://github.com/odoo/odoo/blob/d0424f2ffcf99ee59befe288150f1643b3fa0112/addons/account/models/account_tax.py#L4459-L4462
The cache_key used is defined as follows: {line's invoice, line's name, line's partner}.
This implies that if two lines from the same invoice share the same name and partner, the same tax will automatically be used even if different taxes were indicated in the file.
This is not desirable as we should match what is indicated in the XML file imported.
opw-6226166
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#266697This update resolves an error that prevented users with standard accounting access from verifying company partners within the Türkiye - Nilvera module. The fix allows users to perform verification without requiring full system administrator privileges, improving usability and workflow efficiency.
Original PR description
**Steps to reproduce:** * Install *Türkiye - Nilvera* (`l10n_tr_nilvera`) module. * Log in as *admin user*. * Create a *partner* for the company. * Set *country* as Turkey. * Configure required…
**Steps to reproduce:** * Install *Türkiye - Nilvera* (`l10n_tr_nilvera`) module. * Log in as *admin user*. * Create a *partner* for the company. * Set *country* as Turkey. * Configure required *taxes*. * Create a *demo user*. * Grant the demo user *Accounting admin access*. * Log in with the *demo user*. * Navigate to *Contacts* → open the *Turkey company partner*. * Navigate to *Nilvera Status* (via Invoicing/Accounting tab) click on *Verify*. **Observed behavior:** * A *company access error* is raised during partner verification. **Cause:** * The field *l10n_tr_nilvera_api_key* is restricted with `groups='base.group_system'`, requiring full system admin rights. * Users with *module-level admin access* (e.g., Accounting) do not have sufficient rights, causing the access error. **Fix:** * Use `sudo()` on `env.company` to bypass the restrictive group access. * This allows users with appropriate *functional admin rights* to perform verification without granting full system privileges. Ticket [link](https://www.odoo.com/odoo/project.task/6106907) opw-6106907 Forward-Port-Of: odoo/odoo#262668
This update corrects minor layout issues within the Odoo portal, specifically aligning alert content and Knowledge cards. The fix addresses visual misalignments caused by spacing and padding, ensuring a consistent and professional appearance for users. This change is a temporary solution awaiting a broader refactoring on the main Odoo branch.
Original PR description
The alert content is vertically misaligned due to the mb-1. The Knowledge / Document cards are not inserted inside a `row` which misaligns them due to the missing margin and padding. This is to be reworked on master forwardport since here we're dealing with nested rows withouth intermediary columns. SCSS only fix for stable. task-5262108 <img width="663" height="553" alt="image" src="https://github.com/user-attachments/assets/18dd6c2f-47f0-4ba8-91cb-f9c5a2e0fda4" /> > [!NOTE] > On the master forwardport I'll review the DOM to avoid the nested row and unnecessary margin instead of the scss fix here. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#249313
This update resolves a bug where formatting (bold, italic, underline) applied to selected inline code within the HTML editor couldn't be consistently removed. The fix ensures that formatting nodes are correctly considered when determining if a selection is already formatted, leading to accurate formatting removal.
Original PR description
Problem: When selecting text containing `o_inline_code` and applying formatting such as bold, italic, or underline, the formatting cannot be removed. Cause: When applying formatting, nodes matching…
Problem: When selecting text containing `o_inline_code` and applying formatting such as bold, italic, or underline, the formatting cannot be removed. Cause: When applying formatting, nodes matching `is_formattable_node_predicates` are ignored. However, when checking whether the selection is already formatted, those nodes are not ignored, so the selection is erroneously considered to be only partially formatted. Solution: Take `is_formattable_node_predicates` into account when checking whether a selection is formatted. Steps to reproduce: - Go to To-Do → Create New. - Type some text and add inline code on the same line. - Select all content using Ctrl + A. - Apply formatting such as bold, italic, or underline using keyboard shortcuts (Ctrl + B / Ctrl + I / Ctrl + U). - Press the same shortcut again to remove the formatting. - Observe that the formatting is not removed. task-6229228 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#267455 Forward-Port-Of: odoo/odoo#265183
A recent test failure related to demo data installation has been resolved. The fix ensures that a simulation offer is hidden, preventing errors during the testing process. This improves the reliability of the salary payroll module's automated tests.
Original PR description
**Problem**: The test fails when demo data is installed because some steps expect an empty list view. **Fix**: Ensure the simulation offer is hidden by applying a custom filter on the simulation employee Task: 6246575 Forward-Port-Of: odoo/enterprise#118358
This update corrects a display issue in the Sales graph view where currency was incorrectly converted to USD when only one company was present. The fix prevents unnecessary currency conversions, ensuring consistent and accurate currency representation for all users. This improves the user experience and data clarity.
Original PR description
Steps to reproduce ================== - Install sale_managemement - Enable the EUR currency - Create a new company with the EUR currency - Enable both the current and the new company as the main one - Go to Sales - Switch to the graph view - Group by Order Date > year - Hover over a bar => The currency is in USD - Group by Order Date > Week => The currency is now in EUR even though all records are in USD Cause of the issue ================== _web_read_group_fill_temporal returns an empty array in currency_id:array_agg_distinct when there are no records in that group The undefined currency was then added to graphCurrencies. => graphCurrencies = [1, undefined] Since graphCurrencies has more than one item, the currencies are converted opw-6226827 Forward-Port-Of: odoo/odoo#266972
This update prevents users from unintentionally adding snoozed products to their orders in both the standard POS and self-order systems. The system now checks if a product is snoozed before allowing it to be added, improving order accuracy and preventing errors. This enhancement ensures a smoother and more reliable customer experience.
Original PR description
### Before this commit: - Snoozed products could still be selected from the product screen and combo configurator without any warning. - Users could add snoozed products to the order by mistake. - In self-order, snoozed products were still selectable in combo items. - Snooze checking was only based on product template id. For product variants (`product.product`), the `product_tmpl_id` was not checked. ### After this commit: - Add a `canAddProductToCurrentOrder` method to show a warning before adding a snoozed product. - Apply this check in the product screen and combo configurator. - Improve snooze detection by supporting both `product.template` and `product.product` (via `product_tmpl_id`). - In self-order, If a product is snoozed, show it as 'Out of stock'. - If a product is not available in self-order, do not show it in the list. - Fix the radio input attribute in the snooze dialog. Task:6012412 Forward-Port-Of: odoo/odoo#253269
This update fixes a technical error that occurred when applying payslips with negative amounts, specifically within the Belgian payroll module. The fix involved correcting references to negative net amounts and removing unnecessary code, ensuring accurate payslip generation and preventing errors.
Original PR description
Steps to produce: - create a previous payslip with negative amount - create a payslip for current month - click on the warning to apply negative amount - you get an error or a traceback because it's referencing an input which is removed from the system and migrated to other input Fix: - corrected the reference to negative net - removed content of the method `_generate_payslip` as it's not used and referencing removed inputs task-id: 6240163 Forward-Port-Of: odoo/enterprise#118144
This update fixes a minor issue with the website link tracker feature, preventing the creation of invalid trackers and ensuring a cleaner user experience. The update now validates tracker codes and disables editing of target links after creation, streamlining the process and reducing potential errors.
Original PR description
1. Remove the possibility to create link tracker with an empty code. Empty code tracker do not work, but still appear in the tracker list. Only accept alphanumerical chars in the tracker code. 2. Set the target link input as disabled after generating the tracker, since editing the target link at this point would have no impact. task-4531974 Forward-Port-Of: odoo/odoo#266733
This update resolves an issue where attachments sent via the 'Send by Email' action in Sales Orders were disappearing after refreshing the chatter window. The fix restricts attachment saving to the full composer view, ensuring consistent functionality across different composer types. This improves the reliability of email sending workflows.
Original PR description
**Steps to reproduce:** - Install Sales app - Create a Sales Order - Click on the 'Send by Email' action - Add an attachment and send it - Open the chatter to create a log note - Attachment is…
**Steps to reproduce:** - Install Sales app - Create a Sales Order - Click on the 'Send by Email' action - Add an attachment and send it - Open the chatter to create a log note - Attachment is attached to the new message - It disappears on refresh **Issue:** Attachment upload widget was moved to the toolbar of the composer with [1], which split it into `mail_composer_attachment_selector` and `mail_composer_attachment_list`. Then with [2] the selector logic was changed to use `FileUploader` instead of `FileInput` to get the attachment synced when switching back and forth between full and normal chatter composers. But this should not impact action composers created with `'mail.email_compose_message_wizard_form'`. **Fix:** Restrict the attachment save to the full composer using context. [1] https://github.com/odoo/odoo/commit/cee3c8146863300242f9f2d109743a50c2b91027 [2] https://github.com/odoo/odoo/commit/9f7249a141b618fc8640a65d1f7fc20023156ce3 opw-5164504 Forward-Port-Of: odoo/odoo#266994 Forward-Port-Of: odoo/odoo#265736
This update fixes an issue where the payment link wizard's copy button would overflow on smaller mobile screens due to a long label. The button now automatically adjusts to fit the available space, ensuring it's fully visible and usable on all devices. This improves the user experience for mobile users generating payment links.
Original PR description
Description of the issue/feature this PR addresses: The payment link wizard copy button can overflow horizontally on small screens because of its long label. Current behavior before PR: On mobile view, the copy button may appear partially hidden. Desired behavior after PR is merged: The payment link wizard copy button properly fits within the available width on mobile view. Before: <img width="514" height="667" alt="image" src="https://github.com/user-attachments/assets/9060bf5a-9590-47a6-b322-220ed0a871be" /> After: <img width="514" height="667" alt="image" src="https://github.com/user-attachments/assets/3b257e73-3744-4236-b28c-bad1a46ca92d" /> @Tecnativa TT58871 @CarlosRoca13 please review --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#266303
This update fixes an issue where flexible employee time off wasn't accurately reflected in the calendar views. Now, time off hours are correctly grayed out from midnight to 11 PM, aligning with expected behavior and ensuring accurate scheduling for flexible employees. This ensures accurate representation of employee availability.
Original PR description
__ ## Short functional explanation of the error When setting a time off for an employee who has a flexible schedule, in the attendance app, on the calendar with the 'days' view. We can see that the…
__ ## Short functional explanation of the error When setting a time off for an employee who has a flexible schedule, in the attendance app, on the calendar with the 'days' view. We can see that the hours are grayed out from 8 hours to 16 hours. However, according to this message: https://www.odoo.com/mail/message/1027495005 "[...] the entire day of absence might not be represented as such, which is an issue (for example if a flexible employee with 8h/day takes a day off, the duration of the leave should be 1 day/8 hours but on the gantt view everything should be gray from midnight to midnight)". Moreover, when we select the Week or Month view on the calendar, the day off isn't grayed out. This comes from the fact that, for a flexible schedule, we consider that any time of the day can be a working hour; and we only grey out days in the calendar where no hour has been worked at all. Hence, the hours considered during a flexible day off should be from midnight to 23:59:59. ## Reproduction Steps 1. Go to an employee's profile and set their schedule to flexible. 2. Create a time off of a one-day duration for this employee. 3. Go to the attendance app and see the calendar. ### Expected behavior When clicking on the Day view, all hours from midnight to 11pm should be grayed out. When clicking on the Week/month view, the day of the time off should be grayed out. ### Unexpected behavior When clicking on the Day view, hours from 8am to 4pm are grayed out. When clicking on the Week/month view, the day of the time off isn't grayed out. ## Origin of the issue First, we only consider the leave if the resource is fully flexible, i.e if the employee has no working calendar set: https://github.com/odoo/odoo/blob/394a30f8a2814d460cfe220b5017e7ac95d8cddc/addons/resource/models/resource_calendar.py#L546 However, if the schedule of the employee is flexible, the leave resource isn't considered as fully flexible, thus leading us to a leave from 8 am to 4 pm. Moreover, when processing flexible leaves, we return the unavailable intervals with the timezone of the employee: https://github.com/odoo/odoo/blob/394a30f8a2814d460cfe220b5017e7ac95d8cddc/addons/resource/models/resource_calendar.py#L589-L592 Whereas when we process fixed leaves, we return the unavailable intervals under utc: https://github.com/odoo/odoo/blob/394a30f8a2814d460cfe220b5017e7ac95d8cddc/addons/resource/models/resource_calendar.py#L597-L601 This leads us to display problems: when the user is under European/ Brussels time in summer, the leave starts at 2 am and ends at 11pm, instead of starting at midnight. Note: after discussion with AJU, it has been agreed that the behavior should be the same on the Planning app. __ opw-6030212 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#264154 Forward-Port-Of: odoo/odoo#256636
This update fixes an issue where flexible employee time off wasn't displayed accurately in the attendance calendar. Now, time off durations are correctly grayed out from midnight to 11 PM, aligning with expected behavior and ensuring accurate representation of employee availability. This improves the usability of the attendance app for flexible schedules.
Original PR description
__ ## Short functional explanation of the error When setting a time off for an employee who has a flexible schedule, in the attendance app, on the calendar with the 'days' view. We can see that the…
__ ## Short functional explanation of the error When setting a time off for an employee who has a flexible schedule, in the attendance app, on the calendar with the 'days' view. We can see that the hours are grayed out from 8 hours to 16 hours. However, according to this message: https://www.odoo.com/mail/message/1027495005 "[...] the entire day of absence might not be represented as such, which is an issue (for example if a flexible employee with 8h/day takes a day off, the duration of the leave should be 1 day/8 hours but on the gantt view everything should be gray from midnight to midnight)". Moreover, when we select the Week or Month view on the calendar, the day off isn't grayed out. This comes from the fact that, for a flexible schedule, we consider that any time of the day can be a working hour; and we only grey out days in the calendar where no hour has been worked at all. Hence, the hours considered during a flexible day off should be from midnight to 23:59:59. ## Reproduction Steps 1. Go to an employee's profile and set their schedule to flexible. 2. Create a time off of a one-day duration for this employee. 3. Go to the attendance app and see the calendar. ### Expected behavior When clicking on the Day view, all hours from midnight to 11pm should be grayed out. When clicking on the Week/month view, the day of the time off should be grayed out. ### Unexpected behavior When clicking on the Day view, hours from 8am to 4pm are grayed out. When clicking on the Week/month view, the day of the time off isn't grayed out. ## Origin of the issue First, we only consider the leave if the resource is fully flexible, i.e if the employee has no working calendar set: https://github.com/odoo/odoo/blob/394a30f8a2814d460cfe220b5017e7ac95d8cddc/addons/resource/models/resource_calendar.py#L546 However, if the schedule of the employee is flexible, the leave resource isn't considered as fully flexible, thus leading us to a leave from 8 am to 4 pm. Moreover, when processing flexible leaves, we return the unavailable intervals with the timezone of the employee: https://github.com/odoo/odoo/blob/394a30f8a2814d460cfe220b5017e7ac95d8cddc/addons/resource/models/resource_calendar.py#L589-L592 Whereas when we process fixed leaves, we return the unavailable intervals under utc: https://github.com/odoo/odoo/blob/394a30f8a2814d460cfe220b5017e7ac95d8cddc/addons/resource/models/resource_calendar.py#L597-L601 This leads us to display problems: when the user is under European/ Brussels time in summer, the leave starts at 2 am and ends at 11pm, instead of starting at midnight. Note: after discussion with AJU, it has been agreed that the behavior should be the same on the Planning app. __ opw-6030212 Forward-Port-Of: odoo/enterprise#117112 Forward-Port-Of: odoo/enterprise#112482
This update resolves an issue where the Executive Summary report would crash when the date range option was disabled. The fix ensures the report uses the fiscal year's start date as a fallback, preventing a type error and allowing the report to function correctly regardless of the date range selection.
Original PR description
## Steps to Reproduce: 1. Install the Accounting module. 2. Go to Accounting > Reporting > Executive Summary. 3. Activate debug mode. 4. Click on the gear icon at the top. 5. In the "Options" tab,…
## Steps to Reproduce: 1. Install the Accounting module. 2. Go to Accounting > Reporting > Executive Summary. 3. Activate debug mode. 4. Click on the gear icon at the top. 5. In the "Options" tab, disable the "Date Range". 6. Open the report again. ## Error: `TypeError - unsupported operand type(s) for -: 'datetime.date' and 'NoneType'` ## Cause: At [1], when the "Date range" option is disabled in the summary report, `date_from` becomes None. The NDays expression still computes `date_to - date_from` at [2], which raises a TypeError because subtraction between a datetime and NoneType is not supported. ## Fix: This commit takes the fiscal-year's start date, when the date-range feature is disabled. [1] - https://github.com/odoo/enterprise/blob/a9cadd93b849375edfcc7fd04612d9eb8787043b/account_reports/models/account_report.py#L564-L570 [2] - https://github.com/odoo/enterprise/blob/a9cadd93b849375edfcc7fd04612d9eb8787043b/account_reports/models/executive_summary_report.py#L15-L16 sentry-7455506965
This update optimizes a key report that calculates historical stock values. The change adds indexes to a database table, significantly speeding up the report generation process. Previously, the report was extremely slow due to inefficient database searches, but now it completes much faster.
Original PR description
The Inventory Valuation report at a past date rebuilds historical value by tracing stock moves. Two product.value lookups run on the hot path and both hit unindexed columns: -…
The Inventory Valuation report at a past date rebuilds historical value by tracing stock moves. Two product.value lookups run on the hot path and both hit unindexed columns: - stock.move._get_manual_value() searches product.value by move_id for every traced move; - product.product._get_last_product_value() searches product.value by product_id. product.value declares neither column with an index, so each lookup performs a sequential scan of the whole table. This is harmless on small tables but degrades sharply as product.value grows (one row is written per manual standard-price/move revaluation). On a database where product.value held ~9.6M rows, the per-move move_id lookup seq-scans the entire table only to return nothing (no row carries a move_id), repeated for every traced move, so the historical report never completes. Index product_id (dense) and move_id (btree_not_null, since it is null for every manual revaluation row). Each lookup then becomes an index scan. Measured on a ~9.6M-row product.value, historical valuation report, single date: | product.value lookup | without index | with index | | --------------------------- | ------------------------- | ------------------ | | by product_id (DISTINCT ON) | ~0.56s (1.7 GB seq scan) | index scan | | by move_id, per traced move | full seq scan, returns 0 | index scan | | report (~3.1M moves traced) | never completes (>20 min) | completes (~3 min) | --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#266790
This update resolves a technical issue preventing the Instagram snippet on our website from displaying correctly in iOS Chrome browsers. The problem stemmed from a change in how Chrome on iOS sends data, requiring a simple adjustment to our code to handle the data format correctly. This ensures a consistent user experience across different devices.
Original PR description
Scenario:
- insert Instagram Page snippet
- using iOS chrome browser (reproduced in iOS 26.3, google chrome 146)
visit that page logged in as a internal user or in ?debug=assets (so
traceback are shown)
Result: 3 tracebacks errors are shown with error "Uncaught Promise >
JSON Parse error: Unexpeced identifier "object".
Cause: probably since this change:
https://chromium.googlesource.com/chromium/src/+/9629a16a7ab0b91c59ecaa9fc8934db3d6c83ba3%5E%21/
chrome on iOS is sending message with this object as data:
{ "command": "registerAsChildFrameAck", "remoteFrameId": "d905013d…" }
but the instagram code is expecting a stringified JSON.
Fix: ignore message data that are object.
opw-5930717
Forward-Port-Of: odoo/odoo#267027
Forward-Port-Of: odoo/odoo#254664This update fixes an issue where custom text attributes on products weren't correctly displayed in POS order lines. Previously, the POS system showed a placeholder instead of the customer's entered text. The fix ensures that customer-defined attributes are accurately reflected when settling orders from the website through POS.
Original PR description
When a sale order containing a product with a custom (free text) attribute was settled in POS, the order line displayed the placeholder attribute value name (e.g. "Custom") instead of the actual text…
When a sale order containing a product with a custom (free text) attribute was settled in POS, the order line displayed the placeholder attribute value name (e.g. "Custom") instead of the actual text entered by the customer. Steps to reproduce: ------------------- * Create a product with a free text attribute (create_variant='no_variant', is_custom=True) * Go to the website's shop (works best in a new private tab) * Fill the free text attribute and add the product to the cart * Click on checkout * In POS, open Quotation/Order and settle the order > Observation: the order line shows "Custom" instead of the text Why the fix: ------------ `SaleOrderLine._load_pos_data_fields` was not exposing `product_no_variant_attribute_value_ids` nor `product_custom_attribute_value_ids`, so the JS `settleSO` function received no attribute data on the `line` object. As a result, the new POS order line was created with empty `attribute_value_ids` and `custom_attribute_value_ids`, leaving `constructFullProductName` unable to find the custom text. The fix adds both fields to `_load_pos_data_fields` and updates `settleSO` to use them when building the new POS order line. The dynamic fetch path (`_getSaleOrder`) is also updated to explicitly read the `product.attribute.custom.value` records so the data is available for orders loaded at runtime. opw-5958678 Forward-Port-Of: odoo/odoo#266875 Forward-Port-Of: odoo/odoo#251993
This update corrects a misunderstanding in the order payment flow. When creating an order with a price of $0, the system incorrectly treated payments as refunds. This fix hides the 'Pay Later' payment method for these zero-price orders, aligning with business requirements and preventing incorrect accounting.
Original PR description
Step to reproduce: - install "pos_settle_due" - create a pos order, set order price = 0, select a customer - go to payment page, select "customer account" as payment method - here you can set any…
Step to reproduce: - install "pos_settle_due" - create a pos order, set order price = 0, select a customer - go to payment page, select "customer account" as payment method - here you can set any amount to pay, ex 100$ - fulfill the order. Observation: - the order amount is 0, if we pay 100$ using customer account, it is considered as change (which means we returned it to customer) - As per PO, this flow doesn't make sense Issue: - customer has 100$ due for this order, but he won't be able to settle this as fetch order to settle with amount != 0, after commit [1] - [1] https://github.com/odoo/enterprise/commit/12af23d5382e972facfaa999e4c5ab30c97e8d1f https://github.com/odoo/enterprise/blob/951e5f42884c898bc14d9c32ae6a8f08c31ff06d/pos_settle_due/static/src/app/screens/partner_list/partner_line/partner_line.js#L35 Fix: - we hide payment method of type "pay_later" in case of 0 price order opw-6123699 Forward-Port-Of: odoo/enterprise#118296 Forward-Port-Of: odoo/enterprise#116556
This update fixes an issue where order names weren't correctly updated when a customer (partner) was changed on an existing order, particularly in scenarios like Delivery/Eat In presets. The change ensures order names accurately reflect the current customer, improving order clarity and reporting. This was a minor bug fix.
Original PR description
When a partner is changed on an order that was previously named after another partner (e.g. in a Delivery/Eat In preset scenario), the order name was not updated. This was because once `floating_order_name` is set, the order is no longer considered a "direct sale", and the logic to update the name from the partner was bypassed. This commit updates `setPartner` to check if the current name matches the name of the previous partner. If so, it updates the name to the new partner's name. task-id: 6000287 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#253456 Forward-Port-Of: odoo/odoo#251811
This update fixes an issue where orders placed at tables in one POS configuration were sometimes incorrectly matched and merged by other POS configurations sharing the same restaurant floor. This ensures that orders are accurately tracked and processed, preventing duplicate orders and improving the reliability of our restaurant POS system. The fix was verified through task ID 6024012.
Original PR description
When multiple POS configurations share the same restaurant floor, an order placed on a table in one POS could be incorrectly retrieved or merged by another POS selecting the same table. task-id: 6024012 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#253116
This update resolves a crash that occurred when creating payslips for Belgian employees with overtime, specifically when using attendance-based work contracts. The issue stemmed from a data structure mismatch within the payroll calculations, which has now been corrected. This ensures accurate payslip generation for all employees.
Original PR description
When creating a payslip for an employee in the Belgian localization with an hourly wage and an attendance-based work entry source contract, a traceback occurs if there is an attendance with overtime. This happens because the overridden `_preprocess_work_hours_data_split_half` method in `l10n_be_hr_payroll_attendance` attempts to unpack `work_entries` assuming it is a list of triplets, but it is passed as a `defaultdict` with composite keys instead. This data structure mismatch results in a `ValueError: not enough values to unpack (expected 3, got 2)`. Even if updated to handle the `defaultdict` structure, `_preprocess_work_hours_data_split_half` would improperly delete the overtime line hours without adding them back elsewhere (the code responsible for adding them back seems to have been removed). Since this function serves no purpose anymore, we omit the call to it. However, because `saas-19.2` is a stable version Task Id: 6253707
This update resolves an issue preventing users from editing the short description of new partners within the website interface. A recent change removed essential styling, causing the editing field to appear unusable. The fix restores the necessary styling and adds a placeholder for improved user experience.
Original PR description
Steps to reproduce: 1. Create a new partner with any level. 2. Click on the Go to Website button and publish it. 3. Now go to the /partners page and activate editor. 4. Now try to edit the short description of the partner. Current behavior: The short description is not editable in the frontend. This is due to the changes made in the editor, before the changes, the o_editable class was getting added additional properties to give it a minimum height and width, along with making it an inline-block element. But now, these properties has been removed, which is causing an issue for users adding new partners and trying to edit the short description in the website. Solution: We brought back the crm_partner_assign.scss and added the properties back to the o-editable element inside our specific partner short description. Also added a placeholder to the short description to make the interaction more intuitive for users. opw-5955922 Forward-Port-Of: odoo/odoo#253097
This update resolves an issue where the system incorrectly flagged service invoices as needing an Incoterm, even though they don't require one. The fix ensures that service invoices in the l10n_gt_edi module export correctly to the tax agency, preventing export errors. This improves invoice processing efficiency.
Original PR description
With l10n_gt_edi: - Create an invoice with a partner without a country (in l10n_gt this is considered an export invoice) and a service product. When trying to export the invoice to the tax agency, the following alert is triggered: Incoterm is required on export invoice with goods product but it's currently missing However, service products do not require incoterm configuration. opw-6170409 Forward-Port-Of: odoo/enterprise#115833