Monday, February 23, 2026
46 changes · saas-19.2
Enhancements to existing features
This update enhances the AI chat experience by improving the readability and formatting of AI responses. Changes include highlighting code snippets, adjusting message layout for better clarity, and dynamically updating conversation titles to mirror popular AI platforms like ChatGPT.
Original PR description
* = ai_knowledge, ai_livechat, test_full_discuss_enterprise In this commit, we "overhaul" the way that AI messages are rendered. This effort was motivated not just by aesthetics but also to make the…
* = ai_knowledge, ai_livechat, test_full_discuss_enterprise In this commit, we "overhaul" the way that AI messages are rendered. This effort was motivated not just by aesthetics but also to make the AI responses more readable and understandable for users. The first change was to inject boostrap classes to the tables added by the markdown library. By doing that, we make tables render as tables with borders and highlighting, instead of just text. We also added the prism library in the modules assets. Now, if the AI replies with some code snippet, it will be highlighted depending on the language used. We also added different CSS rules in `chat.scss` to changed some of the front end details like the padding and margin between elements in messages. In said file, we also changed some display and width values, to make tables and code segments horizontally scrollable, so information won't get "smushed" in a chat window. We also limit the width to 75% of the AI response in the discuss app because otherwise the information was too spread out - we added a media query to return the width to 100% in smaller screens. We moved the "Expand in Discuss" button, to be inbetween the close button and the minimise button, because the dropdown was confusing users, who imagined that they can switch between agents directly from the chat window. We additionally, made it so conversation titles change based on the user's first query, similarly to how it is done in the web versions of ChatGPT or Gemini. For that, we initial create channels with the name field empty and then we extend the display_name compute method of the discuss channel to add the agent's name in case the name is empty. After the first message we populate the name field which should by extension change the display_name field. We heavily patched the message template to remove the bubble and apply classes for the css rules. We also made it so user messages remain in the right in the discuss app (like in chat windows), increasing visual clarity. Finally, the test_natural_language_query_tour was modified to check for the new descriptive chat window title feature and the test_create_ai_chat was modified to reflect the new way of creating ai chats - with empty name and populated display_name. Task-5164382
This update allows companies to directly receive KSeF invoices electronically, eliminating the need for traditional postal delivery. This streamlines the invoice process and ensures legally compliant delivery of sales invoices under Poland's KSeF tax system. It improves efficiency and reduces administrative overhead.
Original PR description
If a company sell me something, they can send me an invoice. With KSeF, they do not have to send an invoice to me by post or mail - they can send it directly to KSeF. And it is legally delivered to me. Implement fetching bills from KSeF task-5405257 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#247812
This update allows users to process multiple bank statements and reconciliation lines simultaneously, streamlining the accounting process. The changes enhance efficiency by enabling bulk actions on statement lines, improving the accuracy and speed of reconciliation tasks. This update focuses on usability and performance improvements.
Original PR description
This commit will allow to do the set account, set partner and apply reco models on multiple lines. To select multiple line you need to use alt + click and then you will have button on top to trigger the actions. - The set partner function was modified to work with multiple statement lines and keep all existing functionality (modify line with same partner_name) - The trigger reconcile model function was also modified to work with multiple statement lines - The set account function was not touched because we use the aml_id of the suspense as a parameter but here we will have multiple suspense line to modify. Since we are doing this change in stable, we created a new function set_account_multiple_bank_statement_line. This function will have the same behavior for reco models as the basic set account. task-5253778 Forward-Port-Of: odoo/enterprise#107997 Forward-Port-Of: odoo/enterprise#100316
Resolved issues and error corrections
This update fixes a critical issue in the Australian payroll calculations by ensuring payslips use the correct tax settings for each pay period, based on the employee's contract history. Previously, the system incorrectly used current employee data, leading to inaccurate withholding and tax calculations. This change guarantees historically accurate payroll processing for Australian employees.
Original PR description
Since the introduction of the employee versioning system, using `employee.field_name` in salary rules is no longer accurate for computations involving historical or specific periods. Accessing fields…
Since the introduction of the employee versioning system, using `employee.field_name` in salary rules is no longer accurate for computations involving historical or specific periods. Accessing fields directly on the `employee` record returns the current values. This creates an issue when a future version exists. For example, if a new version is created for February 2026 with an updated Child Support amount, generating a delayed payslip for January 2026 would incorrectly use the February value (current state) instead of the January value (historical state). This commit updates the Python compute logic in the Australian salary rules to use `version.field_name` instead of `employee.field_name`. The `version` object ensures the data used corresponds strictly to the payslip's period. The following rules/fields are updated to use the version object: - Tax Treatment Category - Additional Withholding Amount - Extra Pay - TFN Declaration - Medicare (Reduction, Exemption, and Levy) - Training Loans - NAT 3093 Amount (Tax Offset) - Child Support (Garnishee and Deduction) A test case is added to verify that a payslip correctly retrieves the child support amount from the version valid during the payslip period, ignoring future updates. Task-5002697 Forward-Port-Of: odoo/enterprise#108063 Forward-Port-Of: odoo/enterprise#106550
This update fixes an issue where the builder overlay's position wouldn't refresh when resizing elements within the website builder. The fix prevents the creation of hover overlays for elements already using the builder overlay, ensuring the overlay accurately reflects changes made through resizing. This improves the user experience when making adjustments to website designs.
Original PR description
**Issue:** The builder overlay position was not reliably updating when resizing an element via drag handles. This happened because the hover overlay was also being created for elements that already had an active builder overlay. When `removeHoverOverlay()` ran, it unobserved the element from the ResizeObserver. Active builder overlays rely on that observer to refresh their position and dimensions. Removing it prevented the overlay from updating while resizing. **Fix:** Do not create a hover overlay for elements that already have an active builder overlay. This preserves the ResizeObserver for active overlays, and not showing hover overlays for already active elements also makes functional sense. task-[5955545](https://www.odoo.com/odoo/project/974/tasks/5955545) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update ensures that Peppol invoices always include the PDF attachment, resolving an issue where the PDF was missing when sending via Peppol. Previously, the system skipped a necessary step to embed the PDF, leading to incomplete UBL XML files for recipients. This fix guarantees consistent invoice delivery with the complete PDF representation.
Original PR description
**Steps to reproduce:** * Install `Accounting` and `accounting_peppol` modules. * Create Belgium company. * Go to accounting settings and activate PEPPOL under `PEPPOL Electronic Invoicing`. * Create…
**Steps to reproduce:** * Install `Accounting` and `accounting_peppol` modules. * Create Belgium company. * Go to accounting settings and activate PEPPOL under `PEPPOL Electronic Invoicing`. * Create and post a customer invoice. * Click **Send & Print**. * Select only **Email** and click **Send** to generate the PDF. * Click **Send & Print** again. * Select only **Peppol** (partner configured for Peppol). * Click **Send**. **Observed behavior:** * The invoice is sent via **Peppol**, but the generated UBL XML does **not** contain the embedded PDF. * The receiver gets the XML data without the PDF representation. **Cause:** * When a PDF already exists on the invoice, the send flow skips the document post-processing step to avoid regenerating it. * The PDF embedding into the UBL XML relies on this post-processing step. * Sending via Peppol after emailing the invoice therefore bypasses the PDF embedding logic. **Fix:** * When sending via **Peppol**, detect if a PDF already exists on the invoice. * If so, explicitly post-process the UBL XML to embed the existing PDF before sending. * Ensures the PDF is always included in Peppol messages, regardless of when it was generated. opw-5495465 Forward-Port-Of: odoo/odoo#245901
This update corrects inaccuracies in the fiscal position data for key markets like the UAE, Oman, and Bahrain. By standardizing the data and removing redundancies, we ensure accurate tax calculations for both local and international customers, improving financial reporting and compliance.
Original PR description
After the changes from 5261836336799076fd8133be943a037f1124b905, several fiscal positions for UAE, Bahrain and Oman were either missing or not fully mapped. So with this PR: - We adapts the fiscal positions and restructures them with a clear country-based split, ensuring taxes are applied correctly for local and non-local customers. - Removes a duplicate sequence column from UAE fiscal position data to avoid confusion and keep the structure consistent. - Cleans up obsolete data in Oman by removing an empty fiscal position row that was previously used for tax source/destination mappings. task-5359829 Forward-Port-Of: odoo/odoo#245383
This update corrects a bug where high-priority applicants weren't displayed correctly in the applicant management system. The issue stemmed from a duplicated setting in the applicant model, which was overriding the intended priority ordering. This change ensures that applicants with the highest priority are now shown first within their stage.
Original PR description
Steps to reproduce: ---------------------------------------- 1. Install the Recruitment module 2. Navigate to Recruitment > Applications > All Applications 3. Go to Kanban view 4. Make any…
Steps to reproduce: ---------------------------------------- 1. Install the Recruitment module 2. Navigate to Recruitment > Applications > All Applications 3. Go to Kanban view 4. Make any application Very High Priority (3 star) 5. Refresh the page Observation: ---------------------------------------- Applications marked as Very High Priority are not displayed on top, Applicants with higher priority should be displayed first within the same stage. Issue: ---------------------------------------- The `_order` attribute on the applicant model is declared twice, causing the intended priority-based ordering to be overridden by `sequence`. https://github.com/odoo/odoo/blob/6fed805389d878558e4139b270ee7a70269af767/addons/hr_recruitment/models/hr_applicant.py#L28-L41 Solution: ---------------------------------------- Reorder the fields in the `_order` attribute so that priority is applied before sequence, ensuring higher-priority applicants are shown first opw-5893371 Forward-Port-Of: odoo/odoo#249712 Forward-Port-Of: odoo/odoo#247779
This update resolves an issue preventing Odoo from starting correctly in version 19.2. The problem stemmed from a missing directory within the IoT drivers module, which caused a critical error during startup. This fix adds the necessary directory structure to ensure the module loads properly.
Original PR description
Currently in saas-19.2 on start of Odoo tim_interface throws an exception and Odoo doesn't start: ``` 2026-02-20 14:15:31,683 10276 CRITICAL ? odoo.modules.module: Couldn't load module iot_drivers…
Currently in saas-19.2 on start of Odoo tim_interface throws an exception and Odoo doesn't start: ``` 2026-02-20 14:15:31,683 10276 CRITICAL ? odoo.modules.module: Couldn't load module iot_drivers 2026-02-20 14:15:31,684 10276 ERROR ? odoo.service.server: Failed to load server-wide module `iot_drivers`. Traceback (most recent call last): File "/home/pi/odoo/odoo/service/server.py", line 1554, in load_server_wide_modules load_openerp_module(m) ~~~~~~~~~~~~~~~~~~~^^^ File "/home/pi/odoo/odoo/modules/module.py", line 488, in load_openerp_module __import__(qualname) ~~~~~~~~~~^^^^^^^^^^ File "/home/pi/odoo/addons/iot_drivers/__init__.py", line 18, in <module> interface_thread().start() ~~~~~~~~~~~~~~~~^^ File "/home/pi/odoo/addons/iot_drivers/iot_handlers/interfaces/tim_interface.py", line 61, in __init__ self.tim_api.six_initialize_manager.argtypes = [ctypes.c_int] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'six_initialize_manager' ``` This is due to a missing 'tim' directory: ``` /home/pi/odoo/addons/iot_drivers/iot_handlers/drivers cp: cannot stat '/home/pi/odoo/addons/iot_drivers/iot_handlers/drivers/tim/libtimapi.so.3.38.0-5308': No such file or directory ``` This PR adds 'tim' directory in unzipping fixing the path --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves an issue where users could incorrectly drop images into product descriptions, leading to errors. The fix ensures images can only be added in designated drop zones, improving the stability and usability of product listings.
Original PR description
Steps to reproduce the issue: ================================= 1. Go to Website > Products and edit a product. 2. In the product description, add a header using the editor. 3. You can now drop an…
Steps to reproduce the issue: ================================= 1. Go to Website > Products and edit a product. 2. In the product description, add a header using the editor. 3. You can now drop an image in that place, so drop it. 4. Click on the image and try to add an anchor for it. -> Traceback Cause: ====== The reason an image can be dropped in that location is because the editor added an adjacent element, such as a `<p>` or `<h1>`, which is considered a valid drop zone by the drop zone plugin. However, when trying to create a link, the parent element checks if it is valid to have an anchor, but then when adding an anchor the element text is undefined, causing a traceback. Why can an image be dropped in that location after adding the editor? The bug was due to passing `excludeNearParent` as a property name instead of `excludeParent` to the `getSelectorSiblings` function, which always evaluated to false. So it allowed dropping images in invalid locations. Solution: ========= Pass the correct property name. Impact: ======= This fix enforces the intended dropzone behavior where content snippets (like images, buttons with `.o_snippet_drop_in_only`) cannot create dropzones next to elements that are direct children of `.oe_structure` containers. Test Changes Required: ======================= The button tests were failing after the fix because they were testing buttons as direct children of `<div id="wrap" class="oe_structure oe_empty">`. This was only working before due to the bug - `excludeNearParent` was being ignored. The fix wraps the test buttons in a `<div>` container, making them children of a child of `.oe_structure` rather than direct children. opw-5489444 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#249707 Forward-Port-Of: odoo/odoo#244324
This update resolves an issue preventing successful processing of Dutch tax (OB) and ICP reports by Digipoort. The report templates have been updated to the final 20251210 NT20 taxonomy, ensuring compliance and accurate data transmission. This change is critical for accurate tax reporting and compliance with Dutch regulations.
Original PR description
Update the Dutch tax (OB) and ICP report templates from the 20251210.a pre-release to the final 20251210 NT20 taxonomy to ensure successful processing by Digipoort. Fixes: https://github.com/odoo/enterprise/commit/5becacff48f1a2490ce2f57a4679020615b6b8c2 opw-5911496 Forward-Port-Of: odoo/enterprise#108126
This update fixes an issue where Italian tax information (like VAT number) wasn't being correctly applied when creating a company record from an Italian ecommerce order. Previously, the system didn't automatically populate the necessary Italian tax fields. This change ensures that all company records created from Italian sales accurately reflect the required tax details, improving compliance and reporting.
Original PR description
**STEP TO REPRODUCE** 1. Create a ecommerce order on a shop page of a italian company. 2. Goes to the checkout page, enter info (company_name, l10n_it_codice_fiscale, l10n_it_pa_index). 3. On the contact created, click on create company. 4. Notice l10n_it fields are not propagated to the company. opw-5477372 Forward-Port-Of: odoo/odoo#248887 Forward-Port-Of: odoo/odoo#246785
This update fixes a visual issue where Telugu characters in Odoo's PDF reports were displayed as black squares. By adding a specific font for Telugu, the system now correctly renders Telugu text within these reports, ensuring accurate and consistent reporting for Telugu-speaking users. This resolves a known limitation in the SaaS 19.0 version.
Original PR description
SaaS 19.0 QWeb PDF reports renders Telugu characters as black squares because the default font stack has no Telugu coverage on the server side. While some environments may display Telugu via locally installed fonts, wkhtmltopdf requires explicit webfont coverage to embed the glyphs in the PDF. Add a Noto Sans Telugu @font-face rule with the Telugu unicode range so report rendering can fetch and embed a Telugu-capable font when needed. This mirrors the existing mechanism used for Arabic/Hebrew/Cyrillic. opw-5886157 (related ticket) https://github.com/odoo/odoo/pull/32312 (related PR) I have attached the font files that needs to be uploaded to cdn in NotoSansTelugu.zip. [NotoSansTelugu.zip](https://github.com/user-attachments/files/25395294/NotoSansTelugu.zip) --- Forward-Port-Of: odoo/odoo#249320
This update addresses a potential issue where abrupt system clock changes could disrupt IoT driver jobs, leading to delays in data processing. The system now automatically adjusts job schedules to compensate for these changes, ensuring reliable operation of custom IoT handlers. This improves the stability and accuracy of data collection from IoT devices.
Original PR description
Before this commit: If IoT system clock is wrongly set (happened on a Wi-Fi environment with slow connection). The system clock will abruptly change for a date in the future which will trigger all…
Before this commit:
If IoT system clock is wrongly set (happened on a Wi-Fi environment with slow connection). The system clock will abruptly change for a date in the future which will trigger all `schedule` jobs (which will think they are several days late).
In addition to this oversight, on an IoT on which "custom IoT handlers" configuration is enabled, if the `upgrade.check_git_branch` job is called on IoT boot, it will trigger the following traceback:
```py
2026-02-17 13:53:41,751 1371 ERROR ? odoo.addons.iot_drivers.exception_logger: Exception in thread Thread-4:
2026-02-17 13:53:41,757 1371 ERROR ? odoo.addons.iot_drivers.exception_logger: Traceback (most recent call last):
2026-02-17 13:53:41,758 1371 ERROR ? odoo.addons.iot_drivers.exception_logger: File "/usr/lib/python3.13/threading.py", line 1043, in _bootstrap_inner
self.run()
~~~~~~~~^^
2026-02-17 13:53:41,759 1371 ERROR ? odoo.addons.iot_drivers.exception_logger: File "/home/pi/odoo/addons/iot_drivers/tools/helpers.py", line 50, in run
service.server.restart()
~~~~~~~~~~~~~~~~~~~~~~^^
2026-02-17 13:53:41,759 1371 ERROR ? odoo.addons.iot_drivers.exception_logger: File "/home/pi/odoo/odoo/service/server.py", line 1622, in restart
os.kill(server.pid, signal.SIGHUP)
^^^^^^^^^^
2026-02-17 13:53:41,759 1371 ERROR ? odoo.addons.iot_drivers.exception_logger: AttributeError: 'NoneType' object has no attribute 'pid'
```
Which will prevent the IoT to restart thus to load custom handlers
After this commit:
Brutal time changes (of 10 minutes (in a 3-second loop)) are detected, and jobs schedules are updated to prevent misfire calls
Forward-Port-Of: odoo/odoo#249112This update resolves an issue in Odoo 19.0 where uploading encrypted KSeF certificates caused server crashes. The fix allows users to correctly configure KSeF authentication using encrypted private keys by adding a password argument to the key loading process. This ensures seamless KSeF compliance.
Original PR description
In Odoo 19.0 (Master), the handling of KSeF certificates introduced an issue where uploading an encrypted private key caused a server crash, blocking the configuration of KSeF. This functionality worked correctly in v18 (where keys were often unencrypted). The `XadesSigner` class was not designed to accept a password argument. The `serialization.load_pem_private_key` method would fail with a `TypeError` because the password was not passed to the underlying Updated the `XadesSigner.__init__` method to accept a `private_key_password` argument. Passed this password correctly to `serialization.load_pem_private_key`. 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#248423
This update fixes an issue where multi-employee payslips were defaulting to the language of the first employee. The change ensures that each employee's payslip is printed in their correct, selected language, improving accuracy and user experience. This resolves a previous bug related to date formatting and caching.
Original PR description
Steps to detect the bug: - Install payroll - Create more than one employee with different payslip languages - Add a contract for the employees - Payroll -> Payslip -> Pay run - Create a new payroll for more than one employee - Select all the employees in the pay run - Click 'print' button - Dates for the employees that are not the first one are in the language of the first employee This commit will allow the user to create multiemployee payslips maintaining the correct selected payslip language for each one of them. The issue was caused by a cache dictionary that used only the date and date format as a key, failing to include the user language. This led the system to reuse the first translated date for all subsequent employees. opw-5865260 Forward-Port-Of: odoo/enterprise#107269 Forward-Port-Of: odoo/enterprise#106575
This update fixes a potential issue in how point-of-sale cash rounding is handled. Previously, it only considered cash payments. Now, it correctly accounts for other payment methods like cards, ensuring accurate change calculations when a customer 'deposits' money, regardless of the payment type.
Original PR description
We extract the condition into a getter so we can override it elsewhere. For now, it is overriden in `pos_settle_order`. See below for explanation. `change` is the amount we return to the client, so it's in cash, and therefore, we always round it if `cash_rounding` is true. However, in pos_settle_order, when a client 'deposits money', the order `change` is what we get paid by that client, and he might choose a payment method different than cash (card for e.g.). We change the `shouldRoundChange` logic to count for such cases. opw-5222985 Forward-Port-Of: odoo/odoo#248787
This update ensures that payment rounding is applied accurately when customers deposit money into their accounts, regardless of the payment method used. Previously, rounding was incorrectly applied to deposits, leading to inaccurate amounts. This fix aligns the system with how deposits are handled, ensuring correct calculations for all payment types.
Original PR description
Steps to reproduce: ------------------- 1. Enable cash rounding, only for cash payment method - Rounding method doesn't matter, I tested with 0.05 nearest rounding 2. In PoS, make an order with the…
Steps to reproduce: ------------------- 1. Enable cash rounding, only for cash payment method - Rounding method doesn't matter, I tested with 0.05 nearest rounding 2. In PoS, make an order with the customer account, such that the total amount is not divisible by 0.05, i.e. when rounded, it's not the same amount. For instance, $5.27. 3. Close the session and reopen it, then select that customer, and click settle due 4. Select the Bank payment method, so a NON-Cash payment method. Notice that the amount is being rounded, even though we have only enable rounding for cash methods. If we take my example of step 2, the amount became $5.25 instead of $5.27. That is understandable when we settle with Cash, however, for Bank (non-cash), we should not round. The fix ------- Now when choosing a payment method to settle due, we also round the amount if needed, in `getTotalDueOfPartner`. Before, we always set the exact amount, regardless of the payment method and the rounding settings. We now also apply rounding on the payment screen based on the selected payment method. Previously, the change was always rounded whenever rounding was enabled, ignoring whether rounding was restricted to cash methods. This behavior made sense for normal orders—where change is typically given in cash—but not when settling a due amount, since the customer can pay using any method. During due settlement, the change represents the amount the customer must pay, so rounding must follow the rules of the chosen payment method. opw-5222985 Forward-Port-Of: odoo/enterprise#105368 Forward-Port-Of: odoo/enterprise#100278
This update automatically calculates and transmits the 2050 pension contribution for employees in Switzerland using the Swissdec standard. This ensures accurate and compliant payroll processing, addressing a previous calculation error and improving the reliability of Swiss payroll reporting.
Original PR description
task-5166226 Forward-Port-Of: odoo/enterprise#104140 Forward-Port-Of: odoo/enterprise#103453
This update resolves an issue where imported vendor bills with a product price of $0.00 were incorrectly increasing the product's price unit. The fix ensures that the total imported from the XML invoice accurately matches the Odoo invoice, preventing double-billing. This improves data accuracy for financial reporting.
Original PR description
Whenever a line with price `0.0` with `AllowanceCharge`s got imported, Odoo used to update the `price_unit` to the sum of price, allowance and charges, because of a wrong float comparison condition between this sum and the XML total. So the product price was increased, but the allowances were maintained. The total imported in Odoo became double the one in the XML. Step to reproduce: - Import vendor bill from XML with a product: - price: `0.00` - quantity: `1` - an AllowanceCharge, amount: `0.2` - an AllowanceCharge, amount: `0.1` - `0.0 + 0.2 + 0.1 (sum of price and allowances) != 0.3 (subtotal)` (but `float_compare(0.1 + 0.2, 0.3, precision_digits=4) == 0`) - `price_unit` is updated to `0.3` - Total in Odoo is `0.6` Ticket [link](https://www.odoo.com/odoo/project.task/5499525) opw-5499525 Forward-Port-Of: odoo/odoo#249677 Forward-Port-Of: odoo/odoo#248043
This update fixes an issue where the delivery amount was being incorrectly calculated twice during Stripe express checkout, particularly with Apple Pay and Google Pay. The fix ensures accurate delivery pricing is applied, preventing overcharging and improving the customer experience. This resolves a regression identified in a previous update.
Original PR description
Versions: --- - 17.0+ Issue: --- Delivery amount is doubled in stripe express payment checkout. Steps to reproduce: --- 1- Setup a stripe payment express checkout. (In my client case it is apple pay…
Versions: --- - 17.0+ Issue: --- Delivery amount is doubled in stripe express payment checkout. Steps to reproduce: --- 1- Setup a stripe payment express checkout. (In my client case it is apple pay express checkout but we also reproduced it in google pay) 2- Set fixed price on standard delivery: 10 3- Navigate to website: add a product to cart. Use express checkout. Outcome: The delivery price is calculated twice which is wrong. Cause: --- This regression is due to #238574. Once `/compute_taxes` is called, there is delivery lines included in SO. As a result returning `amount_total` will cause `this.paymentContext['minorAmount']` to include delivery amount. Then we add delivery carrier `minorAmount`: https://github.com/odoo/odoo/blob/469220cde82ecebf4a59451cc1325add6bfc3e69/addons/payment_stripe/static/src/js/express_checkout_form.js#L188-L196 Which cause delivery amount be added twice. Fix: --- We could exclude delivery amount from total amount in `express_checkout_shipping_address_compute_taxes`, which is going to calculate the tax for lines excluding delivery lines. opw-5424398 Forward-Port-Of: odoo/odoo#249551 Forward-Port-Of: odoo/odoo#248415
This update resolves a problem in the Hong Kong payroll calendar that was causing errors when creating employees. The system incorrectly used US company data, leading to workflow disruptions. The fix sets company IDs to 'False' to use the standard work entry type, ensuring correct functionality.
Original PR description
The resource calendar for Hong Kong doesn't work well at the moment. When the data is loaded, it picks the company from the env (usually a US one during db initialization) and the country from it. Using that country, it deduces the work entry type for the attendance_ids. At the moment, the result is that HK calendar ends up with US work entries, causing access errors in certain flow. (e.g. With hr_contract_salary installed you can no longer create employees). The solution is to explicitly set the company_ids to False as done in other countries to have the generic work entry set and bypass the issue.
This update fixes a usability issue with drag-and-drop functionality, particularly when using nested elements like dropdowns. The change ensures smaller elements are preferred when overlapping, leading to a smoother and more intuitive user experience. It addresses a previous bug where larger dropzones were incorrectly prioritized.
Original PR description
This commit improves the drag and drop functionality by detecting the closest elements when dragging. The previous implementation only calculated distance when the cursor was outside the rectangle,…
This commit improves the drag and drop functionality by detecting the closest elements when dragging. The previous implementation only calculated distance when the cursor was outside the rectangle, returning 0 for any position inside. This caused issues with nested dropdowns: when a small dropdown is inside a larger one, the quadrance of the larger one would be 0, but since for the smaller one it is actually harder to place it perfectly inside, the distance would be non-zero, so the larger one would be preferred. The new implementation: - Handles rectangle-to-rectangle overlap detection using center distances - For non overlapping rectangles, returns correct quadrance - Returns negative normalized overlap ratio for overlapping elements, preferring smaller elements with similar overlap percentages - Supports both point queries (x, y) and rectangle queries (x, y, width, height) Steps to see the issue: - Open Website and start editing - Drop the `s_banner` snippet - Try to drop a button (or any other inner element) next to the existing button in the snippet => The experience is not the most user-friendly Old implementation: https://github.com/user-attachments/assets/507c0402-b855-46a7-938d-8f05d905dd3e New implementation: https://github.com/user-attachments/assets/34b352b4-e08a-4a7f-a2b5-2702ee8e63ef It might not look like an improvement in the video, but it feels actually easier now when trying to drag and drop to a relatively small dropzone. task-5794898
This update addresses an issue where vendor bills received via Peppol as XML were missing a PDF attachment. Now, Odoo automatically generates and attaches a PDF when one isn't provided, allowing users to easily preview and verify the bill data. This improves usability and data validation.
Original PR description
Some vendor bills received via Peppol as XML do not include an attached PDF, preventing users from previewing the document and verifying the values parsed by Odoo. This commit generates and attaches a PDF when the XML does not provide one. task-5500236 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#245577
This update resolves an issue where users within the 'Planning / User' group couldn't take open shifts. The fix ensures that the 'I Take It' button is consistently displayed for these users, allowing them to seamlessly accept shifts within the Planning app. This improves the usability of the Planning feature for all users.
Original PR description
## Issue In the Planning app, users within the *Planning / User* groups could not take open shifts. The button *"I Take It"* would not be displayed when clicking on the shift. ## Steps to reproduce…
## Issue
In the Planning app, users within the *Planning / User* groups could not take open shifts. The button *"I Take It"* would not be displayed when clicking on the shift.
## Steps to reproduce
1. Install the *Planning* (`planning`) app
2. In the Planning app, as an admin, create and publish an open shift
3. Log in as a *User*, open the *Planning* app, and click on the open shift
4. **The _"I Take It"_ button is not displayed**
When logging in as a user who is **not** part of the *Planning / User* group, the *I Take It* button is displayed.
## Cause
The condition for the *I Take It* button to be displayed is the following:
https://github.com/odoo/enterprise/blob/301e3c40c3272a6ae89a1eb4387d7d244e1dc52c/planning/views/planning_views.xml#L282-L283
The condition that makes the button invisible is `not context.get('my_planning_action')`. When the user is part of *Planning / User*, the schedule they see when opening the *Planning* app is the *"Schedule by Resource"*, which has the following context:
https://github.com/odoo/enterprise/blob/301e3c40c3272a6ae89a1eb4387d7d244e1dc52c/planning/views/planning_views.xml#L716
When a user who **is not** part of the *Plannig / User* group opens the *Planning* app, they see their own schedule, where the context is different than in the first case:
https://github.com/odoo/enterprise/blob/301e3c40c3272a6ae89a1eb4387d7d244e1dc52c/planning/views/planning_views.xml#L636
Because the `my_planning_action` property is in the context (and all the other conditions are respected), the button is displayed.
opw-5451282
Forward-Port-Of: odoo/enterprise#104919This update ensures Odoo's Mexican payroll system accurately reflects the latest Social Security Law regarding minimum wage exemptions. Specifically, it correctly handles situations where an employee's earnings are below the minimum wage, zeroing out relevant deductions and tax contributions. This update maintains compliance and avoids potential errors in payroll reporting.
Original PR description
According to the Mexican Social Security Law, when an employee's total monthly earnings (including bonuses and commissions) are equal to or less than the monthly minimum wage (l10n_mx_daily_min_wage…
According to the Mexican Social Security Law, when an employee's total monthly earnings (including bonuses and commissions) are equal to or less than the monthly minimum wage (l10n_mx_daily_min_wage * 365 / 12), they are exempt from social security contributions and income tax, also they lost the subsidy benefit. - The next rules are zeroed out when the gross salary is equal or less than the minimum wage: - IMSS_EMPLOYEE: IMSS Total (Employee) - ISR: ISR (Income Tax) - SUBSIDY: Used Subsidy - IMSS_EMPLOYEE and ISR are omitted from the generated XML. - As the ISR is zero, the `totalDeducciones` attribute on the `nomina12:Nomina` node should be removed. - The SUBSIDY should be present in the `SubsidioCausado` attribute on the `nomina12:SubsidioAlEmpleo` node, but the `Importe` attribute on the `nomina12:OtroPago` node should be 0.0. This change requires updates to existing standard tests, as some previous test cases used amounts lower than the minimum wage. target: 19.0 task-5226971 Forward-Port-Of: odoo/enterprise#107712 Forward-Port-Of: odoo/enterprise#104668
This update significantly speeds up order processing within the Master Production Schedule (MPS) by optimizing how related product information is retrieved. Previously, the system was loading unnecessary data, leading to delays. Now, the system efficiently fetches only the required information, resulting in faster order fulfillment.
Original PR description
When traversing X2many fields (bom_ids, bom_line_ids) during prefetching in filtered, the _prefetch_ids data grew excessively. Prefetching bom lines pulled in IDs for lines belonging to all boms across all associated products, even though _skip_bom_line in this case only operates on the current product's context. Use prefetch() with no args to avoiding unnecessary record loading for unrelated boms. Benchmark: | |Before |After| |-----------------|-------|-----| |action_replenish |Timeout|577ms| Related ticket: opw-5928055 Forward-Port-Of: odoo/enterprise#107648
This update resolves a problem where CFDI-compliant invoices for Mexican companies were generating PDF reports with section lines that were too short, failing to properly display all invoice details. The fix ensures that the section line in the PDF accurately reflects the entire invoice, improving report accuracy and compliance. This impacts users generating invoices for Mexican businesses.
Original PR description
**STEP TO REPRODUCE** 1. Select a MX company. 2. Create an invoice for a MX company with a section. 3. Send the invoice via CFDI. 4. Notice the section line in the section pdf is no long enough and does not cover the lines below. opw-5501379 Forward-Port-Of: odoo/enterprise#106123
This update fixes an issue where OCR-extracted expense amounts weren't correctly converting to the company's standard currency (USD). The change ensures that the 'Total' amount accurately reflects the receipt's original currency value, improving the reliability of expense reporting. This prevents incorrect financial calculations.
Original PR description
Steps to reproduce: 1. Initialize an expense with a foreign currency (e.g., EUR). 2. Trigger OCR extraction on a receipt with a specific total. 3. Observe that both 'Total In Currency' and 'Total' (USD) are set to the same value. 4. The exchange rate is forced to 1.0, ignoring the system's exchange rate. Cause: The _fill_document_with_results method assigned the OCR total to both 'total_amount_currency' and 'total_amount' as a placeholder. This triggered the field's inverse logic during the write() call, causing Odoo to treat the input as a manual exchange rate override of 1:1. Solution: Remove the 1:1 placeholder assignment. The method now explicitly calculates 'total_amount' using the _convert() helper once the currency is identified, ensuring the company currency total reflects the actual system exchange rate. opw-5437611 Forward-Port-Of: odoo/enterprise#108089 Forward-Port-Of: odoo/enterprise#107534
This update resolves an incorrect reliance on Peppol BIS3 constraints within the RO and HR EDI modules. Previously, an unnecessary dependency caused issues with sending invoices, particularly to physical persons. This fix aligns the modules with the correct BIS3 specifications, ensuring proper invoice processing.
Original PR description
The CIUS RO and CIUS HR depends on the BIS3 which is fundamentally incorrect. This was probably made out of lazyness to redefine things that are almost the same in both these CIUS and the BIS3. Now, in previous PR [1], we added contraints for the Peppol BIS 3 that are impacting those formats. Indeed, the EndpointID can be empty in the context of CIUS RO and CIUS HR. In particular, it's breaking the sending to physical person at the moment. [1]: https://github.com/odoo/odoo/pull/246961 opw-5943698 Forward-Port-Of: odoo/odoo#249970 Forward-Port-Of: odoo/odoo#249089
This update significantly speeds up the loading of product pages by reducing unnecessary browser recalculations (reflows). The change optimizes how product variants are displayed, resulting in a 82% faster rendering and a 5.5x speedup, leading to a better customer experience.
Original PR description
**Issue:** Loading the shop page was slow due to excessive forced reflows. When a reflow occurs, the browser can't reuse the layout computed so far, and it's forced recalculate it again. **Cause:**…
**Issue:** Loading the shop page was slow due to excessive forced reflows. When a reflow occurs, the browser can't reuse the layout computed so far, and it's forced recalculate it again. **Cause:** In `updateVariantPreview`, the init loop wrote to the DOM (textContent, classList) then immediately read `offsetWidth` in the same iteration, forcing the browser to flush and recalculate layout once per product. This PR tackles the 2 areas of improvement identified: 1. Reduce reflows **number**. 2. Reduce reflows performance **cost**. [task-5177358](https://www.odoo.com/web#id=5177358&cids=1&menu_id=4720&action=333&active_id=1695&model=project.task&view_type=form) --- ### 1: Reduce reflows **number**. **Before this PR:** Phase 1 was a single loop mixing writes and reads, triggering N layout recalculations for N products on the page. | Performance Tab: CSS selectors & Advanced paint instr. active (slow) | |--------| | <img width="1847" height="650" alt="image" src="https://github.com/user-attachments/assets/91e86e91-1209-4865-bcbd-336f792664ed" /> | | Timing inflated by the debug environment | **After this PR** Phase 1 is split into two sub-loops. All writes first (1a) and all reads after (1b). So the browser flushes layout only once, regardless of product count, matching the batching pattern already used in phases 2 and 3. | Performance Tab: CSS selectors & Advanced paint instr. active (slow) | |--------| | <img width="1380" height="555" alt="image" src="https://github.com/user-attachments/assets/c0fefe32-d309-4fc8-a945-1a5f5c12b86e" /> | | Timing inflated by the debug environment | **Performance results** In a page with 21 products, 11 of which with variants, the number of reflows dropped from 12 to just 2, resulting on a 82% faster rendering, roughly a 5.5X speedup. --- ### 2: Reduce reflows performance **cost**. Reflows cannot be entirely avoided, but side-effects can be mitigated in CSS by instructing the browser how to react when this circumstance occurs. This PR add two rules to the products card: 1. `contain`: Tells the browser each product card is a layout containment boundary and inner changes "should not" affect elements outside. 2. `content-visibility`: Tells the browser to try skipping cards outside the viewport. Their layout will be eventually evaluated when cards scroll into view. **Performance result:** In a page with 21 products, 11 of which with variants, the performance cost of a single reflow dropped by 22%. _note: the browser is not obliged to honor these "suggestion" and may behave differently depending by the viewport size, the content and the browser itself._ --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#249324
This update resolves an issue where users with the 'Project Manager' role couldn't access sale order lines, specifically within the inventory system. The fix adjusts security rules to ensure stock users, including those with the 'Project Manager' role, have the necessary permissions to view related sale order details. This improves usability for users managing stock and sales operations.
Original PR description
Users with the project_manager role and no access on sale cannot open stock moves Steps to reproduce: 1. Install Sales, Inventory and Project 2. Create a Sale order for any company with an address…
Users with the project_manager role and no access on sale cannot open stock moves Steps to reproduce: 1. Install Sales, Inventory and Project 2. Create a Sale order for any company with an address and any product and confirm it (a delivery should be automatically created) 3. Go to Settings > Users and open user Marc Demo 4. Set Marc Demo's role on Sales to "No" and on Project to "Administrator" 5. Log in as Marc Demo 6. Go to Inventory > Operations > Deliveries and try to access the delivery previously created 7. An error occurs Problem: https://github.com/odoo/odoo/blob/6b2d3af64a076654e04494972acc4c42d7c54bd8/addons/sale_stock/models/stock.py#L32-L38 stock.move's description is computed based on the related sale order lines which will cause an access error because users with role `project.group_project_manager` can only access sale order lines of projects or tasks because of this rule: https://github.com/odoo/odoo/blob/3909bef741ebb5c879beb383c395e1a310ba78eb/addons/sale_project/security/sale_project_security.xml#L4-L13 even though the group `stock.group_stock_user` are expected to always have read access to sale order lines because of this right: https://github.com/odoo/odoo/blob/3909bef741ebb5c879beb383c395e1a310ba78eb/addons/sale_stock/security/ir.model.access.csv#L6 Note that the issue doesn't happen when the user is a sale user because of this rule that adds the rights on sale order lines: https://github.com/odoo/odoo/blob/3909bef741ebb5c879beb383c395e1a310ba78eb/addons/sale/security/ir_rules.xml#L78-L83 This fix also solves the issue for `mrp.group_mrp_user` because they inherit the group `stock.group_stock_user`: https://github.com/odoo/odoo/blob/cda011dc8590773f6c3a26f4ae9d5242a3147024/addons/mrp/security/mrp_security.xml#L11-L16 Therefore the rule on `project.group_project_manager` needs to be overridden when the user is a stock user Solution: Create a record rule with a truthy domain to force stock users to have access to sale order lines even if other rules remove this access opw-5492232 Forward-Port-Of: odoo/odoo#247529
This update fixes a bug where the MO search filter was unintentionally cleared when clicking the header of a manufacturing order. The change ensures that the filter remains active after interacting with the workorder, improving usability and streamlining the shopfloor search process. This resolves an issue caused by a previous update related to barcode scanning.
Original PR description
### Steps to reproduce: - Download MRP app. - Create a product and its corresponding BOM (including at least a single operation) - Create and confirm a manufacturing order for 1 unit of that product…
### Steps to reproduce: - Download MRP app. - Create a product and its corresponding BOM (including at least a single operation) - Create and confirm a manufacturing order for 1 unit of that product - Click on the Shop Floor smart button > Click on the header of the MO - The MO filter applied on the shopfloor search bar is removed ### Issue: The MO search filter is removed after you click the header of the workorder order. This bug was introduced by another commit https://github.com/odoo/enterprise/pull/94584/changes/c83ab24a8d037a339db8067c7e9794cba5c16eab to remove the filter when a workorder's barcode is scanned. Hence, https://github.com/odoo/enterprise/blob/67ff37a830202afb8c8914da6f7bc8d4972eefd4/mrp_workorder/static/src/mrp_display/mrp_display_record.js#L289-L292 the change resulted in the filter being removed every time the header is clicked. In the case where a user clicks to start the workorder, we need to keep the filter. ### Fix: Based on https://github.com/odoo/enterprise/blob/67ff37a830202afb8c8914da6f7bc8d4972eefd4/mrp_workorder/static/src/mrp_display/mrp_display_record.xml#L6-L8 `onClickHeader()` is called every time a shopfloor record is clicked, which (based on the reference in the previous section) removes the filter, then calls `startWorking()`. By removing `this.env.searchModel.removeMOFilter()` from this method, it's ensured that clicks preserve the user's current search context. For https://github.com/odoo/enterprise/blob/67ff37a830202afb8c8914da6f7bc8d4972eefd4/mrp_workorder/static/src/mrp_display/mrp_display.js#L248-L250 since the original workflow of removing the filter in case of a barcode scan should be kept, moving `removeMOFilter()` call here with the appropriate reference of `workorder.component.env.searchModel`matches the expected behaviour. opw-5877418 Forward-Port-Of: odoo/enterprise#107121
This update fixes an issue where formatting links would create duplicate links and introduce formatting inconsistencies. The changes ensure links are treated as single units, wrapping selected text in a `<font>` tag for formatting, and also addresses issues with color classes and block splitting to improve the overall link editing experience.
Original PR description
Before this commit: when formatting partially a link, the link is split at the selection and formatted. This causes duplicated links. After this commit: we consider links are unsplittable, thus…
Before this commit: when formatting partially a link, the link is split at the selection and formatted. This causes duplicated links. After this commit: we consider links are unsplittable, thus formatting on links will wrap the selected part in a <font> tag. commit 2: [FIX] html_editor: solve infinite loop of links with color class Before this commit: we have a fix https://github.com/odoo/odoo/commit/96bc421d30f34a8bfc10dde93c2f283809a8a3e3 which to be able to remove the style classes in the link element After this commit: We don't consider the style class in the link element as `hasColor`, because the style classes come from the template code, which is hard-coded xml. Removing them, the user won't be able to add it back. For example, on a product page, edit the `Terms and conditions` link, do nothing and save, the muted color is forced removed. Note that another fix https://github.com/odoo/odoo/commit/f5fc55f19f89041c8391ff81b127ffce0898f89f is also removed cause it was a fix for https://github.com/odoo/odoo/commit/96bc421d30f34a8bfc10dde93c2f283809a8a3e3. The tests belonging to https://github.com/odoo/odoo/commit/96bc421d30f34a8bfc10dde93c2f283809a8a3e3 are adapted, and those of https://github.com/odoo/odoo/commit/f5fc55f19f89041c8391ff81b127ffce0898f89f are kept as future safeguards of list coloring. commit 3: [FIX] html_editor: extra check on targetnode when splitting blocks Before this commit: we only check if the current block to be split is splittable, but not the target node. After this commit: if the current block is splittable but the current target node is not, we won't split the block but insert a <br> commit 4: [FIX] html_editor: properly fill inlineAncestors when formatting Before this commit: when the parent node of the current node is unsplittable, the `inlineAncestors` stays empty. After this commit: we handle this case and push the parent node in the list when the parent node is fully selected. We also add a fully selected predicate in link_plugin for the case when the selection includes all the content (except for zws) of a non-button link task-5244810 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#249470 Forward-Port-Of: odoo/odoo#241871
This update ensures that tracking values are consistently and accurately recorded during HR employee updates, regardless of user access permissions. By preparing values as an administrator, the system avoids potential tracking issues and crashes, particularly when tracking sign requests. This improves data reliability and prevents disruptions in key HR processes.
Original PR description
When prepating initial value to track value changes, do it as sudo. Indeed user access rights should not prevent from checking tracking. Use case: hr employee update triggers an update on version…
When prepating initial value to track value changes, do it as sudo. Indeed user access rights should not prevent from checking tracking. Use case: hr employee update triggers an update on version records. On version model sign requests are tracked, but their access is limited to sign members. Tracking should not crash at that point. When finalizing, "new" value of tracking is also computed as sudo. We hence ensure that all values (pre and post) are computed the same way and independently from implemented ACLs. Reproduce steps: run 'test_employee_deletion'. It was not visible before adding a manual flush, as cr was still in "no tracking" mode (precommit data kept from creation in setupclass). Task-5935695 ([mail, various] Cleanup and test tracking usage) Prepares Task-3645865 ([mail] In-body tracking) Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves several issues that were causing crashes during tracking improvements, particularly within the Helpdesk and Payroll modules. The changes focus on accurate time tracking, eliminating unnecessary test manipulations, and addressing multi-mode compatibility problems, ultimately enhancing the reliability of our tracking features.
This update improves the speed of changing order stages in the Point of Sale (POS) system. By separating customer display calculations and optimizing database queries, the process is now significantly faster, especially when multiple orders are being prepared. This enhances the user experience for POS staff.
Original PR description
Before this commit when a lot of orders were in the preparation display and when clicking on an order to change its stage, it was very slow because we were doing the customer display computation directly. Now we compute customer display data in a separate RPC call, and we only call it when the customer display receives a notification of new orders, which makes the stage change much faster. The `_get_pos_orders` is updated to avoid an O(n²) loop; The `_get_open_orderlines_in_display` is updated to avoid deep joins. Forward-Port-Of: odoo/enterprise#107727
This update resolves an issue where delivery and invoicing addresses weren't being displayed on certain reports (specifically the 'lines' report). The fix ensures that address information is now correctly rendered, providing users with complete delivery and invoicing details. This improves the accuracy and usability of reports.
Original PR description
The `information_block` is always false on the `external_layout_lines` this means that when a delivery address and invoicing address is specified they are not rendered. Reviews the spacing of the bubble layout `information_block` task-5951799 Part of task-5949213 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#249436
This update corrects a bug that caused attendee registration answers to disappear when using the POS. The issue stemmed from how the system handled related data, leading to lost information. The fix simplifies the data handling process to ensure all registration answers are correctly recorded.
Original PR description
In [1], a refactoring of the POS framework was done, but in the process some overlooked behaviors induced a complete loss of the answers given in the registration process, as long as they do not…
In [1], a refactoring of the POS framework was done, but in the process some overlooked behaviors induced a complete loss of the answers given in the registration process, as long as they do not include an answer to a 'selection' question. STEPS ===== 0. Create a new event with a few questions (no 'selection' one) 1. Add tickets so that you can buy one in the POS 2. Go in the POS (reload data if needed) 3. Buy a ticket and fill the attendee form (answer to all questions) 4. Continue the POS flow and pay for your ticket. 5. Go back to the back-end and event > attendees 6. Check your new attendee: no answers are linked to the record. ISSUE ===== TLDR - Two fields have the same comodel on event.registration. This breaks the use of inverseMap as both are loaded in the pos. As they are treated sequentially when connecting related records, hidden side effects occur when both are not set. Details: This effect is due to two main issues. First, after [1], we compute the whole model reference relations using processModelDefs method, that accounts for inverse relations of o2m, m2o fields and provides an inverseMap to be used in several places, notably on creation or deletion of relational records from the POS. However, pos_event presents a peculiar situation, as registrations have two o2m fields, both loaded in _load_pos_data_fields, that are linked to the model event.registration.answer: registration_answer_ids and registration_answer_choice_ids, a subset of the first, just with a domain to only include answers of 'selection' questions. Meaning that the inverseMap will only use one of the two, in this case registration_answer_choice_ids. In turn, this means that any update of registration_id on the answer model will update that field, even if the original update was done on registration_answer_ids... Secondly, one could notice that this should still work, as the inverseMap is used in all places, we should just update the records through the field registration_answer_choice_ids. So why does it not work and why are all answers removed? Because both fields are loaded in _load_pos_data_fields, and in _sanitazeRawData we use getFields to know which fields to update and to connect (for relations on the model), both being returned. This means that independantly of the create values for the registration in addProductToOrder in pos_event, the 'framework' will still have two fields to connect and will do so sequentially, one field at the time. But in the _connect logic, if a field has no value given at creation, then the 'CLEAR' command is used, as this would mean we remove the content of the relational field. But in this case, this means that as both answer fields try to update registration_id through registration_answer_choice_ids, if no value is given at creation in that field, then we clear existing ones, for instance those we just linked through the creation values in the first field registration_answer_ids, as we basically empty registration_id on those records. The answers will also be deleted of the indexedDB because of the condition in databaseTable (no linked registration -> can be removed) FIX === Remove registration_answer_choice_ids from the loaded data, as it is not used anywhere except in the registration creation values. As it is a subset of the other field registration_answer_ids, only keep that one instead. Update the creation values to only use that field. Note that this seems to highlight a limitation when it comes to having more than one o2m field on a model loaded at the same time in POS. [1] odoo/odoo@a80a39f2ad16baf474553574c79d55948f86c453 Task-4919080 Forward-Port-Of: odoo/odoo#231293
The Time Off Balance report was incorrectly calculating remaining time off days due to how allocations were aggregated. This fix reorders allocations by their start date to ensure accurate calculations, especially when employees have allocations across different periods. This ensures the report accurately reflects available time off.
Original PR description
The balance report aggregates allocations regardless of the period in which they occur resulting in wrong information when an employee has two allocations in different periods and a filter is used in the report Steps to reproduce: 1. Install Time Off app 2. Open Time Off app and go to Management > Allocations 3. Create a new allocation of 100 days for employee "Mitchell Admin" of time off type "Paid Time Off" with a validity period from 01/01/2027 to 31/12/2027 and approve it 4. Activate debug mode 5. Go to Time Off > Reporting > Balance 6. The number of days left for "Mitchell Admin" for "Paid Time Off" is 120 days even though the default filter is on the period of 2026 Solution: Refactor the entire query: we order the allocations by date_from so we can subtract taken leaves from the allocations in that order opw-5156142 Forward-Port-Of: odoo/odoo#249512 Forward-Port-Of: odoo/odoo#245860
This update fixes several issues related to how custom website snippets are displayed in the preview. Specifically, it ensures consistent preview heights for carousel snippets, corrects parallax preview behavior, and maintains labels for custom previews. These changes improve the user experience when creating and testing website content.
Original PR description
Steps to reproduce: - Open the website editor. - Add a carousel snippet to a page. - Remove content from the first slide so it is shorter. - Save the carousel as a custom snippet. - Open the snippet…
Steps to reproduce: - Open the website editor. - Add a carousel snippet to a page. - Remove content from the first slide so it is shorter. - Save the carousel as a custom snippet. - Open the snippet dialog and locate the custom snippet. => The preview height is too small. Before this commit, the preview height was computed from the scaled size, so shorter slides made the preview min-height too low. After this commit, the preview height uses the layout size so the min-height stays consistent with other slides. ---------- Steps to reproduce: - Open the website editor. - Open the snippet dialog and resize the window. => The parallax preview background shifts to the left. - Save a snippet with a parallax zoom in/out effect as a custom snippet. - Open the snippet dialog and locate the custom snippet. => The preview shows a top to bottom effect instead of zoom. Before this commit, resizing the snippet dialog could offset the parallax background to the left, and zoom previews looked like top to bottom effects. After this commit, the preview keeps the background aligned and shows zoom in/out effects for custom snippets. Fixed parallax is still not previewed because it would require an oversized background in the dialog. ---------- Steps to reproduce: - Open the website editor. - Save a "Carousel" snippet as a custom snippet. - Open the snippet dialog. => The custom snippet shows no label. Before this commit, custom previews dropped the base label so the dialog showed no tag for custom snippets. After this commit, custom previews reuse the base label. task-5156137 **To see/test the bug, the change made in https://github.com/odoo/odoo/pull/244251 must be present** Forward-Port-Of: odoo/odoo#249163 Forward-Port-Of: odoo/odoo#244295
This update addresses a recent finding that the SAT (Mexican tax authority) sometimes accepts accented characters in tax documents. Previously, the system was removing these accents to comply with SAT's rules. This change temporarily allows the 'É' character, and further investigation is underway to determine the best long-term approach for SAT compliance.
Original PR description
An improvement in September (PR #95207) began removing accents from names in documents sent to the SAT, in order to comply with their own practices. In recent months, it has become clear that the SAT…
An improvement in September (PR #95207) began removing accents from names in documents sent to the SAT, in order to comply with their own practices. In recent months, it has become clear that the SAT does accept accents sometimes. First with umlauts on the `ü` in October (PR #96043), then all umlauts in February (PR #106557). As this PR has found another accepted accented character `É`, it may be necessary to undo the original improvment entirely. The [Anexo 20 Guía de llenado de los comprobantes fiscales digitales por Internet](http://omawww.sat.gob.mx/tramitesyservicios/Paginas/documentos/Anexo_20_Guia_de_llenado_CFDI.pdf), pg 17, indicates that accented characters are maintained in legal names. At least, `Í` is allowed. At this point in time I only added the exception for `É`. Steps to reproduce are [on the ticket](https://www.odoo.com/mail/message/999357619), as it requires a real person's tax information. [opw-5915515](https://www.odoo.com/odoo/project.task/5915515) ---- *Edit: Miguel (mial) confirmed that names are not always sanitized, but that we expect them to be.* Forward-Port-Of: odoo/enterprise#107677
This update resolves an issue where the 'Update Prices' button disappeared after saving a quotation. The fix adds a field to the view that correctly maintains the button's visibility, ensuring users can easily adjust prices when needed. This improves the sales process and prevents data inconsistencies.
Original PR description
Steps to produce: --- - Install sales module. - Go to Settings and enable Pricelists (make sure we have 2 pricelists so that we able to change the pricelist value in quotation). - Create a new…
Steps to produce: --- - Install sales module. - Go to Settings and enable Pricelists (make sure we have 2 pricelists so that we able to change the pricelist value in quotation). - Create a new quotation > Add a customer and product. - Change the pricelist. - Save the record. Issue: --- - After saving the quotation, the `Update Prices` button becomes invisible. Root cause: --- - The field `show_update_pricelist`, which controls the visibility of the button, is not present in the view. As a result, when the record is saved, the field is not included in the form data and its value is not properly maintained, causing the button to become invisible. - The field is removed from the view in this [commit]. Solution: --- - Added the `show_update_pricelist` field to the view to ensure its value is properly maintained. This allows the `Update Prices` button to remain visible when applicable. [commit]: https://github.com/odoo/odoo/commit/da4b588b272432095f549c012e0a0d7238f00dc0 **Enterprice PR:** https://github.com/odoo/enterprise/pull/107621 opw-5927659 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#249881 Forward-Port-Of: odoo/odoo#248957
This update corrects a bug where refund transactions for non-settled payments were incorrectly cancelled. The change ensures that voided refund transactions are now properly marked as 'confirmed,' improving the reliability of refund processing within the Payment Authorize module. This resolves an issue impacting payment reconciliation and reporting.
Original PR description
Versions: --- 19.0+ Issue: --- Refund transactions are cancelled once refund is completed for non-settled payments. Steps to reproduce: --- 1- Configure `payment_authorize`. 2- Create a payment, and pay using authorize. 3- Refund the payment. Outcome: The refund transaction is initiated and then cancelled once the refund is completed. Cause: --- After #209685, the `tx._refund` method is introduced, which is creating a new transaction, and the provider-specific logic is left for `_send_refund_request` hook. Before that, the tx creation was done in `_send_refund_request`, which in `payment_authorize`'s override, no transaction was created if the payment wasn't settled by the provider yet. Therefore, voided transaction meant setting tx.status as cancelled. Fix: --- Now that we are creating tx for all refund tx regardless of payment settlement, we should set status of refund voided tx as confirmed. opw-5904548 Forward-Port-Of: odoo/odoo#249434
This update resolves a previous issue where automation flows involving moving documents and triggering subsequent actions frequently failed due to security restrictions. The change allows actions to run seamlessly even after a document is moved, improving the reliability of automated workflows. The fix simplifies the system and enhances user flexibility.
Original PR description
Prior to this commit, creating a multi-action that moved a document to a new folder and immediately triggered another action (e.g., "Create Invoice") often failed. This occurred because the security…
Prior to this commit, creating a multi-action that moved a document to a new folder and immediately triggered another action (e.g., "Create Invoice") often failed. This occurred because the security check required the sub-action to be explicitly embedded (pinned) on the *destination* folder. Since the record was moved during the process, the subsequent action failed the security check on the new folder where it wasn't pinned. This limitation caused confusion for users setting up automation flows, as the intent of the sequence (Move -> Action) was clear and initiated from a valid context (the source folder), but strict per-action security rules blocked execution. This commit improves the `ir.actions.server` execution logic to support this pattern by introducing a context-based security sentinel: 1. Entry Point Validation: When a Documents action (root) is triggered, the system enforces strict security: the action must be explicitly embedded on the record's current folder. 2. Context Inheritance: Once the root action is authorized and begins execution, it sets a secure sentinel in the context. 3. Trusted Execution: Any subsequent sub-actions (children) detect this sentinel and are allowed to run, regardless of the record's current folder location. This ensures that if a user has the right to start the process (the root action), they have the right to complete the defined sequence, even if intermediate steps move the record to a folder where the sub-actions are not explicitly pinned. As a result, the `_can_execute_action_on_records` override in `documents_account` is no longer necessary and has been removed. Tests have been extended in the `documents` and `documents_account` modules to cover these scenarios (using Tags in the `documents` module instead of Accounting-specific models to make the tests generic). A new test file `test_documents_ir_actions_server.py` was created to maintain a clean testing environment, covering nesting, move sequences, and RPC spoofing attempts. Task-5916630 Forward-Port-Of: odoo/enterprise#106702
This update fixes an issue where invoices weren't correctly using product category accounts. Now, Odoo automatically checks the entire category hierarchy (parent to child) to find an appropriate account, ensuring invoices accurately reflect the intended income or expense. This improves financial reporting accuracy.
Original PR description
**Steps to reproduce:** * Install the **Accounting** module. * Create a product category hierarchy (grandparent → parent → child). * Set an **income account** on the grandparent category. * Set an…
**Steps to reproduce:** * Install the **Accounting** module. * Create a product category hierarchy (grandparent → parent → child). * Set an **income account** on the grandparent category. * Set an **expense account** on the child category. * Leave the parent category without any accounts. * Create a product assigned to the child category. * Create a customer invoice using this product. **Observed behavior:** * The invoice line uses the **default income account** from settings instead of the grandparent category’s income account. * The category hierarchy is not checked to retrieve parent accounts. **Expected behavior:** * If no account is defined on a category, Odoo should traverse the **parent categories** to find one. * Only if no account exists in the hierarchy should it fall back to journal or default accounts. **Cause:** * Account lookup only checked the **immediate category**. * Parent categories were not considered. **Fix:** * Traverse the product category hierarchy when searching for accounts. * Use the first account found in the parent chain. opw-5869592 Forward-Port-Of: odoo/odoo#249909 Forward-Port-Of: odoo/odoo#248389