Daily updates from Odoo
Thursday, May 21, 2026
61 changes · saas-19.2
New functionality added to Odoo
This update introduces a new module, 'obox,' designed to connect Odoo to hardware devices similar to the existing Odoo FDM for Belgium. The initial step allows the system to identify and track Obox devices, providing key information like their IP address and available services.
Original PR description
The Obox (same platform as the Odoo FDM for Belgium) will allow interfacing with hardware devices, and is intended to replace the functionality of the IoT box. This commit only adds the ability to pair an Obox to the database, and see its IP and available services. Enterprise https://github.com/odoo/enterprise/pull/110834 Forward-Port-Of: odoo/odoo#254208
This update introduces a new module, 'obox,' designed to connect with Obox devices – similar to the Odoo FDM for Belgium. The initial step allows users to register and view basic information about their Obox, including its IP address and available services, paving the way for future device control.
Original PR description
The Obox (same platform as the Odoo FDM for Belgium) will allow interfacing with hardware devices, and is intended to replace the functionality of the IoT box. This commit only adds the ability to pair an Obox to the database, and see its IP and available services. Community: https://github.com/odoo/odoo/pull/254208 Forward-Port-Of: odoo/enterprise#110834
Enhancements to existing features
This update improves the softphone's call history by allowing users to initiate calls without needing to first select a contact. This simplifies the call logging process and enhances user convenience. The change is a minor improvement to the softphone functionality.
Original PR description
Make it possible to log on calls without contscts on softphone. Task-[6204798](https://www.odoo.com/odoo/5778/tasks/6204798)
This update enables users to reset statement lines directly within the Kanban view, mirroring functionality from previous versions. Previously, this required manual deletion of multiple reconciliations, which was inefficient. This change streamlines the process and improves user workflow.
Original PR description
This commit adds the possibility to reset a statement line in kanban view like in the previous versions. Function is still there but no UI button was tied to it. This is a problem if you have many reconciliations on one statement line, we do not want to delete them one by one. opw-6015838 Forward-Port-Of: odoo/enterprise#111107
Resolved issues and error corrections
This update resolves an issue where users could trigger an error when entering spaces in the 'Forecasted Demand' or 'Forecasted Stock' cells within the Master Production Schedule. The fix ensures that blank input is handled correctly, preventing the error and maintaining data integrity.
Original PR description
## Steps to Reproduce:
1. Install `mrp_mps` module.
2. Manufacturing > Planning > Master Production Schedule
3. Click on "Forecasted Demand" or "Forecasted Stock" of any product.
4. Click `<SPACE>` and then `<ENTER>`.
## Error:
`ValueError: could not convert string to float: ' '`
## Cause:
When a user enters whitespace(' ') in a **Forecasted Demand** or **Forecasted Stock** cell, the string bypasses the existing `isNaN/empty` checks at [1]. Then the raw whitespace string passes to the ORM call, where `float(' ')` raised a ValueError.
## Fix:
This commit trims the value so that blank input is treated the same as an empty string, and the cell reverts to its original value.
[1] - https://github.com/odoo/enterprise/blob/6ae5d3df6e9305416e4d6f74259cd01753025f42/mrp_mps/static/src/components/line.js#L128
sentry-7473062917
Forward-Port-Of: odoo/enterprise#117052A bug was causing errors when creating new Helpdesk teams. This update ensures that a necessary email template exists before attempting to use it, preventing a system crash. This improves the stability of the Helpdesk module.
Original PR description
Currently, an error occurs when a user tries to create a helpdesk team record. **Steps to Reproduce:** - Install the `helpdesk` module without demo data. - Go to `Settings` > `Technical` > `Email` >…
Currently, an error occurs when a user tries to create a helpdesk team record. **Steps to Reproduce:** - Install the `helpdesk` module without demo data. - Go to `Settings` > `Technical` > `Email` > `Email Templates` and delete the `Helpdesk: Ticket Received` template record. - Go to `Helpdesk` > `Configuration` > `Stages` and remove all records. - Go to `Helpdesk` > `Configuration` > `Helpdesk Teams` and click `New` to create a record. `AttributeError: 'NoneType' object has no attribute 'id'` When the user deletes all stages, the system attempts to create a new stage and assign the "Helpdesk: Ticket Received" mail template to it [1]. However, if this template record does not exist, accessing its id raises the error. This commit ensures that the template record exists before accessing its id, otherwise, None is passed as the default value. [1]: https://github.com/odoo/enterprise/blob/32187f79fb0a595497a5e77db4b22b417b03b8dd/helpdesk/models/helpdesk_team.py#L34 sentry-7482994877 Forward-Port-Of: odoo/enterprise#117446
This update fixes a bug that prevented order synchronization with Lazada when package information was incomplete. The system now gracefully handles missing package data, avoiding errors and ensuring orders are synced correctly. This improves the overall reliability of the Lazada integration.
Original PR description
orders can omit package data in the API payload if the package id doesn't match. When a picking still had a package_extern_id, filtering order_items by that id produced an empty list, and max() on the resulting timestamps raised ValueError and blocked order sync. Return early when no matching package lines exist so sync can continue. taskId - 6195507 Forward-Port-Of: odoo/enterprise#117194
This update fixes an issue where URLs with mixed or uppercase characters weren't automatically converted to clickable links within the HTML editor. The fix ensures that all URLs, including those with single-character domains like 'x.com', are correctly recognized and linked. This enhancement improves the user experience by making it easier to share and navigate to online resources.
Original PR description
### Description of the issue/feature this PR addresses: - URL_REGEX was constructed with the "i" flag, but passing a RegExp object to new RegExp(regex, "g") silently drops the original flags, leaving only "g". This caused uppercase (ODOO.COM) and mixed-case (Odoo.Com) URLs to not be converted to links when pressing space. ### Desired behavior after PR is merged: - URL_REGEX.source with explicit "gi" flags to preserve case-insensitive matching in `prepareConvertToLink`. - Allow automatic URL detection for single-character domains such as `x.com`, `t.co`, and `a.io` by relaxing the minimum domain label length in the URL regex from 2 to 1 characters. task-6199269 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#265409 Forward-Port-Of: odoo/odoo#263255
This update fixes an error in the WPS payroll report generation process. Specifically, it ensures the report correctly uses the value date and prevents issues when the payment date is too close to or equal to the value date, leading to more accurate and reliable reports for Saudi Arabian payroll.
Original PR description
In this commit, we: - corrected the tooltip description of `l10n_sa_wps_value_date`; - added back the Debit Date to the WPS file and assigned it the value of the `effective_date`; - added back the user error in case the Payment Date is greater than or equal to the Value Date. TaskID-6130969 Forward-Port-Of: odoo/enterprise#115762
This update fixes a minor issue in the demo order system for point-of-sale and restaurant POS. Previously, demo orders used a default forward slash ('/') as an order reference. Now, all demo orders have sequential order references, except those in the 'new' state. This ensures demo orders are more accurately represented and easier to understand.
Original PR description
Before this commit: =================== - For demo orders, no proper Order Reference is displayed, by default, it is set to '/'. After this commit: =================== - All default '/' values are replaced with a sequential Order Reference, except for orders in the 'new' state . Task-6004716 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#264971 Forward-Port-Of: odoo/odoo#253272
This update corrects a bug where users couldn't edit dates within the blog translate mode. The fix ensures the `DateTimeFieldPlugin` is correctly included in the necessary Odoo modules, allowing for proper date field editing and preventing potential save errors. This improves the user experience for blog content management.
Original PR description
The plugin `DateTimeFieldPlugin` was only added in registry `builder-plugins`. But it should also be included in the lists `CORE_PLUGINS` of `html_builder` and `TRANSLATION_PLUGINS` of `website` (the same as `MonetaryFieldPlugin` and similar plugins) Steps to reproduce: - Open `/blog` in translate mode - Click on a date - Bug: you can edit the text (and it will likely cause an error on save) task-6226376 Forward-Port-Of: odoo/odoo#265400 Forward-Port-Of: odoo/odoo#264943
This update corrects a bug in the Odoo holiday scheduling module. Previously, a key field was missing from a system update trigger, preventing proper validation of dates. Now, any changes to the popover form in validated state will trigger a correct validation error, ensuring accurate holiday calculations.
Original PR description
Related-https://github.com/odoo/enterprise/pull/114445 The `work_entry_type_request_unit` field was missing from the @api.depends decorator of `_compute_date_from_to()`. This prevented the method from recomputing `date_from` and `date_to` when related fields changed, which meant the `_check_date_state` constraint was never triggered. After this change, whenever any field changes on popover form in validated state it will raise proper validation error task-[6117310](https://www.odoo.com/odoo/project/1251/tasks/6117310) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update optimizes how bank statement information is recorded within Odoo. By using a batch logging function, the system now processes bank statement details more efficiently, reducing delays and improving overall performance. This change enhances the speed and reliability of financial reporting.
Original PR description
There is no need for a full message post to get the details of the transaction. We can use the batched function instead `_message_log_batch`. Forward-Port-Of: odoo/enterprise#117923 Forward-Port-Of: odoo/enterprise#117742
This update resolves an issue where users could set an asset to 'draft' after a lock date was applied, leading to accounting errors. The fix prevents this action to maintain data integrity and ensure accurate financial reporting. It corrects a logic error related to finalized accounting entries.
Original PR description
Steps to reproduce: 1- Install Accounting 2- Go to [Accounting -> Assets] and create a new asset with start date 1/1/2025 3- Specify the fixed asset account and confirm the asset 4- Open [Accounting -> Lock Dates] 5- Set a Lock date on everything with the date 31/12/2025 and save 6- Cancel the asset, set to draft and confirm again Issue: `Invalid Operation: The remaining value on the last depreciation line must be 0` Expected behavior: Should not be able to set to draft once the asset is cancelled Why this happens: Commit 66db1d5 introduced a new condition on the `Set to Draft` button which results in the button being visible when it should not be. If a Lock Date is set after an asset is confirmed, the acquisition and any depreciation entries are effectively finalized in the accounting history. Allowing a user to "Set to Draft" at that point would involve deleting or modifying entries in a closed period, which violates accounting integrity. opw-6152777
This update fixes a potential error in the maintenance scheduling process. Previously, a maintenance request with only a scheduled end date could cause a system crash. The fix ensures both start and end dates are set, or both are empty, preventing this error and improving stability.
Original PR description
#### Issue: Opening the MRP planning view could raise a traceback when a maintenance request had a `schedule_end` but no `schedule_date`. `TypeError: '<' not supported between instances of 'NoneType'…
#### Issue: Opening the MRP planning view could raise a traceback when a maintenance request had a `schedule_end` but no `schedule_date`. `TypeError: '<' not supported between instances of 'NoneType' and 'datetime.datetime'` #### Steps to reproduce: 1. Install maintenance, mrp, and mrp_maintenance. 2. Create a work center. 3. Create a maintenance request linked to that work center. 4. set a `Scheduled end` and Leave `Scheduled Date` empty. 5. Go to MRP > Planning > Work Orders. #### Cause: `maintenance.request` stores `schedule_end` as a writable field, but no constraint enforces that `schedule_date` and `schedule_end` must be set together. Later, `mrp_maintenance` in `_get_maintenances_intervals` fetches maintenance intervals for the gantt view without filtering null bounds. If a request has `(schedule_date, schedule_end)` = `(False, datetime)`, that interval is passed to `Intervals(...)`, which crashes when comparing `None` with a `datetime`. #### Fix: Add a constraint on `maintenance.request` to require `schedule_date` and `schedule_end` to either both be set or both be empty. Also filter out incomplete intervals in the MRP maintenance gantt query in this enterprise PR: https://github.com/odoo/enterprise/pull/117710 opw-6225772 enterprise PR: https://github.com/odoo/enterprise/pull/117710 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves a potential error in the MRP planning view that could cause it to crash when maintenance requests lacked scheduled dates. The fix filters out incomplete maintenance intervals, ensuring the view functions reliably. A related constraint has also been added to the maintenance request model to prevent future issues.
Original PR description
#### Issue: Opening the MRP planning view could raise a traceback when a maintenance request had a ``Scheduled End`` but no ``Scheduled Date``. ```TypeError: '<' not supported between instances of 'NoneType' and 'datetime.datetime'``` #### Cause: In `_get_maintenances_intervals`, `mrp_maintenance` loaded maintenance intervals for gantt unavailability without filtering out incomplete rows. If an interval like False, datetime reached Intervals, it crashed when comparing None with a datetime. #### Fix: Filter out incomplete maintenance intervals in the gantt query. Also added a constraint on `maintenance.request` to require `schedule_date` and `schedule_end` to either both be set or both be empty in this community PR: https://github.com/odoo/odoo/pull/265208 opw-6225772
This pull request corrects an accidental reversion of changes related to Weblate. The original reversion impacted several internal components, including those supporting helpdesk, IoT devices, and payroll. This ensures these features continue to function correctly.
Original PR description
This partially reverts commit 64c2b74aaec2742df68c8494b2b2378ea59ce173. Weblate accidentally reverted the following commits: - d0e4fbbf09c10b1927020657c11ac46e9ced2496 - fdb5afd26817e1aa5da6cc3eaa3f3fed1744427d - ff467b9c0bb21e1e6bafe00c2dffb7019196e5ac - d94a3c0908cfad8d39f30dc3399b42dc2078cc46
This update resolves a crash issue that occurred when opening dropdown menus on certain pages (like the `/r` page). The fix ensures the menu is fully loaded before attempting to observe it, preventing a technical error that previously caused the dropdown to fail. This improves the overall stability and usability of the application.
Original PR description
Steps to reproduce: - Go to the `/r` page. - Click a dropdown. => traceback Before this commit, `Dropdown.onOpened()` always observed `menuRef.el` as soon as the popover reported it was open. In frontend pages such as `/r`, the menu can still be rendering at that moment. The menu appears just after, but `MutationObserver.observe()` already received `undefined` and raised a `TypeError`. After this commit, `Dropdown.onOpened()` only starts the observer when the menu element exists. The dropdown can finish opening normally, so the menu is shown without traceback. Introduced by [1]. [1]: 7aed5b141f06 Forward-Port-Of: odoo/odoo#265224
This update fixes a minor visual issue in the multi-currency popover. Previously, the display would include an awkward "on" with no date, creating a less polished user experience. This change ensures a cleaner and more professional appearance for currency conversions.
Original PR description
This commit fixes a formatting issue in the multi-currency popover when no currency exchange rate is available. Previously, the popover would awkwardly display the word "on" with no trailing date (e.g., "CHF 22.81 at $ 1.00 on"). The template now conditionally hides the "on" keyword when no date is present to ensure a clean UI. task-6227557 Forward-Port-Of: odoo/odoo#265022
This update resolves an issue where the Odoo tour feature was repeatedly rendering, causing performance slowdowns. The fix prevents an infinite loop of updates triggered by state changes, limiting rendering to a manageable level. This results in a smoother and more responsive user experience.
Original PR description
Before this commit, the tour pointer entered an infinite loop of rendering because one change in its state triggered DOM mutations on which the tour listen to update the pointer, triggering the rendering of the pointer. This was because of a reactive's state being update too early. After this commit, the number of renderings is limited to a reasonable minimum. 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#265498
This update fixes an issue where certain Italian taxes (INPS and Pension Fund) weren't properly imported from vendor bills. The fix ensures these taxes are correctly configured within Odoo, allowing the system to accurately process and recognize tax data during import. This improves the reliability of tax calculations and reporting for Italian businesses.
Original PR description
### Issue before this commit: In the previous implementation, several Italian taxes, specifically the 4% INPS and the 4% Pension Fund (F.Pens), were not correctly initialized. Although the relevant…
### Issue before this commit: In the previous implementation, several Italian taxes, specifically the 4% INPS and the 4% Pension Fund (F.Pens), were not correctly initialized. Although the relevant EDI data was present in the source CSV templates, it was missing from the actual tax records in the database. ### Steps to reproduce the issue: 1. Download Accounting and l10n_it_edi 2. Go to Accounting -> Taxes 3. Open 4% INPS tax and 4% F.Pens and go to Advanced Options tab and see that no Pension Fund Type is associated by default ### Cause of the issue: While moving the witholding data from l10n_it_edi to l10n_it in this commit https://github.com/odoo/odoo/commit/40e09ca01242 the templates were not correcly rendered and set up. ### Reason to introduce the fix: For a tax to be correctly recognized from the XML, it is essential that we have the corresponding tax already configured in Odoo, including the specific type. We should have at least these two taxes fully configured so the system can elaborate them correctly when imported from vendor bills. opw-6093221 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#258947
This update ensures that the customer reference field from invoices is correctly included in the fa3 file generated for transmission to the Polish KSEF system. Previously, this information was missing, which could cause processing delays. This fix ensures compliance with Polish tax regulations.
Original PR description
**STEP TO REPRODUCE** 1. Create an invoice and fill the customer reference field (other info tab). 2. send the invoice to ksef. 3. Open the generated fa3 file, and notice there is no mention of the customer reference. Ticket [link](https://www.odoo.com/odoo/project.task/6150812) opw-6150812 Forward-Port-Of: odoo/odoo#263797
This update fixes an issue where the bottom sheet wasn't consistently appearing on larger touch devices like tablets. Previously, a dropdown was shown instead, which was visually incorrect. Now, the bottom sheet is always displayed, ensuring a better user experience across all screen sizes.
Original PR description
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#264973 Forward-Port-Of: odoo/odoo#264705
This update resolves an issue where the Send & Print wizard would fail when proforma PDFs weren't automatically created for invoices. The fix ensures the system handles cases where these PDFs aren't generated gracefully, preventing errors and improving the reliability of invoice sending. This primarily impacts scenarios where proforma PDFs are not immediately available.
Original PR description
`_generate_and_send_invoices` raises `KeyError: 'proforma_pdf_attachment'` when `_get_invoice_extra_attachments` returns an empty recordset for a move in the `success` dict. The…
`_generate_and_send_invoices` raises `KeyError: 'proforma_pdf_attachment'` when `_get_invoice_extra_attachments` returns an empty recordset for a move in the `success` dict.
The `proforma_pdf_attachment` key is only populated in `_generate_invoice_fallback_documents`, which is called exclusively when `allow_fallback_pdf=True`. However, the code at the return step also triggers when `allow_fallback_pdf=False` (normal wizard path), where the key is never set.
Replace the bare dict access `move_data['proforma_pdf_attachment']` with `move_data.get('proforma_pdf_attachment', self.env['ir.attachment'])` so the flow returns an empty attachment recordset instead of raising a `KeyError` when no fallback proforma PDF was generated.
Fixes: KeyError: 'proforma_pdf_attachment' in account.move.send.wizard Steps to reproduce:
1. Use the Send & Print wizard on a posted invoice
2. Trigger a condition where _get_invoice_extra_attachments returns an empty recordset (e.g. via l10n_vn_edi_viettel with sinvoice files not yet fetched) despite no error being raised
Forward-Port-Of: odoo/odoo#264564This update resolves an issue preventing normal users from canceling approval requests they created. The fix utilizes 'sudo' to grant the necessary permissions, allowing users to successfully cancel their own requests and streamlining the approval process. This improves user experience and reduces potential bottlenecks.
Original PR description
Issue: - A user who created an approval request could cancel it. But a rights error appeared during the cancellation. Steps to Reproduce: - Create an approval being a normal user. - Try to cancel the approval. - A ValidationError is raised eventhough the approvals can be cancelled by creator of it. Fix: - Changed the cancel action to use the sudo for the user who created the task and can cancel it Impact: - Users can cancel their own approval requests without errors. Task: 6123104 Forward-Port-Of: odoo/enterprise#114189
This update resolves an issue where updating a manufacturing order (MO) with a multi-level BOM would only create MOs for the immediate child components, failing to generate MOs for subsequent components in the BOM hierarchy. The fix ensures that all necessary MOs are created during the update process, maintaining accurate manufacturing tracking. This prevents disruptions in production planning.
Original PR description
When updating a mo, if the new component has a multilvl bom, it will only create a mo for the direct child and not the next Steps to reproduce: ------------------- * Create a products "Main",…
When updating a mo, if the new component has a multilvl bom, it will only create a mo for the direct child and not the next Steps to reproduce: ------------------- * Create a products "Main", "Final", "Semi", "Raw" * Create a Bom for "Final" with "Semi" as component * Create a Bom for "Semi" with "Raw as component * Add MTO on final and Semi * Create a MO for Main with no components and confirm it * Add "Final" to the mo as component as save. -> The MO for "Final" is correctly created with "Semi" as component but there is no MO for "Semi" with "Raw" as component. Observation: ------------- When updating de MO, it will write the new SM (Final) to the production, and we will call ```_autoconfirm_production``` with ```no_procurement```: https://github.com/odoo/odoo/blob/6fb69b5640743d3bc7bb52c73cb27da428f2451c/addons/mrp/models/mrp_production.py#L1051 Where we will directly confirm the sm (```_action_confirm```). From the SM ```_action_confirm``` we will create and run a procurement (manufacture in our case). From the manufacture we will create the new move line for Semi and go through ```action_confirm``` on the manufacturing order: https://github.com/odoo/odoo/blob/9ef76a4d6010191ab7ab1a0d1085972901280dda/addons/mrp/models/stock_rule.py#L116-L118 In the MO ```action_confirm```, we will confirm the move and should create new procurement for the moves that need them, but, since in our case we have ```no_procurement``` in the context, we will set ```create_proc``` to false: https://github.com/odoo/odoo/blob/9ef76a4d6010191ab7ab1a0d1085972901280dda/addons/mrp/models/mrp_production.py#L1635 Since ```create_proc``` is false we will not create a procurement for those move lines: https://github.com/odoo/odoo/blob/6fb69b5640743d3bc7bb52c73cb27da428f2451c/addons/stock/models/stock_move.py#L1557-L1558 https://github.com/odoo/odoo/blob/6fb69b5640743d3bc7bb52c73cb27da428f2451c/addons/stock/models/stock_move.py#L1571-L1580 opw-6005675 Forward-Port-Of: odoo/odoo#258153
This update fixes a problem where adding rental products to the cart resulted in an error message about incompatible rental periods. The fix ensures that rental product durations are correctly calculated and applied, allowing users to add rental products with hourly pricing to their carts without encountering this issue. This improves the overall rental product purchasing experience.
Original PR description
Steps to reproduce: =================== 1. Go to the shop page and use the rental date picker to select a start and end date with hours. 2. Find a rental product configured with "Days" pricing. 3.…
Steps to reproduce: =================== 1. Go to the shop page and use the rental date picker to select a start and end date with hours. 2. Find a rental product configured with "Days" pricing. 3. Add to card directly from the product card 4. Add a rental product from product image that has date type value date 5. Go to that product details page. 6. Click add to cart -> Invalid operation, You cannot mix different rental periods... Cause: ====== When adding a product from the shop list view, the system uses the default start/end dates (from the rental period) exactly as first added. However, the "Add to Cart" logic on the product details page attempts to adapt the selected dates to the product's specific rental unit (e.g., normalizing the time component for 'Day' pricing). This re-calculation creates a timestamp mismatch between the item already in the cart (from the shop view) and the new item being added (from the details page). Solution: ========= The add-to-cart flow has been updated to correctly utilize the default duration values (the globally selected dates) if they exist. opw-5450576 Forward-Port-Of: odoo/enterprise#117058 Forward-Port-Of: odoo/enterprise#103373
This update fixes an issue where service products didn't consistently apply user-defined default units of measure. Previously, the default unit was overridden when a product was marked as a service. Now, the system correctly applies the user's preferred unit of measure for all products, including services, ensuring accurate time tracking and invoicing. This improves data consistency and simplifies product management.
Original PR description
A user-defined default on `product.template` Unit is not applied when the product is of type Service 1. Install Sales and Sales Timesheet 2. Go to Settings > Sales > Product Catalog and enable Units of Measure & Packagings 3. Enable debug mode 4. Go to Sales > Products, open a new product form and set unit to Days 5. In the debug menu (bug icon in the top right), select Set Default Values for Unit = Days and save 6. Reload the page 7. Set the type to Service 8. Unit changes from Days to Hours Same issue happens for `product.product` Issue: User default values are overwritten when certain conditions are met by https://github.com/odoo/odoo/blob/6955370fd2d62c83f0ea24247abf7a9e4b4ebed3/addons/sale_timesheet/models/product_template.py#L55-L57 Solution: Use the user defined default on `uom_id` except for service products that are invoiced with timesheets as they need a time unit of measure opw-6139603 Forward-Port-Of: odoo/odoo#262597
This update fixes an issue where Fedex delivery labels were missing a crucial 'REF' field, which is required by the shipping carrier. The fix ensures all labels now include this reference, preventing potential delivery delays or errors. This improves the accuracy and reliability of our shipping process.
Original PR description
Issue ----- `REF` field of Fedex labels is missing. Steps to reproduce ----- - Setup Fedex - Create a product (set weight) - Create a delivery for the product - Set carrier as Fedex - Validate…
Issue
-----
`REF` field of Fedex labels is missing.
Steps to reproduce
-----
- Setup Fedex
- Create a product (set weight)
- Create a delivery for the product
- Set carrier as Fedex
- Validate delivery
- Opend the label
> REF field is empty
Cause
-----
When filling the `CustomerReferences`, we only specify the SO
https://github.com/odoo/enterprise/blob/aae680f5b86fa87193ba6616e8431eed985b2ee7/delivery_fedex_rest/models/fedex_request.py#L309-L313
The `REF` field is populated using `CUSTOMER_REFERENCE` references, which is not present in this case.
Excerpt of the API DOC
-----
```
"CustomerReference": {
"type": "object",
"properties": {
"customerReferenceType": {
"type": "string",
"description": [...],
"example": "DEPARTMENT_NUMBER",
"enum": [
"CUSTOMER_REFERENCE",
"DEPARTMENT_NUMBER",
"INVOICE_NUMBER",
"P_O_NUMBER",
"INTRACOUNTRY_REGULATORY_REFERENCE",
"RMA_ASSOCIATION"
]
},
"value": {
"type": "string",
"description": [...],
"example": "3686"
}
}
},
```
[...] replaces long description strings, refer to API for full documentation.
Result after fix
-----
<img width="477" height="738" alt="image" src="https://github.com/user-attachments/assets/0d3a0786-5b7d-41cc-8548-2dc7b0f379ab" />
-----
Ticket:
opw-6101620
Forward-Port-Of: odoo/enterprise#116870This update resolves an issue that caused Odoo to run out of memory when importing large PDF files into the Documents App. The fix disables a resource-intensive process within the PDF indexing library, improving the stability and reliability of this key feature. This ensures smoother operation for users working with larger documents.
Original PR description
### Description: When trying to import a large PDF file into the Documents App, it can sometimes fail because of an Out-of-Memory error (OOM). This is caused by the library `pdfminer.six` and the function `group_textboxes` that helps order the result of the indexing. This function is memory heavy and is not useful for our use case. To avoid it, we can just disable the "advanced layout analysis" by disabling `boxes_flow`. ### Reference: opw-6164752 Forward-Port-Of: odoo/odoo#264301
This update fixes a bug where calendar events weren't consistently appearing in user calendars when multiple contacts shared the same email address. The fix adds filters to ensure events are correctly associated with the user's partner, improving calendar synchronization reliability. This prevents missed event notifications and ensures accurate calendar views.
Original PR description
**Steps to reproduce:** - Install Calendar app and sync it with google as admin user - Setup another user, related contact will be created automatically - Log as the new user and sync his calendar…
**Steps to reproduce:** - Install Calendar app and sync it with google as admin user - Setup another user, related contact will be created automatically - Log as the new user and sync his calendar with his google account - Create another contact with the same email - Log as admin user - Invite the contact linked to the user to a calendar event - Invite the contact not linked to the user to another calendar event - Both invitations are received by email - Both events appear in the organizer and recipient google calendars - Only the event sent to the contact linked to the user shows up in odoo calendar - Event sent to the contact not linked to the user doesn't appear **Issue:** The second event is properly synced with the google calendar, but it won't show up in the user calendar as it is not assigned to his own partner. Adding the second contact to the calendar view will make the other event appear. **Fix:** Add `calendar.filters` for such duplicated partners on event creation so that the correct user has them by default in its calendar view. Another possible fix would be to adapt the partner of the event directly to the one of the user on creation when there are duplicates (but it would change the current logic where such partners are used). opw-6117460
This update fixes an issue where the 'Company Name' field on the customer website form wasn't syncing correctly, leading to potential data loss. The fix ensures that a parent company is created and linked to the customer contact, maintaining data consistency and preventing errors when creating new customers through the website.
Original PR description
Steps to reproduce: 1. Add a Website Form snippet 2. Set the action to "Create a Customer" 3. The "Company Name" field is not synced with the builder option (the "Type" dropdown shows "None") Reason: In PR[1], the company field was removed, resulting in an unexpected `None` value and potential data loss. Fix: Restore the expected behavior by ensuring that: - A parent company is created if it does not exist - The contact is linked to this parent This prevents data loss and ensures consistency between the form and backend data. [1] https://github.com/odoo/odoo/pull/211043 task-5979184
This update fixes an issue where vendor bills were incorrectly using Swiss tax rates when the invoice originated from a Belgian company. The change ensures that the tax rate aligns with the company's fiscal localization, preventing errors in financial reporting. This improves data accuracy and compliance.
Original PR description
**Steps to reproduce:** - Create a company in Belgium and set the fiscal localisation accordingly. - In the same company, create a fiscal position in Switzerland, set the foreign tax ID and then…
**Steps to reproduce:** - Create a company in Belgium and set the fiscal localisation accordingly. - In the same company, create a fiscal position in Switzerland, set the foreign tax ID and then generate the taxes for it. - Install the module account_edi_ubl_cii. - Create and invoice for a belgian customer, with one product line having a 0% tax. - Export the invoice as XML. - Go to taxes, filter by purchase, and make sure that the 0% switzerland tax has a higher sequence than the belgian 0% tax. - Import the previous invoice XML as a vendor bill. **Issue:** After importing the bill, the switzerland tax is used even though the fiscal localisation is belgian, which is wrong as it violates the constraint _validate_taxes_country **Solution:** Added a more selective domain to _import_fill_invoice_line_taxes opw-5467936 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#265200 Forward-Port-Of: odoo/odoo#255848
This fix resolves an issue where recurring plans weren't appearing in quotations generated using the DIN5008 template. The update adds a simple styling adjustment to ensure recurring plans are consistently visible in all reports, improving the accuracy of subscription information. This ensures users always see the complete details of their subscriptions.
Original PR description
When generating a quotation for a recurring plan, if the quotation uses the DIN5008 template, the recurring plan is not shown in the report. Steps to reproduce: ------------------- * Make sure…
When generating a quotation for a recurring plan, if the quotation uses the DIN5008 template, the recurring plan is not shown in the report. Steps to reproduce: ------------------- * Make sure l10n_din5008 is installed * Create a Swiss company * Go to the subscription app and create an order with a recurring plan * Print the quotation > Observation: The recurring plan is not shown in the report. Why the fix: ------------ We add a new scss rule to make sure the recurring plan is always shown in the report. https://github.com/odoo/enterprise/blob/fb2eb6cfdc4527e102dd22321975ab3f0d24b88b/sale_subscription/views/subscription_templates.xml#L7-L23 Before: <img width="790" height="677" alt="image" src="https://github.com/user-attachments/assets/342753fa-9655-41ac-a958-f94f6ae2b6c7" /> After: <img width="808" height="756" alt="image" src="https://github.com/user-attachments/assets/4ed726c5-0702-48ee-8578-8b0d2c0f4e55" /> opw-5960219 Forward-Port-Of: odoo/odoo#261727
This update fixes an error that occurred when selecting shift templates on planning slots, specifically when dealing with long time differences in resource schedules. The change ensures the system falls back to a previously calculated end date if the initial template calculation fails, preventing the application from crashing.
Original PR description
Currently, an error occurs when a user selects a shift template on a planning slot. **Steps to Reproduce:** - Install the `Planning` module with demo data. - Create a `Resource Time Off` record with…
Currently, an error occurs when a user selects a shift template on a planning slot. **Steps to Reproduce:** - Install the `Planning` module with demo data. - Create a `Resource Time Off` record with `start` and `end date` separated by more than `1400 days (around 3.9 years)`, and Set the Working Hours field to Standard 40 hours/week. - Go to `Planning` > `Configuration` > `Shift Templates`, open an `existing record` or create a `new one`, and set the `Working Days` to more than 1 day. - Create a new `planning slot`, Assign the resource `Abigail Peterson`, and select the above `shift template`. `AttributeError: 'bool' object has no attribute 'replace'` This error occurs because when the user sets the shift template, the compute method runs to calculate the start and end datetimes [1]. It computes the end datetime by adding the template duration in working days from the given start datetime using the resource working calendar within a searchable range of around 1400 days [2]. During this computation, leaves and non-working days are skipped [3]. If no valid working interval is found within the searchable range, then it returns False [4], which raises the error [5]. This commit ensures that if plan_days returns False, the computation falls back to the previously calculated end date. [1]: https://github.com/odoo/enterprise/blob/6ae5d3df6e9305416e4d6f74259cd01753025f42/planning/models/planning.py#L662-L671 [2]: https://github.com/odoo/odoo/blob/a439bd305112f6efc752ce900f7782e7faaf7312/addons/resource/models/resource_calendar.py#L826-L835 [3]: https://github.com/odoo/odoo/blob/a439bd305112f6efc752ce900f7782e7faaf7312/addons/resource/models/resource_calendar.py#L533-L537 [4]: https://github.com/odoo/odoo/blob/a439bd305112f6efc752ce900f7782e7faaf7312/addons/resource/models/resource_calendar.py#L835 [5]- https://github.com/odoo/enterprise/blob/6ae5d3df6e9305416e4d6f74259cd01753025f42/planning/models/planning.py#L653-L654 sentry-7472958590 Forward-Port-Of: odoo/enterprise#117851 Forward-Port-Of: odoo/enterprise#117073
This update fixes a potential issue where the website incorrectly displayed unavailable unit of measure (UOM) information for products. This change ensures that users receive accurate UOM details, improving the overall sales experience. It was triggered by recent product updates and is a minor improvement.
Original PR description
In some case, the requested uom might not be available (anymore) depending on the product latest changes. Followup on 4ac31e3545f009d0f96462f6a9098d5163ad521b --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#265231
This update resolves an error that prevented users from completing the replenishment process when no routes were associated with a product. The fix ensures the system handles empty route lists gracefully, preventing a technical error and ensuring replenishment functionality works correctly for all products and company setups. This improves the reliability of the stock management process.
Original PR description
## Steps to Reproduce: 1. Install the stock module. 2. Activate "Multi-Step Routes" from settings. 3. Activate the "My Company (Chicago)" company. 4. Create a route for the Chicago company. 5. Create a new product and enable the created route on it. 6. Click on the "Replenish" button. ## Error: `IndexError - tuple index out of range` ## Cause: At [1], when none of the product routes belong to the current company or are shared routes, the filtering returns an empty recordset. As a result, trying to access the first route from the empty result raises an index error. ## Fix: This commit only assigns `route_id` when a route matches the given condition. Otherwise, it keeps the value as `False`. [1] - https://github.com/odoo/odoo/blob/13c0e082c260381a332fe1425fe2ba83a1c0c579/addons/stock/wizard/product_replenish.py#L78 sentry-7488075413 Forward-Port-Of: odoo/odoo#265468 Forward-Port-Of: odoo/odoo#265179
This update significantly speeds up the process of finding a Bill of Materials (BOM) for a set of products within the MRP module. The change optimizes how the system identifies relevant BOMs, reducing processing time and improving overall system performance. This results in faster product creation and management.
Original PR description
Before this commit, finding a bom for a recordset of `products` involved looping over all the boms and it will loop over all the `product_variant_ids` of `bom.product_tmpl_id` if the bom's…
Before this commit, finding a bom for a recordset of `products` involved looping over all the boms and it will loop over all the `product_variant_ids` of `bom.product_tmpl_id` if the bom's `product_id` is NULL. This approach might loop over variants which we are not trying to find a bom for. In additon to that, due to the fact that multiple boms might have the same `product_tmpl_id`, this approach might consider the same variants in the inner loop redundantly even though we matched the variant with a bom in a previous itration.
Worst case, this might result in a time complexity of $O(N * M)$ where N is the number of boms and M is the number of variants.
To improve the performance, I only considered the variants given in the paramater `products` and in addition to that, I created a new dictionary mapping a `product_tmpl_id` to its bom if the bom doesn't have a variant set. By doing this, I can loop over the `products` given and if it doesn't have a bom set then it will be set to the one its template had taken from the previos loop.
In a method call with the following constraints
- **2** products the method was finding a bom for
- The 2 products had the same template and the template contained **550** active variants
- The boms were only related to the template rather than the variants themselves.
| Input Size | Before | After |
| :--- | :--- | :--- |
| 100 | 0.78s | 0.03s |
| 1000 | 8.53s | 0.11s |
| 10000 | 80.99s | 0.73s |
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#247465This update corrects a bug where changing the standard price of a lot-valued product didn't correctly update the product's cost. The fix ensures that the product's cost is accurately recalculated when the standard price is modified, maintaining consistency in inventory valuation. This prevents discrepancies in product cost calculations.
Original PR description
**Problem:** change of standard price on a product valued by lot and with standard price category does not work **Steps to reproduce:** - create a storable product tracked and valued by lot - set…
**Problem:** change of standard price on a product valued by lot and with standard price category does not work **Steps to reproduce:** - create a storable product tracked and valued by lot - set category as standard price - set a cost of 10 and save - click on the quantity smart button and then "update quantity" - add a quantity of 1 in a new lot - on the product form, change the cost to 12 and save - reload the page **Current behavior:** the cost is back to 10 **Expected behavior:** it should stay 12 **Cause of the issue:** when we change the standard_price of the product, _change_standard_price() is called from the write method https://github.com/odoo/odoo/blob/eaa6c4352aec2be8519360c282f3f6504a2f263c/addons/stock_account/models/product.py#L293 Inside _change_standard_price(): step 1: a new product.value is created step 2 : we set the standard_price of the lots to be the same as the one of the product https://github.com/odoo/odoo/blob/eaa6c4352aec2be8519360c282f3f6504a2f263c/addons/stock_account/models/product.py#L319-L323 In the create method for product.value (step 1), we call _set_value() on the moves with a remaining quantity https://github.com/odoo/odoo/blob/eaa6c4352aec2be8519360c282f3f6504a2f263c/addons/stock_account/models/product_value.py#L95 At the end of set_value we call _update_standard_price() on our product https://github.com/odoo/odoo/blob/eaa6c4352aec2be8519360c282f3f6504a2f263c/addons/stock_account/models/stock_move.py#L337 Because the product is lot_valuated we update the standard_price based on the avg_cost of the product (this is needed because for instance if the prod is avco we can not simply use _run_average_batch as it is the case for non lot valuated avco product, because then the result won't be a weighted average of each lot, whereas avg_cost does take this into account) https://github.com/odoo/odoo/blob/eaa6c4352aec2be8519360c282f3f6504a2f263c/addons/stock_account/models/product.py#L633-L634 To compute the avg_cost, inside _compute_value(), we use the total value of each lot https://github.com/odoo/odoo/blob/eaa6c4352aec2be8519360c282f3f6504a2f263c/addons/stock_account/models/product.py#L226 The lots total value is computed inside the _compute_value() method of stock.lot. In this method, because the product is valued by standard_price we use the standard price of the lot https://github.com/odoo/odoo/blob/eaa6c4352aec2be8519360c282f3f6504a2f263c/addons/stock_account/models/stock_lot.py#L40 But this value hasn't been updated yet (it will be at the time of step 2) so it's still the old value (10 in our case). So the avg_cost of the product will also be the old value and the standard price will be udpated back the old value Then, at the end of _change_standard_price() (at the time of step 2) the standard price of the lots are set based on the standard price of the product (so it stays the old value) **fix:** Inside _update_standard_price(), if the product is valued by standard price we do nothing https://github.com/odoo/odoo/blob/eaa6c4352aec2be8519360c282f3f6504a2f263c/addons/stock_account/models/product.py#L639-L640 We apply the same logic for the lot_valued product, if it's standard_price there is nothing to update opw-5949146 Forward-Port-Of: odoo/odoo#264991
This update fixes a technical issue where the mock server incorrectly included archived users when determining a primary user. Now, the mock server accurately reflects the real Odoo system by only considering active users for this calculation. This ensures consistent behavior and data accuracy in the mock environment.
Original PR description
Previously, archived users were not filtered out when computing 'main_user_id' in the mock server, which did not reflect the actual behavior. This PR ensures that only active users are considered when computing 'main_user_id', aligning the mock server logic with the real implementation. enterprise: https://github.com/odoo/enterprise/pull/117480 task-6179486 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#265428 Forward-Port-Of: odoo/odoo#262247
This update resolves a test failure in the WhatsApp discuss sidebar by aligning it with a recent change that now only considers active users when determining available commands. This ensures the test accurately reflects the current system behavior and prevents disruptions to the WhatsApp feature.
Original PR description
This PR updates the discuss sidebar testcase to match the new behavior where only active users are considered when computing main_user_id, reducing the number of available commands and fixing the failing assertion. community: https://github.com/odoo/odoo/pull/262247 task-6179486 Forward-Port-Of: odoo/enterprise#117830 Forward-Port-Of: odoo/enterprise#117480
This update fixes an error in how VAT reimbursement moves are generated when unclaimed tax is carried over to the next month. The previous calculation incorrectly used data from the last tax report, leading to inaccurate reimbursement amounts. This ensures accurate VAT reporting and proper reimbursement processing.
Original PR description
When generating a VAT return with an unclaimed tax amount carried to the next month, the carryover reimbursement move amounts are computed with an incorrect ratio. Steps to reproduce: - Create and…
When generating a VAT return with an unclaimed tax amount carried to the next month, the carryover reimbursement move amounts are computed with an incorrect ratio. Steps to reproduce: - Create and post a bill in May containing a VAT amount. - Create and post a bill in June containing a VAT amount. - Create a VAT return for May to carry over the VAT amount to the next month. - Create a VAT return for June, requesting the full VAT amount to be reimbursed. - Validate and send the June VAT return. - Check the generated reimbursement move Issue: Line values does not correspond to anything real/tangible. It occurs because when computing the ratio for the move we check the last tax report entry, where we find the amount of tax from the past months and a line balancing the last month that should not be taken into account. The "Balance tax current account (receivable)" line from the tax closing entry is mistakenly picked up as a tax carried forward line, throwing off the amounts. opw-5961836 Forward-Port-Of: odoo/enterprise#117837 Forward-Port-Of: odoo/enterprise#115451
This update corrects a visual issue where the project sharing notebook was using dark styles, causing a conflict with the standard light mode. The team removed a specific style file to ensure consistent appearance across the Odoo Enterprise platform.
Original PR description
The project sharing notebook previously used dark-themed styles, which conflicted with the light mode .Removing the notebook.dark.scss file from the imported files in the manifest. task-4922564 Forward-Port-Of: odoo/enterprise#99161
This update fixes an issue where the system only processed the first business document within a multi-bill XML file. The fix ensures that all documents within the XML file are correctly imported, aligning with Italian tax regulations regarding unique file progressives. This improves the accuracy of invoice processing.
Original PR description
### Issue before this commit: When importing an XML file containing multiple business documents (multiple bodies with a single header), the system correctly split the file into separate attachments…
### Issue before this commit: When importing an XML file containing multiple business documents (multiple bodies with a single header), the system correctly split the file into separate attachments but failed to process any document beyond the first one. ### Steps to reproduce the issue: 1. Download Accounting and l10n_it 2. Go to Vendor -> Bills 3. Try to upload a xml with multiple bodies and one header 4. See only the first bill is correctly imported ### Cause of the issue: The splitting logic renamed subsequent attachments with numeric suffixes but then this function incorrectly checked the name of the document. https://github.com/odoo/odoo/blob/29805eec2b70144edf9441cffe7e69e39fd4ba0e/addons/l10n_it_edi/models/account_move.py#L297-L305 We can not rely only on the name of the document but we need to check also its content. Refer to the rules for the name of the attachments: https://www.fatturapa.gov.it/export/documenti/Specifiche-tecniche-relative-al-Sistema-di-Interscambio-versione-1.8.4.pdf In summary what we need in the document (page 9): > The unique progressive of the file is represented by an alphanumeric string up to 5 characters long and with allowed values. [az], [AZ], [0-9]. The unique progressive of the file has the sole purpose of differentiating the name of the files transmitted to the Interchange System by the same entity; it does not necessarily have to follow a strict progressive nature and may also present different numbering styles. ### Reason to introduce the fix: This fix ensures that the function not only checks the name but also the content to be sure that the xml or p7m file contains a valid structure to be registered. Ticket [link](https://www.odoo.com/odoo/project.task/6072258) opw-6072258 Forward-Port-Of: odoo/odoo#265079 Forward-Port-Of: odoo/odoo#259887
This update allows users to re-submit invoices that were previously rejected by the tax authorities (SPV). Previously, rejected invoices were deleted and recreated, losing important tracking information. Now, rejected invoices are preserved as a history, providing better traceability and simplifying the process for users.
Original PR description
Allow users to re-send invoices that were rejected by the SPV. Previously, EDI documents were deleted and recreated on every interaction, losing history in the process. This commit updates existing EDI documents in place instead, preserving failed documents as history for traceability. task-[5976612](https://www.odoo.com/odoo/project/967/tasks/5976612) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#254882
This update resolves an issue where UBL invoices couldn't be imported correctly if the EndpointID field had extra spaces at the end. The change automatically removes these spaces, allowing the import process to succeed and ensuring accurate invoice processing. This prevents import failures and improves data integrity.
Original PR description
**PROBLEM** When importing a ubl that, for some reason, have trailing space on the text of the EndpointID node, we refuse it. This PR strips the trailing spaces on the import. **STEP TO REPRODUCE** 1. Import a ubl as a bill, with a trailing space in the EndpointID of the other party. 2. Notice the import fail, with the error: The Peppol endpoint (50238597645 ) is not valid. It should contain only letters and digit. opw-6227395 Forward-Port-Of: odoo/odoo#265266
This update fixes an issue where newly created projects weren't automatically inheriting the stage selected in their project templates. The fix ensures that projects created from templates correctly utilize the specified stage, streamlining project setup and improving consistency. This prevents manual stage adjustments after project creation.
Original PR description
Steps to reproduce: - 1. Enable "Project Stages" in Project settings. 2. Create a project template and move it to a stage other than the first one (e.g., "Stage 2"). 3. Create a project from this template (manually or via a Sales Order). Issue: - The newly created project is always placed in the first stage instead of inheriting the stage defined in the template. Cause: - The `stage_id` field on the `project.project` model is defined with `copy=False` When a project is created from a template, this field is excluded from the copied values, causing the new project to fall back to the default first stage. Fix: - Override `copy_data` to explicitly include `stage_id` from the source project template. task-6019852 Forward-Port-Of: odoo/odoo#265429 Forward-Port-Of: odoo/odoo#253864
This update resolves an issue where validating opening financial entries caused an error. Now, users can successfully validate opening credit and debit values, ensuring accurate initial accounting setup. The fix addresses a context issue preventing the system from correctly identifying the company for posting.
Original PR description
Issue:
Posting and validating an opening move raises a UserError.
Steps to reproduce:
- With accounting
- Accounting -> Settings -> Initial setup
- Add some opening credit/debit values
- Click on "Validate and post"
- On the confirm window, click on Post
Current behavior:
- Raise a UserError
Expected behavior:
- Post the entry for the current company only
Cause:
As "company_id" is not always defined in the context, `get('company_id')` return None and trigger the UserError.
Instead, warn the user it will be validated only for the current company.
opw-6164885This update resolves an issue where users would encounter an error when attempting to sign in to planning slots that lacked a defined end date. The fix ensures the system handles this scenario gracefully by assigning a default end date, preventing the error and allowing users to successfully sign in.
Original PR description
Currently, an error occurs when user tries to signin on a planning slot which doesnt have an end date selected.
Steps to replicate:
- Install `planning_field_service` and open Planning.
- Click New > Add a Customer > Change status to `Scheduled`.
- Remove end datetime (right one) > Click `Sign In`.
Error:
```
File '/home/odoo/odoo19/enterprise/planning_field_service/models/planning_slot.py', line 264, in action_sign_in
if now > self.end_datetime.astimezone(ZoneInfo('UTC')):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'bool' object has no attribute 'astimezone'
```
Cause:
- As the user removed value from end datetime, `self.end_datetime` is False so we get this error when trying to access `self.end_datetime.astimezone()`.
Solution:
- Added a conditonal check for `self.end_datetime` before accessing `self.end_datetime.astimezone()`.
sentry-7480608465This update fixes an issue where users could still add rental services to their cart even when resources were unavailable during their chosen time periods. The change ensures that the system now accurately checks rental availability, preventing users from adding unavailable products to their cart, especially when integrated with rental planning features. This improves the user experience and prevents incorrect bookings.
Original PR description
Before this commit, when the user goes to the webshop to take a rental service with rental service unavailable at a certain period, the system does not block the user when the resource is not available during 2 hours in the period chosen by the user. The reason is because the hours are not checked when website_sale_renting_stock is not installed. This commit moves the code checking the time of the rental period made in website_sale_renting_stock in website_sale_renting to be able to have that verification for rental service used with planning to make sure the system will prevent the user to add the product in his cart when the resource is unavailable. task-5123239 Forward-Port-Of: odoo/enterprise#114285
This update fixes an issue where the 'clear' buttons on the Odoo website's shop pages were unintentionally shrinking, making them difficult for users to see and interact with. The change ensures these buttons maintain their full size, improving the user experience and accessibility of the online store. This is a simple visual improvement.
Original PR description
task-6145581 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#265494 Forward-Port-Of: odoo/odoo#262183
This update fixes a problem where importing Swiss VAT numbers in a standard format caused duplicate vendor creation in Odoo. The fix ensures correct matching of VAT numbers, regardless of format, preventing errors and maintaining data accuracy during EDI import processes. This improves the reliability of our import functionality.
Original PR description
### Issue: When importing EDI documents such as Peppol files, Swiss VAT numbers are often provided in a flat format (e.g., CHE530781296TVA), while existing Odoo partners usually store them in the…
### Issue: When importing EDI documents such as Peppol files, Swiss VAT numbers are often provided in a flat format (e.g., CHE530781296TVA), while existing Odoo partners usually store them in the official formatted version (e.g., CHE-530.781.296 TVA) This mismatch prevents proper partner matching and may create duplicate partners during import ### Cause: `_retrieve_partner` lacks Swiss-specific VAT normalization logic in `_import_retrieve_customer_from_vat()` As a result, the matching process fails to: - match formatted and unformatted Swiss VAT numbers - properly handle language suffixes such as `TVA`, `MWST`, or `IVA` If `base_vat` is installed, and the imported XML VAT is `CHE530781296TVA`, a new partner will be created with the structure format `CHE-530.781.296 TVA` As the match won't be made new partner will be created at each import ### Steps to reproduce: - Install `account` - Create a Vendor (Name: Test CH Vendor, Country: Switzerland, Tax ID: CHE-530.781.296 TVA) - Import the bill [CH_bill_to_import.xml](https://github.com/user-attachments/files/27202997/CH_bill_to_import.xml) from the ticket Before the fix, the existing partner is not matched and a duplicate partner is created opw-6072239 Forward-Port-Of: odoo/odoo#262011
This update resolves an error that occurred when automatically checking out employees with no defined check-out date, specifically when using the hr_attendance and hr_work_entry_attendance modules. The fix corrects a timezone calculation issue that was creating duplicate overtime entries, leading to a system error. This ensures accurate automatic check-out functionality.
Original PR description
__ ## Short functional explanation of the error While investigating for bug reported on ticket 6036064, I found this other bug. It only occurs when hr_attendance and hr_work_entry_attendance are both…
__ ## Short functional explanation of the error While investigating for bug reported on ticket 6036064, I found this other bug. It only occurs when hr_attendance and hr_work_entry_attendance are both installed. When setting an attendance for an employee that has a check-in date but no check-out date, and running the scheduled action `Automatically check-out employees`, an `expected singleton` error occurs. ## Reproduction Steps 1. Install hr_work_entry_attendance. 2. Create an Employee. In the Payroll tab, set a start date for the contract. In the Settings tab, make sure their timezone is set to Brussels, and set the Overtime Ruleset field to Default Ruleset. 3. In Settings, check the Automatic Check-out box. 4. Go to Attendances. Create an attendance for the employee you just created. Set a Check-in date to 8 am on April 17th, for example, and leave the check-out field empty. 5. Open Scheduled Actions. Search the action Automatically check-out employees and click Run Manually. ### Expected behavior The attendance check-out should be set at the end of April 17th. ### Unexpected behavior An error occurs: `Expected singleton: hr.attendance.overtime.line(39, 40)` ## Origin of the issue When the attendance goes over several days, we set the check-out date to: https://github.com/odoo/odoo/blob/b293ce50e0fc9355ffd233557f079916b514eac7/addons/hr_attendance/models/hr_attendance.py#L618 This is a Naive date. However, it will later be considered as a UTC date. Because the employee's timezone is Brussels, this time will be transformed to 2 am next day when we retrieve attendance intervals. This will result in the creation of overtime entries for both days, causing the Expected Singleton error. https://github.com/odoo/odoo/blob/b293ce50e0fc9355ffd233557f079916b514eac7/addons/hr_attendance/models/hr_attendance.py#L687 https://github.com/odoo/odoo/blob/b293ce50e0fc9355ffd233557f079916b514eac7/addons/hr_attendance/models/hr_attendance.py#L667-L672 In our case, `self.check_in` = April 17th at 06:00:00 and `self.check_out` = April 17th at 23:59:59. Converted, we will obtain April 17th at 08:00:00 and April 18th at 1:59:59. Because of that, at the return: https://github.com/odoo/odoo/blob/b293ce50e0fc9355ffd233557f079916b514eac7/addons/hr_attendance/models/hr_attendance.py#L706-L709 We will return a dict containing 2 intervals: one for 17th April and one for 18th April. We will then create overtime entries with such attendances: https://github.com/odoo/odoo/blob/b293ce50e0fc9355ffd233557f079916b514eac7/addons/hr_attendance/models/hr_attendance.py#L333 leading to the creation of 2 different overtimes for the same attendance. So, when we retrieve the overtime for that attendance: https://github.com/odoo/enterprise/blob/2d2056766441157dc45ebc37b677841c44e5c513/hr_work_entry_attendance/models/hr_version.py#L185, We get the 2. Thus when trying to access their status with: https://github.com/odoo/enterprise/blob/2d2056766441157dc45ebc37b677841c44e5c513/hr_work_entry_attendance/models/hr_version.py#L191 An Expected Singleton Occurs. __ opw-6036064 Forward-Port-Of: odoo/odoo#262257
This update resolves an error that occurred when automatically checking out employees with no defined check-out date, particularly when using the hr_work_entry_attendance module. The issue stemmed from incorrect timezone handling, leading to the creation of duplicate overtime entries. This fix ensures accurate automatic check-out calculations based on employee timezones.
Original PR description
__ ## Short functional explanation of the error While investigating for bug reported on ticket 6036064, I found this other bug. It only occurs when hr_attendance and hr_work_entry_attendance are both…
__ ## Short functional explanation of the error While investigating for bug reported on ticket 6036064, I found this other bug. It only occurs when hr_attendance and hr_work_entry_attendance are both installed. When setting an attendance for an employee that has a check-in date but no check-out date, and running the scheduled action `Automatically check-out employees`, an `expected singleton` error occurs. ## Reproduction Steps 1. Install hr_work_entry_attendance. 2. Create an Employee. In the Payroll tab, set a start date for the contract. In the Settings tab, make sure their timezone is set to Brussels, and set the Overtime Ruleset field to Default Ruleset. 3. In Settings, check the Automatic Check-out box. 4. Go to Attendances. Create an attendance for the employee you just created. Set a Check-in date to 8 am on April 17th, for example, and leave the check-out field empty. 5. Open Scheduled Actions. Search the action Automatically check-out employees and click Run Manually. ### Expected behavior The attendance check-out should be set at the end of April 17th. ### Unexpected behavior An error occurs: `Expected singleton: hr.attendance.overtime.line(39, 40)` ## Origin of the issue When the attendance goes over several days, we set the check-out date to: https://github.com/odoo/odoo/blob/b293ce50e0fc9355ffd233557f079916b514eac7/addons/hr_attendance/models/hr_attendance.py#L618 This is a Naive date. However, it will later be considered as a UTC date. Because the employee's timezone is Brussels, this time will be transformed to 2 am next day when we retrieve attendance intervals. This will result in the creation of overtime entries for both days, causing the Expected Singleton error. https://github.com/odoo/odoo/blob/b293ce50e0fc9355ffd233557f079916b514eac7/addons/hr_attendance/models/hr_attendance.py#L687 https://github.com/odoo/odoo/blob/b293ce50e0fc9355ffd233557f079916b514eac7/addons/hr_attendance/models/hr_attendance.py#L667-L672 In our case, `self.check_in` = April 17th at 06:02:00 and `self.check_out` = April 17th at 23:59:59. Converted, we will obtain April 17th at 08:02:00 and April 18th at 1:59:59. Because of that, at the return: https://github.com/odoo/odoo/blob/b293ce50e0fc9355ffd233557f079916b514eac7/addons/hr_attendance/models/hr_attendance.py#L706 We will return a dict containing 2 intervals: one for 17th April and one for 18th April. We will then create overtime entries with such attendances: https://github.com/odoo/odoo/blob/b293ce50e0fc9355ffd233557f079916b514eac7/addons/hr_attendance/models/hr_attendance.py#L333 leading to the creation of 2 different overtimes for the same attendance. So, when we retrieve the overtime for that attendance: https://github.com/odoo/enterprise/blob/2d2056766441157dc45ebc37b677841c44e5c513/hr_work_entry_attendance/models/hr_version.py#L185, We get the 2. Thus when trying to access their status with: https://github.com/odoo/enterprise/blob/2d2056766441157dc45ebc37b677841c44e5c513/hr_work_entry_attendance/models/hr_version.py#L191 An Expected Singleton Occurs. __ opw-6036064 Forward-Port-Of: odoo/enterprise#115828
This update corrects a previous issue where product manufacturing quantities were incorrectly based on planned amounts instead of actual production. Now, the system accurately reflects the quantity of products that have been actually produced, leading to more reliable inventory management and reporting. This ensures better data for decision-making regarding production and sales.
Original PR description
* Before: the manufactured quantity on product use the planned quantity * After: Use actual produced quantity 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#265114 Forward-Port-Of: odoo/odoo#261438
This update fixes an issue where multiple attachments to invoice emails sometimes used the same filename, leading to confusion. The change ensures that additional reports attached to invoices have unique filenames, preventing attachment conflicts and improving email reliability. This resolves a previous bug reported in related tickets.
Original PR description
Problem: When adding additional dynamic reports to the “Invoice: Send by Email” template, reports without a configured `print_report_name` incorrectly use the invoice filename. This is an issue because multiple attachments can have the same exact filename. Example from related ticket: the user attached timesheets to their template and both the invoice PDF and timesheet attachment used the same filename. Expected: The additional report should use its own fallback filename (ex: `timesheets_INV_XXX.pdf`) or its configured `print_report_name`. Actual: The additional report uses the invoice filename instead. To fix this, reports without `print_report_name` now fallback to: `<report name>_<invoice name>.pdf` as done in v18.0 Related Ticket: 6207518 and 6175376 Forward-Port-Of: odoo/odoo#264841
This update ensures customers receive email notifications when their 'Pick Up In Store' orders are confirmed. Previously, orders using this delivery method didn't trigger confirmation emails due to a technical issue with how the system handled partner subscriptions. This fix resolves the problem, improving customer communication and order tracking.
Original PR description
Customers placing an order without logging in and with the "Pick up in store" delivery method are not notified when the delivery is confirmed 1. Install eCommerce and Sales 2. Go to Settings >…
Customers placing an order without logging in and with the "Pick up in store" delivery method are not notified when the delivery is confirmed 1. Install eCommerce and Sales 2. Go to Settings > Website > Delivery and enable "Click & Collect" 3. Go to Settings > Inventory > Shipping and enable "Email Confirmation" 4. Go to Website > Configuration > Payment Providers and Install Demo 5. Go to Website > Configuration > Delivery Methods and open "Pick up in store", set YourCompany as warehouse and publish it 6. Go to Sales > Products, open product "Office Lamp", click on "Update Quantity" in the status bar and add 5 units 7. Log out 8. Go to the shop, add product "Office Lamp" to the cart and checkout 9. Fill in the address form and continue checkout 10. Select "Pick up in store" as delivery method and select a location 11. Confirm the order and pay with Demo 12. As user Mitchell Admin, go to Sales, remove the default filter and open the newly created sale order 13. Open the related delivery with the smart button and validate it 14. No delivery order confirmation was sent to the customer (check emails) Issue: Confirming an order with a "Pick up in store" delivery method replaces the `partner_shipping_id` of the sale order with an archived partner https://github.com/odoo/odoo/blob/d73e5662a0af7c549008661f743ba5d51f765339/addons/delivery/models/sale_order.py#L178-L192 which updates the `partner_id` of the related `stock.picking` with the archived partner https://github.com/odoo/odoo/blob/d73e5662a0af7c549008661f743ba5d51f765339/addons/sale_stock/models/sale_order.py#L130-L132 This will unsubscribe the old `partner_id` on the `stock.picking` and try to subscribe the archived partner https://github.com/odoo/odoo/blob/d73e5662a0af7c549008661f743ba5d51f765339/addons/stock/models/stock_picking.py#L1120-L1125 Because the partner we want to subscribe is archived, he will be filtered out and the subscribe action will have no effect, preventing him from receiving the delivery confirmation https://github.com/odoo/odoo/blob/d73e5662a0af7c549008661f743ba5d51f765339/addons/mail/models/mail_thread.py#L4367-L4369 Solution: Subscribe the parent of the archived partner when we write a `partner_id` on pickings with "in_store" `delivery_type`. This ensures the unarchived partner is subscribed to the picking allowing him to receive the mail confirmation. opw-6095396 Forward-Port-Of: odoo/odoo#265392 Forward-Port-Of: odoo/odoo#263005
This update resolves an issue where the timesheet timer wouldn't function when accessed from a subtask. The fix ensures the timer correctly opens and pre-fills with the subtask's project details, preventing a 'missing record' error. This improves the user experience for managing timesheets on complex projects.
Original PR description
**Problem:** Clicking the timesheet timer in the systray while viewing a subtask raises a MissingError, preventing the user from starting the timer. **Steps to reproduce:** 1. Open a project task…
**Problem:** Clicking the timesheet timer in the systray while viewing a subtask raises a MissingError, preventing the user from starting the timer. **Steps to reproduce:** 1. Open a project task that has subtasks 2. Click the subtasks smart button and open a subtask 3. Click the timesheet timer icon in the systray 4. Observe the "missing record" error **Current behavior:** The systray RPC fails with MissingError. **Expected behavior:** The timer opens, with the subtask's project and task prefilled. **Cause of the issue:** The frontend sends `currentState.active_id` regardless of the model it refers to. When the user navigates to a subtask via the smart button, `active_id` is the parent task's id. The systray controller then does `request.env['project.project'].browse(active_id)`, which returns a truthy recordset for an id that does not exist in `project_project`. Reading `.allow_timesheets` on that recordset triggers the DB fetch and raises MissingError. The same pattern exists in the `helpdesk_timesheet` override for both the `project.task` and `helpdesk.ticket` branches. **Fix:** Adding `.exists()` after the browse validates the recordset before any field access, so a stray `active_id` falls through to the task's own project (or ticket's project) instead of crashing. opw-6169548
This update optimizes how the Point of Sale system calculates prices, particularly when dealing with many product price lists. By streamlining the process, the system now responds faster and more efficiently, leading to a better user experience. This change focuses on internal performance improvements within the Odoo system.
Original PR description
The getPrice function in product_template_accounting.js was a performance bottleneck when using large pricelists. This commit introduces the following optimizations: 1. Pre-index pricelist rules by product_id and product_tmpl_id at load time in ProductPricelist. 2. Replace the sort() operation with a single-pass scan to find the best matching rule (highest min_quantity that satisfies the current quantity). 3. Apply sequential rule precedence (Variant → Template → General), stopping as soon as a valid rule is found. 4. Move rule mappings from uiState to direct properties in ProductPricelist to avoid useless reactivity. 5. Centralize rule selection logic in ProductPricelist for better responsibility separation. task-id: 5965826 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#244268
This update optimizes how Odoo handles changes to a partner's parent organization. Previously, updating a partner's parent could trigger unnecessary checks and updates, slowing down the process. This fix ensures these checks only happen when a true change to the parent ID occurs, resulting in faster updates and fewer errors.
Original PR description
When updating a partner's parent_id, ensure the VAT check and move line updates are only triggered if the parent_id actually changes. This prevents unnecessary validations and side effects when writing the same parent_id value. This fix improves performance and avoids spurious errors when updating partners via the API. task-[6214466](https://www.odoo.com/odoo/project.task/6214466) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#264175
This update corrects a bug where a negative payment through a POS order led to inaccurate 'Settle Due' amounts being displayed. The fix prevents negative values from being used in calculations, ensuring the correct outstanding balance is shown to customers.
Original PR description
When a customer paid off their account balance through a POS order, a negative pay_later amount was used. The condition `if order_due:` in `_compute_customer_due_total` evaluated to True for negative values, causing `customer_due_total` and `init_customer_due_total` to be set to a negative amount. This made `pos_orders_amount_due` on the partner go negative, which in turn inflated `remainingDue` in the frontend (remainingDue = totalDue - posOrdersAmountDue), showing a wrong amount in the "Settle due amount" button. opw-6187771 Forward-Port-Of: odoo/enterprise#116394