Daily updates from Odoo
Friday, April 24, 2026
156 changes
17 changes
Resolved issues and error corrections
This update fixes a bug that occurred when rescheduling work orders in the Gantt view. Specifically, the issue arose when dependent operations lacked start or end dates. The fix ensures that date comparisons are handled correctly, preventing a 'TypeError' and allowing for smooth rescheduling functionality.
Original PR description
Currently, an error occurs when rescheduling work orders in the Gantt view if a dependent operation has no start or end date. **Steps to Reproduce:** - Install the MRP module (with demo data). -…
Currently, an error occurs when rescheduling work orders in the Gantt view if a dependent operation has no start or end date. **Steps to Reproduce:** - Install the MRP module (with demo data). - Activate "**Custom Work Order Dependencies**". - Create a new MO for the _Drawer_ product with _SEC-ASSEM_ BoM. - Confirm and plan the MO. - Remove both start and end dates of any dependent operation. - Manufacturing > Planning > Work Orders > Gantt - Enable **Auto-Reschedule (Keep Buffer)** and reschedule the first operation (in 'Drill 1'). **Error:** `TypeError - '>' not supported between instances of 'bool' and 'datetime.datetime'` **Cause:** At [1], `date_start` and `date_finished` can both be set to False because a condition that bypasses the UserError when both dates are empty (unlike earlier versions). As a result, during rescheduling, a False value is compared with a datetime, leading to a TypeError at [2]. Fix: This commit adds a condition before date comparisons to ensure the dates are defined. [1]: https://github.com/odoo/odoo/blob/3f256437a7e6c124affca8d5304476a67375753f/addons/mrp/models/mrp_workorder.py#L281-L284 [2]: https://github.com/odoo/enterprise/blob/ef2efe113684104032d798b5aa237c67a3bc240a/web_gantt/models/models.py#L484-L491 sentry-7377739830 Forward-Port-Of: odoo/enterprise#112729
This update corrects a bug in how depreciation is calculated for companies with non-standard fiscal years (e.g., May-December). Previously, the system incorrectly skipped months during depreciation, leading to inaccurate asset valuations. The fix ensures accurate depreciation calculations for all fiscal year types.
Original PR description
When a company has a shortened fiscal year defined via account.fiscal.year (e.g. May-December), the depreciation board computation for degressive assets incorrectly computes the start of the next…
When a company has a shortened fiscal year defined via account.fiscal.year (e.g. May-December), the depreciation board computation for degressive assets incorrectly computes the start of the next fiscal year using `date_from + 1 year` instead of querying the actual next fiscal year. This causes entries for the months between the wrong and correct FY start (e.g. January-April) to be skipped entirely. Step to reproduce: - Create a company with a fiscal year starting in May (e.g. May 1st 2025 to 31st December 2025) - Create an asset with a start date in the 1 December 2025, with a 24 months duration and degressive method - Compute the board and observe that entries from January to April 2026 are missing Fix the FY boundary detection in _recompute_board to query the fiscal year containing the day after the current period end, revert the effective_start_date logic in _compute_board_amount that was masking the root cause, and move the prorata date clamping to _create_move_before_date where it is needed for disposal. opw-6016834 Forward-Port-Of: odoo/enterprise#113895 Forward-Port-Of: odoo/enterprise#113521
This update resolves an issue where users would encounter an error when trying to open unassigned opportunities linked to a team. The fix removes unnecessary whitespace from the context string used to open the opportunity, preventing a parsing error. This ensures a smoother experience for users managing unassigned leads.
Original PR description
Currently, an error occurs when user tries to open unassigned opportunities assigned to a team. Steps to replicate: - Install `crm` with demo. - Open `CRM > Sales > Teams` and click `Sales` team. -…
Currently, an error occurs when user tries to open unassigned opportunities assigned to a team.
Steps to replicate:
- Install `crm` with demo.
- Open `CRM > Sales > Teams` and click `Sales` team.
- Remove the `salesperson` from any lead, then return to `Teams` via breadcrumbs.
- On the kanban card for Sales, click “Unassigned Leads”.
Error:
```
File '/home/odoo/src/odoo/saas-19.2/addons/crm/models/crm_team.py', line 728, in action_open_unassigned_opportunities
context = self.env['crm.lead']._evaluate_context_from_action(action)
File '/home/odoo/src/odoo/saas-19.2/addons/crm/models/crm_lead.py', line 727, in _evaluate_context_from_action
return literal_eval(context_str)
File '/home/odoo/src/odoo/saas-19.2/odoo/_monkeypatches/ast.py', line 28, in literal_eval
return orig_literal_eval(expr)
File 'ast.py', line 66, in literal_eval
node_or_string = parse(node_or_string.lstrip(' \t'), mode='eval')
File 'ast.py', line 52, in parse
return compile(source, filename, mode, flags,
IndentationError: unexpected indent (<unknown>, line 8)
```
Cause:
- Error occurs after a recent [PR].
- As we called `literal_eval()` on the context string that we passed on to the `act_window` [1], it tries to parse the string using python like rules, the context is received as this:
```
"{\n 'search_default_team_id': [False],
\n'default_team_id': False,
\n'default_type': 'opportunity',
\n'default_user_id': 2,
\n'show_lead_gen_button': True
}\n "
^^^^^^^
```
- The extra whitespace/indentation (coming from the `act_window` context definition) makes the string invalid for strict parsing, causing `literal_eval()` to fail.
- Additionally, in the above given context string the `search_default_team_id` and `default_team_id`are both `False` because we called `_evaluate_context_from_action()` method on an empty recordset and when we try to [substitute] `active_id` with `self.id`(which is False because we dont have any record) we get another JS Error that is caused by not receiving any results for the search default on team.
Solution:
- Using `strip()` function removed the extra whitespaces.
- Passed the `team_id` through context (as we cant add new parameters to a function in stable) and assigned it in place of `active_id`.
[1]: https://github.com/odoo/odoo/blob/746ea418da2af2a6d36daea4dc544bdf3bc28495/addons/crm/views/crm_team_views.xml#L41-L48
[PR]: https://github.com/odoo/odoo/pull/240202/changes#diff-595d3dbbabdc4f766a380a320c1c1a43b143385bc7487c7275e80f76a9fbabc2R724
[substitute]: https://github.com/odoo/odoo/blob/e00dd21880c3c4e5c22d65567c700e02541f7259/addons/crm/models/crm_lead.py#L726
sentry-7404817458
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#259288This update fixes an issue where VAT reports were incorrectly using the company's VAT number instead of the fiscal position's foreign VAT ID. The change ensures that VAT reports accurately reflect the correct tax identification number for each country, improving tax reporting accuracy. This resolves a discrepancy impacting financial reporting.
Original PR description
### Issue: When a fiscal position defines a `foreign_vat`, tax reports generated for that country still use the company's VAT number instead For example, with a Belgian fiscal position using…
### Issue: When a fiscal position defines a `foreign_vat`, tax reports generated for that country still use the company's VAT number instead For example, with a Belgian fiscal position using `BE010203040`, the generated BE VAT report uses the company VAT instead of `010203040` ### Cause: The report generation did not check whether there is a fiscal position with a `foreign_vat` matching the country of the report ### Note: The example above uses a Belgian fiscal position to reproduce the issue Starting from 19.0, this specific flow is blocked because Intervat is enabled in production mode by default A related fix makes the Intervat settings available in that case Until then, the issue can be reproduced by temporarily commenting out: https://github.com/odoo/enterprise/blob/5fb58a9b7b3ae89f87e84d4ba1fa3a16237d80ac/l10n_be_intervat/models/account_return.py#L15 ### Steps to reproduce: - Disable demo data and install `accountant` - Create a Fiscal Position "Belgium" (Country: Belgium, Foreign Tax ID: BE010203040) - Click the alert to install the Belgian taxes - Create and confirm an invoice for a Belgian customer: - Fiscal Position: Belgium - Any product with a Belgian tax - Invoice Date: 01/01/2026 - Open the Tax Report and select `VAT Return (BE)` for January - Click `Returns` and select the full year - Mark the December return as Completed from the three-dot menu - Review January and fill the missing company data (TIN: 1111111, phone and email) - Click `Validate -> Lock -> Submit` ### Before the fix: The generated XML uses the company VAT number (`1111111`) instead of the fiscal position foreign VAT (`010203040`). opw-6076540 Forward-Port-Of: odoo/enterprise#112610
This update addresses a critical issue where Odoo would crash when attempting to download a URL document alongside a spreadsheet. The fix ensures stable downloads of combined documents, improving user experience and preventing data loss. This resolves a reported bug impacting users accessing and sharing documents.
Original PR description
Try to download a url document along with a spreadsheet. `onDownload` crash when trying to download a url document. Task: 5485662 Forward-Port-Of: odoo/enterprise#113645 Forward-Port-Of: odoo/enterprise#112513
This update corrects an issue where E-invoice filenames weren't being properly recorded during the import process from SDI documents. Previously, this caused problems when exporting invoices, as the system couldn't find the associated file. This change ensures the correct filename is now stored, resolving potential export errors and maintaining data integrity.
Original PR description
PR #212726 removed a Many2One field and replaced it with an existing binary field (`l10n_it_edi_attachment_file`) and a new Char field (`l10n_it_edi_attachment_name`) to store E-invoice files as…
PR #212726 removed a Many2One field and replaced it with an existing binary field (`l10n_it_edi_attachment_file`) and a new Char field (`l10n_it_edi_attachment_name`) to store E-invoice files as XMLs. This change was made for security reasons. This pre-existing binary field was already used for importing SDI documents, which caused errors resolved in PR #252806. The new char field was not set during the SDI import process in PR #212726. This can cause errors when exporting invoice documents, as our code sees content in the binary field and expects the name to also be present. See [`_get_invoice_legal_documents()`](https://github.com/odoo/odoo/blob/f48f221c91b8d123bcaf1c4d8ed6c7dfba763ae6/addons/l10n_it_edi/models/account_move.py#L411). This commit ensures that the name of an imported SDI document is set in the move's `l10n_it_edi_attachment_name` field. opw-6023263 [link](https://www.odoo.com/odoo/my-tasks/6023263) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#258882 Forward-Port-Of: odoo/odoo#257586
This update resolves an issue where the Odoo system couldn't correctly handle the Turkey timezone after a recent software update. The fix adds a fallback mechanism to ensure accurate timezone calculations, preventing errors during database upgrades. This ensures proper event scheduling and data processing.
Original PR description
**[FIX] handle Turkey timezone when tzdata-legacy not installed** In #236660 we switched from pytz to zoneinfo. The library `pytz` has `Turkey` in **pytz.all_timezones_set**. On the other hand…
**[FIX] handle Turkey timezone when tzdata-legacy not installed**
In #236660 we switched from pytz to zoneinfo.
The library `pytz` has `Turkey` in **pytz.all_timezones_set**.
On the other hand starting from ubuntu 24.04 as tzdata was split and `Turkey` was [moved](https://documentation.ubuntu.com/release-notes/24.04/#tzdata-package-split) out of tzdata to tzdata-legacy.
If we run a db which has reference to `Turkey` timezone, on a server which is ubuntu 24.04 and tzdata-legacy not installed, we will get an error as we did not have fallback for `Turkey` while we have for `Türkiye`. Because zoneinfo will not have `Turkey` in `zoneinfo.available_timezones()`
Issue was discovered during upgrade of db which has res.partners with timezone=`Turkey` from 19.0 to saas~19.1. The upgrading docker container was nobel and it did not have tzdata-legacy.
For fixing the issue we added fallback for `Turkey`.
Tbh I do not think we need a fallback for `Türkiye` but I wanted to not change the old behaviour.
###
**[FIX] handle America/{Catamarca,Godthab} timezones**
As we moved from `pytz` to `zoneinfo` in **saas~19.1**
we have 2 more timezones which were existing in `pytz`
but not in `tzdata` adn we do not have fallback for them.
They are in `tzdata-legacy`:
- America/Catamarca
- America/Godthab
We added fallback for them.
We already have a failing upgrade request because of
America/Catamarca.
Turkey:
```
File "/home/odoo/src/odoo/saas-19.1/addons/calendar/models/calendar_event.py", line 742, in _compute_field_value
return super()._compute_field_value(field)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/odoo/src/odoo/saas-19.1/addons/mail/models/mail_thread.py", line 495, in _compute_field_value
return super()._compute_field_value(field)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/odoo/src/odoo/saas-19.1/odoo/orm/models.py", line 4271, in _compute_field_value
determine(field.compute, self)
File "/home/odoo/src/odoo/saas-19.1/odoo/orm/fields.py", line 83, in determine
return needle(*args)
^^^^^^^^^^^^^
File "/home/odoo/src/odoo/saas-19.1/addons/calendar/models/calendar_event.py", line 503, in _compute_recurrence
event_values = event._get_recurrence_params()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/odoo/src/odoo/saas-19.1/addons/calendar/models/calendar_event.py", line 1341, in _get_recurrence_params
event_date = self._get_start_date()
^^^^^^^^^^^^^^^^^^^^^^
File "/home/odoo/src/odoo/saas-19.1/addons/calendar/models/calendar_event.py", line 1573, in _get_start_date
return start.replace(tzinfo=UTC).astimezone(ZoneInfo(self.event_tz)).date()
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/odoo/src/odoo/saas-19.1/odoo/_monkeypatches/zoneinfo.py", line 130, in __new__
z = super().__new__(cls, key)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/zoneinfo/_common.py", line 24, in load_tzdata
raise ZoneInfoNotFoundError(f"No time zone found with key {key}")
zoneinfo._common.ZoneInfoNotFoundError: 'No time zone found with key Turkey'
```
Catamarca:
```
Traceback (most recent call last):
File "/tmp/tmpm0v0h90i/migrations/base/tests/test_mock_crawl.py", line 335, in crawl_menu
self.mock_action(action_vals)
File "/tmp/tmpm0v0h90i/migrations/base/tests/test_mock_crawl.py", line 348, in mock_action
return self.mock_act_window(action)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/tmpm0v0h90i/migrations/base/tests/test_mock_crawl.py", line 508, in mock_act_window
mock_method(model, view, fields_list, domain, group_by)
File "/tmp/tmpm0v0h90i/migrations/base/tests/test_mock_crawl.py", line 541, in mock_view_form
[data] = record.read(fields_list)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/odoo/src/odoo/saas-19.1/odoo/orm/models.py", line 2735, in read
self._origin.fetch(fields)
File "/home/odoo/src/odoo/saas-19.1/odoo/orm/models.py", line 3067, in fetch
fetched.mapped(field_name)
File "/home/odoo/src/odoo/saas-19.1/odoo/orm/models.py", line 5479, in mapped
return [getter(record) for record in records]
^^^^^^^^^^^^^^
File "/home/odoo/src/odoo/saas-19.1/odoo/orm/fields.py", line 1794, in __get__
self.compute_value(recs)
File "/home/odoo/src/odoo/saas-19.1/odoo/orm/fields.py", line 1965, in compute_value
records._compute_field_value(self)
File "/home/odoo/src/odoo/saas-19.1/odoo/orm/models.py", line 4271, in _compute_field_value
determine(field.compute, self)
File "/home/odoo/src/odoo/saas-19.1/odoo/orm/fields.py", line 83, in determine
return needle(*args)
^^^^^^^^^^^^^
File "/home/odoo/src/odoo/saas-19.1/odoo/addons/base/models/res_users.py", line 455, in _compute_tz_offset
user.tz_offset = datetime.datetime.now(ZoneInfo(user.tz or 'UTC')).strftime('%z')
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/odoo/src/odoo/saas-19.1/odoo/_monkeypatches/zoneinfo.py", line 130, in __new__
z = super().__new__(cls, key)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/zoneinfo/_common.py", line 24, in load_tzdata
raise ZoneInfoNotFoundError(f"No time zone found with key {key}")
zoneinfo._common.ZoneInfoNotFoundError: 'No time zone found with key America/Catamarca'
```
tbg-2529
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#256821This update resolves a bug where deleting a button within the HTML editor would unexpectedly remove the entire editor. The fix ensures that after deleting a button, the editor correctly clears the block and adds a line break, preventing the editor from being removed entirely. This improves the user experience and stability of the HTML editor.
Original PR description
### Steps to reproduce: - Create a button, set its URL to #, and click Apply. - Place the cursor right after the link. - Press Backspace until the button/link is removed. - Entire editor also gets…
### Steps to reproduce: - Create a button, set its URL to #, and click Apply. - Place the cursor right after the link. - Press Backspace until the button/link is removed. - Entire editor also gets removed. ### In previous version: - Issue is due to [1](https://github.com/odoo/odoo/commit/7685e562b1036d08724ba91ed5064b6fe20c2ce2 ) change in `isEmptyBlock` (because of `isButton`). - When we had `<a>#[]</a>` and pressed backspace, `deleteRange` was called. - Then `fillShrunkBlocks` ran and `isEmptyBlock` returned true (no isButton). - So `<br>` was added and block never became fully empty. ### In current version: - Because of `isButton` condition, some empty blocks are not treated as empty. - So `<br>` is not added & block stays actually empty. Then `removeFEFF` runs & `nodeSize` becomes false & `cleanEmptyAncestors` removes parent even editable. ### After this PR: - Case like `<a>[]</a>`, backspace is handled by override which directly removes `<a>`. Since this skips `deleteRange`, manually call `fillShrunkBlocks` there. - Now after removing `<a>`, block is properly detected as empty and `<br>` gets added. task-6109145 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#259055
A recent update to receipt printing caused fiscal data for Swedish blackbox receipts to disappear. This fix corrects the receipt template and data generation process, ensuring that all required fiscal information is now correctly printed on Swedish receipts, both in the frontend and backend.
Original PR description
Since the receipt printing refactor that allowed printing receipts from either the frontend or backend, the fiscal data for Swedish blackbox receipts has been broken. In the frontend, the receipt prints but the blackbox data is missing from the footer. In the backend, attempting to print the receipt gives a 500 error. This commit fixes both these issues by correcting the receipt template and data generation. Community - https://github.com/odoo/odoo/pull/260587 Forward-Port-Of: odoo/enterprise#114579
This update corrects a reporting error that incorrectly showed planned hours on public holiday days. The fix ensures that public holidays, regardless of their calendar association, are accurately excluded from time sheet forecasts, resolving inconsistencies in reporting. This improves the accuracy of time tracking data.
Original PR description
### Steps to reproduce: - Install project_timesheet_forecast module - Configure your database to have a far timezone (Montevideo/Uruguay in my case) - Create a public holiday starts from 12AM to…
### Steps to reproduce: - Install project_timesheet_forecast module - Configure your database to have a far timezone (Montevideo/Uruguay in my case) - Create a public holiday starts from 12AM to 11:59PM with a calendar - Create a planning slot for a resource that overlap with the public holiday - Check the Timesheets / Planning analysis report - Group by employees > day **- Check the date of the public holiday and notice there are still planned hours shown** - Remove the calendar from the public holidays that we created previously - Check the report once again **- Notice the day of the public holiday and the day after has no planned hours** ### Cause: In the query we are using to exclude the leave days from the report we only exclude the ones that has calendar_id assigned, not taking into consideration that some of the public holiday are general and is not applied to just one working schedule. Also if we have a leave starting midnight to 11:59PM since we store dates in database as UTC for timezone like Uruguay's one it will shift the end with one day which will introduce inconsistencies ### Fix: We check if the calendar_id is null on the resource_calendar_leaves and make sure we take timezone of the resource into account when checking the dates of the leaves. opw-5027070 Forward-Port-Of: odoo/enterprise#114757 Forward-Port-Of: odoo/enterprise#111846
This fix resolves an issue where updating a manufacturing order (MO) after changing a product's design or variant could cause a system error. The change prevents users from making these updates to confirmed MOs, ensuring accurate material reservations and preventing potential operational disruptions. This improves stability and avoids data inconsistencies.
Original PR description
Currently, an error occurs if a user changes the product in a BoM, updates the manufacturing order (MO) based on that BoM, and then attempts to unbuild the order. ## Steps to replicate: - Install…
Currently, an error occurs if a user changes the product in a BoM, updates the manufacturing order (MO) based on that BoM, and then attempts to unbuild the order.
## Steps to replicate:
- Install Manufacturing without demo data
- Settings > Enable Variants
- Create the following products:
- Car with (Red and Blue Color attributes)
- Red Paint
- Create a BoM for Car and product variant set to Red Car and have Red paint as the component.
- Create and Confirm manufacturing order for Red Car
- Click on Bill of Material > Set Paint required to 2 > Save
- Set product variant in BoM to Blue and save again.
- Go back to MO > Update BoM > Produce All
- Unbuild qty 1 > Confirm
## Observed Behavior:
ZeroDivisionError: float division by zero
## Root cause:
This issue occurs because the Update BoM button remains visible on the Manufacturing Order (MO) even after the product has been changed.
The problem starts when a user initially updates the required paint quantity from 1 to 2. At that point, the function [1] marks the BoM as outdated for all linked MOs, which makes the Update BoM button appear. However, if the user later changes the product template or variant, the BoM is still considered outdated. This incorrectly allows the user to update the MO using a BoM that no longer matches the selected product.
**Why this causes a traceback when unbuilding?**
When the user clicks Update BoM, it triggers the `action_update_bom function` [2], which calls `_link_bom`. This process recomputes several fields to align the MO with the updated BoM. One of the methods triggered during this recomputation is `_compute_move_finished_ids` [3]. Since the production is already confirmed, the logic skips adding the production to `production_with_move_finished_ids_to_unlink_ids`, meaning no new finished moves are created for that updated product.
As a result, although the MO is updated, its finished product (`move_finished_ids.product_id`) still refers to the original product (for example, Red Car), instead of the newly selected one.
Later, when the user attempts to unbuild the product, the `action_unbuild` function [4] is executed, which calls `_generate_consume_moves` [5] During this step, the system tries to compute a factor that depends on `unbuild.mo_id.quantity_produced`.
However, because the finished moves still reference the old product and do not match the MO’s current product, the computed total becomes zero at [6] This leads to a division by zero error at [5], which ultimately causes the traceback.
[1]:
https://github.com/odoo/odoo/blob/444de5354dcd70e9160a985486317a8912d53a84/addons/mrp/models/mrp_bom.py#L432-L447 [2]:
https://github.com/odoo/odoo/blob/444de5354dcd70e9160a985486317a8912d53a84/addons/mrp/models/mrp_production.py#L1044-L1048 [3]:
https://github.com/odoo/odoo/blob/444de5354dcd70e9160a985486317a8912d53a84/addons/mrp/models/mrp_production.py#L771-L800
[4]:
https://github.com/odoo/odoo/blob/97b60952d59a57aba12b048cb4da4f41d85d2ea2/addons/mrp/models/mrp_unbuild.py#L153-L164
[5]:
https://github.com/odoo/odoo/blob/444de5354dcd70e9160a985486317a8912d53a84/addons/mrp/models/mrp_unbuild.py#L225-L232 [6]:
https://github.com/odoo/odoo/blob/444de5354dcd70e9160a985486317a8912d53a84/addons/mrp/models/mrp_production.py#L641-L647
## Solution:
This change prevents users from updating a Bill of Materials (BoM) after the main product or its template has been modified, by ensuring the BoM is not marked as outdated.
This approach make sense because, once a manufacturing order (MO) is confirmed, all raw materials are physically reserved before production begins. While it makes sense to update BoM components in response to an Engineering Change Order (ECO) or last-minute specification changes, it does not make sense to allow changes to the final product itself on existing confirmed MOs. Doing so could lead to operational errors, since materials have already been procured and reserved for a specific product.
This fix ensures that if the product variant or product template is updated in the BoM, users cannot update the MO based on that BoM. This also prevents potential divide-by-zero errors when attempting to unbuild the product in the MO.
Reference commit which also suggests this behavior for the `Update BoM` button: [commit](https://github.com/odoo/odoo/commit/d7392829c769ef50456a7bc93d4482072b329463#:~:text=An%20exception%20however%3A%20if%20the%20MO%20is%20confirmed%20and%20the%20BoM%27s%20product%20was%0Achanged%2C%20the%20MO%20shouldn%27t%20have%20the%20%22Update%20BoM%22%20button%20displayed.%0AOtherwise%2C%20it%20would%20change%20the%20finished%20product%20of%20a%20confirmed%20MO.)
opw-6044754
Forward-Port-Of: odoo/odoo#260639
Forward-Port-Of: odoo/odoo#255981This update addresses an issue where the delivery confirmation email wasn't being sent correctly due to missing tracking information from Easypost. The fix prevents errors when tracking data is unavailable, ensuring accurate picking validation and correct shipping creation in Easypost. Easypost support suggested a slight delay between order placement and data retrieval as a potential workaround.
Original PR description
Problem: 'tracker' object in response from GET /orders/:id request can sometimes be null. This means that when the mail template 'mail_template_data_delivery_confirmation' is sent, a traceback occurs…
Problem: 'tracker' object in response from GET /orders/:id request can sometimes be null. This means that when the mail template 'mail_template_data_delivery_confirmation' is sent, a traceback occurs with error: TypeError: 'NoneType' object is not subscriptable. As a result the picking is not validated in odoo but a shipping has succesfully been created in the easypost backend. Solution: Prevent traceback form happening, picking gets correctly validated and carrier_tracking_url field is empty. Transcript from Easypost support: << I'm also seeing the tracker showing as null when reviewing the response. I'll go ahead and create a ticket for the engineering team to investigate. I can see that the tracking code is being returned in the request, but the full tracking object is not. Since this appears to be happening on a case-by-case basis, you may want to allow more time between the BUY and the GET requests, as I noticed they are being triggered very close together. I'm not certain if that's related, but it may be worth trying as a troubleshooting step while we have this under review. >> opw-5402415 Forward-Port-Of: odoo/enterprise#113231 Forward-Port-Of: odoo/enterprise#111833
This update fixes an issue where taxes automatically replacing themselves were being hidden from account move reports. The change ensures that all relevant taxes, including those that self-replace, are accurately displayed, improving financial reporting accuracy. This ensures compliance and provides a more complete view of financial transactions.
Original PR description
If a tax replaces itself, it's not redundant and must appear on account moves. This commit solves this issue by including self-replacing taxes in the name_search. task-6147767 Forward-Port-Of: odoo/odoo#261044 Forward-Port-Of: odoo/odoo#260616
This update ensures that links within documents added through the website builder's 'replace media' feature are correctly translated. Previously, a different upload process didn't apply the necessary translation, leading to broken links. This change corrects this issue, improving the functionality of the website builder.
Original PR description
[FIX] website: translate links inline on media replacement On the website builder, files added through the `/file` command would go through the domPlugin `insert` method, which would call…
[FIX] website: translate links inline on media replacement
On the website builder, files added through the `/file` command would go
through the domPlugin `insert` method, which would call
`before_insert_processors` and apply `.o_translate_inline` as expected.
But there is another flow to add a document on the page: replace an
image (or video, or icon), then select the "Documents" tab and upload
a file. With this flow, `insert` is not called, so we have to add the
class through some other resource.
[FIX] html_editor: target documents with right class
The class `.o_image` was still associated with documents (in the context
of the file selector) and the expected tag of a document was `A`, in
spite of it not being true in `html_editor` since the introduction of
the file box in [1].
This has also been updated in the website builder since the introduction
of the `html_builder` module in 18.4, which swapped uses of `web_editor`
components for `html_editor`.
As a side-effect, in website, a double click on a file did not open the
media dialog on the "document" tab, unlike other media (images, videos,
icons). In such a case, the file was also not shown as already selected
in the media dialog (because it targetted the wrong tag name). Both of
those behaviors were lost as we used the new file box design in 18.4.
[1]: https://github.com/odoo/odoo/commit/7f9afa21dffba2f74f9fb8a68809db4af6c7c225
task-5876278
Forward-Port-Of: odoo/odoo#261015
Forward-Port-Of: odoo/odoo#245904This update fixes an issue where the forecast report incorrectly grouped purchase orders with different receipt dates for the same product. The fix ensures that each unique receipt date is accurately reflected in the forecast details, providing a more precise view of inventory availability. This improves the reliability of inventory planning.
Original PR description
If you make a purchase order with 2 quantity of the same product, and set 2 different receipt date. The forecast report details would incorrectly group them as the same line. Steps to reproduce: ------------------- * Create a purchase order * Add 2 lines with the same product * Change the receipt date for one of the 2 lines * Go to the forecast report of the product > Observation: In the forecast details there is only one line for the first receipt date. Why the fix: ------------ We add a condition in the `_sameDocument` function to check that the 2 documents being compared have the same receipt date opw-5361583 Forward-Port-Of: odoo/odoo#254170
This update resolves an issue where the original product name was incorrectly prepended to product descriptions on invoices and RFQs when editing. The fix ensures that only translated names and descriptions are displayed, improving invoice clarity and accuracy for users working with multiple languages. This change impacts invoicing and purchasing workflows.
Original PR description
Steps to reproduce: 1- Install invoicing app 2- Add French language in the settings 3- Create a customer with language set as French 4- Create a product and define french translations of the name and…
Steps to reproduce: 1- Install invoicing app 2- Add French language in the settings 3- Create a customer with language set as French 4- Create a product and define french translations of the name and the description in Sales tab 5- Create an invoice for that customer and choose the product you created 6- You will find the translated product name and description under the product name 7- Edit the description, save and preview the invoice 8- The invoice line will contain [Product Name EN] [Product Name FR] [Product Description FR] Description of the issue: When creating an invoice for a customer whose language differs from the user's account language, manually editing the product description on an invoice line causes the original product name to be prepended to the description. The same issue happens in a RFQ in Purchase. Expected behaviour: User can edit the product description in the invoice line and the output in the invoice should only be the translated name and description, without the original product name. Why this happens? 1- When the product is selected in the invoice line, the label is loaded from _compute_name method in account_move_line, which holds the translated name and description. 2- After editing the description and escaping the field (clicking outside it), the parseLabel method is called, which prepends the original name to the label, making the invoice output as [original name] [translated name] [translated desc.] Fix: Use the product name returned in the label for trimming and concatenation to handle both original/translated text scenarios. References: original PR: #248401 partial revert: #254158 opw-5480494 Forward-Port-Of: odoo/odoo#256837
This update fixes an issue where self-billed invoices received through Peppol were sometimes incorrectly assigned to the wrong company within a multi-company database. The system has been updated to accurately filter invoices based on the current company's details, ensuring correct accounting and reporting. This improves the reliability of Peppol invoice processing.
Original PR description
Currently, if a database has multiple companies registered on Peppol, receiving a self-billed invoice may assign it to the wrong company. The system was searching the journal using a domain that included all companies (in self), instead of filtering by the correct current company. Steps to reproduce: - Create a database with 2 companies, both on Peppol - Receive a self-billed invoice from a random other company on Peppol - The received invoice will potentially be assigned to the wrong company This is only a test forward-port of #257380 opw-6045669 Forward-Port-Of: odoo/odoo#259524 Forward-Port-Of: odoo/odoo#259072
26 changes
Resolved issues and error corrections
This update resolves a problem where confirming deliveries for kit products would trigger errors. The fix prevents unnecessary move explosions during delivery validation, ensuring deliveries can be confirmed smoothly. This prevents potential issues with stock valuation.
Original PR description
**Issue**: Making a product a kit could prevent confirming deliveries. **Steps to reproduce**: - Make sure the account application is installed - Create a product P without kit - Create a SO and…
**Issue**: Making a product a kit could prevent confirming deliveries. **Steps to reproduce**: - Make sure the account application is installed - Create a product P without kit - Create a SO and confirm it - Make the product P a kit - Validate the delivery associated to the SO -> A traceback occurs: the record does not exist anymore **Cause**: While confirming the delivery: https://github.com/odoo/odoo/blob/a253cff9039fcf729a9922b119acad5ec7c7a0bd/addons/stock_account/models/stock_move.py#L168 It first filters which moves are out (`moves_out`). On the move associated with product P, since the kit is not exploded yet: https://github.com/odoo/odoo/blob/a253cff9039fcf729a9922b119acad5ec7c7a0bd/addons/stock_account/models/stock_move.py#L172 Then explodes the kit: https://github.com/odoo/odoo/blob/a253cff9039fcf729a9922b119acad5ec7c7a0bd/addons/stock_account/models/stock_move.py#L174 https://github.com/odoo/odoo/blob/ea18f34a48d61350f80c79894bef66bf02840bfc/addons/mrp/models/stock_move.py#L357-L361 By doing so, the original move associated to the product P are deleted: https://github.com/odoo/odoo/blob/ea18f34a48d61350f80c79894bef66bf02840bfc/addons/mrp/models/stock_move.py#L399 Thus, `moves_out` contains moves that no longer exist, and eventually, and eventually while accessing `product_id`: https://github.com/odoo/odoo/blob/a253cff9039fcf729a9922b119acad5ec7c7a0bd/addons/stock_account/models/stock_move.py#L179 A traceback is thrown **Aditionnal information** Validating a delivery of a kit product whose moves were not exploded will trigger their explosion and require a second validation. Therefore, no stock valuation errors will be created. opw-6063602 Forward-Port-Of: odoo/odoo#258403
This update fixes an issue where invoices generated from KSeF bills weren't correctly processing gross unit prices. The system now supports both net and gross unit price reporting from vendors, ensuring accurate invoice generation and compliance with Polish tax regulations. This prevents incorrect invoices and potential financial discrepancies.
Original PR description
**PROBLEM** When receiving bills from KSeF, we don't handle gross unit price and default to a price_unit of 0.0. Leading to an incorrect invoice. When generating the bill, the vendor can choose to report the net unit price (P_9A) or gross unit price (P_9B). We need to handle both cases. opw-6066027 Forward-Port-Of: odoo/odoo#260314
This update resolves a bug in the overtime calculation process for employees with specific attendance records. The fix ensures that overtime calculations are accurate, particularly when employees' attendance times involve midnight transitions. This prevents errors and ensures correct overtime payments.
Original PR description
**Context** - "Absence Management" is enabled in the database settings - Employee has an overtime ruleset selected in their employee settings - That overtime ruleset has a rule with a non-zero `expected_hours` - That employee has 1 or more attendance records that start or end at midnight in their timezone. **Before this commit** When updating overtime records, either via the "Regenerate overtimes" button on the overtime rule, or by simply creating a new attendance record, we'll end up passing around an intervals object that contains no intervals. Then, when we later assume this object will have at least one element, we crash. **After this commit** Guarantee that intervals objects are populated before assuming they are. Further, we remove the opportunity to create an empty intervals object that was exposing this bug. opw-6035270 Forward-Port-Of: odoo/odoo#260772 Forward-Port-Of: odoo/odoo#257986
This update resolves a reporting discrepancy where planned hours were incorrectly shown for public holidays. The fix ensures the system accurately excludes public holidays, regardless of whether they're linked to a specific calendar, and accounts for timezone differences to prevent date shifting issues. This improves the accuracy of timesheet forecasts.
Original PR description
### Steps to reproduce: - Install project_timesheet_forecast module - Configure your database to have a far timezone (Montevideo/Uruguay in my case) - Create a public holiday starts from 12AM to…
### Steps to reproduce: - Install project_timesheet_forecast module - Configure your database to have a far timezone (Montevideo/Uruguay in my case) - Create a public holiday starts from 12AM to 11:59PM with a calendar - Create a planning slot for a resource that overlap with the public holiday - Check the Timesheets / Planning analysis report - Group by employees > day **- Check the date of the public holiday and notice there are still planned hours shown** - Remove the calendar from the public holidays that we created previously - Check the report once again **- Notice the day of the public holiday and the day after has no planned hours** ### Cause: In the query we are using to exclude the leave days from the report we only exclude the ones that has calendar_id assigned, not taking into consideration that some of the public holiday are general and is not applied to just one working schedule. Also if we have a leave starting midnight to 11:59PM since we store dates in database as UTC for timezone like Uruguay's one it will shift the end with one day which will introduce inconsistencies ### Fix: We check if the calendar_id is null on the resource_calendar_leaves and make sure we take timezone of the resource into account when checking the dates of the leaves. opw-5027070 Forward-Port-Of: odoo/enterprise#111846
This update ensures that links within documents added to the website builder – whether through the `/file` command or replacing media like images – are correctly translated inline. Previously, a different upload process didn't apply the necessary translation, leading to broken links. This fix resolves this inconsistency and improves the user experience for adding and managing documents on the website.
Original PR description
[FIX] website: translate links inline on media replacement On the website builder, files added through the `/file` command would go through the domPlugin `insert` method, which would call…
[FIX] website: translate links inline on media replacement
On the website builder, files added through the `/file` command would go
through the domPlugin `insert` method, which would call
`before_insert_processors` and apply `.o_translate_inline` as expected.
But there is another flow to add a document on the page: replace an
image (or video, or icon), then select the "Documents" tab and upload
a file. With this flow, `insert` is not called, so we have to add the
class through some other resource.
[FIX] html_editor: target documents with right class
The class `.o_image` was still associated with documents (in the context
of the file selector) and the expected tag of a document was `A`, in
spite of it not being true in `html_editor` since the introduction of
the file box in [1].
This has also been updated in the website builder since the introduction
of the `html_builder` module in 18.4, which swapped uses of `web_editor`
components for `html_editor`.
As a side-effect, in website, a double click on a file did not open the
media dialog on the "document" tab, unlike other media (images, videos,
icons). In such a case, the file was also not shown as already selected
in the media dialog (because it targetted the wrong tag name). Both of
those behaviors were lost as we used the new file box design in 18.4.
[1]: https://github.com/odoo/odoo/commit/7f9afa21dffba2f74f9fb8a68809db4af6c7c225
task-5876278
Forward-Port-Of: odoo/odoo#259840
Forward-Port-Of: odoo/odoo#245904This update fixes a bug where the shipping address wasn't appearing on Purchase Order (PO) and Request for Quotation (RFQ) reports. The change involves updating how address information is passed within the Odoo reporting system, ensuring that customer shipping details are now correctly displayed. This improves the accuracy of purchase order data.
Original PR description
Version: ---------- - saas-19.2+ Steps to reproduce: ---------------------- 1. Install `stock_dropshipping` and `sale_management` modules. 2. Create a Customer (res.partner) with a proper address…
Version:
----------
- saas-19.2+
Steps to reproduce:
----------------------
1. Install `stock_dropshipping` and `sale_management` modules.
2. Create a Customer (res.partner) with a proper address block.
3. Create a dropship product (route: Dropship).
4. Create a Sales Order for the created customer.
5. Add the dropship product.
6. Confirm the Sales Order to generate a Purchase Order.
7. Open the generated PO/RFQ and print the report.
Issue:
------
The shipping address is missing in the printed PO/RFQ report.
Cause:
--------
The `t-call` syntax is updated to use the new semantic, which passes
values *as attributes/parameters* on the `<t>` (with `t-call`) tag itself,
instead of relying on nested `t-set` directive.
- Old (Deprecated): Used nested `<t t-set='var_name' t-value='x'/>` tags
inside the calling element to define variables.
- New: Variables are passed as attributes directly on the element where
the `t-call` is located (e.g., `<t t-call='module.template' var_name='x'/>`).
A warning is added to alert developers when using the old deprecated
syntax.
see Reference: https://github.com/odoo/odoo/pull/197296
<details>
<summary>Click here to see the results:</summary>
<p><strong>Before:</strong></p>
<div class="image-row">
<img src="https://github.com/user-attachments/assets/c6892b30-10d6-4fb4-881c-1433d4fe07a0" />
</div>
<p><strong>After:</strong></p>
<div class="image-row">
<img src="https://github.com/user-attachments/assets/6109fcc3-5773-44a8-b07b-6566ed855d3f" />
</div>
</details>
> NOTE: We can also move test into `purchase_stock`
----
opw-6075017
---
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-prThis update fixes a confusing issue for Mexican employees receiving payslips. Previously, an unstamped payslip was emailed immediately after batch confirmation, followed by a second email with the stamped version. Now, the email is only sent when the CFDI (tax document) is generated, ensuring employees receive the correct, fully stamped payslip.
Original PR description
Currently, when a user confirms a payslip batch (hr.payslip.run), the base payroll module queues the PDF generation and sends an email to the employee with their payslip immediately. For Mexican payslips, this means the employee receives the email with an unstamped payslip (without CFDI UUID). Later, when the CFDI is generated, a second email is sent with the stamped version, confusing the employee. This commit prevents the email from being sent for Mexican payslips if the CFDI has not been generated yet, ensuring only the stamped payslip is emailed. Forward-Port-Of: odoo/enterprise#114731
This update fixes an issue where the unit cost of tracked products with consigned quantities was incorrectly calculated. The change ensures that consigned quantities are excluded from the unit cost calculation, resulting in accurate valuation for products with partial ownership. This improves inventory reporting accuracy.
Original PR description
edit : the issue was fixed by https://github.com/odoo/odoo/pull/257103 So this commit only contains these use cases tests **Steps to reproduce:** - enable consignement setting - create a tracked avco…
edit : the issue was fixed by https://github.com/odoo/odoo/pull/257103 So this commit only contains these use cases tests **Steps to reproduce:** - enable consignement setting - create a tracked avco product with a cost of 10 - click on the quantities smart button and then "update quantity" to open the quants view - create one line with a quantity of 1 and no owner - create one line with a quantity of 1 and an owner outside the company **Current behavior:** problem A: open the 'stock' view and look for your product, the unit cost is 5 problem B: navigate back to the quants view of the product, unhide the value column, the value is 5 for the non consigned quant **Expected behavior:** problem A: the unit cost should be 10 (because consigned product shouldn't be taken into account when computing the unit cost) problem B: the non consigned quant value should be 10 for the same reason **Cause of the issue:** problem A: Inside _compute_value(), to compute total_value_by_company_id, we use _with_valuation_context() https://github.com/odoo/odoo/blob/6c107cd70e2228d3428e53cf8095aba17f678d8a/addons/stock_account/models/product.py#L196-L203 which excludes consigned products https://github.com/odoo/odoo/blob/6c107cd70e2228d3428e53cf8095aba17f678d8a/addons/stock_account/models/product.py#L362-L364 So when we iterate through 'products' and fetch qty_available for our product the value is going to be 1. But when computing avg_cost at the end of the method, we iterate through 'self', so we don't have this context anymore and the value of qty_available is 2. https://github.com/odoo/odoo/blob/6c107cd70e2228d3428e53cf8095aba17f678d8a/addons/stock_account/models/product.py#L271-L273 That's because qty_available is computed with _compute_quantities() which depends on context (including owner_id) https://github.com/odoo/odoo/blob/53f7d1dd2f972921ba91f6083a49f50749a3f503/addons/stock/models/product.py#L148-L152 problem B: when computing the value of the quant, there is no context specifying that the consigned quantities should be excluded https://github.com/odoo/odoo/blob/53f7d1dd2f972921ba91f6083a49f50749a3f503/addons/stock_account/models/stock_quant.py#L61-L62 opw-6049413 Forward-Port-Of: odoo/odoo#257013
This update fixes an issue where VAT reports incorrectly used the company's VAT number instead of the fiscal position's foreign VAT ID. The change ensures that VAT reports accurately reflect the correct tax identification number for each country, improving tax reporting accuracy. This resolves a discrepancy impacting financial reporting.
Original PR description
### Issue: When a fiscal position defines a `foreign_vat`, tax reports generated for that country still use the company's VAT number instead For example, with a Belgian fiscal position using…
### Issue: When a fiscal position defines a `foreign_vat`, tax reports generated for that country still use the company's VAT number instead For example, with a Belgian fiscal position using `BE010203040`, the generated BE VAT report uses the company VAT instead of `010203040` ### Cause: The report generation did not check whether there is a fiscal position with a `foreign_vat` matching the country of the report ### Note: The example above uses a Belgian fiscal position to reproduce the issue Starting from 19.0, this specific flow is blocked because Intervat is enabled in production mode by default A related fix makes the Intervat settings available in that case Until then, the issue can be reproduced by temporarily commenting out: https://github.com/odoo/enterprise/blob/5fb58a9b7b3ae89f87e84d4ba1fa3a16237d80ac/l10n_be_intervat/models/account_return.py#L15 ### Steps to reproduce: - Disable demo data and install `accountant` - Create a Fiscal Position "Belgium" (Country: Belgium, Foreign Tax ID: BE010203040) - Click the alert to install the Belgian taxes - Create and confirm an invoice for a Belgian customer: - Fiscal Position: Belgium - Any product with a Belgian tax - Invoice Date: 01/01/2026 - Open the Tax Report and select `VAT Return (BE)` for January - Click `Returns` and select the full year - Mark the December return as Completed from the three-dot menu - Review January and fill the missing company data (TIN: 1111111, phone and email) - Click `Validate -> Lock -> Submit` ### Before the fix: The generated XML uses the company VAT number (`1111111`) instead of the fiscal position foreign VAT (`010203040`). opw-6076540 Forward-Port-Of: odoo/enterprise#112610
This update addresses a critical issue where Odoo Enterprise experienced a crash when attempting to download a URL document alongside a spreadsheet. The fix ensures stable and reliable downloading of both document types, improving user experience and preventing data loss. This resolves a reported problem impacting users accessing and sharing documents.
Original PR description
Try to download a url document along with a spreadsheet. `onDownload` crash when trying to download a url document. Task: 5485662 Forward-Port-Of: odoo/enterprise#113645 Forward-Port-Of: odoo/enterprise#112513
This update fixes an issue where car BIK calculations were inaccurate when employees changed cars during a month. The system now correctly prorates the BIK based on the employee's car usage each month, ensuring accurate payroll calculations and compliance. This change impacts the HR payroll module.
Original PR description
**Description of the issue/feature this PR addresses:** When there is a change of car during a month, the employee will have 2 versions but all will be merged on the same payslips but currently only the BIK of one version is taken into account (or no BIK if the employee has no company car anymore) **Current behavior before PR:** . car_atn value equal the yearly_atn / 12 . ATN.CAR rule returns the car_atn value of the first version **Desired behavior after PR is merged:** . Update the car_atn value to be computed monthly, based on the number of calendar days in the current month . Update ATN.CAR payslip rule, it get the value of the car's atn on the current payslip month then prorated based on the versions periods within the payslip period . Modify the corresponding tests . Add corresponding tests task-6108696
This update resolves an issue where the Odoo system couldn't correctly handle the Turkey timezone after a recent software update. The fix adds a fallback mechanism to ensure accurate timezone calculations, preventing errors during database upgrades and ensuring correct event scheduling.
Original PR description
**[FIX] handle Turkey timezone when tzdata-legacy not installed** In #236660 we switched from pytz to zoneinfo. The library `pytz` has `Turkey` in **pytz.all_timezones_set**. On the other hand…
**[FIX] handle Turkey timezone when tzdata-legacy not installed**
In #236660 we switched from pytz to zoneinfo.
The library `pytz` has `Turkey` in **pytz.all_timezones_set**.
On the other hand starting from ubuntu 24.04 as tzdata was split and `Turkey` was [moved](https://documentation.ubuntu.com/release-notes/24.04/#tzdata-package-split) out of tzdata to tzdata-legacy.
If we run a db which has reference to `Turkey` timezone, on a server which is ubuntu 24.04 and tzdata-legacy not installed, we will get an error as we did not have fallback for `Turkey` while we have for `Türkiye`. Because zoneinfo will not have `Turkey` in `zoneinfo.available_timezones()`
Issue was discovered during upgrade of db which has res.partners with timezone=`Turkey` from 19.0 to saas~19.1. The upgrading docker container was nobel and it did not have tzdata-legacy.
For fixing the issue we added fallback for `Turkey`.
Tbh I do not think we need a fallback for `Türkiye` but I wanted to not change the old behaviour.
###
**[FIX] handle America/{Catamarca,Godthab} timezones**
As we moved from `pytz` to `zoneinfo` in **saas~19.1**
we have 2 more timezones which were existing in `pytz`
but not in `tzdata` adn we do not have fallback for them.
They are in `tzdata-legacy`:
- America/Catamarca
- America/Godthab
We added fallback for them.
We already have a failing upgrade request because of
America/Catamarca.
Turkey:
```
File "/home/odoo/src/odoo/saas-19.1/addons/calendar/models/calendar_event.py", line 742, in _compute_field_value
return super()._compute_field_value(field)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/odoo/src/odoo/saas-19.1/addons/mail/models/mail_thread.py", line 495, in _compute_field_value
return super()._compute_field_value(field)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/odoo/src/odoo/saas-19.1/odoo/orm/models.py", line 4271, in _compute_field_value
determine(field.compute, self)
File "/home/odoo/src/odoo/saas-19.1/odoo/orm/fields.py", line 83, in determine
return needle(*args)
^^^^^^^^^^^^^
File "/home/odoo/src/odoo/saas-19.1/addons/calendar/models/calendar_event.py", line 503, in _compute_recurrence
event_values = event._get_recurrence_params()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/odoo/src/odoo/saas-19.1/addons/calendar/models/calendar_event.py", line 1341, in _get_recurrence_params
event_date = self._get_start_date()
^^^^^^^^^^^^^^^^^^^^^^
File "/home/odoo/src/odoo/saas-19.1/addons/calendar/models/calendar_event.py", line 1573, in _get_start_date
return start.replace(tzinfo=UTC).astimezone(ZoneInfo(self.event_tz)).date()
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/odoo/src/odoo/saas-19.1/odoo/_monkeypatches/zoneinfo.py", line 130, in __new__
z = super().__new__(cls, key)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/zoneinfo/_common.py", line 24, in load_tzdata
raise ZoneInfoNotFoundError(f"No time zone found with key {key}")
zoneinfo._common.ZoneInfoNotFoundError: 'No time zone found with key Turkey'
```
Catamarca:
```
Traceback (most recent call last):
File "/tmp/tmpm0v0h90i/migrations/base/tests/test_mock_crawl.py", line 335, in crawl_menu
self.mock_action(action_vals)
File "/tmp/tmpm0v0h90i/migrations/base/tests/test_mock_crawl.py", line 348, in mock_action
return self.mock_act_window(action)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/tmpm0v0h90i/migrations/base/tests/test_mock_crawl.py", line 508, in mock_act_window
mock_method(model, view, fields_list, domain, group_by)
File "/tmp/tmpm0v0h90i/migrations/base/tests/test_mock_crawl.py", line 541, in mock_view_form
[data] = record.read(fields_list)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/odoo/src/odoo/saas-19.1/odoo/orm/models.py", line 2735, in read
self._origin.fetch(fields)
File "/home/odoo/src/odoo/saas-19.1/odoo/orm/models.py", line 3067, in fetch
fetched.mapped(field_name)
File "/home/odoo/src/odoo/saas-19.1/odoo/orm/models.py", line 5479, in mapped
return [getter(record) for record in records]
^^^^^^^^^^^^^^
File "/home/odoo/src/odoo/saas-19.1/odoo/orm/fields.py", line 1794, in __get__
self.compute_value(recs)
File "/home/odoo/src/odoo/saas-19.1/odoo/orm/fields.py", line 1965, in compute_value
records._compute_field_value(self)
File "/home/odoo/src/odoo/saas-19.1/odoo/orm/models.py", line 4271, in _compute_field_value
determine(field.compute, self)
File "/home/odoo/src/odoo/saas-19.1/odoo/orm/fields.py", line 83, in determine
return needle(*args)
^^^^^^^^^^^^^
File "/home/odoo/src/odoo/saas-19.1/odoo/addons/base/models/res_users.py", line 455, in _compute_tz_offset
user.tz_offset = datetime.datetime.now(ZoneInfo(user.tz or 'UTC')).strftime('%z')
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/odoo/src/odoo/saas-19.1/odoo/_monkeypatches/zoneinfo.py", line 130, in __new__
z = super().__new__(cls, key)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/zoneinfo/_common.py", line 24, in load_tzdata
raise ZoneInfoNotFoundError(f"No time zone found with key {key}")
zoneinfo._common.ZoneInfoNotFoundError: 'No time zone found with key America/Catamarca'
```
tbg-2529
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#256821This update resolves an issue where deleting a button in the HTML editor would unexpectedly remove the entire editor. The fix ensures that after deleting a button, the editor correctly recognizes the empty space and adds a line break, preventing the editor from being removed entirely. This improves the user experience and stability of the HTML editor.
Original PR description
### Steps to reproduce: - Create a button, set its URL to #, and click Apply. - Place the cursor right after the link. - Press Backspace until the button/link is removed. - Entire editor also gets…
### Steps to reproduce: - Create a button, set its URL to #, and click Apply. - Place the cursor right after the link. - Press Backspace until the button/link is removed. - Entire editor also gets removed. ### In previous version: - Issue is due to [1](https://github.com/odoo/odoo/commit/7685e562b1036d08724ba91ed5064b6fe20c2ce2 ) change in `isEmptyBlock` (because of `isButton`). - When we had `<a>#[]</a>` and pressed backspace, `deleteRange` was called. - Then `fillShrunkBlocks` ran and `isEmptyBlock` returned true (no isButton). - So `<br>` was added and block never became fully empty. ### In current version: - Because of `isButton` condition, some empty blocks are not treated as empty. - So `<br>` is not added & block stays actually empty. Then `removeFEFF` runs & `nodeSize` becomes false & `cleanEmptyAncestors` removes parent even editable. ### After this PR: - Case like `<a>[]</a>`, backspace is handled by override which directly removes `<a>`. Since this skips `deleteRange`, manually call `fillShrunkBlocks` there. - Now after removing `<a>`, block is properly detected as empty and `<br>` gets added. task-6109145 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#259055
This update resolves a migration issue by requiring the ‘survey’ module to be installed before the ‘esg_csrd’ module can be automatically updated. Previously, users without ‘survey’ would incorrectly install it, leading to migration problems. Now, the update only proceeds if the ‘survey’ module is already present, ensuring a stable and reliable migration process.
Original PR description
Description of the issue this commit addresses: As survey is a dependency but not an auto_install requirement of esg_csrd only from 19.0, when migrating to that version, users that don't have survey installed but do have esg will auto_install survey and pull a new computed stored field, ResUsers.karma which causes migrations issues as no script was made to account for that scenario. --- Desired behavior after this commit is merged: This commit adds survey in the auto_install requirements for the module so only instances that already have ResUsers.karma can auto_install esg_csrd --- runbot-238524 Forward-Port-Of: odoo/enterprise#113905
This fix resolves an issue where updating a manufacturing order (MO) after changing a product's design or variant could cause a system error. The change prevents users from modifying MOs based on outdated BoMs, ensuring accurate inventory management and preventing potential production disruptions. This improves stability and reliability of the manufacturing process.
Original PR description
Currently, an error occurs if a user changes the product in a BoM, updates the manufacturing order (MO) based on that BoM, and then attempts to unbuild the order. ## Steps to replicate: - Install…
Currently, an error occurs if a user changes the product in a BoM, updates the manufacturing order (MO) based on that BoM, and then attempts to unbuild the order.
## Steps to replicate:
- Install Manufacturing without demo data
- Settings > Enable Variants
- Create the following products:
- Car with (Red and Blue Color attributes)
- Red Paint
- Create a BoM for Car and product variant set to Red Car and have Red paint as the component.
- Create and Confirm manufacturing order for Red Car
- Click on Bill of Material > Set Paint required to 2 > Save
- Set product variant in BoM to Blue and save again.
- Go back to MO > Update BoM > Produce All
- Unbuild qty 1 > Confirm
## Observed Behavior:
ZeroDivisionError: float division by zero
## Root cause:
This issue occurs because the Update BoM button remains visible on the Manufacturing Order (MO) even after the product has been changed.
The problem starts when a user initially updates the required paint quantity from 1 to 2. At that point, the function [1] marks the BoM as outdated for all linked MOs, which makes the Update BoM button appear. However, if the user later changes the product template or variant, the BoM is still considered outdated. This incorrectly allows the user to update the MO using a BoM that no longer matches the selected product.
**Why this causes a traceback when unbuilding?**
When the user clicks Update BoM, it triggers the `action_update_bom function` [2], which calls `_link_bom`. This process recomputes several fields to align the MO with the updated BoM. One of the methods triggered during this recomputation is `_compute_move_finished_ids` [3]. Since the production is already confirmed, the logic skips adding the production to `production_with_move_finished_ids_to_unlink_ids`, meaning no new finished moves are created for that updated product.
As a result, although the MO is updated, its finished product (`move_finished_ids.product_id`) still refers to the original product (for example, Red Car), instead of the newly selected one.
Later, when the user attempts to unbuild the product, the `action_unbuild` function [4] is executed, which calls `_generate_consume_moves` [5] During this step, the system tries to compute a factor that depends on `unbuild.mo_id.quantity_produced`.
However, because the finished moves still reference the old product and do not match the MO’s current product, the computed total becomes zero at [6] This leads to a division by zero error at [5], which ultimately causes the traceback.
[1]:
https://github.com/odoo/odoo/blob/444de5354dcd70e9160a985486317a8912d53a84/addons/mrp/models/mrp_bom.py#L432-L447 [2]:
https://github.com/odoo/odoo/blob/444de5354dcd70e9160a985486317a8912d53a84/addons/mrp/models/mrp_production.py#L1044-L1048 [3]:
https://github.com/odoo/odoo/blob/444de5354dcd70e9160a985486317a8912d53a84/addons/mrp/models/mrp_production.py#L771-L800
[4]:
https://github.com/odoo/odoo/blob/97b60952d59a57aba12b048cb4da4f41d85d2ea2/addons/mrp/models/mrp_unbuild.py#L153-L164
[5]:
https://github.com/odoo/odoo/blob/444de5354dcd70e9160a985486317a8912d53a84/addons/mrp/models/mrp_unbuild.py#L225-L232 [6]:
https://github.com/odoo/odoo/blob/444de5354dcd70e9160a985486317a8912d53a84/addons/mrp/models/mrp_production.py#L641-L647
## Solution:
This change prevents users from updating a Bill of Materials (BoM) after the main product or its template has been modified, by ensuring the BoM is not marked as outdated.
This approach make sense because, once a manufacturing order (MO) is confirmed, all raw materials are physically reserved before production begins. While it makes sense to update BoM components in response to an Engineering Change Order (ECO) or last-minute specification changes, it does not make sense to allow changes to the final product itself on existing confirmed MOs. Doing so could lead to operational errors, since materials have already been procured and reserved for a specific product.
This fix ensures that if the product variant or product template is updated in the BoM, users cannot update the MO based on that BoM. This also prevents potential divide-by-zero errors when attempting to unbuild the product in the MO.
Reference commit which also suggests this behavior for the `Update BoM` button: [commit](https://github.com/odoo/odoo/commit/d7392829c769ef50456a7bc93d4482072b329463#:~:text=An%20exception%20however%3A%20if%20the%20MO%20is%20confirmed%20and%20the%20BoM%27s%20product%20was%0Achanged%2C%20the%20MO%20shouldn%27t%20have%20the%20%22Update%20BoM%22%20button%20displayed.%0AOtherwise%2C%20it%20would%20change%20the%20finished%20product%20of%20a%20confirmed%20MO.)
opw-6044754
Forward-Port-Of: odoo/odoo#260639
Forward-Port-Of: odoo/odoo#255981This update fixes an issue where the Mercado Pago webhook couldn't process invoices with references containing slashes (like INV/2026/00001). Previously, it resulted in a 404 error. Now, the webhook correctly handles these invoice references, ensuring accurate processing of Mercado Pago payments.
Original PR description
Currently, the mercado_pago_webhook http route only takes into consideration 1 url segment. This means that invoices with references like INV/2026/00001 don't match any defined route and the server returns a 404. /payment/mercado_pago/webhook/S00001 => OK /payment/mercado_pago/webhook/INV/2026/00001 => KO This commit allows references with slashes to be matched by the route by capturing the entire remaining url path including the slashes. /payment/mercado_pago/webhook/S00001 => OK /payment/mercado_pago/webhook/INV/2026/00001 => OK opw-6035161 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#259530 Forward-Port-Of: odoo/odoo#259378
This update fixes an issue where the tip amount displayed in the Point of Sale system was incorrectly formatted (showing '415' instead of '4,15') when using a locale with a comma as the decimal separator. The fix ensures the tip amount is displayed correctly based on the user's selected language and regional settings, improving the user experience and accuracy of transactions.
Original PR description
Steps to reproduce 1. Set language decimal separator to "," and thousands separator to "." 2. Open PoS, create an order (e.g. total 17.85) 3. Pay more than the total (e.g. 22) 4. Open the Tip popup —…
Steps to reproduce
1. Set language decimal separator to "," and thousands separator to "."
2. Open PoS, create an order (e.g. total 17.85)
3. Pay more than the total (e.g. 22)
4. Open the Tip popup — it shows 415 instead of 4,15
5. Confirm — tip is set to 415
Issue
When overpaying, the change is passed as `startingValue` to the NumberPopup via
`String(amount)` (https://github.com/odoo/odoo/blob/b3d78644bc873b3b22f3fd5f8fc0cd27ce38999f/addons/point_of_sale/static/src/app/screens/payment_screen/payment_screen.js#L232),
which always uses "." as decimal separator. This value is used directly as the
display buffer in NumberPopup
(https://github.com/odoo/odoo/blob/b3d78644bc873b3b22f3fd5f8fc0cd27ce38999f/addons/point_of_sale/static/src/app/components/popups/number_popup/number_popup.js#L53),
so the user already sees "415" instead of "4,15" when the popup opens. When the
user confirms, `computeNewTip` parses this value with the locale-aware `parseFloat`
from `@web/views/fields/parsers`
(https://github.com/odoo/odoo/blob/b3d78644bc873b3b22f3fd5f8fc0cd27ce38999f/addons/point_of_sale/static/src/app/screens/payment_screen/payment_screen.js#L279
and https://github.com/odoo/odoo/blob/b3d78644bc873b3b22f3fd5f8fc0cd27ce38999f/addons/web/static/src/views/fields/parsers.js#L73-L83),
which uses `localization.thousandsSep` and `localization.decimalPoint` to interpret
the string. With "," as decimal separator and "." as thousands separator,
`parseFloat("4.15")` treats the "." as a thousands separator, strips it, and
returns 415 instead of 4.15.
opw-5895622
Forward-Port-Of: odoo/odoo#255273This update fixes an issue where employees were incorrectly paid 80% for rest days when on sick leave. The change ensures that employees are paid their full wage on rest days, aligning with the definition of a sickness day. This corrects a miscalculation impacting payroll accuracy.
Original PR description
Currently, if a sick leave is spread over a weekend, the work entry type set on the saturday and sunday will be the sick leave type. If an employee is entitled sickness allowance (which is paid 80%), it means that we will be paying them 80% for their rest days as well. However, as per the definition, a sickness day is a day on which an employee is absent from work by reason of being unfit due to injury or sickness. If an employee is not expected to be at work (rest day), that day cannot be considered a sickness day. If this rest day is paid (which is done by default in our module), we should thus pay the full wage on that day and not a reduced 80%. task-6079736 Forward-Port-Of: odoo/enterprise#114841 Forward-Port-Of: odoo/enterprise#113486
This update fixes an issue where the forecast report incorrectly grouped purchase orders with different receipt dates for the same product. The fix ensures that each unique receipt date is accurately represented in the forecast details, providing a more precise view of inventory availability. This improves the reliability of inventory planning.
Original PR description
If you make a purchase order with 2 quantity of the same product, and set 2 different receipt date. The forecast report details would incorrectly group them as the same line. Steps to reproduce: ------------------- * Create a purchase order * Add 2 lines with the same product * Change the receipt date for one of the 2 lines * Go to the forecast report of the product > Observation: In the forecast details there is only one line for the first receipt date. Why the fix: ------------ We add a condition in the `_sameDocument` function to check that the 2 documents being compared have the same receipt date opw-5361583 Forward-Port-Of: odoo/odoo#254170
This update fixes an issue where approving overtime on one attendance record would reset previously approved overtime for the same week. The change ensures that approved overtime remains approved, streamlining the attendance management process and preventing unnecessary re-approvals. It corrects a logic error in how the system updates attendance records.
Original PR description
Creating or updating an attendance record resets previously approved overtime entries in the same week back to the 'to_approve' status. ### **Steps to reproduce:** 1) Install Attendance with demo…
Creating or updating an attendance record resets previously approved overtime entries in the same week back to the 'to_approve' status. ### **Steps to reproduce:** 1) Install Attendance with demo data. 2) Set 'Extra Hours Validation' to 'Approved by Manager' in settings. 3) Ensure an overtime rule is set for the Admin user. 4) Create an attendance for Admin with some overtime. 5) Navigate to management and approve overtime. 6) Create another attendance with overtime for Admin in the same week. 7) Navigate back to management. ### **Observed Behavior:** Previously approved overtime reappears in the list, requiring approval again. ### **Expected Behavior:** Previous overtime should remain in the 'approved' status, provided its calculated duration has not changed. ### **Root Cause:** When an attendance is added or modified, the [_get_overtimes_to_update_domain](https://github.com/odoo/odoo/blob/3891dd471d64629634644c0b022a171bbaa65b49/addons/hr_attendance/models/hr_attendance.py#L268-L286) method evaluates the entire week regardless of the ruleset. This means any daily attendance update wipes and recreates the entire week. ### **Fix:** Check the ruleset of the employee. If no rule has `quantity_period` set to **'week'**, restrict the domain to the specific days of the attendances being modified, rather than the entire week. **opw-6054497** Forward-Port-Of: odoo/odoo#259872 Forward-Port-Of: odoo/odoo#256281
This update ensures the VIES summary report XML files generated for Czech companies correctly format VAT numbers. Previously, the report included the country code, which is now removed to comply with official VIES XML requirements. This ensures accurate reporting and avoids potential issues with tax authorities.
Original PR description
**Steps to reproduce:** - Install the `l10n_cz_reports` module and switch to a `CZ Company` - Create an invoice for a customer with a VAT number, add a product, and set the Transaction Code (enable…
**Steps to reproduce:** - Install the `l10n_cz_reports` module and switch to a `CZ Company` - Create an invoice for a customer with a VAT number, add a product, and set the Transaction Code (enable it from the optional columns if needed). - Navigate to Reporting > VIES Summary Report. - Observe the value in the `VAT Number` column (includes country code). - From the dropdown, export the report as XML. **Observation:** In the generated XML file, the `c_vat` field contains the VAT number including the country code (e.g., `CZ12345679`) instead of only the numeric part (`12345679`). **Root cause:** At [1], the VAT number is directly taken from the report lines without removing the country code. **Fix:** This commit ensures that the `c_vat` field contains only the VAT number without the country code, complying with the official VIES XML format requirements. Ref: https://adisspr.mfcr.cz/dpr/adis/idpr_pub/epo2_info/popis_struktury_detail.faces?zkratka=DPHSHV#:~:text=Tax%20identification%20number%20of%20the%20purchaser%20(only%20the%20numeric%20part) [1]: https://github.com/odoo/enterprise/blob/c4f2c3442f30f5ac972dd136a3642acc5bcc6da2/l10n_cz_reports_2025/models/l10n_cz_vies_summary_handler.py#L29-L62 opw-6093259 Forward-Port-Of: odoo/enterprise#114730 Forward-Port-Of: odoo/enterprise#113083
This update resolves an issue where the original product name was incorrectly prepended to product descriptions on invoices and RFQs when editing. The fix ensures that only translated names and descriptions are displayed, improving invoice clarity and accuracy for users. This change impacts invoicing and purchasing workflows.
Original PR description
Steps to reproduce: 1- Install invoicing app 2- Add French language in the settings 3- Create a customer with language set as French 4- Create a product and define french translations of the name and…
Steps to reproduce: 1- Install invoicing app 2- Add French language in the settings 3- Create a customer with language set as French 4- Create a product and define french translations of the name and the description in Sales tab 5- Create an invoice for that customer and choose the product you created 6- You will find the translated product name and description under the product name 7- Edit the description, save and preview the invoice 8- The invoice line will contain [Product Name EN] [Product Name FR] [Product Description FR] Description of the issue: When creating an invoice for a customer whose language differs from the user's account language, manually editing the product description on an invoice line causes the original product name to be prepended to the description. The same issue happens in a RFQ in Purchase. Expected behaviour: User can edit the product description in the invoice line and the output in the invoice should only be the translated name and description, without the original product name. Why this happens? 1- When the product is selected in the invoice line, the label is loaded from _compute_name method in account_move_line, which holds the translated name and description. 2- After editing the description and escaping the field (clicking outside it), the parseLabel method is called, which prepends the original name to the label, making the invoice output as [original name] [translated name] [translated desc.] Fix: Use the product name returned in the label for trimming and concatenation to handle both original/translated text scenarios. References: original PR: #248401 partial revert: #254158 opw-5480494 Forward-Port-Of: odoo/odoo#256837
This update fixes an issue where draft stock moves were incorrectly flagged as unavailable, even when sufficient stock existed. The change adjusts how availability is calculated to accurately reflect available stock, ensuring accurate forecasts and preventing fulfillment delays. This improves the reliability of stock management.
Original PR description
Steps to reproduce: - Create a storable product "P1" - Update on-hand quantity to 2 units - Create a delivery with 2 units of P1 and keep it in draft state Problem: The forecast availability is…
Steps to reproduce: - Create a storable product "P1" - Update on-hand quantity to 2 units - Create a delivery with 2 units of P1 and keep it in draft state Problem: The forecast availability is displayed in red (not available), even though the stock is sufficient to fulfill the move. Explication: For draft consuming moves, the forecast availability is computed as: `virtual_available - move.product_qty` In the case where stock exactly matches the demand, this results in 0. However, on the JS side, availability is evaluated with: `forecast_availability >= product_qty` So with forecast_availability = 0 and product_qty = 2, the condition evaluates to False, incorrectly marking the move as not available. https://github.com/odoo/odoo/blob/c7fede7f44c668ccc0a094d8341c3cae8879a7f1/addons/stock/static/src/widgets/forecast_widget.js#L31 Solution: When the available quantity is sufficient to cover the move (using float_compare), set forecast_availability to the full available quantity instead of subtracting the move quantity. This ensures the JS condition correctly evaluates to True and the move is marked as available. opw-5159142 Forward-Port-Of: odoo/odoo#258504 Forward-Port-Of: odoo/odoo#257354
This update resolves an issue where role mentions weren't working correctly within the full composer, leading to emails being sent to incorrect addresses or failing to send at all. The fix ensures role mentions are displayed accurately and links function properly, improving the reliability of email communication within Odoo. This ensures users can effectively tag roles in emails.
Original PR description
There is an issue when tagging a role using the full composer: 1. Emails are sent to the wrong address or sometimes no address at all 2. The displayed URL is not correct This commit fixes the issue by correctly rendering the mention block for roles in the full composer, using the correct configuration. task-6139162 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#260457 Forward-Port-Of: odoo/odoo#260094
This update enhances the account reports feature on mobile devices by ensuring the chatter is always visible and the annotation icon is consistently accessible via touch. This improves usability for users accessing reports on phones and tablets, making it easier to review and annotate information.
Original PR description
Previously, the chatter was hidden on device too smalls and the annotation icon was only visible with hover so not visible on touch devices such as phones or tablets. Now, we have the chatter at the bottom when the device is too small and always display the annotation icon on touch devices. task-5106852 Forward-Port-Of: odoo/enterprise#114700 Forward-Port-Of: odoo/enterprise#95737
This update corrects a previous issue where payroll calculations were inaccurate for employees with contracts that didn't fully overlap with the payslip period. Now, the system correctly identifies and handles fully out-of-contract payslips, preventing incorrect calculations and ensuring accurate reporting. Partially overlapping payslips continue to compute as expected.
Original PR description
Fix:- Block payslip computation when the payslip period does not overlap the employee's contract period. Before this change:- Employees with contracts starting and ending before the payslip period will have 'worked days' and computation will yield numbers even though this is not accurate. After this change: - compute raises "No running contract" for fully out-of-contract slips, - worked days summary stays at 0, -`Out Of Contract` worked day lines are preserved, - partially overlapping payslips still compute as expected. task-[6055170](https://www.odoo.com/odoo/project/1251/tasks/6055170)
21 changes
Resolved issues and error corrections
This update fixes a bug where discounts on purchase orders weren't being correctly reflected in the final accounting. The system now accurately displays the discounted amount, ensuring accurate financial reporting for purchase transactions. This resolves issue OPW-5049848.
Original PR description
Steps to reproduce: [purchase] - Create a purchase order - add a line with a discount - confirm and receive - create an accrued expense entry Issue: The full tax excl amount is displayed but no discount is applied opw-5049848 Forward-Port-Of: odoo/odoo#231706 Forward-Port-Of: odoo/odoo#225375
This update resolves an issue where copying a user also duplicated their associated tasks, leading to shared task assignments. The fix ensures that new users have independent task assignments, preventing conflicts and simplifying task management. This improves data consistency and reduces potential errors.
Original PR description
Duplicating a user also duplicates all their task assignments because task_ids on res.users is missing copy=False. The new user ends up sharing the same tasks in project_task_user_rel, so removing a task from either user affects both. Forward-Port-Of: odoo/enterprise#114028
This update resolves an issue where links added through the website's media replacement feature (replacing images, videos, etc.) weren't correctly translated. The fix ensures that all media files, regardless of how they're added, are properly tagged for translation, improving the website's localization capabilities.
Original PR description
[FIX] website: translate links inline on media replacement On the website builder, files added through the `/file` command would go through the domPlugin `insert` method, which would call…
[FIX] website: translate links inline on media replacement
On the website builder, files added through the `/file` command would go
through the domPlugin `insert` method, which would call
`before_insert_processors` and apply `.o_translate_inline` as expected.
But there is another flow to add a document on the page: replace an
image (or video, or icon), then select the "Documents" tab and upload
a file. With this flow, `insert` is not called, so we have to add the
class through some other resource.
[FIX] html_editor: target documents with right class
The class `.o_image` was still associated with documents (in the context
of the file selector) and the expected tag of a document was `A`, in
spite of it not being true in `html_editor` since the introduction of
the file box in [1].
This has also been updated in the website builder since the introduction
of the `html_builder` module in 18.4, which swapped uses of `web_editor`
components for `html_editor`.
As a side-effect, in website, a double click on a file did not open the
media dialog on the "document" tab, unlike other media (images, videos,
icons). In such a case, the file was also not shown as already selected
in the media dialog (because it targetted the wrong tag name). Both of
those behaviors were lost as we used the new file box design in 18.4.
[1]: https://github.com/odoo/odoo/commit/7f9afa21dffba2f74f9fb8a68809db4af6c7c225
task-5876278
Forward-Port-Of: odoo/odoo#259840
Forward-Port-Of: odoo/odoo#245904This update resolves an issue preventing portal users from creating tickets via email when automatic assignment is enabled. The fix ensures the system correctly accesses employee calendars across companies, eliminating access errors that were blocking ticket creation. This improves the portal's functionality for users submitting support requests.
Original PR description
Problem: Portal email with auto-assignment crashes ticket creation due to calendar access. When a helpdesk ticket is created via email from a portal user and automatic assignment is enabled, the…
Problem: Portal email with auto-assignment crashes ticket creation due to calendar access. When a helpdesk ticket is created via email from a portal user and automatic assignment is enabled, the system computes working intervals for users to determine assignment. This computation goes into resource logic, where resource.calendar fields (flexible_hours) are read. If the assigned user is linked to multiple employees across companies, multiple resource.resource records are evaluated. The helpdesk email flow starts in sudo, but the employee calendar lookup explicitly drops sudo before returning the calendar. Then, the calendar is accessed in the portal context, which does not have permission to read the other company's resource.calendar, leading to an AccessError and preventing ticket creation. Although the failure is triggered from Enterprise helpdesk, the actual crash occurs in Odoo (resource.calendar), meaning the fix must be applied there. Fix: Preserve sudo when fetching employee calendars to ensure that scheduling logic does not depend on the access rights of the email sender. A test is added in helpdesk_holidays, as the issue requires both helpdesk (auto-assignment) and hr (employees/resources) to reproduce. The test simulates a portal email flow with a multi-company user linked to multiple employees and ensures ticket creation succeeds. Steps to Reproduce: 1. Install Helpdesk, Employees, and enable multi-company 2. Create two companies (e.g., Company A and Company B) 3. Create one internal user (User X) with access to both companies 4. Create two employees linked to the same user: - Employee 1 in Company A - Employee 2 in Company B Make sure they are set with a start date, but no end date. Needs to be active employee. 5. Create a Helpdesk team in Company A 6. Add Agent X as a team member 7. Enable automatic assignment 8. Configure an email alias for the helpdesk team 9. Create a portal user 10. Send an email from the portal user to the alias Related Ticket: opw-6035099 Forward-Port-Of: odoo/odoo#257720
This update resolves an issue where portal email auto-assignment caused ticket creation failures due to permission errors accessing employee calendars across companies. The fix ensures that calendar access is handled correctly, allowing ticket assignments to proceed smoothly. This improves the reliability of the helpdesk system for portal users.
Original PR description
Problem: Portal email with auto-assignment crashes ticket creation due to calendar access. When a helpdesk ticket is created via email from a portal user and automatic assignment is enabled, the…
Problem: Portal email with auto-assignment crashes ticket creation due to calendar access. When a helpdesk ticket is created via email from a portal user and automatic assignment is enabled, the system computes working intervals for users to determine assignment. This computation goes into resource logic, where resource.calendar fields (flexible_hours) are read. If the assigned user is linked to multiple employees across companies, multiple resource.resource records are evaluated. The helpdesk email flow starts in sudo, but the employee calendar lookup explicitly drops sudo before returning the calendar. Then, the calendar is accessed in the portal context, which does not have permission to read the other company's resource.calendar, leading to an AccessError and preventing ticket creation. Although the failure is triggered from Enterprise helpdesk, the actual crash occurs in Odoo (resource.calendar), meaning the fix must be applied there. Fix: Preserve sudo when fetching employee calendars to ensure that scheduling logic does not depend on the access rights of the email sender. A test is added in helpdesk_holidays, as the issue requires both helpdesk (auto-assignment) and hr (employees/resources) to reproduce. The test simulates a portal email flow with a multi-company user linked to multiple employees and ensures ticket creation succeeds. Steps to Reproduce: 1. Install Helpdesk, Employees, and enable multi-company 2. Create two companies (e.g., Company A and Company B) 3. Create one internal user (User X) with access to both companies 4. Create two employees linked to the same user: - Employee 1 in Company A - Employee 2 in Company B Make sure they are set with a start date, but no end date. Needs to be active employee. 5. Create a Helpdesk team in Company A 6. Add Agent X as a team member 7. Enable automatic assignment 8. Configure an email alias for the helpdesk team 9. Create a portal user 10. Send an email from the portal user to the alias Related Ticket: opw-6035099 Forward-Port-Of: odoo/enterprise#113047
This update enhances the reliability of our IoT device monitoring by ensuring a callback is always triggered when a polling listener fails to connect. Previously, failures were silent, now the system reports an 'unreachable' status for each device, providing better visibility and alerting capabilities. This improves the overall stability of the IoT integration.
Original PR description
Enterprise PR: https://github.com/odoo/enterprise/pull/114779
Before this commit, if a longpolling listener failed to send the polling request to the IoT box, it would silently fail without calling any listener callback.
After this commit, the callback is called with `{ status: "unreachable" }` for each device listener associated with the IoT box.
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#260931This update fixes a confusing issue for Mexican employees receiving payslips. Previously, an unstamped payslip was emailed immediately after confirmation, followed by a second email with the stamped version. Now, the email is only sent after the CFDI (tax document) is generated, ensuring employees receive the correct, fully stamped payslip.
Original PR description
Currently, when a user confirms a payslip batch (hr.payslip.run), the base payroll module queues the PDF generation and sends an email to the employee with their payslip immediately. For Mexican payslips, this means the employee receives the email with an unstamped payslip (without CFDI UUID). Later, when the CFDI is generated, a second email is sent with the stamped version, confusing the employee. This commit prevents the email from being sent for Mexican payslips if the CFDI has not been generated yet, ensuring only the stamped payslip is emailed. Forward-Port-Of: odoo/enterprise#114731
This update fixes a bug where VAT reports were incorrectly using the company's VAT number instead of the fiscal position's foreign VAT ID. The change ensures that VAT reports accurately reflect the correct tax identification number for each customer's location, improving tax reporting accuracy. This resolves an issue impacting VAT compliance for international customers.
Original PR description
### Issue: When a fiscal position defines a `foreign_vat`, tax reports generated for that country still use the company's VAT number instead For example, with a Belgian fiscal position using…
### Issue: When a fiscal position defines a `foreign_vat`, tax reports generated for that country still use the company's VAT number instead For example, with a Belgian fiscal position using `BE010203040`, the generated BE VAT report uses the company VAT instead of `010203040` ### Cause: The report generation did not check whether there is a fiscal position with a `foreign_vat` matching the country of the report ### Note: The example above uses a Belgian fiscal position to reproduce the issue Starting from 19.0, this specific flow is blocked because Intervat is enabled in production mode by default A related fix makes the Intervat settings available in that case Until then, the issue can be reproduced by temporarily commenting out: https://github.com/odoo/enterprise/blob/5fb58a9b7b3ae89f87e84d4ba1fa3a16237d80ac/l10n_be_intervat/models/account_return.py#L15 ### Steps to reproduce: - Disable demo data and install `accountant` - Create a Fiscal Position "Belgium" (Country: Belgium, Foreign Tax ID: BE010203040) - Click the alert to install the Belgian taxes - Create and confirm an invoice for a Belgian customer: - Fiscal Position: Belgium - Any product with a Belgian tax - Invoice Date: 01/01/2026 - Open the Tax Report and select `VAT Return (BE)` for January - Click `Returns` and select the full year - Mark the December return as Completed from the three-dot menu - Review January and fill the missing company data (TIN: 1111111, phone and email) - Click `Validate -> Lock -> Submit` ### Before the fix: The generated XML uses the company VAT number (`1111111`) instead of the fiscal position foreign VAT (`010203040`). opw-6076540 Forward-Port-Of: odoo/enterprise#112610
This update addresses a critical issue where Odoo Enterprise experienced a crash when attempting to download a URL document alongside a spreadsheet. The fix ensures stable and reliable downloads of combined documents, improving user workflow and preventing data loss. This resolves a previously reported instability.
Original PR description
Try to download a url document along with a spreadsheet. `onDownload` crash when trying to download a url document. Task: 5485662 Forward-Port-Of: odoo/enterprise#113645 Forward-Port-Of: odoo/enterprise#112513
This update fixes a display issue in reports related to invoices and purchase orders when users are in time zones ahead of UTC. The change ensures that reports accurately reflect the order date in the user's local time, preventing missed invoices or orders. This improves data accuracy for financial reporting.
Original PR description
Why this commit: When loading the 'bills to receive' or 'Invoices to be Issued' The time zones ahead of UTC will face the discrepancy in the view. e.g. etc/GMT-12 timezone is 12 hours ahead of UTC,…
Why this commit: When loading the 'bills to receive' or 'Invoices to be Issued' The time zones ahead of UTC will face the discrepancy in the view. e.g. etc/GMT-12 timezone is 12 hours ahead of UTC, So 12 AM UTC is 12 PM etc/GMT-12. So report view will not include the invoices/bill with order_date of current day till its 12 AM[next day] IN UTC, Meaning etc/GMT-12 will be seeing today's bills/invoices after 12 PM. After this commit: To resolve this discrepancy we use the context_today date to get the user local date. Which is required by the [domain sanitizer](https://github.com/odoo/odoo/blob/8bff78853f6ab8dc2cc951c03bb30181c0745834/odoo/orm/domains.py#L1572-L1574) too. Steps to reproduce (Possible in runbot) : 1. Select etc/GMT-12 timezone in preferences [when UTC is between 13:00-24:00 ~ 1:00-12:00 GMT-12(of next day)] 2. Create a PO and Validate the quantity received. 3. Go to accounting>review>bills to receive. 4. the newly created PO won't be listed here. OPW: 6083526 Forward-Port-Of: odoo/enterprise#114763
This update resolves a bug where deleting a button within the HTML editor would unexpectedly remove the entire editor. The fix ensures that after deleting a button, the editor correctly removes the button and adds a line break, preventing the editor from being cleared. This improves the user experience and stability of the HTML editor.
Original PR description
### Steps to reproduce: - Create a button, set its URL to #, and click Apply. - Place the cursor right after the link. - Press Backspace until the button/link is removed. - Entire editor also gets…
### Steps to reproduce: - Create a button, set its URL to #, and click Apply. - Place the cursor right after the link. - Press Backspace until the button/link is removed. - Entire editor also gets removed. ### In previous version: - Issue is due to [1](https://github.com/odoo/odoo/commit/7685e562b1036d08724ba91ed5064b6fe20c2ce2 ) change in `isEmptyBlock` (because of `isButton`). - When we had `<a>#[]</a>` and pressed backspace, `deleteRange` was called. - Then `fillShrunkBlocks` ran and `isEmptyBlock` returned true (no isButton). - So `<br>` was added and block never became fully empty. ### In current version: - Because of `isButton` condition, some empty blocks are not treated as empty. - So `<br>` is not added & block stays actually empty. Then `removeFEFF` runs & `nodeSize` becomes false & `cleanEmptyAncestors` removes parent even editable. ### After this PR: - Case like `<a>[]</a>`, backspace is handled by override which directly removes `<a>`. Since this skips `deleteRange`, manually call `fillShrunkBlocks` there. - Now after removing `<a>`, block is properly detected as empty and `<br>` gets added. task-6109145 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#259055
This update fixes an issue where increasing the quantity of a service order led to an incorrect purchase order quantity being generated. The fix ensures the quantity is consistently calculated in the sales order line's UoM, resolving a discrepancy in the purchase order creation process. This ensures accurate order fulfillment for service products.
Original PR description
Steps to reproduce the bug: - Create a service product "P1": - In the Purchase tab: - Vendor: Azure Interior - Subcontract Service: True - UoM: dozen - Purchase UoM: unit - Create a sales order with…
Steps to reproduce the bug:
- Create a service product "P1":
- In the Purchase tab:
- Vendor: Azure Interior
- Subcontract Service: True
- UoM: dozen
- Purchase UoM: unit
- Create a sales order with 1 dozen of P1
- Confirm -> a purchase order with 12 units of P1 is generated
- Confirm the purchase order
- Go back to the sales order:
- Update the quantity from 1 to 2 dozen
Problem:
A new purchase order is generated, but with 144 units instead of 12
units. The quantity difference between the old SO quantity and the new
one is computed twice in the purchase order line UoM, in both
`_purchase_increase_ordered_qty` and `_purchase_service_prepare_line_values`:
https://github.com/odoo/odoo/blob/17.0/addons/sale_purchase/models/sale_order_line.py#L186
Solution:
The `quantity` parameter must be expressed in the SO line UoM, as
described in the documentation of the function `_purchase_service_prepare_line_values`.
https://github.com/odoo/odoo/blob/17.0/addons/sale_purchase/models/sale_order_line.py#L178
opw-6049106
Forward-Port-Of: odoo/odoo#258002
Forward-Port-Of: odoo/odoo#255478A recent update caused crashes in the Self-Ordering and Mobile Menu (QR ordering) interfaces. This fix corrects a naming discrepancy in the POS data loading process, ensuring these key features now function correctly. The change updates a field name to align with the current SaaS-19.1 version.
Original PR description
## Overview Accessing the Mobile Menu (QR ordering) or Self-Ordering interface crashes after installing `pos_blackbox_be` on SaaS-19.1. The interface fails to load due to a missing field in the POS…
## Overview Accessing the Mobile Menu (QR ordering) or Self-Ordering interface crashes after installing `pos_blackbox_be` on SaaS-19.1. The interface fails to load due to a missing field in the POS data loading flow. ## Steps to Reproduce 1. Install `pos_blackbox_be` 2. Open POS 3. Access the Mobile Menu (QR code) or Self-Ordering page ## Current Behavior - A traceback is raised - The interface does not load ## Root Cause The method `_load_pos_self_data_fields` returns the field: iface_fiscal_data_module However, from SaaS-19.1 this field was renamed to: iot_fdm_be_id This mismatch causes the POS self-ordering data loading to fail. ## Fix Updated the returned field to match the new field name. # Before return fields + ['iface_fiscal_data_module'] # After return fields + ['iot_fdm_be_id'] ## Impact - Restores proper loading of Mobile Menu (QR ordering) - Fixes Self-Ordering interface crash opw-6044883 ## Reproduction Video https://drive.google.com/file/d/1R5TYVIXvtts12YLF5iB4GKZirMZePoGr/view?usp=sharing
This fix resolves an issue where updating a product in a Bill of Materials (BoM) after a manufacturing order is created would cause an error. The change prevents users from modifying BoMs linked to confirmed manufacturing orders, ensuring data consistency and preventing potential production disruptions. This ensures accurate inventory management.
Original PR description
Currently, an error occurs if a user changes the product in a BoM, updates the manufacturing order (MO) based on that BoM, and then attempts to unbuild the order. ## Steps to replicate: - Install…
Currently, an error occurs if a user changes the product in a BoM, updates the manufacturing order (MO) based on that BoM, and then attempts to unbuild the order.
## Steps to replicate:
- Install Manufacturing without demo data
- Settings > Enable Variants
- Create the following products:
- Car with (Red and Blue Color attributes)
- Red Paint
- Create a BoM for Car and product variant set to Red Car and have Red paint as the component.
- Create and Confirm manufacturing order for Red Car
- Click on Bill of Material > Set Paint required to 2 > Save
- Set product variant in BoM to Blue and save again.
- Go back to MO > Update BoM > Produce All
- Unbuild qty 1 > Confirm
## Observed Behavior:
ZeroDivisionError: float division by zero
## Root cause:
This issue occurs because the Update BoM button remains visible on the Manufacturing Order (MO) even after the product has been changed.
The problem starts when a user initially updates the required paint quantity from 1 to 2. At that point, the function [1] marks the BoM as outdated for all linked MOs, which makes the Update BoM button appear. However, if the user later changes the product template or variant, the BoM is still considered outdated. This incorrectly allows the user to update the MO using a BoM that no longer matches the selected product.
**Why this causes a traceback when unbuilding?**
When the user clicks Update BoM, it triggers the `action_update_bom function` [2], which calls `_link_bom`. This process recomputes several fields to align the MO with the updated BoM. One of the methods triggered during this recomputation is `_compute_move_finished_ids` [3]. Since the production is already confirmed, the logic skips adding the production to `production_with_move_finished_ids_to_unlink_ids`, meaning no new finished moves are created for that updated product.
As a result, although the MO is updated, its finished product (`move_finished_ids.product_id`) still refers to the original product (for example, Red Car), instead of the newly selected one.
Later, when the user attempts to unbuild the product, the `action_unbuild` function [4] is executed, which calls `_generate_consume_moves` [5] During this step, the system tries to compute a factor that depends on `unbuild.mo_id.quantity_produced`.
However, because the finished moves still reference the old product and do not match the MO’s current product, the computed total becomes zero at [6] This leads to a division by zero error at [5], which ultimately causes the traceback.
[1]:
https://github.com/odoo/odoo/blob/444de5354dcd70e9160a985486317a8912d53a84/addons/mrp/models/mrp_bom.py#L432-L447 [2]:
https://github.com/odoo/odoo/blob/444de5354dcd70e9160a985486317a8912d53a84/addons/mrp/models/mrp_production.py#L1044-L1048 [3]:
https://github.com/odoo/odoo/blob/444de5354dcd70e9160a985486317a8912d53a84/addons/mrp/models/mrp_production.py#L771-L800
[4]:
https://github.com/odoo/odoo/blob/97b60952d59a57aba12b048cb4da4f41d85d2ea2/addons/mrp/models/mrp_unbuild.py#L153-L164
[5]:
https://github.com/odoo/odoo/blob/444de5354dcd70e9160a985486317a8912d53a84/addons/mrp/models/mrp_unbuild.py#L225-L232 [6]:
https://github.com/odoo/odoo/blob/444de5354dcd70e9160a985486317a8912d53a84/addons/mrp/models/mrp_production.py#L641-L647
## Solution:
This change prevents users from updating a Bill of Materials (BoM) after the main product or its template has been modified, by ensuring the BoM is not marked as outdated.
This approach make sense because, once a manufacturing order (MO) is confirmed, all raw materials are physically reserved before production begins. While it makes sense to update BoM components in response to an Engineering Change Order (ECO) or last-minute specification changes, it does not make sense to allow changes to the final product itself on existing confirmed MOs. Doing so could lead to operational errors, since materials have already been procured and reserved for a specific product.
This fix ensures that if the product variant or product template is updated in the BoM, users cannot update the MO based on that BoM. This also prevents potential divide-by-zero errors when attempting to unbuild the product in the MO.
Reference commit which also suggests this behavior for the `Update BoM` button: [commit](https://github.com/odoo/odoo/commit/d7392829c769ef50456a7bc93d4482072b329463#:~:text=An%20exception%20however%3A%20if%20the%20MO%20is%20confirmed%20and%20the%20BoM%27s%20product%20was%0Achanged%2C%20the%20MO%20shouldn%27t%20have%20the%20%22Update%20BoM%22%20button%20displayed.%0AOtherwise%2C%20it%20would%20change%20the%20finished%20product%20of%20a%20confirmed%20MO.)
opw-6044754
Forward-Port-Of: odoo/odoo#260639
Forward-Port-Of: odoo/odoo#255981This update fixes an error in how the basic salary is calculated for Mexican employees, ensuring it accurately reflects the total calendar days worked, including unpaid leave. Previously, unpaid leave wasn't properly accounted for, leading to incorrect salary amounts. This change ensures accurate payroll processing for Mexican employees.
Original PR description
In Mexico, the basic salary must be calculated based on the total calendar days of the period. This ensures that both worked days and non-working days (e.g. Sundays) contribute equally to the total…
In Mexico, the basic salary must be calculated based on the total calendar days of the period. This ensures that both worked days and non-working days (e.g. Sundays) contribute equally to the total payment. This calculation also applies to the daily schedule, as the proportional daily wage must be divided equivalently across the hours of the day. Current behavior: When an employee has an unpaid leave, the basic salary is incorrectly prorated using only the registered days/hours. Example: For a monthly wage of 30,000 MXN in a month with 22 scheduled days (21 attendances + 1 unpaid leave), the implicit daily rate becomes 1,363.63 (30,000 / 22). This leads to an incorrect basic salary of 28,636.36 MXN for the days worked. This also happens with unpaid leave for x hours, e.g., for 2 hours, the unpaid leave is calculated as 2 hours * (30,000 / (22 days * 8 hours)) = 340.90 MXN, which is incorrect. Expected behavior: The basic salary should be derived from the full period (e.g., 30 days for a month, 15 for a bi-weekly period). Example: For a 30,000 MXN wage, the daily rate should be 1,000 MXN (30,000 / 30 days). If there is 1 unpaid leave, the basic salary should be 29,000 MXN (29 days * 1,000 MXN), regardless of the number of scheduled working days in the calendar. For unpaid leaves by hours, e.g., for 2 hours, the unpaid leave should be calculated as 2 hours * (30,000 / (30 days * 8 hours)) = 250.00 MXN. To achieve this, the calculation of the days in the `_get_worked_day_lines` is: * Adjust worked days/hours for out-of-contract entries where necessary, ensuring that rest days(Sundays) are included in the count. * Get all worked hours in the lines. * Calculate the number of days to pay based on the total hours and the hours per day. ### Case: payslip does not cover the complete pay period Current behavior: If a payslip is created for a partial period, the total amount is the full period wage. Expected behavior: The total amount should be pro-rated based on the days of the period. For example, if a payslip is created for 25 days(with a monthly schedule pay), the total amount should be the daily salary multiplied by 25 days. To achieve this, `_compute_amount` is updated to calculate the wage based on the `l10n_mx_daily_salary`. Changes on tests: * Add: * `test_monthly_payslip_with_partial_leave`, `test_partial_payslip`, `test_partial_payslip_new_hire_month_31_days` and `test_partial_payslip_new_hire_month_28_days`. * `test_hourly_payslip_by_attendance` to validate when `Work Entry Source` is set to "attendance". * Update: * `test_hourly_payslip`, `test_monthly_payslip` and `test_partial_payslip_new_hire` to align with the new calculation. * Adjust payslips dates to match the `schedule_pay` in `test_regular_payslip_subsidy` and `test_weekly_schedule_pay_no_code` * Fix a one-day difference in `TestMxEdiHrPayrollCommon`(16 days instead of 15 days for a bi-weekly schedule), and update the corresponding CFDI values. * Refactor tests and add new helpers. ### Error on [warning issues generation][1] and [`_compute_is_wrong_duration`][2] The warning: `"The duration of the payslip is not accurate according to the structure type."` appears with these custom periods for Mexican Payroll, although the period is correct: * `10_days` * `14_days` * `bi-weekly` Steps to replicate: * Install `l10n_mx_hr_payroll` module. * Switch to "INNOVACION VALOR Y DESARROLLO SA SA" company. * Go to Employees and open "Cesar Osbaldo Cruz Solorzano". * Click on "Payroll" tab, change the "Pay Schedule" to any option listed above, for example "Bi-weekly". * Go to Payroll > Payslips > Payslips and create a new pay run. * Select Salary Structure 'Mexico: Regular Pay', Pay Schedule 'Bi-weekly' and the Period '01/01/2026 -> 01/15/2026'. * Click on "Continue", select Cesar and click on "Select". * It appears the warning issue. Problem: The warning is raised because of `slip.date_from + slip._get_schedule_timedelta() != slip.date_to` condition, because `_get_schedule_timedelta` function calls [`self._schedule_timedelta(schedule, self.date_from)`][3] without the `country_code` argument. In the Mexican Payroll [_schedule_timedelta is overriden][4] but it is necessary to call it with the country code to use the custom periods; similar to how the [`date_end` is computed][5]. Solution: Call `_get_schedule_timedelta` passing the `country_code` [1]: https://github.com/odoo/enterprise/blob/1666ac87b6cb40e904210fecd159df3ac5b6b33a/hr_payroll/models/hr_payslip.py#L1367 [2]: https://github.com/odoo/enterprise/blob/1666ac87b6cb40e904210fecd159df3ac5b6b33a/hr_payroll/models/hr_payslip.py#L1454 [3]: https://github.com/odoo/enterprise/blob/1666ac87b6cb40e904210fecd159df3ac5b6b33a/hr_payroll/models/hr_payslip.py#L275 [4]: https://github.com/odoo/enterprise/blob/1666ac87b6cb40e904210fecd159df3ac5b6b33a/l10n_mx_hr_payroll/models/hr_payslip.py#L58 [5]: https://github.com/odoo/enterprise/blob/1666ac87b6cb40e904210fecd159df3ac5b6b33a/hr_payroll/models/hr_payslip_run.py#L211 target: 19.0 task-6073601 Forward-Port-Of: odoo/enterprise#112524
This update resolves an issue where the original product name was incorrectly prepended to product descriptions on invoices and RFQs when editing. The fix ensures that only translated names and descriptions are displayed, improving invoice clarity and accuracy for users working with multiple languages. This change impacts invoicing and purchasing workflows.
Original PR description
Steps to reproduce: 1- Install invoicing app 2- Add French language in the settings 3- Create a customer with language set as French 4- Create a product and define french translations of the name and…
Steps to reproduce: 1- Install invoicing app 2- Add French language in the settings 3- Create a customer with language set as French 4- Create a product and define french translations of the name and the description in Sales tab 5- Create an invoice for that customer and choose the product you created 6- You will find the translated product name and description under the product name 7- Edit the description, save and preview the invoice 8- The invoice line will contain [Product Name EN] [Product Name FR] [Product Description FR] Description of the issue: When creating an invoice for a customer whose language differs from the user's account language, manually editing the product description on an invoice line causes the original product name to be prepended to the description. The same issue happens in a RFQ in Purchase. Expected behaviour: User can edit the product description in the invoice line and the output in the invoice should only be the translated name and description, without the original product name. Why this happens? 1- When the product is selected in the invoice line, the label is loaded from _compute_name method in account_move_line, which holds the translated name and description. 2- After editing the description and escaping the field (clicking outside it), the parseLabel method is called, which prepends the original name to the label, making the invoice output as [original name] [translated name] [translated desc.] Fix: Use the product name returned in the label for trimming and concatenation to handle both original/translated text scenarios. References: original PR: #248401 partial revert: #254158 opw-5480494 Forward-Port-Of: odoo/odoo#256837
This update fixes inaccuracies in tax calculations for Argentina (l10n_ar) by modernizing the underlying tax calculation methods. The changes ensure accurate VAT and tax amount reporting, aligning with Argentina's specific tax regulations. This improves the reliability of financial reporting for Argentinian businesses.
Original PR description
This commit refactors the tax amount calculations on the `_get_vat` and `_l10n_ar_get_amounts` method so that it uses the tax computation engine helpers properly, to prepare for any future fixes done on how Argentina tax calculations differs from all other localizations. This replaces all move line queries with the proper `base_line` calculation, with the proper aggregating methods. related-enterprise-PR: https://github.com/odoo/enterprise/pull/92639 task-4891206 Forward-Port-Of: odoo/odoo#259976 Forward-Port-Of: odoo/odoo#223393
This update fixes inaccuracies in how tax amounts are calculated for Arabic VAT (l10n_ar_edi) within Odoo. By utilizing the new tax computation engine, the system now accurately processes and formats tax figures, ensuring correct financial reporting. This improves the reliability of VAT calculations for Arabic-speaking customers.
Original PR description
- Rewrite all tax amounts calculations on `_get_tributes` and `_get_line_details` to properly use the tax computation engine helpers (`base_line`, and aggregating methods) - Ensure that all final amounts from the calculation are formatted with `float_repr` with appropriate precision. related-community-PR: https://github.com/odoo/odoo/pull/223393 task-4891206 Forward-Port-Of: odoo/enterprise#114251 Forward-Port-Of: odoo/enterprise#92639
This update resolves an error that prevented users from grouping depreciation schedules by analytic plans. The issue stemmed from an incorrect formatting of data within the database query, specifically surrounding analytic account IDs. Removing unnecessary parentheses corrected the query and allows users to properly group schedules by analytic plans.
Original PR description
Currently, an error occurs when user tries to group by an analytic plan on depreciation schedule. Steps to replicate: - Install `accountant` with demo, turn on `Analytic Accounting` from settings. -…
Currently, an error occurs when user tries to group by an analytic plan on depreciation schedule.
Steps to replicate:
- Install `accountant` with demo, turn on `Analytic Accounting` from settings.
- Open `Accounting > Review > Depreciation Schedule`.
- Click `Analytic` > Add a `Plan`.
Error:
```
psycopg2.errors.UndefinedFunction: operator does not exist: text = record
LINE 12: WHERE key IN (('7', '16', '8', '15', '6', '9', '...
^
HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
```
Cause:
- At line [1], we pass a tuple of `analytic_account_ids`, which is then wrapped again in parentheses at line [2].
- This results in the IDs being enclosed in double parentheses, e.g. `(('7', '16', '8', '15', '6'))`.
- When the `IN` clause is used with this double-parenthesized tuple, PostgreSQL treats it as a list containing a single record. It then tries to compare `key` (a text value) with that record `('7', '16', '8', '15', '6')`, effectively resulting in a `text = record` comparison, which is invalid and causes error.
Solution:
- Removed the extra parentheses from the query.
[1]: https://github.com/odoo/enterprise/blob/847b5be291adbfa315f8f74ab7a6dd3d1fb7d518/account_asset/models/account_assets_report.py#L124
[2]: https://github.com/odoo/enterprise/blob/847b5be291adbfa315f8f74ab7a6dd3d1fb7d518/account_asset/models/account_assets_report.py#L121
sentry-7423121981This update fixes a potential error in bank statement reconciliation. Previously, the system incorrectly matched bank transactions with payments from different companies using the same UUID. This could lead to foreign tax lines being added to the wrong company's accounting records. The fix ensures both the bank statement and payment share the same company hierarchy for accurate reconciliation.
Original PR description
ticket-5992100 When auto-reconciling bank statement lines, the end-to-end UUID lookup correctly checked that matched AMLs and their payment belong to the same company hierarchy, but missed checking that the payment also belongs to the same company hierarchy as the bank statement line itself. This allowed a payment from an unrelated company (sharing the same end-to-end UUID from an inter-company bank transfer) to be matched against another company's bank transaction, pulling foreign tax lines into the wrong company's journal entry. Fix by adding the same parent-path company check between the bank statement line and the payment. Forward-Port-Of: odoo/enterprise#113279
This update fixes an issue where invoices incorrectly showed as 'Paid' after a check was voided. The change ensures that the invoice payment state reverts to 'not_paid' when a check is voided, preventing incorrect payment reporting. This improves the accuracy of financial records.
Original PR description
Steps to reproduce: 1- Install l10n_ar and l10n_latam_check modules 2- Switch company to (AR) Responsable Inscripto 3- Go to [Accounting -> Configuration -> Journals -> Bank] and make sure 'outstanding payments account' is set in outgoing payments for own checks and manual payment 4- Go to [Accounting -> Vendors -> Bills] and create a new bill 5- Create an own check payment for the full amount 6- Go to the check and void it Description of issue: When you view the invoice after voiding the check, it's payment state will be shown as 'Paid' Expected behavior: Invoice payment state should go back to 'not_paid' Why this happens: When the check is voided, it's `amount_residual` attribute becomes 0. This causes `pay.is_matched` to be True, and as a result `all_payments_matched` attribute is also True. This turns the invoice payment state to paid. opw-6016394 Forward-Port-Of: odoo/odoo#256118
2 changes
Resolved issues and error corrections
This update fixes an issue where VAT reports were incorrectly using the company's VAT number instead of the fiscal position's foreign VAT ID. This ensures accurate tax reporting for businesses using foreign VAT schemes, particularly in countries like Belgium. The change corrects a data mismatch in generated reports.
Original PR description
### Issue: When a fiscal position defines a `foreign_vat`, tax reports generated for that country still use the company's VAT number instead For example, with a Belgian fiscal position using…
### Issue: When a fiscal position defines a `foreign_vat`, tax reports generated for that country still use the company's VAT number instead For example, with a Belgian fiscal position using `BE010203040`, the generated BE VAT report uses the company VAT instead of `010203040` ### Cause: The report generation did not check whether there is a fiscal position with a `foreign_vat` matching the country of the report ### Note: The example above uses a Belgian fiscal position to reproduce the issue Starting from 19.0, this specific flow is blocked because Intervat is enabled in production mode by default A related fix makes the Intervat settings available in that case Until then, the issue can be reproduced by temporarily commenting out: https://github.com/odoo/enterprise/blob/5fb58a9b7b3ae89f87e84d4ba1fa3a16237d80ac/l10n_be_intervat/models/account_return.py#L15 ### Steps to reproduce: - Disable demo data and install `accountant` - Create a Fiscal Position "Belgium" (Country: Belgium, Foreign Tax ID: BE010203040) - Click the alert to install the Belgian taxes - Create and confirm an invoice for a Belgian customer: - Fiscal Position: Belgium - Any product with a Belgian tax - Invoice Date: 01/01/2026 - Open the Tax Report and select `VAT Return (BE)` for January - Click `Returns` and select the full year - Mark the December return as Completed from the three-dot menu - Review January and fill the missing company data (TIN: 1111111, phone and email) - Click `Validate -> Lock -> Submit` ### Before the fix: The generated XML uses the company VAT number (`1111111`) instead of the fiscal position foreign VAT (`010203040`). opw-6076540 Forward-Port-Of: odoo/enterprise#112610
This update addresses a critical issue where Odoo would crash when attempting to download a URL document alongside a spreadsheet. The fix ensures stable and reliable downloading of both document types, improving user experience and preventing data loss. This resolves a reported bug impacting users accessing and sharing documents.
Original PR description
Try to download a url document along with a spreadsheet. `onDownload` crash when trying to download a url document. Task: 5485662 Forward-Port-Of: odoo/enterprise#113645 Forward-Port-Of: odoo/enterprise#112513
6 changes
Resolved issues and error corrections
This update addresses a critical issue where Odoo would crash when attempting to download a URL document alongside a spreadsheet. The fix ensures stable downloads of combined documents, improving user experience and preventing data loss. This resolves a reported bug impacting users accessing and sharing documents.
Original PR description
Try to download a url document along with a spreadsheet. `onDownload` crash when trying to download a url document. Task: 5485662 Forward-Port-Of: odoo/enterprise#113645 Forward-Port-Of: odoo/enterprise#112513
This update fixes an issue where group payments were incorrectly calculating amounts for vendor bills with multiple installments. Now, payments accurately reflect the full amount of the first bill and only the initial installment of subsequent bills, ensuring accurate accounting for recurring payments. This improves the reliability of our payment processing.
Original PR description
Steps to reproduce: 1- Install Accounting and make sure "Batch Payments" is enabled in settings 2- Go to [Accounting -> Vendors -> Bills] 3- Create two bills for the same vendor, ensuring one of them has multiple installments (i.e payment term with 3 installments) 4- Confirm the bills 5- In list view, select both bills and another bill from a different vendor and click on Pay 6- Select "Group Payments" and confirm the payment Description of issue: The batch payment of the first vendor has the full amount for both bills Expected behavior: The payment should consider the full amount of the first bill and the first installment only of the second bill opw-5969972 Forward-Port-Of: odoo/odoo#257871
This update resolves an issue where the 'Returns' button and Return Period options were missing when viewing variant reports (like RCE Purchase 8.5). The fix ensures these features now correctly display based on the report's root type, addressing a discrepancy in how variant reports handle return data.
Original PR description
Since the Accounting Returns refactor https://github.com/odoo/enterprise/pull/81569 the “Returns” button and the Return-Period date mode only appear when the current `account.report` carries at least…
Since the Accounting Returns refactor https://github.com/odoo/enterprise/pull/81569 the “Returns” button and the Return-Period date mode only appear when the current `account.report` carries at least one return type (i.e., `self.return_type_ids` is non-empty). Localization modules (e.g., PE) attach `account.return.type` to the filing (root) VAT report, while ledger/variant reports (e.g., VAT Report (RCE Purchase 8.5) (PE)) are presentation variants and usually do not repeat that configuration. As a result, opening a variant report yields: No Returns button, because _init_options_buttons() checks only `self.return_type_ids`. No Return Period chip and wrong/no return-period boundaries, because the date initializers also check/use only `self.return_type_ids`. Even if the button is shown by a downstream customization, `action_open_returns() would still open an empty list because it filters on `self.return_type_ids.ids`. Why the issue happens: Variant reports (like RCE 8.5) have `self.root_report_id` pointing to their root VAT report, which does carry `return_type_ids`. But the in odoo we checks/uses only the current report’s`return_type_ids`, which is empty on variants. Hence: missing Returns button, missing Return Period, and wrong/empty return filtering. Fix: Adopt the reporting engine’s existing “inherit from root when on a variant” pattern and its already used elsewhere for `variants_source_id`, custom handlers ... Introduce a tiny helper: Prefer explicit types on the current report if present; otherwise fall back to the root’s types. Replace direct uses of self.return_type_ids by the effective types in: _init_options_buttons: show Returns on variants too. _init_options_return_periodicity: enable Return Period on variants when the root has exactly one type. _init_options_date(return-period branch): compute correct boundaries from effective types. _get_shifted_dates_period(return-period branch): shift using effective types. _get_date_bounds_info(..., 'previous_return_period'): validate count and compute previous period from effective types. action_open_returns: filter the list view by the types of variants if present or the root instead if the variant’s empty. Before this commit: On VAT Report (RCE Purchase 8.5) (PE): no Returns button is shown when you are in variant. After this commit: Returns button appears. Return Period mode works Open Returns action lists the correct returns (filtered by the effective type). Steps to reproduce: Install PE_reporting module make sure dev move is on Accounting -> Reporting -> tax reports Click on reports and switch from `Report: Group by: Account > Tax` to `RCE Purchase 8.4` Return Button is not there any more :( [opw-4973204](https://www.odoo.com/odoo/my-tasks/4973204)
This update fixes an error where kit-based sales orders were incorrectly calculating costs. Previously, the system multiplied kit quantities by batch sizes, leading to inflated prices. The fix ensures accurate cost calculations for kits, aligning with expected inventory valuation methods.
Original PR description
### Issue: When a kit BoM has `product_qty` > 1 (e.g. 12 Kit X = 12 Comp A + 12 Comp B), the SO line cost after confirmation is multiplied by the batch size. Selling 1 Kit X shows a cost of 360…
### Issue: When a kit BoM has `product_qty` > 1 (e.g. 12 Kit X = 12 Comp A + 12 Comp B), the SO line cost after confirmation is multiplied by the batch size. Selling 1 Kit X shows a cost of 360 instead of 30. ### Cause: The method `_compute_average_price` uses `bom.explode(self, 1)`, which returns raw BoM line quantities for one full batch. It accumulates the total batch cost but returns it without dividing by `bom.product_qty`. ### Steps to Reproduce: - Costing Method = AVCO, Inventory Valuation = Automated - Comp A (cost 10), Comp B (cost 20), Kit X (cost 0) - Kit BoM: 12 Kit X = 12 x Comp A + 12 x Comp B - Create and confirm a SO for 1 x Kit X - Expected SO line cost: 30 - Actual SO line cost: 360 Solution: This fix mirrors the normalization already done in `_compute_bom_price`, which correctly divides by `bom.product_qty` and converts UoMs. opw-5969310 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#253948 Forward-Port-Of: odoo/odoo#253406
This update fixes an issue where deferred invoice moves weren't consistently linked to the correct customer partner. The change ensures that the `partner_id` is always taken from the original invoice line, maintaining accurate data and preventing discrepancies in financial reporting. This improves data integrity for deferred accounting processes.
Original PR description
When creating deferred move lines, the `partner_id` could be incorrectly influenced by the `default_partner_id` context key (e.g., when generating an invoice from a Sales Order). This led to inconsistencies where the deferred move lines did not match the partner on the original invoice line. This commit ensures the `partner_id` is explicitly taken from the source invoice line, guaranteeing data integrity across all deferred move lines. Steps: - Create a sale order for partner X, receive and confirm it - Create the invoice from the SO - Change partner to Y but keep X as delivery partner (not essential to reproduce bthough) - Set a deferred start date and a deferred end date on the invoice line, covering two full months - Confirm the invoice and open deferred moves via the smart button -> Note that one deferred move's lines get the partner id from the SO instead of the invoice opw-6095711 Forward-Port-Of: odoo/enterprise#114439
This update allows administrators to override the automatic resetting of subscription users. Previously, this process was difficult to manage, and this change provides greater control over subscription user management within the Odoo Enterprise system. This improves flexibility and aligns with evolving business needs.
Original PR description
After this commit, the auto resetting of subscription user is overridable. Doing business logic in CRUD methods makes them impossible to bypass, by encapsulating the logic in another method, it would be easily overridable. Forward-Port-Of: odoo/enterprise#114202 Forward-Port-Of: odoo/enterprise#114055
4 changes
Resolved issues and error corrections
This update resolves two issues impacting how users manage manufacturing orders through the Barcode app. Specifically, it prevents the UoM from changing after confirmation and ensures that manually entered quantity producing values are saved correctly, improving data consistency and reducing user frustration.
Original PR description
### Issue Two bugs reported in the Barcode app / Manufacturing Order flow: **1. UoM change after confirm leaves MO inconsistent** Changing the UoM on a confirmed MO via the Barcode app does not…
### Issue Two bugs reported in the Barcode app / Manufacturing Order flow: **1. UoM change after confirm leaves MO inconsistent** Changing the UoM on a confirmed MO via the Barcode app does not recalculate `product_qty` / `qty_producing`. The backend locks the UoM after confirm — the Barcode view did not. **2. `qty_producing` reset on wizard open/close** Typing a value in `qty_producing` then opening the "Change Qty to Produce" widget (even closing without saving) caused the typed value to vanish. Root cause: the widget's `onClose` calls `env.model.load()`, which refetches from DB and discards any unsaved form edits. ### Fix - `product_uom_id` in the Barcode MO form is now readonly once `state != 'draft'`, matching the backend. - `openChangeQtyWizard` now saves the record before opening the wizard, so pending edits survive the reload. ### Steps to reproduce **UoM bug** 1. Create an MO, confirm it. 2. Open it in the Barcode app. 3. Try to change the UoM → it was editable (bug). **Qty reset bug** 1. Open a confirmed MO in the Barcode app, go to the header product page. 2. Type a value in `qty_producing` (e.g. `3`). 3. Click the `/ X` button next to it (opens the Change Qty wizard) then close it without clicking "Set Quantity". 4. `qty_producing` reverts to its previous value (bug). ### After the fix - UoM field is greyed out once the MO is confirmed. - Typed value in `qty_producing` is preserved after opening and closing the wizard. opw-5809178 Forward-Port-Of: odoo/enterprise#114075
This update ensures that VAT numbers in the VIES Summary Report XML files are formatted correctly, removing the country code. This is necessary to comply with Czech tax regulations and prevent errors when submitting reports to the tax authorities. The fix ensures accurate reporting and avoids potential issues with data validation.
Original PR description
**Steps to reproduce:** - Install the `l10n_cz_reports` module and switch to a `CZ Company` - Create an invoice for a customer with a VAT number, add a product, and set the Transaction Code (enable…
**Steps to reproduce:** - Install the `l10n_cz_reports` module and switch to a `CZ Company` - Create an invoice for a customer with a VAT number, add a product, and set the Transaction Code (enable it from the optional columns if needed). - Navigate to Reporting > VIES Summary Report. - Observe the value in the `VAT Number` column (includes country code). - From the dropdown, export the report as XML. **Observation:** In the generated XML file, the `c_vat` field contains the VAT number including the country code (e.g., `CZ12345679`) instead of only the numeric part (`12345679`). **Root cause:** At [1], the VAT number is directly taken from the report lines without removing the country code. **Fix:** This commit ensures that the `c_vat` field contains only the VAT number without the country code, complying with the official VIES XML format requirements. Ref: https://adisspr.mfcr.cz/dpr/adis/idpr_pub/epo2_info/popis_struktury_detail.faces?zkratka=DPHSHV#:~:text=Tax%20identification%20number%20of%20the%20purchaser%20(only%20the%20numeric%20part) [1]: https://github.com/odoo/enterprise/blob/c4f2c3442f30f5ac972dd136a3642acc5bcc6da2/l10n_cz_reports_2025/models/l10n_cz_vies_summary_handler.py#L29-L62 opw-6093259 Forward-Port-Of: odoo/enterprise#114730 Forward-Port-Of: odoo/enterprise#113083
This update prevents unauthorized users from viewing or modifying assets linked to invoices. Previously, users on certain groups could access assets, leading to potential data access issues. This change ensures that only users with appropriate accounting permissions can view associated assets, enhancing data security and accuracy.
Original PR description
Only groups `account.group_account_readonly`, `account.group_account_invoice` or higher have access to model `account.asset`, therefore if an user goes to see an invoice with assets and they are not on either group, they will receive an error and won't be able to access said invoice. How to reproduce: - Create a vendor bill - Create an account.asset and link it to said account.move - Go to the form view with an user that it's on group "Purchase: User" for example --> They get a traceback --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/enterprise#113858 Forward-Port-Of: odoo/enterprise#112890
This update fixes a problem where opening the same restaurant order on multiple devices would cause errors with the Fiskaly payment system. The fix ensures that transaction details are properly shared between devices, preventing duplicate transaction attempts and associated API errors. This improves the reliability of the restaurant POS experience.
Original PR description
In a restaurant POS, when an order with an active Fiskaly transaction is opened on a second device, `transactionState` and `tx_revision` were not available (uiState is not persisted to the server), causing the new device to attempt creating a duplicate transaction with a stale revision, which resulted in a Fiskaly API error. opw-6147654 Forward-Port-Of: odoo/enterprise#114599
6 changes
Resolved issues and error corrections
This update fixes a bug that occurred when rescheduling work orders in the Gantt view if a dependent operation lacked start or end dates. The fix ensures that dates are defined before comparisons are made, preventing a 'TypeError' and allowing rescheduling to continue smoothly. This improves the reliability of the Gantt visualization.
Original PR description
Currently, an error occurs when rescheduling work orders in the Gantt view if a dependent operation has no start or end date. **Steps to Reproduce:** - Install the MRP module (with demo data). -…
Currently, an error occurs when rescheduling work orders in the Gantt view if a dependent operation has no start or end date. **Steps to Reproduce:** - Install the MRP module (with demo data). - Activate "**Custom Work Order Dependencies**". - Create a new MO for the _Drawer_ product with _SEC-ASSEM_ BoM. - Confirm and plan the MO. - Remove both start and end dates of any dependent operation. - Manufacturing > Planning > Work Orders > Gantt - Enable **Auto-Reschedule (Keep Buffer)** and reschedule the first operation (in 'Drill 1'). **Error:** `TypeError - '>' not supported between instances of 'bool' and 'datetime.datetime'` **Cause:** At [1], `date_start` and `date_finished` can both be set to False because a condition that bypasses the UserError when both dates are empty (unlike earlier versions). As a result, during rescheduling, a False value is compared with a datetime, leading to a TypeError at [2]. Fix: This commit adds a condition before date comparisons to ensure the dates are defined. [1]: https://github.com/odoo/odoo/blob/3f256437a7e6c124affca8d5304476a67375753f/addons/mrp/models/mrp_workorder.py#L281-L284 [2]: https://github.com/odoo/enterprise/blob/ef2efe113684104032d798b5aa237c67a3bc240a/web_gantt/models/models.py#L484-L491 sentry-7377739830 Forward-Port-Of: odoo/enterprise#112729
This update resolves an issue where the version number on payslips could be incorrectly edited, leading to potential payroll inaccuracies. The change makes the version field read-only and automatically calculates it from the payslip period, ensuring data integrity. Additionally, a fix was implemented to handle multiple worked days records for meal voucher quantities, preventing errors during payroll calculations.
Original PR description
Before: version field was visible and editable, and could be incorrectly overridden After: version field is readonly, hidden (debug only), and always computed from payslip period without being overridden task-6112109
This update fixes a confusing issue for Mexican employees receiving payslips. Previously, an unstamped payslip was emailed immediately after batch confirmation, followed by a second email with the stamped version. Now, emails are only sent for Mexican payslips after the CFDI (tax document) has been generated, ensuring a cleaner and more accurate experience.
Original PR description
Currently, when a user confirms a payslip batch (hr.payslip.run), the base payroll module queues the PDF generation and sends an email to the employee with their payslip immediately. For Mexican payslips, this means the employee receives the email with an unstamped payslip (without CFDI UUID). Later, when the CFDI is generated, a second email is sent with the stamped version, confusing the employee. This commit prevents the email from being sent for Mexican payslips if the CFDI has not been generated yet, ensuring only the stamped payslip is emailed. Forward-Port-Of: odoo/enterprise#114731
This update fixes an issue where tax reports for international customers incorrectly used the company's VAT number instead of the customer's foreign VAT ID. The change ensures that VAT reports accurately reflect the customer's tax identification, improving financial reporting accuracy and compliance. This resolves a discrepancy impacting VAT calculations for businesses operating across borders.
Original PR description
### Issue: When a fiscal position defines a `foreign_vat`, tax reports generated for that country still use the company's VAT number instead For example, with a Belgian fiscal position using…
### Issue: When a fiscal position defines a `foreign_vat`, tax reports generated for that country still use the company's VAT number instead For example, with a Belgian fiscal position using `BE010203040`, the generated BE VAT report uses the company VAT instead of `010203040` ### Cause: The report generation did not check whether there is a fiscal position with a `foreign_vat` matching the country of the report ### Note: The example above uses a Belgian fiscal position to reproduce the issue Starting from 19.0, this specific flow is blocked because Intervat is enabled in production mode by default A related fix makes the Intervat settings available in that case Until then, the issue can be reproduced by temporarily commenting out: https://github.com/odoo/enterprise/blob/5fb58a9b7b3ae89f87e84d4ba1fa3a16237d80ac/l10n_be_intervat/models/account_return.py#L15 ### Steps to reproduce: - Disable demo data and install `accountant` - Create a Fiscal Position "Belgium" (Country: Belgium, Foreign Tax ID: BE010203040) - Click the alert to install the Belgian taxes - Create and confirm an invoice for a Belgian customer: - Fiscal Position: Belgium - Any product with a Belgian tax - Invoice Date: 01/01/2026 - Open the Tax Report and select `VAT Return (BE)` for January - Click `Returns` and select the full year - Mark the December return as Completed from the three-dot menu - Review January and fill the missing company data (TIN: 1111111, phone and email) - Click `Validate -> Lock -> Submit` ### Before the fix: The generated XML uses the company VAT number (`1111111`) instead of the fiscal position foreign VAT (`010203040`). opw-6076540 Forward-Port-Of: odoo/enterprise#112610
This update addresses a critical issue where Odoo Enterprise would crash when attempting to download a URL document alongside a spreadsheet. The fix ensures stable and reliable downloading of both document types, improving user experience and preventing data loss. This resolves a reported bug impacting document access.
Original PR description
Try to download a url document along with a spreadsheet. `onDownload` crash when trying to download a url document. Task: 5485662 Forward-Port-Of: odoo/enterprise#113645 Forward-Port-Of: odoo/enterprise#112513
This update fixes inaccuracies in how signed documents are displayed and communicated, particularly when using 'Sign Now'. Now, certificates clearly show who signed on behalf of whom, and confirmation emails accurately reflect the signing process, improving transparency and trust.
Original PR description
Before: When a document template is signed using "Sign Now" on behalf of another user, the certificate should show the line “Connected as ” for internal and portal users. Previously, the Email…
Before: When a document template is signed using "Sign Now" on behalf of another user, the certificate should show the line “Connected as ” for internal and portal users. Previously, the Email verification note under Participants could appear even when no email verification was actually done, for example when using "Sign Now". Additionally, the signature confirmation email did not clearly reflect when the document was signed locally on behalf of others. After: When a document is signed using Sign Now on behalf of another user, the certificate now shows the line "Connected as <LoggedUser>" for all users. The Email verification note under Participants is shown only when email verification actually happens Otherwise show `Document was signed locally for all signers using UserName's account` - The signature confirmation mail is updated for local sign cases `..., while connected as <LoggedUser>`. Impact: - Clearly shows in the certificate when a document is signed by user for another user. - Avoids showing Email verification information when it did not happen and displays the correct message instead. - Improves clarity and accuracy of signature confirmation emails. taskid-5343749
7 changes
Resolved issues and error corrections
This update fixes an issue where DIAN invoice states were incorrectly set to 'failed' due to expected status update failures. The fix ensures invoices successfully transmitted to DIAN receive the correct 'invoice_accepted' state, preventing problems like QR code generation errors. This improves the accuracy of DIAN invoice processing.
Original PR description
Before this commit, the logic that computes the invoice's DIAN state would rely solely on the state of the most recent document. The problem with that approach is that we will regularly send status…
Before this commit, the logic that computes the invoice's DIAN state would rely solely on the state of the most recent document. The problem with that approach is that we will regularly send status updates to DIAN after the invoice was successfully submitted via the status cron here: https://github.com/odoo/enterprise/blob/19.0/l10n_co_dian/models/account_move.py#L484 Those status updates are expected to fail a certain number of times (typically when no commercial status information is available, or in other terms when `l10n_co_dian_commercial_state` is still in `'pending'`). As a result, an invoice successfully transmitted to DIAN could still end up with a `l10n_co_dian_state` not set to `'invoice_accepted'`. This leads, among other things to a QR code that cannot be reprinted as the logic here: https://github.com/odoo/enterprise/blob/19.0/l10n_co_dian/models/account_move.py#L225 determines which template to render based on that state. The issue cannot be easily reproduced or tested as `l10n_co_dian.document` are generated almost only in prod scenarios. The most common setup where the error happens is for invoices that have 2 DIAN documents: 1. the first (oldest, bottom-most) one reflects acceptance of the invoice sending by DIAN (`state = 'invoice_accepted'`) 2. the second one (most recent, top-most), which reflects the latest query for commercial status update by the cron and which failed (`state = 'invoice_rejected'` and the error message reflects the lack of commercial events) opw-6108318 opw-5931442 opw-6034035
This update ensures that Brazilian tax documents generated for EDI comply with local law. It incorporates approximate tax values provided by Avalara, which are now included in the EDI payload regardless of whether specific tax information is available. This ensures accurate and compliant tax reporting for Brazil.
Original PR description
All fiscal documents are required by Brazil law to include the approximate value of fed, state, and city taxes that affect it. Avalara already provides back these values in their tax calculation response, we just missed sending it to the EDI. This commit takes the information from that response and adds it to the EDI payload to make sure that it is generated properly into the generated documents. We are required to always show this even if there are no informative taxes as such we combine it with the T&C sent already. task-5478059
This update corrects a bug where overtime work entries were incorrectly generated on previous days due to an issue with how work entries were being regenerated. The fix ensures accurate overtime calculations by considering employee timezones when searching for work entries. This prevents incorrect overtime payments.
Original PR description
How to reproduce: - Select an employee with an overtime ruleset and work entries based on attendances - Create attendance with an approved overtime - Go to "Work Entries" in Payroll, and regenerate the work entries for the following day of the attendance - A new overtime work entry is generated on the first day. Reason: Because of how regenerating work entries is done, the computed date for searching overtime lines took into account the previous day (i.e. regenerating a work entry for a tuesday in an UTC+1 timezone made it so the starting date was on monday at 23:00:00), and since the _read_group only looked at the date part of the time start without taking into account the hour, it included the overtime of the previous day. How it was fixed: The domain now takes into account the timezone of the employee to generate the domain for the _read_group to ensure the correct day is selected Task ID: 5899657
This update resolves a problem where CFDI (Mexican tax) generation for payslips would fail due to rounding discrepancies. The fix ensures payroll calculations are rounded to the required 2 decimal places before generating the CFDI XML, aligning with Mexican tax regulations. This prevents errors and ensures accurate tax reporting.
Original PR description
Currently, if the company is configured with a 4-decimal currency, the CFDI generation for payslips might fail with NOM111 and CFDI40119 errors. This occurs because the calculation of totals and subtotals uses the raw unrounded floats, which can cause penny differences when the XML template formats the individual lines to 2 decimal places. This commit forces all payroll concept amounts to be explicitly rounded to 2 decimal places before accumulating the totals. This ensures that the sum of the formatted XML nodes precisely matches the total and subtotal values reported in the CFDI. Accounting might require a higher decimal precision for the company's currency (e.g., 4 decimals for inventory). However, payroll CFDI stamping strictly requires 2 decimal precision. This fix isolates the payroll CFDI calculations from the company's currency settings.
This update fixes an issue where tax reports for international customers incorrectly used the company's VAT number instead of the fiscal position's foreign VAT ID. The change ensures that VAT reports accurately reflect the customer's tax ID, improving compliance and reporting accuracy for businesses operating across borders. This was triggered by a specific test case involving a Belgian fiscal position.
Original PR description
### Issue: When a fiscal position defines a `foreign_vat`, tax reports generated for that country still use the company's VAT number instead For example, with a Belgian fiscal position using…
### Issue: When a fiscal position defines a `foreign_vat`, tax reports generated for that country still use the company's VAT number instead For example, with a Belgian fiscal position using `BE010203040`, the generated BE VAT report uses the company VAT instead of `010203040` ### Cause: The report generation did not check whether there is a fiscal position with a `foreign_vat` matching the country of the report ### Note: The example above uses a Belgian fiscal position to reproduce the issue Starting from 19.0, this specific flow is blocked because Intervat is enabled in production mode by default A related fix makes the Intervat settings available in that case Until then, the issue can be reproduced by temporarily commenting out: https://github.com/odoo/enterprise/blob/5fb58a9b7b3ae89f87e84d4ba1fa3a16237d80ac/l10n_be_intervat/models/account_return.py#L15 ### Steps to reproduce: - Disable demo data and install `accountant` - Create a Fiscal Position "Belgium" (Country: Belgium, Foreign Tax ID: BE010203040) - Click the alert to install the Belgian taxes - Create and confirm an invoice for a Belgian customer: - Fiscal Position: Belgium - Any product with a Belgian tax - Invoice Date: 01/01/2026 - Open the Tax Report and select `VAT Return (BE)` for January - Click `Returns` and select the full year - Mark the December return as Completed from the three-dot menu - Review January and fill the missing company data (TIN: 1111111, phone and email) - Click `Validate -> Lock -> Submit` ### Before the fix: The generated XML uses the company VAT number (`1111111`) instead of the fiscal position foreign VAT (`010203040`). opw-6076540 Forward-Port-Of: odoo/enterprise#112610
This update addresses a critical issue where Odoo would crash when attempting to download a URL document alongside a spreadsheet. The fix ensures stable downloads of combined documents, improving the user experience and preventing data loss. This resolves a reported bug impacting document access.
Original PR description
Try to download a url document along with a spreadsheet. `onDownload` crash when trying to download a url document. Task: 5485662 Forward-Port-Of: odoo/enterprise#113645 Forward-Port-Of: odoo/enterprise#112513
This update fixes a reporting issue related to Hong Kong's IRD (IRD56B/F/G) salary reports. It adds adjustments for global reimbursements and deductions, ensuring that taxable income totals are accurately calculated. This improves the reliability of financial reporting for Hong Kong businesses using Odoo.
Original PR description
Added GLOBAL_REIMBURSEMENT and GLOBAL_DEDUCTION to the AmtOfSalary calculation for IR56B/F/G reports. This ensures adjustments are properly reflected in taxable income totals. task-6126661
8 changes
Resolved issues and error corrections
This update fixes an issue where deferred invoice moves weren't consistently linked to the correct customer partner. The change ensures that the partner ID is pulled directly from the original invoice line, maintaining accurate record-keeping and preventing discrepancies in financial reporting. This improves data integrity for deferred accounting processes.
Original PR description
When creating deferred move lines, the `partner_id` could be incorrectly influenced by the `default_partner_id` context key (e.g., when generating an invoice from a Sales Order). This led to inconsistencies where the deferred move lines did not match the partner on the original invoice line. This commit ensures the `partner_id` is explicitly taken from the source invoice line, guaranteeing data integrity across all deferred move lines. Steps: - Create a sale order for partner X, receive and confirm it - Create the invoice from the SO - Change partner to Y but keep X as delivery partner (not essential to reproduce bthough) - Set a deferred start date and a deferred end date on the invoice line, covering two full months - Confirm the invoice and open deferred moves via the smart button -> Note that one deferred move's lines get the partner id from the SO instead of the invoice opw-6095711
This update corrects a previous error in Odoo's French reporting module. Accounts 657 and 757, introduced by a recent French accounting reform (PCG 2025), are now correctly classified as part of current operations. This ensures accurate profit and loss statements.
Original PR description
…tions As part of the PCG 2025 reform in France, accounts 657 and 757 were introduced to handle capital gains and losses on the disposal of tangible and intangible assets related to normal, current activities. Previously, Odoo incorrectly categorized these under exceptional items which led to mismatches in the P&L. Source: https://www.anc.gouv.fr/files/anc/files/1_Normes_fran%C3%A7aises/Plans%20comptables/PCG--1er-janvier-2025.pdf Relevant excerpts: <img width="630" height="372" alt="image" src="https://github.com/user-attachments/assets/88a66dac-1cc0-4a33-a902-edb6b626f18f" /> <img width="631" height="318" alt="image" src="https://github.com/user-attachments/assets/403b65dc-20ba-447e-937d-20575f1f45ab" /> opw-6105764 Forward-Port-Of: odoo/enterprise#114837
This update resolves an error that occurred when users attempted to pay through express checkout on the website. The fix addresses a technical issue related to delivery discounts and ensures a smoother payment process. It prevents a 'ValueError' from disrupting the checkout flow.
Original PR description
Currently, an error occurs when user makes payment through express checkout on the website. Steps to Reproduce: - Install the `website_sale_loyalty` module. - Install `Demo` payment provider. - Go to…
Currently, an error occurs when user makes payment through express checkout on the website. Steps to Reproduce: - Install the `website_sale_loyalty` module. - Install `Demo` payment provider. - Go to `website` > `Shop` > `Add a product to the cart`. - `View cart` > `Pay with Demo` > `Pay`. - Click the `back button` (Chrome navbar) - Now, click `Pay with Demo` > `Pay` again. `ValueError: Expected singleton: sale.order()` The error occurs after this commit https://github.com/odoo/odoo/commit/bf8d08cd22b5d982a6a71353db5979f6b7545bd8, which overrides method [1] to include the delivery discount, if any. If order_sudo is empty, it raises this error [2]. This commit ensures that if order_sudo is not present, a UserError is raised with an appropriate message. [1]- https://github.com/odoo/odoo/blob/74a8334558bf86c07c0d68090a9126911867ef42/addons/website_sale/controllers/delivery.py#L160 [2]- https://github.com/odoo/odoo/blob/74a8334558bf86c07c0d68090a9126911867ef42/addons/website_sale_loyalty/controllers/delivery.py#L18 sentry-6759936549 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves a critical error that prevented users from accessing newly created model pages on the website. The issue stemmed from a system crash when a model parameter was missing, leading to a `KeyError`. The fix ensures stable website functionality by correctly handling model access.
Original PR description
When accessing a model page through a website route, the system crashes with a `KeyError` if the model parameter is missing. This issue arises because the code attempts to access `request.env[False]`, which is not a valid model name. **Steps to Reproduce:-** 1. Install the `Website` and `Studio` modules. 2. Navigate to `Sales` and, using Studio, create a `new model page` for the sale order model. 3. The new page will now be visible on the website. 4. Uninstall the `Sale` module from the Apps. 5. Attempt to access the page from the website. **Error:-** `KeyError: False` **Solution:-** - When module is installed we need to also unlink the related `website.controller.page`. **Sentry - 6311722475** I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update fixes an issue where Google Reserve appointments incorrectly displayed resources as available due to a lack of leave status checks. Additionally, a redundant offset from the frontend was removed, streamlining the process. This ensures accurate availability and a better user experience for booking appointments.
Original PR description
Resources on leave were still showing as available in BatchAvailabilityLookup responses because unavailabilities were not checked. Also remove the min_schedule_hours offset copied from the frontend logic. It is not relevant for Google Reserve as slots are pre-built in the feeds. Task-6150788
This update fixes an issue where flexible calendar hour calculations were inaccurate due to how time boundaries were handled. The fix ensures 'out of contract' hours are calculated correctly, regardless of user timezone, leading to more precise worked-time reporting. This impacts payroll accuracy for employees on flexible schedules.
Original PR description
Flexible calendar intervals are computed with date-only boundaries, which can shift the range used for worked time calculations. ### **Steps to reproduce:** 1) Install hr_payroll 2) Create a flexible…
Flexible calendar intervals are computed with date-only boundaries, which can shift the range used for worked time calculations. ### **Steps to reproduce:** 1) Install hr_payroll 2) Create a flexible working schedule with 56 hr per week and 8hrs avg per day 3) Create an employee with this working schedule and joined from `16th Feb 2026`. 4) Create a payslip for this employee for the February period. ### **Observed Behavior:** "out of contract" working hours are 120:59hr <img width="1213" height="406" alt="image" src="https://github.com/user-attachments/assets/3f7104fb-3a59-48e3-aaf6-052dcf18c0c0" /> ### **Expected Behavior:** "out of contract" working hours should be 120hr <img width="1225" height="429" alt="image" src="https://github.com/user-attachments/assets/98898b16-4e36-4a30-9460-633f32c53ec3" /> ### **Root Cause:** The flexible calendar interval computation trims the interval boundaries by converting them to dates at [1], and assumes `end_datetime` is always midnight at [2]. This ignores timezone effects, depending on the user timezone, `end_datetime_adjusted`, may still fall on the same day, so an extra day can be included in the computation. This produces incorrect worked-hours totals for flexible calendars. [1]- https://github.com/odoo/odoo/blob/a9a63976372d3b5411fd798a48cc5302c2de8af0/addons/resource/models/resource_calendar.py#L387-L389 [2]- https://github.com/odoo/odoo/blob/e49536031f61b90212eb6f0d1a8a3e15927e723d/addons/resource/models/resource_calendar.py#L402 ### **Fix:** Keep the full datetime values when computing flexible calendar intervals. Related Enterprise PR https://github.com/odoo/enterprise/pull/113119 **opw-6017569**
This update fixes an issue where out-of-contract hours were being incorrectly calculated for flexible work schedules. The change adds a test case to ensure accurate hour calculations when payslips cover periods starting or ending mid-day, preventing overpayment for employees on flexible contracts. This improves payroll accuracy and reduces potential financial discrepancies.
Original PR description
Currently, out-of-contract worked hours are overestimated for flexible calendars When the payslip period starts or ends in the middle of a day. ### **Steps to reproduce:** 1) Install hr_payroll 2) Create a flexible working schedule with 56 hr per week and 8hrs avg per day 3) Create an employee with this working schedule and joined from `16th Feb 2026`. 4) Create a payslip for this employee for the February period. This commit adds a test case for PR https://github.com/odoo/odoo/pull/257824 to ensure the worked hours for `out of contract` period. **opw-6017569**
This update resolves an issue where closing a tab with a new, unsaved record would trigger duplicate save attempts, leading to errors. The fix ensures that the browser's tab closing events are handled correctly, preventing these duplicate saves and improving data consistency. This improves the user experience when creating new records.
Original PR description
Currently, an error occurs when closing a tab with a new (unsaved) record. **Steps to replicate Error- 1:** - Install `hr`. - Open Employees and click new. - Give a name and close the tab (without…
Currently, an error occurs when closing a tab with a new (unsaved) record. **Steps to replicate Error- 1:** - Install `hr`. - Open Employees and click new. - Give a name and close the tab (without saving). **Error:** `KeyError: 'name'` ---- **Steps to replicate Error- 2:** - Install the `Time Off` module. - Go to `Time Off > Management > Time Off`. - Click on New and select an employee and close the tab. **Error:** `KeyError: None` --- **Cause:** - When closing the tab, the browser triggers both `visibilitychange` [1] and `beforeunload` [2]. - Both attempted to save, resulting in duplicate create calls — one with a valid payload and the other empty which leads to error at line [3]. **Solution:** - Skip the `beforeunload` urgent save if the record has no `resId`. This ensures that only existing records are saved at tab close. - Because `beforeunload` is called after `visibilitychange` so we let `visibililitychange` handle the save for new records. [1]: https://github.com/odoo/odoo/blob/6e6f2a0bc8b6b1dc3ef5f203530c6fb82a67132a/addons/web/static/src/views/form/form_controller.js#L467-L471 [2]: https://github.com/odoo/odoo/blob/6e6f2a0bc8b6b1dc3ef5f203530c6fb82a67132a/addons/web/static/src/views/form/form_controller.js#L482-L488 [3]: https://github.com/odoo/odoo/blob/6e6f2a0bc8b6b1dc3ef5f203530c6fb82a67132a/addons/hr/models/hr_employee.py#L476 sentry-6691540890,6234873849 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
3 changes
Resolved issues and error corrections
This update corrects a bug where confirming one upsell option within a subscription automatically cancelled all other alternative upsell options. Now, confirming a single upsell will only cancel the other alternatives, ensuring accurate subscription management. This improves the reliability of the subscription process.
Original PR description
When multiple upsells are created as alternatives for the same subscription, confirming one currently cancels all the upsells for the same subscription. This fix ensures that once an upsell is confirmed, only all other alternative upsells are automatically cancelled. task-5270139
This update resolves a duplication issue in the French Profit & Loss report by removing a redundant account (6492) that was previously included alongside account 649. This ensures accurate financial reporting for French businesses using Odoo Enterprise.
Original PR description
This commit is an addon to this commit[[1]] where we tried to avoid duplicate accounts in the Profit And Loss report. The problem is that we don't exclude the separated account 6492 from the original one (649). This commit adds the removal of this account in the report formula. task-6053784 Here is the coverage: [Profit and loss account (FR) - Accounts Coverage Report (2).xlsx](https://github.com/user-attachments/files/27011824/Profit.and.loss.account.FR.-.Accounts.Coverage.Report.2.xlsx) The correct separation: <img width="837" height="485" alt="image" src="https://github.com/user-attachments/assets/ebe98976-f689-4389-866a-c9a0c8b50534" /> [1]: https://github.com/odoo/enterprise/commit/4587c49c4b220305652150d2f21a95fb7cfa188d
This update fixes an error that occurred when importing SAF-T files into the accounting module. The issue stemmed from a missing element in the SAF-T XML, which caused a system error. This change ensures the import process completes successfully, allowing users to accurately import their financial data.
Original PR description
Currently, an error occurs when importing the SAF-T file into accounting. Steps to Reproduce: - Install the `account_saft_import` and `accountant` modules. - Create a `new company` with the country…
Currently, an error occurs when importing the SAF-T file into accounting. Steps to Reproduce: - Install the `account_saft_import` and `accountant` modules. - Create a `new company` with the country set to `Denmark`, and `switch` to this company. - Go to `Settings` > `Accounting`, and click `Import` under Accounting Import. - Click `Import SAF-T`, enable Import account opening balances, and upload [this file](https://drive.google.com/file/d/177zf_w3B8m3g2VlJkbDB-Zp61TbZuV5r/view) `AttributeError: 'NoneType' object has no attribute 'update'` This error occurs when importing the SAF-T file in accounting. The SAF-T XML does not include any <saft:Account> entries, so map_accounts is empty [1]. As a result, based on map_accounts here [2], it got None in data['account.move'], which causes the error in [3]. [1] https://github.com/odoo/enterprise/blob/2f59dc2443833b0308fcd774a8008b8ebdce48fd/account_saft_import/wizard/import_wizard.py#L436 [2] https://github.com/odoo/enterprise/blob/2f59dc2443833b0308fcd774a8008b8ebdce48fd/account_saft_import/wizard/import_wizard.py#L447 [3] https://github.com/odoo/enterprise/blob/2f59dc2443833b0308fcd774a8008b8ebdce48fd/account_saft_import/wizard/import_wizard.py#L467 This commit ensures that it uses an empty object if it gets None. sentry-6714182871