Daily updates from Odoo
Tuesday, May 19, 2026
274 changes
19 changes
Resolved issues and error corrections
This update resolves an issue where the Planning Gantt view didn't correctly calculate working hours when the view wasn't grouped by resources. The fix ensures the total row accurately displays working schedule data regardless of grouping, improving planning accuracy for users.
Original PR description
Issue: ---------------------------------------- In the Planning Gantt view when we don't group by resources, the total row is not considering the working hours. Steps to reproduce:…
Issue: ---------------------------------------- In the Planning Gantt view when we don't group by resources, the total row is not considering the working hours. Steps to reproduce: ---------------------------------------- - Open Planning - Remove the default group by resources - Have at least a planning slot for a non-flexible employee - The total row doesn't take the working schedule into account Cause: ---------------------------------------- Since [an improvement,](https://github.com/odoo/enterprise/commit/cc35e1a4729453e4f788034a94402ab048eadfcb) the working hours data in given to the `PlanningGanttRenderer` through the progress bars data. This is an issue because the progress bars are only there if we group by resources. ([src](https://github.com/odoo/enterprise/blob/423ab064847dd41d36778a812390e3bec53ba4dc/planning/models/planning_slot.py#L2669-L2678)) Solution: ---------------------------------------- In this commit we partially revert the commit adding the working intervals in the progress bars. Instead of doing it in `_gantt_progress_bar_resource_id()` we create a new method `_get_gantt_planning_data()` which is called directly in `get_gantt_data()` and returns useful information even when there are no progress bars. opw-5507063 Forward-Port-Of: odoo/enterprise#116914 Forward-Port-Of: odoo/enterprise#112522
This update resolves an issue where kitchen tickets were incorrectly printed when platform orders were cancelled, regardless of where the cancellation occurred (Odoo PoS or provider platform). Now, cancelled platform orders will no longer trigger kitchen ticket printing, improving order accuracy and reducing unnecessary printing.
Original PR description
This fixes platform orders should not send to kitchen printer when the platform orders being cancelled. Currently accepting platform orders will not send to kitchen printer. However when cancelling platform orders on either provider platform, or within Odoo PoS. It will print a kitchen ticket of customer note. task-6071740 Forward-Port-Of: odoo/enterprise#114171
This update resolves an issue where list markers with trailing empty lines or complex formatting (links, copy-paste) didn't consistently receive color or font size adjustments. The fix ensures that list items are fully recognized for styling, regardless of formatting, improving the user experience when applying text and font styles to lists.
Original PR description
### Steps to reproduce: **Issue 1:** - Create a list with multiple items and leave the last item empty. - Press Ctrl + A to select all content. - Apply a text color from the toolbar. - The list…
### Steps to reproduce: **Issue 1:** - Create a list with multiple items and leave the last item empty. - Press Ctrl + A to select all content. - Apply a text color from the toolbar. - The list marker of the last item does not receive the color. **Issue 2:** - Create a list and type some text. - Press Ctrl+A to select all. - Apply a font size via the font-size input (inline style=`font-size: ...`). - Then apply a font size via the font-size dropdown (class-based). - Font size from the dropdown is not applied. **Issue 3:** - Create a list item and type some text. - Convert the text into a link. - Copy the link. - Press Enter and paste the link. - Select the entire list using the mouse. - Apply font size & observe that font size is not applied to some list items. **Issue 4:** - Go to Todo and create a list. - Select all items (Ctrl + A). - Apply a background color class from the toolbar. - Apply a font color using inline styling. - Observe that the font color is not visible. ### Description of the issue/feature this PR addresses: - Full-selection detection relied on Range.isPointInRange() checks on list item leaf nodes. When a list item ended with a trailing empty line, the selection often stopped on the `<li>` element and did not include the `<br>` placeholder. As a result, such list items were not considered fully selected when applying text color, and their markers remained unstyled. - Applying a font-size class on a fully-selected list item could leave existing inline font-size on list item, so new class didn’t take effect. - Creating links inside list items & repeated copy-paste operations left empty text nodes (feff cleanup). Manual selection doesn't include these nodes, `areNodeContentsFullySelected` reports that list item is not fully selected. As a result, some list items were not considered fully selected, and font size was not applied. - Background color `(bg-*)` classes also define a color property. When a font color is applied, the color is set on the `<li>`, but the nested `font.bg-*` element’s color takes precedence, causing the applied font color to be overridden. ### Desired behavior after PR is merged: - List items with trailing empty line are now treated as fully selected, even when selection ends before the `<br>` placeholder. - Clear any existing font-size styles on the list item before applying the new font-size class, so the dropdown font size applies correctly. - Empty text nodes are removed before applying font size, ensuring full list item selection and consistent font-size application. - When a list item (li) has a text color (inline style or text-* class), and nested font element has only a background color class then font element now inherits the color from the li. task - 5454639 Forward-Port-Of: odoo/odoo#264759 Forward-Port-Of: odoo/odoo#241827
This update resolves an issue with the alignment of payrun details within the Odoo Enterprise system. The team removed unnecessary code and corrected the layout to ensure payrun information is displayed accurately. This improves the user experience and data clarity for payroll processing.
Original PR description
Remove useless classes and fix alignment task-6191499
This update enhances how Odoo handles database errors during safe evaluation. By catching and retrying `IntegrityError` exceptions, the system now behaves more consistently regardless of the code being executed, leading to more reliable operations. This improves overall system stability and reduces potential disruptions.
Original PR description
It makes sense to bubble up the `psycopg2.IntegrityError` (as well as the subcase `ConcurrencyError`) so that the retry mechanism can handle this exception. In fact, this exception can be triggered without necessarily a problem with the "logic/business code". This ensures consistent behavior between the business logic and the code executed in `safe_eval`. Task-6215886 Forward-Port-Of: odoo/odoo#264838 Forward-Port-Of: odoo/odoo#264266
This update resolves issues that occurred when archiving employees with attendance and planning modules. Specifically, it ensures employees are properly checked out of attendance and planning slots during archiving, preventing access errors and data inconsistencies. The fix utilizes a 'sudo' method to grant necessary permissions for updates.
Original PR description
- Attendance checkout - Step to reproduce: with attendance installed and an employee checked in, archive that employee by HR user. If missing attendance rights, the employee will be archived but not…
- Attendance checkout
- Step to reproduce: with attendance installed and an employee checked in, archive that employee by HR user. If missing attendance rights, the employee will be archived but not checked out from its ongoing attendance.
- Cause: if no role set for Attendance (default), no permission to update the employee attendance while archiving.
- Solution: using sudo method so that any user with sufficient rights to archive an employee, can trigger check out of the corresponding attendance.
- Planning access error (fixed in 18.0 by https://github.com/odoo/odoo/pull/219395)
- Step to reproduce: with attendance and planning installed, archive an employee having planning slots. If missing planning rights, an access error is raised
- Cause: on employee archive, the corresponding planning.slots are updated and some fields recomputed with insufficient rights.
- Solution: using sudo method for recompute.
Task: 6131692
Forward-Port-Of: odoo/odoo#264518
Forward-Port-Of: odoo/odoo#260566This update fixes a bug that caused remote meeting tabs to crash when the host ended a call. The change ensures that call action dropdowns handle call disconnections gracefully, preventing errors and maintaining the existing user interface. This improves stability and reliability for users accessing meetings from multiple tabs.
Original PR description
**Steps to Reproduce:** - Start a new meeting (Host Tab). - Duplicate the tab or open the same meeting URL in another tab (remote tab). - In the remote tab, open the call menu (dropdown). - From the…
**Steps to Reproduce:** - Start a new meeting (Host Tab). - Duplicate the tab or open the same meeting URL in another tab (remote tab). - In the remote tab, open the call menu (dropdown). - From the host tab, disconnect/end the call. - Crashes on Remote Tab. **Current behavior before PR:** Before this PR, duplicating a meeting tab could leave the remote tab with a stale call action dropdown after the host ended the call. Since some action properties and handlers still assumed that selfSession and channel were always available, interacting with the dropdown could crash with errors. **Desired behavior after PR is merged:** After this PR, call action labels/classes defensively tolerate missing selfSession or channel references, and stale click handlers gracefully no-op when the call disappears mid-interaction. This prevents remote tab crashes during call teardown while preserving the existing UI behavior. task-[6191740](https://www.odoo.com/odoo/project/1519/tasks/6191740) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#264989
This update fixes an issue where the print button disappeared from PDF attachment previews in version 19 and later. The change removes a redundant setting that was previously hiding the print button on desktop, ensuring it's consistently visible for all users. This restores a key functionality for accessing and printing PDF documents.
Original PR description
**Problem:** When opening a PDF attachment preview in v19+, the print button disappeared. As a result, the Print button is not accessible from the main toolbar. In v18 the buttons remained…
**Problem:** When opening a PDF attachment preview in v19+, the print button disappeared. As a result, the Print button is not accessible from the main toolbar. In v18 the buttons remained permanently visible. **Steps to reproduce:** - Open any record that has a PDF attachment in the chatter. - Click the PDF attachment to open the preview popup. - Observe toolbar buttons disappeared. **Cause:** commit responsible for this: https://github.com/odoo/odoo/commit/b7889d007f72c7e7f9f22318a9968338cde0ddb3 It was removed to prevent some bugs with some android/smartdevice and some old browsers `file_viewer.js` passes `hidePrint: true` to `hidePDFJSButtons()`. This was originally added alongside the mobile guard (`isMobileOS()`), but the `isMobileOS()` guard in `hidePDFJSButtons` already handles mobile, so the explicit `hidePrint: true` in `file_viewer.js` was redundantly hiding Print on desktop too. https://github.com/odoo/odoo/blob/654a1caafc2ab7b2841c372910b2e81dc6e9c035/addons/web/static/src/core/file_viewer/file_viewer.js#L60-L71 https://github.com/odoo/odoo/blob/654a1caafc2ab7b2841c372910b2e81dc6e9c035/addons/web/static/src/core/utils/pdfjs.js#L35-L37 **Fix:** - Remove `hidePrint: true` from `file_viewer.js` since mobile is already covered by the `isMobileOS()` check inside `hidePDFJSButtons()`. opw-6216534 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#264739
This update aligns the subheaders and numerical data within Odoo's financial reports, ensuring a more consistent and professional appearance. Previously, the alignment was inconsistent, making the reports less readable. This change improves the overall user experience and data presentation.
Original PR description
Before this commit, subheaders of numeric columns were centered, while the figures in the columns were aligned to the end. This commit ensures that both the subheader and the figures are aligned the same way (center or end). task-6197223 Forward-Port-Of: odoo/enterprise#117477 Forward-Port-Of: odoo/enterprise#116578
This update addresses an issue where customers could automatically have orders confirmed when using gift card balances to cover event costs. Now, Odoo requires the standard checkout process to be completed, even with a fully covered cart, ensuring accurate order processing and preventing potential errors. This improves order reliability and customer experience.
Original PR description
**Before this commit** If a gift card balance fully covers a shopping cart containing multiple events, Odoo auto-confirms the order as soon as the last event is added, skipping the final checkout step. **After this commit** Sale orders will no longer be automatically confirmed when a customer registers for a paid event, even if an applied gift card brings the total balance to zero. opw-5896626 Forward-Port-Of: odoo/odoo#264830 Forward-Port-Of: odoo/odoo#246629
This update fixes a UI inconsistency in the property editing process. Previously, the "Add Property" button would remain visible even when switching between records or creating new ones. Now, the button correctly resets to "Edit Properties" ensuring a smoother and more intuitive user experience when managing properties.
Original PR description
Before this commit: - The “+ Add Property” button was not visible when switching between notebook pages if it was present initially. - when we are doing edit properties from the cog menu and without doing save properties if we are creating new record or switch to other record at that time button still shows “Save Properties.” leading to inconsistent UI behavior. After this commit: - The “+ Add Property” button remains visible when switching between pages. - When in property edit mode, switching records or creating a new record now correctly resets the button state back to “Edit Properties”, ensuring consistent UI behavior. task-6051322 ENT PR: https://github.com/odoo/enterprise/pull/113248 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#258030
This update fixes a UI inconsistency in the worksheet property editor. Now, the ‘Add Property’ button remains visible while editing and correctly resets to ‘Edit Properties’ when switching records or creating new ones, ensuring a smoother and more reliable user experience. This resolves a previous issue where the button's state was confusing.
Original PR description
Before this commit: - The “+ Add Property” button was not visible when switching between notebook pages if it was present initially. - when we are doing edit properties from the cog menu and without doing save properties if we are creating new record or switch to other record at that time button still shows “Save Properties.” leading to inconsistent UI behavior. After this commit: - The “+ Add Property” button remains visible when switching between pages. - When in property edit mode, switching records or creating a new record now correctly resets the button state back to “Edit Properties”, ensuring consistent UI behavior. task-6051322 Forward-Port-Of: odoo/enterprise#113248
This update corrects an issue where invoices using a specific tax category ('O-service out of tax scope') in Odoo failed Peppol validation. The fix ensures invoices with this category don't include VAT IDs, aligning with Peppol requirements and preventing validation errors.
Original PR description
**PROBLEM** In peppol, there is a tax category 'O-service out of tax scope'. This tax category is used when what is invoice can't be tax (out of the tax scope). This is different from tax exemption: when using tax category O, there can't be any vat id on the invoice. This also means you can't use tax category O with other taxes, since other taxes need the vat id. Invoices generated by odoo with tax category O failed peppol validation. **STEP TO REPRODUCE** 1. install account_edi_ubl_cii_tax_extension. 2. Create a tax with tax category O. 3. Create an invoice and try validating using the file validator. 4. You should have error BR-O-02 and BR-O-05. opw-6012669 Forward-Port-Of: odoo/odoo#264081 Forward-Port-Of: odoo/odoo#254645
This update fixes a minor issue where some work entry names in the Odoo system were misspelled. The team corrected the data files to ensure accurate and consistent naming conventions for work entries, improving the overall user experience. This change was driven by a reported issue (opw-6090081).
Original PR description
Issue: ---------------------------------------- Some work entry names are wrong. Solution: ---------------------------------------- Change the data files. opw-6090081 Forward-Port-Of: odoo/odoo#264094
This update fixes a visual issue where long accounting reports would cut off the final row, preventing users from seeing all the data. The team adjusted styling to ensure all rows are fully visible, regardless of the report's length. This improves the clarity and completeness of financial reports.
Original PR description
Problem: When an accounting report fills a whole page, the final row is not fully visible Steps to reproduce: 1- View a tax report that has a lot of entries that would fill the whole screen 2- Notice how the last line is not fully visible and it isn't possible to scroll and view the rest of it Solution: Correctly style the different < div > elements opw-6171555 Forward-Port-Of: odoo/enterprise#116068
This update fixes a potential crash in the Gantt chart interface. It reintroduces a safeguard to prevent errors when a user attempts to drag a pill without a valid target. This ensures the Gantt chart remains stable and reliable during testing and user interactions.
Original PR description
In https://github.com/odoo/enterprise/pull/113438, it was incorrectly assumed that it would be impossible to initiate a pill drag without a valid target being found. This commit reintroduces a strict safeguard to handle scenarios where the drag is triggered with no valid cell target. This prevents unexpected crashes encountered during test executions. runbot-error-242486 Forward-Port-Of: odoo/enterprise#116619
This update fixes an issue where Knowledge articles appeared narrow when printed on large screens. The fix specifically targets the Knowledge editor's form view, preventing a CSS rule from causing a constricted layout. Now, articles print correctly in a readable format when exported or printed.
Original PR description
Currently, a CSS rule forces the form container width to 1px to ensure that the nested list view can correctly compute its size. See: ```scss .o_form_view.o_xxl_form_view { .o_form_view_container {…
Currently, a CSS rule forces the form container width to 1px to ensure that the nested list view can correctly compute its size.
See:
```scss
.o_form_view.o_xxl_form_view {
.o_form_view_container {
width: 1px; /* List view needs a width value to recompute the size correctly */
}
}
```
However, since the Knowledge editor is implemented as a form view, this rule also affects Knowledge. When zooming out, the `o_xxl_form_view` class is added to the form view container, causing the rule to apply. If an article is printed while this class is present, it is constrained to an extremely narrow column, making it unreadable.
Steps to reproduce:
1. Open an article in Knowledge
2. Zoom out using `Ctrl` + `-`
3. Open the kebab menu and select "Export"
=> The article is rendered in a very narrow column.
To address this issue, we override this rule specifically for Knowledge. With this change, articles are now rendered correctly when printed or exported as PDF.
Task-5999878
Forward-Port-Of: odoo/enterprise#103259This update corrects issues with the Swedish ISO 20022 XML structure, ensuring accurate data transmission to banks. Specifically, the system now consistently uses BIC identifiers for financial institutions and addresses a unique requirement from Nordea bank regarding bank account formats.
Original PR description
Here is few fixes added to the swedish iso 20022 XML: - CdtrAgt seems to be always mandatory, change the condition in `_skip_CdtrAgt` to always use the CdtrAgt if payment_method is iso20022_se - The `_is_se_bban` is too restrictive, this should be always True when payment method is swedish iso - The `FinInstnId` node can either contain BIC or ClrSysMmbId. But as ClrSysMmbId seems to change from one bank to another, it's more relevant to always use the BIC. opw-5395736 Forward-Port-Of: odoo/enterprise#117574 Forward-Port-Of: odoo/enterprise#114662
This update fixes an issue where tax returns were incorrectly including all tax amounts, regardless of the specific region (like British Columbia or Manitoba). Previously, tax returns generated entries with taxes from multiple locations. Now, tax returns accurately reflect taxes related to the specific return type and region, ensuring accurate reporting for Canadian businesses. This improves the reliability of tax return data.
Original PR description
Issue: Validating a tax return creates an entry with all the tax aml from the company instead of filtering them according to the tax return type. Steps to reproduce: - In a company in Canada - Invoice a Customer from British Columbia in the previous month (A) - Confirm - Go to tax report -> Return - Review and Validate tax return for "Manitoba PST Return (CA)" for month A - Click on the 3 dots -> View Entry Current Behavior: - Entry has lines for PST in British-Columbia and GST taxes Expected behavior: - Entry has lines for PST in Manitoba only Cause: https://github.com/odoo/enterprise/pull/98158 introduces method `_get_vat_closing_entry_additional_domain` in the wrong class. opw-6065838 Forward-Port-Of: odoo/enterprise#116813 Forward-Port-Of: odoo/enterprise#116366
17 changes
Resolved issues and error corrections
This update ensures Odoo correctly sets the `toStateCode` field for SEZ transactions when generating e-waybills. Previously, this was missing, causing API errors. Now, the system automatically sets it to 99, guaranteeing compliance with e-waybill regulations and preventing disruptions to export transactions.
Original PR description
For SEZ transactions, the e-waybill API requires `toStateCode` to be set to 99. Previously, this value was not enforced, leading to API errors: - 373 for export transactions - 641 for supply and CKD/SKD/lots supply This fix updates the logic to derive `toStateCode` based on the invoice's GST treatment. When the transaction is identified as SEZ, `toStateCode` is correctly set to 99, ensuring compliance with e-waybill requirements and preventing API failures. task-6117694 Forward-Port-Of: odoo/odoo#259327
This update ensures charts accurately display data when users specify custom date ranges, including open start or end dates. Previously, the chart's granularity would shift unnecessarily. Now, the chart maintains its current level of detail, regardless of the user-defined date range, providing a consistent and reliable view of the data.
Original PR description
The charts adapt their granularity when a date global filter is updated. But the code didn't handle the cases where the user sets a custom range with an open start or end date (eg. `until 2024-01-01`). In those case picking the best granularity is not practical (because it fully depends on the server data), so we will just keep the current granularity. Task: [6196246](https://www.odoo.com/web#id=6196246&cids=1&menu_id=4720&action=333&active_id=2328&model=project.task&view_type=form) 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#264411 Forward-Port-Of: odoo/odoo#263019
This update resolves an issue where attachments without specific data caused crashes in Odoo's image processing. The fix ensures that when attachment data is missing, a blank bytes object is used instead, preventing errors and maintaining proper image handling. This improves the stability of features relying on attachments.
Original PR description
When an attachment has neither `store_fname` nor `db_datas`, the computed `raw` field was being assigned `False`. This caused crashes in flows expecting binary content, where `binary_to_image()`…
When an attachment has neither `store_fname` nor `db_datas`, the computed `raw` field was being assigned `False`.
This caused crashes in flows expecting binary content, where `binary_to_image()` ultimately passes the value to `io.BytesIO()`, which requires bytes-like data.
Traceback:
```python
Traceback (most recent call last):
File "/tmp/tmpufuj48vj/migrations/base/tests/test_mock_crawl.py", line 344,
in crawl_menu self.mock_action(action_vals)
File "/tmp/tmpufuj48vj/migrations/base/tests/test_mock_crawl.py", line 357,
in mock_action return self.mock_act_window(action)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/tmpufuj48vj/migrations/base/tests/test_mock_crawl.py", line 517,
in mock_act_window mock_method(model, view, fields_list, domain, group_by)
File "/tmp/tmpufuj48vj/migrations/base/tests/test_mock_crawl.py", line 550,
in mock_view_form [data] = record.read(fields_list)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/odoo/src/odoo/saas-19.2/odoo/orm/models.py", line 2734, in read
self._origin.fetch(fields)
File "/home/odoo/src/odoo/saas-19.2/odoo/orm/models.py", line 3065, in fetch
fetched.mapped(field_name)
File "/home/odoo/src/odoo/saas-19.2/odoo/orm/models.py", line 5477, in mapped
return [getter(record) for record in records]
^^^^^^^^^^^^^^
File "/home/odoo/src/odoo/saas-19.2/odoo/orm/fields.py", line 1793, in
__get__ self.compute_value(recs)
File "/home/odoo/src/odoo/saas-19.2/odoo/orm/fields.py", line 1964,
in compute_value records._compute_field_value(self)
File "/home/odoo/src/odoo/saas-19.2/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.2/odoo/orm/models.py", line 4269,
in _compute_field_value determine(field.compute, self)
File "/home/odoo/src/odoo/saas-19.2/odoo/orm/fields.py", line 82,
in determine return needle(*args)
^^^^^^^^^^^^^
File "/home/odoo/src/enterprise/saas-19.2/social_instagram/models/
social_post_template.py", line 57, in _compute_instagram_preview
faulty_images, error_code = post._get_instagram_image_error()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/odoo/src/enterprise/saas-19.2/social_instagram/models/
social_post_template.py", line 108, in _get_instagram_image_error
image = binary_to_image(jpeg_image.with_context(bin_size=False).raw)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/odoo/src/odoo/saas-19.2/odoo/tools/image.py", line 428,
in binary_to_image return Image.open(io.BytesIO(source))
^^^^^^^^^^^^^^^^^^
TypeError: a bytes-like object is required, not 'bool'
```
To prevent this, fallback to an empty bytes object (`b''`) when `db_datas` is falsy during `_compute_raw`.
[here]: https://github.com/odoo/enterprise/blob/saas-19.2/social_instagram/models/social_post_template.py#L108
upg-4247928
opw-6181262
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 addresses a potential crash in the Gantt chart feature. It restores a safety mechanism that prevents the chart from malfunctioning when a user attempts to drag a pill without a valid target. This ensures the Gantt chart remains stable and reliable.
Original PR description
In https://github.com/odoo/enterprise/pull/113438, it was incorrectly assumed that it would be impossible to initiate a pill drag without a valid target being found. This commit reintroduces a strict safeguard to handle scenarios where the drag is triggered with no valid cell target. This prevents unexpected crashes encountered during test executions. runbot-error-242486
This update resolves an issue where users without write access to the Fiskaly Point of Sale (PoS) module would receive an access error when attempting to authenticate with a token that had expired. The fix ensures that the correct error message is displayed, improving the user experience and preventing disruptions to sales transactions.
Original PR description
When trying to auth directly from the PoS when the token expires, if you are logged in with a user that doesn't have write access to the PoS. You would get an access error. Steps to reproduce: ------------------- * Setup Fiskaly in an AT company * Open PoS and try to make a sale * To fake the token expiration I modified the code so that the request always return 401 status code > Observation: You get an access error opw-5925203 Forward-Port-Of: odoo/enterprise#112474
This update resolves an issue where kitchen tickets were incorrectly printed when cancelling platform orders in Odoo PoS. Now, cancelled platform orders will no longer trigger kitchen ticket printing, ensuring accurate order management and preventing unnecessary printing costs. This improves the reliability of the platform order process.
Original PR description
This fixes platform orders should not send to kitchen printer when the platform orders being cancelled. Currently accepting platform orders will not send to kitchen printer. However when cancelling platform orders on either provider platform, or within Odoo PoS. It will print a kitchen ticket of customer note. task-6071740 Forward-Port-Of: odoo/enterprise#114171
This update resolves an error that prevented the generation of PDF reports for Colombian statements. The change adjusts how data is accessed within the report generation process to align with a recent update in the report's data structure. This ensures reports are now generated successfully.
Original PR description
***Steps to reproduce*:** - Install `l10n_co_reports` module. - Create 2 vendor bills with taxes `0% EXEMPT` and `0.966% RteICA`. - Navigate to Reports -> Colombian Statements -> Certificado de…
***Steps to reproduce*:** - Install `l10n_co_reports` module. - Create 2 vendor bills with taxes `0% EXEMPT` and `0.966% RteICA`. - Navigate to Reports -> Colombian Statements -> Certificado de Retención en ICA - Generate the PDF report. ***Observed behavior*:** - An error is raised while generating the PDF: `AttributeError: 'AccountReportColumnData' object has no attribute 'get'` ***Cause*:** After commit [1](https://github.com/odoo-dev/enterprise/commit/b92dc397bef029472a40223f51b611cdf5b631dc#diff-e97f74c63a6257470e69eb8122c12d0ce4afa5bc6013176bb69e702849575123) all report lines, columns, and annotations were converted from dictionaries to custom objects (e.g., AccountReportColumnData). However, the function `_get_report_values` still uses .get() to access values, which is only valid for dictionaries. Calling .get() on these objects raises an error. ***Fix*:** - Replace the `get()` method usage with `column.name` format to access values from `AccountReportColumnData ' properly. - This ensures compatibility with the new structured column data format introduced in v19.2. opw-6205984
This update fixes a visual issue where long accounting reports would cut off the final row, preventing users from seeing all the data. The team adjusted styling to ensure all rows are fully visible, regardless of the report's content length. This improves the clarity and usability of our accounting reports.
Original PR description
Problem: When an accounting report fills a whole page, the final row is not fully visible Steps to reproduce: 1- View a tax report that has a lot of entries that would fill the whole screen 2- Notice how the last line is not fully visible and it isn't possible to scroll and view the rest of it Solution: Correctly style the different < div > elements opw-6171555 Forward-Port-Of: odoo/enterprise#116068
This update fixes a problem where users without sufficient accounting permissions would encounter errors when scraping components from purchase orders created by others. The change ensures that users with the correct access rights can properly retrieve component data, preventing disruptions in reporting and analysis. This improves data accuracy and user workflow.
Original PR description
When scraping the component of a MO created by another user you could get an access error saying you don't have write access on account analytic lines. Steps to reproduce: ------------------- *…
When scraping the component of a MO created by another user you could get an access error saying you don't have write access on account analytic lines. Steps to reproduce: ------------------- * Install timesheet_grid and project_mrp_account * Create product A, storable * Create product B with a cost of 20 and also storable * Update the available quantity of product B * Create a BoM for product A, it should only require one product B * Update Marc Demo access right and make sure he doesn't have access to any accounting stuff and he has atleast timesheet approver * Create a first MO for 1 product A and produce it * Create a second MO for 1 prodcuct A but just confirm it * Login as Marc Demo and try to scrap the component of the second MO > Observation: You get an access error here https://github.com/odoo/odoo/blob/d98afdc08b46bf458eaa287ea882cc7663286a59/addons/stock_account/models/analytic_account.py#L95 opw-5954989 Forward-Port-Of: odoo/odoo#262104 Forward-Port-Of: odoo/odoo#255824
This update fixes a technical error that could have caused the system to fail when accessing certain components. The change adds checks to ensure key objects are initialized before use, preventing an 'AttributeError' and ensuring smoother operation. This improves system stability and reliability.
Original PR description
An error occurs when attempting to access `createCTEPManager` from `self.easy_ctep`, because `self.easy_ctep` is `None`. Error: `AttributeError: 'NoneType' object has no attribute 'createCTEPManager'` This commit resolves the issue by adding an early return when `self.easy_ctep` is `None`. It also introduces a safeguard in `tim_interface.py` to return early when `self.tim_api` is None to preventing unintended errors from accessing an uninitialized object. sentry-7334805653
This update fixes a bug that prevented users from saving blank reports in web_studio. The issue stemmed from removing identifying XML attributes, causing a system error. The fix ensures the system gracefully handles blank XML, preventing save failures and maintaining report editing functionality.
Original PR description
Currently an exception is generated when the user tries to save the report XML as follows: - Install sale_management and web_studio - Go to Sales > Enable Studio Mode > Open Reports - Click New >…
Currently an exception is generated when the user tries to save the report XML as follows:
- Install sale_management and web_studio
- Go to Sales > Enable Studio Mode > Open Reports
- Click New > Select `Blank` Report
- Click `EDIT RESOURCES` and replace all XML with below (Remove `lock-id`)
```
<t t-name="web.basic_layout">
<t t-call="web.html_container">
<t t-if="not o" t-set="o" t-value="doc"/>
<div class="article" t-att-data-oe-model="o and o._name" t-att-data-oe-id="o and o.id" t-att-data-oe-lang="o and o.env.context.get('lang')">
<!-- Your report content -->
</div>
</t>
</t>
```
Error: `KeyError: None`
This issue arises because users removed `lock-id` (identified nodes) attributes from elements, making them untraceable. As a result, fetching the `DIFF_ATTRIBUTE` (key for getting identified) nodes from the modified XML (new_tree) returns `None`, which causes an error when attempting to access the corresponding node in `map_id_to_node_old` (see see code at [1]).
This commit fixes the issue by preventing access to `map_id_to_node_old` when the `key (new_tree.get(DIFF_ATTRIBUTE))` is `None`. In this case, no changes are applied, and the original XML is returned since no identifiable attribute is available in new XML tree.
sentry-7349653271This update resolves an issue where employees archived through HR wouldn't be properly checked out from attendance. The fix utilizes a 'sudo' method to grant necessary permissions during archiving, ensuring attendance checkout occurs regardless of user roles. It also addresses a related planning access error during employee archiving.
Original PR description
- Attendance checkout - Step to reproduce: with attendance installed and an employee checked in, archive that employee by HR user. If missing attendance rights, the employee will be archived but not…
- Attendance checkout
- Step to reproduce: with attendance installed and an employee checked in, archive that employee by HR user. If missing attendance rights, the employee will be archived but not checked out from its ongoing attendance.
- Cause: if no role set for Attendance (default), no permission to update the employee attendance while archiving.
- Solution: using sudo method so that any user with sufficient rights to archive an employee, can trigger check out of the corresponding attendance.
- Planning access error (fixed in 18.0 by https://github.com/odoo/odoo/pull/219395)
- Step to reproduce: with attendance and planning installed, archive an employee having planning slots. If missing planning rights, an access error is raised
- Cause: on employee archive, the corresponding planning.slots are updated and some fields recomputed with insufficient rights.
- Solution: using sudo method for recompute.
Task: 6131692
Forward-Port-Of: odoo/odoo#264518
Forward-Port-Of: odoo/odoo#260566This update resolves a bug where duplicating a meeting tab would cause the remote tab to crash when the host ended the call. The fix ensures that call action elements handle call disappearances gracefully, preventing errors and maintaining the existing user interface.
Original PR description
**Steps to Reproduce:** - Start a new meeting (Host Tab). - Duplicate the tab or open the same meeting URL in another tab (remote tab). - In the remote tab, open the call menu (dropdown). - From the…
**Steps to Reproduce:** - Start a new meeting (Host Tab). - Duplicate the tab or open the same meeting URL in another tab (remote tab). - In the remote tab, open the call menu (dropdown). - From the host tab, disconnect/end the call. - Crashes on Remote Tab. **Current behavior before PR:** Before this PR, duplicating a meeting tab could leave the remote tab with a stale call action dropdown after the host ended the call. Since some action properties and handlers still assumed that selfSession and channel were always available, interacting with the dropdown could crash with errors. **Desired behavior after PR is merged:** After this PR, call action labels/classes defensively tolerate missing selfSession or channel references, and stale click handlers gracefully no-op when the call disappears mid-interaction. This prevents remote tab crashes during call teardown while preserving the existing UI behavior. task-[6191740](https://www.odoo.com/odoo/project/1519/tasks/6191740) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#264989
This update fixes an issue where the print button disappeared from PDF attachment previews in version 19 and later. The change removes a redundant setting that was previously hiding the button on desktop, ensuring the print function is consistently available for all users. This improves usability for users viewing PDFs.
Original PR description
**Problem:** When opening a PDF attachment preview in v19+, the print button disappeared. As a result, the Print button is not accessible from the main toolbar. In v18 the buttons remained…
**Problem:** When opening a PDF attachment preview in v19+, the print button disappeared. As a result, the Print button is not accessible from the main toolbar. In v18 the buttons remained permanently visible. **Steps to reproduce:** - Open any record that has a PDF attachment in the chatter. - Click the PDF attachment to open the preview popup. - Observe toolbar buttons disappeared. **Cause:** commit responsible for this: https://github.com/odoo/odoo/commit/b7889d007f72c7e7f9f22318a9968338cde0ddb3 It was removed to prevent some bugs with some android/smartdevice and some old browsers `file_viewer.js` passes `hidePrint: true` to `hidePDFJSButtons()`. This was originally added alongside the mobile guard (`isMobileOS()`), but the `isMobileOS()` guard in `hidePDFJSButtons` already handles mobile, so the explicit `hidePrint: true` in `file_viewer.js` was redundantly hiding Print on desktop too. https://github.com/odoo/odoo/blob/654a1caafc2ab7b2841c372910b2e81dc6e9c035/addons/web/static/src/core/file_viewer/file_viewer.js#L60-L71 https://github.com/odoo/odoo/blob/654a1caafc2ab7b2841c372910b2e81dc6e9c035/addons/web/static/src/core/utils/pdfjs.js#L35-L37 **Fix:** - Remove `hidePrint: true` from `file_viewer.js` since mobile is already covered by the `isMobileOS()` check inside `hidePDFJSButtons()`. opw-6216534 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#264739
This update corrects an issue where invoices using a specific tax category ('O-service out of tax scope') in Odoo failed Peppol validation. The fix ensures correct handling of this tax category, preventing validation errors and ensuring compliance with Peppol standards. This improves integration with Peppol networks.
Original PR description
**PROBLEM** In peppol, there is a tax category 'O-service out of tax scope'. This tax category is used when what is invoice can't be tax (out of the tax scope). This is different from tax exemption: when using tax category O, there can't be any vat id on the invoice. This also means you can't use tax category O with other taxes, since other taxes need the vat id. Invoices generated by odoo with tax category O failed peppol validation. **STEP TO REPRODUCE** 1. install account_edi_ubl_cii_tax_extension. 2. Create a tax with tax category O. 3. Create an invoice and try validating using the file validator. 4. You should have error BR-O-02 and BR-O-05. opw-6012669 Forward-Port-Of: odoo/odoo#264081 Forward-Port-Of: odoo/odoo#254645
This update fixes a minor issue where some work entry names within the Odoo HR system were displaying incorrect spellings. The team corrected the data files to ensure accurate and consistent naming conventions for work entry types. This ensures proper functionality and reporting within the HR module.
Original PR description
Issue: ---------------------------------------- Some work entry names are wrong. Solution: ---------------------------------------- Change the data files. opw-6090081 Forward-Port-Of: odoo/odoo#264094
This update resolves an issue where Odoo was attempting to process invalid GSTR2B attachments due to missing file content. The system now verifies that the attachment's actual data is present before attempting to process it, preventing errors and ensuring proper return handling. This improves the reliability of tax reporting.
Original PR description
There may be databases contained GSTR2B JSON attachments whose metadata was still present in `ir.attachment`, but whose underlying binary content was missing from the filestore. This caused the matching flow to attempt processing invalid JSON payloads instead of moving the return to `error_in_fetching`. The condition validating JSON attachments now also checks that the attachment raw content exists before adding it to the payload list. opw-6088082 Forward-Port-Of: odoo/enterprise#117083
17 changes
Resolved issues and error corrections
This update corrects a problem where the ABA file generated for Australian payroll wasn't being created correctly. The fix ensures the payslip batch is assigned before payment validation, guaranteeing the ABA file contains accurate payment information. This resolves a previous issue reported in odoo/enterprise#114970.
Original PR description
Payslip batch needs to be assgned before the payment batch is validated, otherwise the ABA file will be blank. This commit ensures that flow and the test ensure both aba flows generate the same file content. task-6123029 Forward-Port-Of: odoo/enterprise#114970
This update resolves a critical error in the audit reports module that occurred when invoices with zero balance move lines were generated. The fix prevents a division-by-zero error by correctly handling zero balances during report calculations, ensuring accurate financial reporting.
Original PR description
# How to reproduce - Create an invoice : - with a move line with a balance of 0 - for date X (e.g. 18/05/2026) - Go to Accounting > Review > Working Files - Create a new audit for the year following date X (e.g. from 01/01/2027 to 31/12/2027) - Go to the balances of that audit - Sort by Var % # The problem A traceback is shown, telling that there was a division by 0 # Cause When filtering by Var % (`audit_var_percentage`), the ORM will call `_field_to_sql` for that field and will use the override defined in `account_reports` : https://github.com/odoo/enterprise/blob/458e3c4b395485974c749955907a1f7310a896a8/account_reports/models/account.py#L229-L240 In this override, we divide by `COALESCE(prev_account_move_line.balance, 1)`, but `COALESCE` only replace the value by 1 if `balance` is `NULL`. When `balance = 0`, we divide by 0, which raises the error. opw-6165282 Forward-Port-Of: odoo/enterprise#116200
This update resolves an issue where kitchen tickets were incorrectly printed after a platform order was cancelled, regardless of where the cancellation occurred (Odoo PoS or the provider platform). Now, cancelled platform orders will no longer trigger kitchen ticket printing, streamlining the order process and preventing unnecessary printouts.
Original PR description
This fixes platform orders should not send to kitchen printer when the platform orders being cancelled. Currently accepting platform orders will not send to kitchen printer. However when cancelling platform orders on either provider platform, or within Odoo PoS. It will print a kitchen ticket of customer note. task-6071740 Forward-Port-Of: odoo/enterprise#114171
This update fixes an issue where dependent taxes weren't correctly recalculated after a base tax was removed from a sales order or invoice. The fix ensures that tax amounts are accurately computed, particularly when using the 'Affect Base of Subsequent Taxes' setting. This improves the reliability of financial reporting.
Original PR description
**Steps to reproduce:** * Install the *Accounting* module with French localization (*l10n_fr_account*). * Create a *Sales Tax* with: * A new tax group (e.g., 'Codifab'). * Enable *Affect Base of…
**Steps to reproduce:** * Install the *Accounting* module with French localization (*l10n_fr_account*). * Create a *Sales Tax* with: * A new tax group (e.g., 'Codifab'). * Enable *Affect Base of Subsequent Taxes*. * Create a *Sales Order*: * Add the first tax (with *Affect Base of Subsequent Taxes*). * Then add the second tax (eg VAT tax). * Confirm the *Sales Order*. * Create a *Down Payment Invoice* (percentage-based). * Open the generated invoice and: * Remove the first tax (the one affecting the base). **Observed behavior:** * The amount of the second tax group does not update after removing the first tax, leading to incorrect tax computation. **Cause:** * In `_import_base_line_extra_tax_data`, the condition: `all(str(tax.id) in extra_tax_data['manual_tax_amounts'] for tax in sorted_taxes)` only ensured partial matching of taxes. * This allowed reuse of stale `manual_tax_amounts` when taxes were removed or modified, causing incorrect base values for dependent taxes (e.g., *Affect Base of Subsequent Taxes*). **Fix:** * Update the condition to enforce an exact match between current taxes and cached `manual_tax_amounts` by checking both size and membership. * Prevent reuse of outdated tax data when taxes change, ensuring proper recomputation of dependent taxes. * Align Python logic with the JS implementation for consistency between `account_tax.py` and `account_tax.js`. opw-6063970 Forward-Port-Of: odoo/odoo#264434 Forward-Port-Of: odoo/odoo#259566
This update fixes a display issue where accounting reports, when filling a full screen, would obscure the final row, preventing users from seeing all data. The fix involves adjusting styling to ensure the complete final row is visible, improving report clarity and data accessibility. This enhancement ensures users can fully review their accounting reports.
Original PR description
Problem: When an accounting report fills a whole page, the final row is not fully visible Steps to reproduce: 1- View a tax report that has a lot of entries that would fill the whole screen 2- Notice how the last line is not fully visible and it isn't possible to scroll and view the rest of it Solution: Correctly style the different < div > elements opw-6171555 Forward-Port-Of: odoo/enterprise#116068
This update adjusts how errors during GIF searches are logged. Previously, errors were flagged as critical issues, but this change reclassifies them as warnings – a more appropriate response as the issue isn't a fundamental problem with the software. This improves logging clarity and reduces unnecessary alerts.
Original PR description
Currently, the logger prints an error message to the terminal when an error occurs searching for GIFs on Tenor. This commit changes the logger error to a warning, since this is not an error in the codebase. sentry-7218806107
This update fixes an issue where deleting all website records would cause a website access error. The fix adds a check to ensure at least one website remains before allowing deletion, preventing a 'False' value from triggering an error and improving website stability.
Original PR description
Currently an error occurs when the user unlinks all websites and tries to access the frontend ( website). Steps to produce an error: - Install the website module - Delete external identifier…
Currently an error occurs when the user unlinks all websites and tries to access the frontend ( website). Steps to produce an error: - Install the website module - Delete external identifier default_website - Delete the My Website from Website > Configuration > Websites - An error will occur when we try to access the website. Error: `TypeError: expected string or bytes-like object, got 'bool'` This issue was generated because while setting cookies to the Werkzeug response, we got 'value' as a `False` at line [1], and the `value` is the language code from the request (see line [2]) . The language is determined by the `IrHttp` class through the `_get_default_lang` method (see code line [3]). In the website module, this method is overridden to return the language configured on the current website. However, when all websites are deleted, no valid website record remains. As a result, the method attempts to retrieve the language from an empty website, which returns `False` (see code line [4]), leading to the issue. This commit fixes the issue by preventing the deletion of all website records. The method `_unlink_except_default_website` already ensures that the default website (identified by the external ID `website.default_website`) cannot be deleted. However, if this external identifier has been removed, the safeguard no longer applies, allowing the default website to be deleted without raising any error. To address this, an additional check has been introduced: when the `default_website` is not found, the system verifies whether any website records remain using search_count. If no records are found, a `UserError` is raised to prevent the deletion and ensure that at least one website always exists. [1]: https://github.com/odoo/odoo/blob/cdf8aaec82ee387c8f29b8327efbc95fd17e2cb8/odoo/http.py#L1825 [2]: https://github.com/odoo/odoo/blob/cdf8aaec82ee387c8f29b8327efbc95fd17e2cb8/addons/http_routing/models/ir_http.py#L518 [3]: https://github.com/odoo/odoo/blob/cdf8aaec82ee387c8f29b8327efbc95fd17e2cb8/addons/http_routing/models/ir_http.py#L407-L411 [4]: https://github.com/odoo/odoo/blob/cdf8aaec82ee387c8f29b8327efbc95fd17e2cb8/addons/website/models/ir_http.py#L288 sentry-7413005338
This update resolves issues where employees weren't properly checked out of attendance when archived, and where access errors occurred during planning slot archiving. The fix utilizes a 'sudo' method to grant necessary permissions for updating attendance and planning data, ensuring a smoother and more reliable employee archiving experience.
Original PR description
- Attendance checkout - Step to reproduce: with attendance installed and an employee checked in, archive that employee by HR user. If missing attendance rights, the employee will be archived but not…
- Attendance checkout
- Step to reproduce: with attendance installed and an employee checked in, archive that employee by HR user. If missing attendance rights, the employee will be archived but not checked out from its ongoing attendance.
- Cause: if no role set for Attendance (default), no permission to update the employee attendance while archiving.
- Solution: using sudo method so that any user with sufficient rights to archive an employee, can trigger check out of the corresponding attendance.
- Planning access error (fixed in 18.0 by https://github.com/odoo/odoo/pull/219395)
- Step to reproduce: with attendance and planning installed, archive an employee having planning slots. If missing planning rights, an access error is raised
- Cause: on employee archive, the corresponding planning.slots are updated and some fields recomputed with insufficient rights.
- Solution: using sudo method for recompute.
Task: 6131692
Forward-Port-Of: odoo/odoo#264518
Forward-Port-Of: odoo/odoo#260566This update fixes a potential error in Odoo's accounting system. Previously, using payable or receivable accounts as transition accounts for cash basis taxes could trigger validation errors. This change restricts users from selecting these account types, ensuring data consistency and preventing unexpected errors during invoice processing.
Original PR description
## **Issue** When a cash basis tax is configured with a payable/receivable transition account, tax journal items are generated on that account without a due date. Since payable/receivable accounts…
## **Issue** When a cash basis tax is configured with a payable/receivable transition account, tax journal items are generated on that account without a due date. Since payable/receivable accounts require a due date on journal items, this leads to a validation error during move creation: "Any journal item on a payable account must have a due date and vice versa." ## **Steps to reproduce:** 1. Install the Accounting and Inter-Company modules. 2. Create an additional company so that there are a total of two companies, then switch to Company 1. 3. Create a product with a price and assign a tax to it. 4. Navigate to Accounting → Configuration → Settings and enable Cash Basis accounting. 5. Go to Accounting → Configuration → Taxes and open the purchase tax (or the tax assigned to the product). 6. In the Tax Computation section, ensure that Group of Taxes is not selected. 7. Under the Advanced Options tab, set Tax Exigibility to Based on Payment. 8. Set the Cash Basis Transition Account to a payable account. 9. Open Company Settings, select Company 1, go to the Inter-Company Transactions section, and enable Synchronize invoices/bills. 10. Switch to Company 2 and create an invoice using the same product. Select the contact that is the partner of Company 1. 11. Confirm the invoice. The following error is raised: "Any journal item on a payable account must have a due date and vice versa." ## **With This Commit:** Added a domain on the Cash Basis Transition Account field to prevent users from selecting payable or receivable accounts, avoiding invalid configurations and runtime validation errors. opw-6189615 Forward-Port-Of: odoo/odoo#264777 Forward-Port-Of: odoo/odoo#263792
This update fixes an issue where e-Faktura invoices for non-Polish customers incorrectly included the country code in the VAT number. The fix ensures the correct VAT number format is used, aligning with KSeF regulations and preventing potential invoice rejection. This ensures compliance and accurate invoice generation.
Original PR description
Currently, an incorrect VAT format is used in the generated `FA3 XML` for non-Polish partners, where the VAT number includes the country code. **Steps to reproduce:** - Install the `l10n_pl_edi`…
Currently, an incorrect VAT format is used in the generated `FA3 XML` for non-Polish partners, where the VAT number includes the country code. **Steps to reproduce:** - Install the `l10n_pl_edi` module and switch to a `PL Company`. - Go to Settings and enable `Allow KSeF integration` (refer to [1]). - Create and confirm an invoice for a customer (e.g., Azure Interior). - Send the invoice using `by KSeF (e-Faktura)`. **Observation:** In the generated XML file, the `NrID` field contains the VAT number `with the country code` for non-Polish partners. **Root Cause:** At [2], `get_vat_number` sets the VAT number using `compact` from `stdnum.pl.nip`, which only works for Polish VAT numbers. At [3], `get_vat_number` correctly formats Polish VAT numbers without the country code in the `if condition`. However, in the fallback (else) case, it returns the VAT number as it is, including the country code. **Fix:** This commit ensures that for non-Polish VAT numbers, the country code is removed before setting the `NrID` or `NrVatUE` values in the XML, aligning the format with KSeF requirements. Ref: https://ksef.podatki.gov.pl/media/4u1bmhx4/information-sheet-on-the-fa-3-logical-structure.pdf (Page no.: 19) [1]: https://www.odoo.com/mail/message/1057847327 [2]: https://github.com/odoo/odoo/blob/d73e5662a0af7c549008661f743ba5d51f765339/addons/l10n_pl_edi/models/account_move.py#L257 [3]: https://github.com/odoo/odoo/blob/d73e5662a0af7c549008661f743ba5d51f765339/addons/l10n_pl_edi/data/fa3_template.xml#L67-L82 opw-6120118 Forward-Port-Of: odoo/odoo#263081
This update fixes an issue where portal messages were incorrectly restricted, preventing access to certain types of non-internal messages. The change ensures that internal notes remain hidden while allowing all other non-internal message types to be visible to users. This improves the overall usability of the portal.
Original PR description
*: test_mail_full Since #138233, portal messages were strictly filtered by the `mt_comment` subtype. This was intended to hide internal notes, but it incorrectly excluded other non-internal message subtypes. Basically we want the share domain (`_get_search_domain_share()`) to apply to all users in the portal. This change ensures internal notes remain hidden while allowing all other non-internal non-comment subtypes to be visible. opw-6031571 Forward-Port-Of: odoo/odoo#264431 Forward-Port-Of: odoo/odoo#263052
This update fixes an issue where the print button disappeared from PDF attachment previews in version 19 and later. The change removes a redundant setting that was hiding the print button on desktop, ensuring it's consistently visible for all users. This restores a key functionality for users to print PDF documents.
Original PR description
**Problem:** When opening a PDF attachment preview in v19+, the print button disappeared. As a result, the Print button is not accessible from the main toolbar. In v18 the buttons remained…
**Problem:** When opening a PDF attachment preview in v19+, the print button disappeared. As a result, the Print button is not accessible from the main toolbar. In v18 the buttons remained permanently visible. **Steps to reproduce:** - Open any record that has a PDF attachment in the chatter. - Click the PDF attachment to open the preview popup. - Observe toolbar buttons disappeared. **Cause:** commit responsible for this: https://github.com/odoo/odoo/commit/b7889d007f72c7e7f9f22318a9968338cde0ddb3 It was removed to prevent some bugs with some android/smartdevice and some old browsers `file_viewer.js` passes `hidePrint: true` to `hidePDFJSButtons()`. This was originally added alongside the mobile guard (`isMobileOS()`), but the `isMobileOS()` guard in `hidePDFJSButtons` already handles mobile, so the explicit `hidePrint: true` in `file_viewer.js` was redundantly hiding Print on desktop too. https://github.com/odoo/odoo/blob/654a1caafc2ab7b2841c372910b2e81dc6e9c035/addons/web/static/src/core/file_viewer/file_viewer.js#L60-L71 https://github.com/odoo/odoo/blob/654a1caafc2ab7b2841c372910b2e81dc6e9c035/addons/web/static/src/core/utils/pdfjs.js#L35-L37 **Fix:** - Remove `hidePrint: true` from `file_viewer.js` since mobile is already covered by the `isMobileOS()` check inside `hidePDFJSButtons()`. opw-6216534 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#264739
This update corrects a bug where attendance records would disappear after a public holiday was added. The issue stemmed from a mismatch between how attendance dates were stored (in UTC) and how they were compared against local time zones. The fix ensures attendance dates are correctly converted to the employee's local time zone for accurate reporting.
Original PR description
**Steps to reproduce in runbot:** 1. Install hr_holidays_attendance. 2. Create an employee with a contract start date (e.g., April 1st). 3. Set the timezone(for both user and emp working schedule) to…
**Steps to reproduce in runbot:** 1. Install hr_holidays_attendance. 2. Create an employee with a contract start date (e.g., April 1st). 3. Set the timezone(for both user and emp working schedule) to Europe/Brussels. 4. Create an attendance record (e.g., April 15th). 5. Go to Reporting > Time Off Ledger and remove all filters. -> Attendance is correctly shown for all dates from April 1st 6. Create a public holiday on April 16th starting at 00:00. 7. Check the Time Off Ledger again. **Issue:** The attendance entry for April 15th disappears after adding the public holiday. **Cause:** Calendar leave datetime fields (date_from/date_to) are stored in UTC but compared against attendance dates without converting to the employee's resource calendar timezone, causing date boundaries to shift and records to be incorrectly excluded. https://github.com/odoo/odoo/blob/b293ce50e0fc9355ffd233557f079916b514eac7/addons/hr_holidays_attendance/report/hr_leave_attendance_report.py#L133-L144 **Solution:** Convert calendar leave datetimes to the resource calendar timezone before casting to date, ensuring comparisons reflect the correct local boundaries. **NOTE:** This issue is mainly reproducible on runbot since its server timezone is GMT. On local machines configured with UTC, the stored datetime values already align with the expected conversions, so the date shift does not occur. opw-6118043 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#262179
This update fixes a bug that allowed users to create multiple leave requests for the same day, even after previously approving and rejecting a leave. The fix ensures that the system accurately detects and prevents conflicting leave requests, improving data integrity and reducing potential scheduling errors. This change enhances the reliability of the holiday calendar.
Original PR description
Steps to reproduce:- - Navigate to Time off Dashboard calendar view. - Create a leave. First approve it then refuse it. - Now on the same day create a leave and approve it. - Now re-approve the…
Steps to reproduce:- - Navigate to Time off Dashboard calendar view. - Create a leave. First approve it then refuse it. - Now on the same day create a leave and approve it. - Now re-approve the previously refused leave from step 2. - System will let user to create 2 leave of same types on same day! Cause:- In `_compute_dashboard_warning_message`, refused/cancelled leaves were excluded from warning computation. When approving a refused request, the warning message was not set, allowing the constraint check to pass even when conflicting approved requests existed for the same period. Fix:- 1. Refactored `_compute_dashboard_warning_message` to only compute warnings for active leaves (non-refused/cancelled) while still detecting conflicts with already approved requests 2. Updated `_check_date` constraint to skip validation for refused/ cancelled leaves, but enforce it when state changes to validate 3. Added 'state' to constraint triggers to ensure validation runs when approving previously refused requests task-[6181717](https://www.odoo.com/odoo/project/1251/tasks/6181717) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#262703
This update resolves an issue where invoices using the 'O-service out of tax scope' tax category in Odoo failed Peppol validation. The fix ensures correct handling of this tax category, aligning with Peppol requirements and preventing validation errors. This ensures seamless integration with Peppol trading partners.
Original PR description
**PROBLEM** In peppol, there is a tax category 'O-service out of tax scope'. This tax category is used when what is invoice can't be tax (out of the tax scope). This is different from tax exemption: when using tax category O, there can't be any vat id on the invoice. This also means you can't use tax category O with other taxes, since other taxes need the vat id. Invoices generated by odoo with tax category O failed peppol validation. **STEP TO REPRODUCE** 1. install account_edi_ubl_cii_tax_extension. 2. Create a tax with tax category O. 3. Create an invoice and try validating using the file validator. 4. You should have error BR-O-02 and BR-O-05. opw-6012669 Forward-Port-Of: odoo/odoo#264081 Forward-Port-Of: odoo/odoo#254645
This update resolves an issue where Odoo was attempting to process invalid GSTR2B attachments due to missing file content. The fix ensures that attachments have both metadata and actual file data before being processed, preventing errors and improving the reliability of tax reporting.
Original PR description
There may be databases contained GSTR2B JSON attachments whose metadata was still present in `ir.attachment`, but whose underlying binary content was missing from the filestore. This caused the matching flow to attempt processing invalid JSON payloads instead of moving the return to `error_in_fetching`. The condition validating JSON attachments now also checks that the attachment raw content exists before adding it to the payload list. opw-6088082 Forward-Port-Of: odoo/enterprise#117083
This update fixes an issue where flexible employee overtime calculations were inaccurate. The fix ensures that overtime hours are correctly computed based on the employee's flexible schedule, addressing a discrepancy in how the system determined worked hours. This ensures accurate overtime payments for flexible employees.
Original PR description
__ ## Short functional explanation of the error When setting attendances on several consecutive days for a flexible employee, with an overtime ruleset containing a single rule. This rule being based…
__ ## Short functional explanation of the error When setting attendances on several consecutive days for a flexible employee, with an overtime ruleset containing a single rule. This rule being based on week and quantity. When regenerating overtimes for this ruleset, the overtime hours generated isn't correct. ## Reproduction Steps 1. Create an employee. In the Payroll tab, set a start date for their contract. Set Work Entry Source as Attendances. Set their Working Hours as a flexible schedule. Set their weekly hours at 40. 2. Create an Overtime Ruleset. Add a single rule, based on Quantity, if the worked hours on a `Week` differs `from the amount defined on the contract`. Check Pay Extra Hours and leave the Work Entry Type to use as Overtime Hours. 3. Go back to the employee. In Settings, set the Overtime Ruleset field as the new Overtime Ruleset you just created. 4. Create 5 attendances, each from 8 am to 6 pm, from Monday to Friday. 5. Go to the Overtime Ruleset you just created and click on Regenerate Overtimes. 6. Go back to Attendances. Search for your employee, and click on the list view. ### Expected behavior The employee's schedule is 40 hours per week. They worked 50 hours. 10 hours should be considered as Worked Extra Hours. ### Unexpected behavior 18 hours are considered as extra hours. ## Origin of the issue To compute the expected duration of the day, we run: https://github.com/odoo/odoo/blob/7fc5edc29f854d619dbcb5fcc3503fb18ca05335/addons/hr_attendance/models/hr_attendance_overtime_rule.py#L303-L304 where `schedule['work']` will contain intervals on 5 consecutive days, from 8 am to 4 pm. However, the last day of the employee's attendances isn't contained in these intervals. As a result, `period_schedule` will contain 4 days (the common days between the employee's Attendance days and `schedule['work']` ) and thus, `expected_duration` will be set at 36 hours instead of 40. In the case where overtimes are computed based on hours from the contract, for flexible employees, the expected hours are the ones indicated on their schedule. __ opw-6131543 Forward-Port-Of: odoo/odoo#263335
4 changes
Resolved issues and error corrections
This update resolves an issue where intercompany invoices were incorrectly flagged with a tax validation error. The fix ensures that taxes are correctly recalculated when processing invoices between companies with different fiscal positions, improving the accuracy of intercompany accounting. This prevents disruptions to cross-border transactions.
Original PR description
**Steps to reproduce:** * Install the *Accounting* module. * Install localisation modules for two different regions: * *Belgium* (**l10n_be**) * *Luxembourg* (**l10n_lu**) * Configure two companies,…
**Steps to reproduce:** * Install the *Accounting* module. * Install localisation modules for two different regions: * *Belgium* (**l10n_be**) * *Luxembourg* (**l10n_lu**) * Configure two companies, each assigned to one of the above regions. * Create fiscal positions: * In the Belgium company, create a fiscal position for Luxembourg. * In the Luxembourg company, create a fiscal position for Belgium. * Go to *Accounting > Configuration > Settings*. Enable *Inter-Company Transactions*. Enable synchronization of *Vendor Bills and Invoices* for both companies. * Create an invoice in the Luxembourg company. Select a partner belonging to the Belgium company. Add a product with applicable taxes. **Observed behavior:** * A validation error is raised: 'This entry contains taxes that are not compatible with your fiscal position. Please check the country set in the fiscal position and in your tax configuration.' **Cause:** * During intercompany bill creation, a foreign fiscal position is applied before recomputing taxes. * If no mapped foreign taxes exist, the system keeps domestic purchase taxes. * This leads to a mismatch between taxes and fiscal position, triggering the validation error. **Fix:** * Add a safeguard in *_inter_company_create_invoices()*. * After *_inter_company_sync_invoice_line_taxes()* recomputes taxes, *_inter_company_has_incompatible_fiscal_position_taxes()* checks whether the fiscal position is incompatible. * If incompatible, the fiscal position is removed and taxes are recomputed without it. opw-6103671 Forward-Port-Of: odoo/enterprise#116944 Forward-Port-Of: odoo/enterprise#115085
This update fixes an issue where draft journal entries for employee payrolls were incorrectly linked to the parent company instead of the employee's branch. The change ensures that the journal entry is created using the correct company, accurately reflecting the employee's location and accounting requirements. This improves payroll accuracy and reporting.
Original PR description
**Steps to reproduce** 1. Create a company with a branch. 2. Create account journals for both the parent and branch companies. 3. Create an employee in the branch company and assign a salary…
**Steps to reproduce** 1. Create a company with a branch. 2. Create account journals for both the parent and branch companies. 3. Create an employee in the branch company and assign a salary structure to the employee. Also, make sure the employee’s contract is started. 4. Create a pay run for this employee while staying in the parent company. 5. Generate and validate the payslip. 6. Check that the `move_id` (draft journal entry) is created for the employee’s company, not the currently selected company. **Issue:** When an employee belongs to a branch company and we create a pay-run/payslip for that employee, the draft journal entry is created using the default company. **Fix:** Since `journal_id` is a company-dependent field, we will use `slip.struct_id.with_company(slip.company_id).journal_id`. This ensures that we will pass correct slip's `journal_id` to `_create_account_move()`. After that `_compute_company_id()` in `account_move.py` will be executed, and the `move_id` will have the correct `company_id`. Ref [code](https://github.com/odoo/odoo/blob/1839e68cad91f6b16865f6ac365500ab6fbda835/addons/account/models/account_move.py#L889-L896) Hence, the issue will be fixed. task: 6123216
This fix resolves an issue where Knowledge articles appeared narrow when printed or exported due to a CSS rule affecting form views. The change specifically targets the Knowledge editor, ensuring articles are rendered correctly regardless of screen size or zoom level, improving readability and export quality.
Original PR description
Currently, a CSS rule forces the form container width to 1px to ensure that the nested list view can correctly compute its size. See: ```scss .o_form_view.o_xxl_form_view { .o_form_view_container {…
Currently, a CSS rule forces the form container width to 1px to ensure that the nested list view can correctly compute its size.
See:
```scss
.o_form_view.o_xxl_form_view {
.o_form_view_container {
width: 1px; /* List view needs a width value to recompute the size correctly */
}
}
```
However, since the Knowledge editor is implemented as a form view, this rule also affects Knowledge. When zooming out, the `o_xxl_form_view` class is added to the form view container, causing the rule to apply. If an article is printed while this class is present, it is constrained to an extremely narrow column, making it unreadable.
Steps to reproduce:
1. Open an article in Knowledge
2. Zoom out using `Ctrl` + `-`
3. Open the kebab menu and select "Export"
=> The article is rendered in a very narrow column.
To address this issue, we override this rule specifically for Knowledge. With this change, articles are now rendered correctly when printed or exported as PDF.
Task-5999878
Forward-Port-Of: odoo/enterprise#103259This update resolves a discrepancy in how contract type IDs are defined within Odoo's payroll modules. Specifically, the definition was standardized across the base and Belgium-specific versions. This ensures accurate payroll calculations and reporting for Belgian users.
Original PR description
[IMP] hr_contract_salary: fix contract_type_id definition The definitions of the contract_type_id in hr_contract_salary_offer and l10n_be_hr_contract_salary/hr_contract_salary_offer should be same I converted the definition of contract_type_id in the base module to the Belgium one. Also, the contract_type_id was inserted to the view in Belgium one as well, I deleted that part to prevent double appearance. This task is only for v.17, after this version I will open a new PR to handle them. Do not forward the task after v.17 (only for v.17) task - 6101717 Forward-Port-Of: odoo/enterprise#117307 Forward-Port-Of: odoo/enterprise#113244
5 changes
Resolved issues and error corrections
This update fixes an issue where e-Faktura invoices for non-Polish customers incorrectly included the country code in the VAT number. The fix ensures the correct VAT number format is used, aligning with KSeF regulations and preventing potential invoice rejection. This ensures compliance and accurate invoice generation.
Original PR description
Currently, an incorrect VAT format is used in the generated `FA3 XML` for non-Polish partners, where the VAT number includes the country code. **Steps to reproduce:** - Install the `l10n_pl_edi`…
Currently, an incorrect VAT format is used in the generated `FA3 XML` for non-Polish partners, where the VAT number includes the country code. **Steps to reproduce:** - Install the `l10n_pl_edi` module and switch to a `PL Company`. - Go to Settings and enable `Allow KSeF integration` (refer to [1]). - Create and confirm an invoice for a customer (e.g., Azure Interior). - Send the invoice using `by KSeF (e-Faktura)`. **Observation:** In the generated XML file, the `NrID` field contains the VAT number `with the country code` for non-Polish partners. **Root Cause:** At [2], `get_vat_number` sets the VAT number using `compact` from `stdnum.pl.nip`, which only works for Polish VAT numbers. At [3], `get_vat_number` correctly formats Polish VAT numbers without the country code in the `if condition`. However, in the fallback (else) case, it returns the VAT number as it is, including the country code. **Fix:** This commit ensures that for non-Polish VAT numbers, the country code is removed before setting the `NrID` or `NrVatUE` values in the XML, aligning the format with KSeF requirements. Ref: https://ksef.podatki.gov.pl/media/4u1bmhx4/information-sheet-on-the-fa-3-logical-structure.pdf (Page no.: 19) [1]: https://www.odoo.com/mail/message/1057847327 [2]: https://github.com/odoo/odoo/blob/d73e5662a0af7c549008661f743ba5d51f765339/addons/l10n_pl_edi/models/account_move.py#L257 [3]: https://github.com/odoo/odoo/blob/d73e5662a0af7c549008661f743ba5d51f765339/addons/l10n_pl_edi/data/fa3_template.xml#L67-L82 opw-6120118 Forward-Port-Of: odoo/odoo#263081
This update resolves a bug where users were incorrectly redirected after completing a signature request. The fix redirects users to their signature list within the portal, streamlining the process and preventing confusion. This ensures a smoother experience for users signing documents.
Original PR description
steps : - create a signature request with 2 roles, assign those to demo or portal user - create another one with a single signature role assigned to the demo or portal user - go on the portal and click on the second document to sign it - complete the document then click close on the thank you popup -> you are redirected on the portal view of the first document This happens because the redirect to /my/document is made using the sign_request id but the controller is using a sign_request_item id. Instead of adding a confusing controller route to be able to pass sign_request ids to reach the document's portal page, we simply redirect to the list of signatures on the portal instead. opw-6190390 Forward-Port-Of: odoo/enterprise#116949 Forward-Port-Of: odoo/enterprise#116600
This update resolves a validation error that occurred when creating intercompany invoices between companies using different tax regions (e.g., Belgium and Luxembourg). The fix ensures accurate tax calculations by correctly applying and recomputing taxes during intercompany transactions, preventing inconsistencies and improving invoice processing.
Original PR description
**Steps to reproduce:** * Install the *Accounting* module. * Install localisation modules for two different regions: * *Belgium* (**l10n_be**) * *Luxembourg* (**l10n_lu**) * Configure two companies,…
**Steps to reproduce:** * Install the *Accounting* module. * Install localisation modules for two different regions: * *Belgium* (**l10n_be**) * *Luxembourg* (**l10n_lu**) * Configure two companies, each assigned to one of the above regions. * Create fiscal positions: * In the Belgium company, create a fiscal position for Luxembourg. * In the Luxembourg company, create a fiscal position for Belgium. * Go to *Accounting > Configuration > Settings*. Enable *Inter-Company Transactions*. Enable synchronization of *Vendor Bills and Invoices* for both companies. * Create an invoice in the Luxembourg company. Select a partner belonging to the Belgium company. Add a product with applicable taxes. **Observed behavior:** * A validation error is raised: 'This entry contains taxes that are not compatible with your fiscal position. Please check the country set in the fiscal position and in your tax configuration.' **Cause:** * During intercompany bill creation, a foreign fiscal position is applied before recomputing taxes. * If no mapped foreign taxes exist, the system keeps domestic purchase taxes. * This leads to a mismatch between taxes and fiscal position, triggering the validation error. **Fix:** * Add a safeguard in *_inter_company_create_invoices()*. * After *_inter_company_sync_invoice_line_taxes()* recomputes taxes, *_inter_company_has_incompatible_fiscal_position_taxes()* checks whether the fiscal position is incompatible. * If incompatible, the fiscal position is removed and taxes are recomputed without it. opw-6103671 Forward-Port-Of: odoo/enterprise#116944 Forward-Port-Of: odoo/enterprise#115085
This update resolves an issue where cancelling a delivery for MTO manufactured products didn't correctly update the associated manufacturing order, leading to manual intervention needed. Additionally, it ensures activity logs are generated when cancelling a move dest on an MTO, improving traceability and demand management. This fix addresses operational inefficiencies and ensures accurate inventory tracking.
Original PR description
Backport of 7c68c3dbb29eaad4e09d59ef7c86bd525969caec Including its fix: e490c0c66561715853a3f80658f47c940bc453dc ### Issues: Cancelling the move dest of a manufacturing order does not cancel the MO…
Backport of 7c68c3dbb29eaad4e09d59ef7c86bd525969caec Including its fix: e490c0c66561715853a3f80658f47c940bc453dc ### Issues: Cancelling the move dest of a manufacturing order does not cancel the MO nor log's an activity warning for the responsible to update the manufacturing demand manually. Additionally, when selling MTO manufactured products, cancelling the delivery and then changing the sol's demand will update the MO for an incorrect amount. ### Steps to reproduce: - In the settings: Enable Multi-Steps Routes - Inventory > Configuration > Warehouse Management > Routes - Unarchive the MTO route - Create an MTO, amnufactured product with BOM - Create and confirm an SO for 3 units of that product - Cancel the delivery of 3 units #### > There is no notification on the unrelevant MO linked to the SO - Adapt the quantity of the SOL from 3 to 0 #### > The delivery is cancelled but no activity is logged what's so ever ### Expected behavior: Both of these operations should log an activity as the demand of the MO is not updated on quantity decrease. opw-6010109 opw-6105366 opw-6100043 opw-6087909 X-original-commit: 796316c341c4346152ad9610c30679f47aaa2ff8 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#264732 Forward-Port-Of: odoo/odoo#258093
This update resolves an issue where the Knowledge editor's printed output was excessively narrow on large screens. The fix specifically targets the CSS rule causing this problem, ensuring articles render correctly when printed or exported as PDFs. This improves the user experience for accessing and sharing knowledge content.
Original PR description
Currently, a CSS rule forces the form container width to 1px to ensure that the nested list view can correctly compute its size. See: ```scss .o_form_view.o_xxl_form_view { .o_form_view_container {…
Currently, a CSS rule forces the form container width to 1px to ensure that the nested list view can correctly compute its size.
See:
```scss
.o_form_view.o_xxl_form_view {
.o_form_view_container {
width: 1px; /* List view needs a width value to recompute the size correctly */
}
}
```
However, since the Knowledge editor is implemented as a form view, this rule also affects Knowledge. When zooming out, the `o_xxl_form_view` class is added to the form view container, causing the rule to apply. If an article is printed while this class is present, it is constrained to an extremely narrow column, making it unreadable.
Steps to reproduce:
1. Open an article in Knowledge
2. Zoom out using `Ctrl` + `-`
3. Open the kebab menu and select "Export"
=> The article is rendered in a very narrow column.
To address this issue, we override this rule specifically for Knowledge. With this change, articles are now rendered correctly when printed or exported as PDF.
Task-5999878
Forward-Port-Of: odoo/enterprise#1032594 changes
Resolved issues and error corrections
This update resolves an issue where intercompany invoices triggered a validation error due to incorrect tax calculations. The fix ensures taxes are correctly recomputed when dealing with invoices between companies using different fiscal positions, improving invoice processing accuracy.
Original PR description
**Steps to reproduce:** * Install the *Accounting* module. * Install localisation modules for two different regions: * *Belgium* (**l10n_be**) * *Luxembourg* (**l10n_lu**) * Configure two companies,…
**Steps to reproduce:** * Install the *Accounting* module. * Install localisation modules for two different regions: * *Belgium* (**l10n_be**) * *Luxembourg* (**l10n_lu**) * Configure two companies, each assigned to one of the above regions. * Create fiscal positions: * In the Belgium company, create a fiscal position for Luxembourg. * In the Luxembourg company, create a fiscal position for Belgium. * Go to *Accounting > Configuration > Settings*. Enable *Inter-Company Transactions*. Enable synchronization of *Vendor Bills and Invoices* for both companies. * Create an invoice in the Luxembourg company. Select a partner belonging to the Belgium company. Add a product with applicable taxes. **Observed behavior:** * A validation error is raised: 'This entry contains taxes that are not compatible with your fiscal position. Please check the country set in the fiscal position and in your tax configuration.' **Cause:** * During intercompany bill creation, a foreign fiscal position is applied before recomputing taxes. * If no mapped foreign taxes exist, the system keeps domestic purchase taxes. * This leads to a mismatch between taxes and fiscal position, triggering the validation error. **Fix:** * Add a safeguard in *_inter_company_create_invoices()*. * After *_inter_company_sync_invoice_line_taxes()* recomputes taxes, *_inter_company_has_incompatible_fiscal_position_taxes()* checks whether the fiscal position is incompatible. * If incompatible, the fiscal position is removed and taxes are recomputed without it. opw-6103671 Forward-Port-Of: odoo/enterprise#116944 Forward-Port-Of: odoo/enterprise#115085
This update fixes an issue where field service orders were incorrectly displaying a delivered quantity of '1' before order confirmation. The fix ensures the delivered quantity accurately reflects stock pickings and is calculated correctly when a purchase order is generated. This improves the accuracy of order fulfillment for field service products.
Original PR description
### Steps to reproduce: - In the settings enable dropshipping - Create a storable product P, enable the dropshipping and set a vendor - Create and confirm a sale order for a field service - Open the…
### Steps to reproduce: - In the settings enable dropshipping - Create a storable product P, enable the dropshipping and set a vendor - Create and confirm a sale order for a field service - Open the related task > Products > Add 1 unit of P - Go back to the sale order > an RFQ has been created #### > The delivered quantity of P is set to 1 ### Cause of the issue: Since 2361368acfe7fecbffde2ca26392eb89aecdc9e1 the `_inverse_fsm_quantity` method manually adapts the delivered quantity based on the fact that the `product.service_type` is `manual` rather than the `qty_delivered_method` of the line or future line is. In particular, because these lines: https://github.com/odoo/enterprise/blob/8f4fe902cb71c49bdb3caf9915f9a5abfe6f237f/industry_fsm_sale/models/product_product.py#L82-L83 provide a value of the `qty_delivered` to the created purchase order line and since the `qty_delivered_method` is a precomputed field: https://github.com/odoo/odoo/blob/fdfd9851393ff82a265997478886bcad6da357d0/addons/sale/models/sale_order_line.py#L225-L237 The fact that the purchase order line will be created with a `stock_move` `qty_delivered_method` and that the generated PO does not generate any move prior to confirmation will not trigger the dependency of the `qty_delivered` to retrigger a computation of the `delivered_qty` of the product which is suppose to be based on stock pickings: https://github.com/odoo/odoo/blob/fdfd9851393ff82a265997478886bcad6da357d0/addons/sale/models/sale_order_line.py#L871-L876 https://github.com/odoo/odoo/blob/fdfd9851393ff82a265997478886bcad6da357d0/addons/sale_stock/models/sale_order_line.py#L193-L198 Leaving the created sol with a delivered quantity of 1 prior to confirmation of the PO (which will generate move_ids related to the sol and trigger the compute). Fix: The changes of 2361368acfe7fecbffde2ca26392eb89aecdc9e1 regarding the `_inverse_fsm_quantity` appears unjustified with respect to the purpose of the fix. In addition, the `qty_delivered` and changes are already expected to be properly computed when the `qty_delivered_method` is not manual, particularly since the '`manual'` `service_type` is actually the default `service_type` corresponding to any 'consu' product and looks unrelated by any mean to the `delivered_qty` computation: https://github.com/odoo/odoo/blob/fdfd9851393ff82a265997478886bcad6da357d0/addons/sale/models/product_template.py#L165-L167 opw-6104326 Forward-Port-Of: odoo/enterprise#115760
This update fixes an issue where WhatsApp channel avatars were incorrectly displayed as the default Discuss avatar after a member was added. Now, avatars are correctly pulled from the channel's WhatsApp member, ensuring a consistent and accurate representation of participants in WhatsApp channels. This improves the user experience for WhatsApp channel communication.
Original PR description
WhatsApp sidebar avatars should be resolved from the channel's whatsapp member, not from an arbitrary non-self member. Before this fix, adding a member to a WhatsApp channel caused the default Discuss avatar to be displayed instead of the actual WhatsApp member's avatar. This happened because the correspondent was not correctly computed for channels of type whatsapp. task-[5879840](https://www.odoo.com/odoo/project/1519/tasks/5879840) Forward-Port-Of: odoo/enterprise#115745
This update removes a redundant step in creating embedded actions within Odoo. Previously, a separate translation was required, but now the system automatically uses the translation from the linked action. This simplifies the process and ensures consistent translations across the platform.
Original PR description
Now that `ir.embedded.actions` delegates its display name to the linked action, the manual translation copy on embedded action creation is no longer needed. Related: https://github.com/odoo/odoo/pull/262981 Forward-Port-Of: odoo/enterprise#116369
26 changes
Resolved issues and error corrections
This update resolves an issue where creating two overtime shifts for the same day, particularly on non-working days, would trigger an error. The fix addresses a timing discrepancy in how overtime start and end times are calculated, preventing the 'Expected singleton' error. This ensures overtime is correctly registered when multiple shifts are scheduled.
Original PR description
__ ## Short functional explanation of the error When we create 2 shifts for the same day for an employee, on a non-working day for their schedule. When trying to create the second one after setting…
__ ## Short functional explanation of the error When we create 2 shifts for the same day for an employee, on a non-working day for their schedule. When trying to create the second one after setting the end date to midnight, we get the error: `ValueError: Expected singleton: hr.attendance.overtime.line(2, 3)` ## Reproduction Steps 1. Create an Employee. In the Payroll tab, Make sure they have an active contract. Set their Working Hours to a fixed schedule, where they have saturdays as non-working days. In the Settings tab, set an Overtime Ruleset. 2. Click on the overtime ruleset. Then, for each rule, under Action, set the Work Entry Type To Use as Overtime Hours. 3. Go to Attendances. In Configuration > Settings, under Extra Hours, set the Extra Hours Validation as Approved By Manager. 4. Create an attendance for your Employee on a Saturday, from 12h to 18h. 5. Create a second attendance for your Employee on that same Saturday, from 18h to 00h00. Try to Save. Note: the timezone of your computer, the working schedule and the employee should be set at Brussels time. ### Expected behavior The Overtime is registered. ### Unexpected behavior An error occurs: `ValueError: Expected singleton: hr.attendance.overtime.line(2, 3)` ## Origin of the issue The end time of the overtime is defined as follows: https://github.com/odoo/enterprise/blob/47faff7d6c9da5572e3bad3ff5a55b40c2ba81ac/hr_work_entry_attendance/models/hr_version.py#L54-L56 However, in the case where our shift ends after the computed end of the day (in our case, the end time of the shift is 00:00:00 and the end of the day is set at 23:59:59), it creates some problems. The end time of the overtime is set 1 second too early. Later we compute the start time of the overtime as follows: https://github.com/odoo/enterprise/blob/47faff7d6c9da5572e3bad3ff5a55b40c2ba81ac/hr_work_entry_attendance/models/hr_version.py#L57 Thus, the time start of the overtime is also set one second too early. As our second shift starts right after the first one, after the execution of this code, we will get a second shift that starts before the end of the first one. Then, we add these values in a list: https://github.com/odoo/enterprise/blob/47faff7d6c9da5572e3bad3ff5a55b40c2ba81ac/hr_work_entry_attendance/models/hr_version.py#L59 which will contain overlapping timeframes, and with which we create an Interval: https://github.com/odoo/enterprise/blob/47faff7d6c9da5572e3bad3ff5a55b40c2ba81ac/hr_work_entry_attendance/models/hr_version.py#L60 But when we create an Interval with overlapping timeframes, we obtain only one interval as the timeframes are merged. https://github.com/odoo/enterprise/blob/47faff7d6c9da5572e3bad3ff5a55b40c2ba81ac/hr_work_entry_attendance/models/hr_version.py#L173 As a result, `overtime_intervals` will contain only one time frame with 2 different corresponding overtimes, which causes a singleton error when reaching: https://github.com/odoo/enterprise/blob/47faff7d6c9da5572e3bad3ff5a55b40c2ba81ac/hr_work_entry_attendance/models/hr_version.py#L179 __ opw-6096454 Forward-Port-Of: odoo/enterprise#117247 Forward-Port-Of: odoo/enterprise#114147
This update fixes a bug preventing users from selecting 'Custom Dates' and 'Specific Date' options when comparing accounting reports. The change aligns the report filter with a recent system update, ensuring the full range of date comparison options are available. This improves the usability of the Profit & Loss reporting feature.
Original PR description
**Problem:** The "Custom Dates" and "Specific Date" comparison options are missing from the Comparison dropdown in accounting reports. **Steps to reproduce:** 1. Go to Accounting > Reporting > Profit…
**Problem:** The "Custom Dates" and "Specific Date" comparison options are missing from the Comparison dropdown in accounting reports. **Steps to reproduce:** 1. Go to Accounting > Reporting > Profit & Loss 2. Click the Comparison dropdown 3. Only "No Comparison", "Previous Period", and "Same Period Last Year" are visible — "Custom Dates" is missing **Current behavior:** Custom date comparison options are not rendered. **Expected behavior:** "Custom Dates" (for range reports) and "Specific Date" (for single date reports) should appear in the Comparison dropdown. **Cause of the issue:** The date filter refactor (40484f985f5) restructured how the date mode is stored in options. Previously, `options.date.mode` held 'range' or 'single'. After the refactor, this key no longer exists — the mode is now stored as a boolean in `options.filter_date.range_mode`. The comparison filter template still checks `controller.cachedFilterOptions.date.mode`, which is now undefined, so both the range and single conditions always evaluate to false and the custom comparison options are never rendered. **Fix:** The comparison template was the only consumer not updated during the refactor. Aligning it to the new data path restores the options without any behavioral change. opw-6070402 Forward-Port-Of: odoo/enterprise#117099 Forward-Port-Of: odoo/enterprise#113391
This update fixes an issue where scanning a packaging barcode (like '6' for a 6-pack) intermittently added quantities to the wrong line in the stock picking process. The fix ensures the barcode scan correctly identifies and updates the intended packaging unit, resolving the alternating quantity issue.
Original PR description
Issue ----- When there are 2 lines for a single product and different packaging uoms, scanning a packaging barcode alternates between lines. Steps to reproduce ----- - Enable packagings - Create a…
Issue ----- When there are 2 lines for a single product and different packaging uoms, scanning a packaging barcode alternates between lines. Steps to reproduce ----- - Enable packagings - Create a product AAA - barcode 1 - Create a packaging 6-Pack - 6 units - barcode for AAA set to 6 - Create a PO - one line for 30 units of AAA - one line for 5 6-Pack of AAA - Confirm PO and open picking in barcode - Scan "6" multiple times > Quantity increases on both lines, alternating for each scan Cause ----- Both lines can be found as matching lines when doing https://github.com/odoo/enterprise/blob/d279632db25713dd639a51385cad197dfdbd2bdc/stock_barcode/static/src/models/barcode_model.js#L1426 The reason it alternates between the lines is because we set the currently selected line first in the array - and since both lines match, the `foundLine` returned ends up being the non-selected line. https://github.com/odoo/enterprise/blob/d279632db25713dd639a51385cad197dfdbd2bdc/stock_barcode/static/src/models/barcode_model.js#L1823-L1832 We can avoid this y refining the `break` condition of the loop to also match the packaging uom. ----- Ticket: opw-6034572 Forward-Port-Of: odoo/enterprise#116961 Forward-Port-Of: odoo/enterprise#112578
This update corrects a technical issue that prevented accurate payroll calculations when a payrun had no associated payslips. The fix ensures the system functions correctly regardless of the number of payslips generated, improving payroll accuracy and reliability. This change primarily impacts the Australian HR Payroll module.
Original PR description
If the payrun does not have any payslips, the _get_payslip_stp is called on an empty recordset, which causes the compute to fail. This commit fixes the _get_payslip_stp compute for empty recordset. task-6215823 Forward-Port-Of: odoo/enterprise#117198
This update resolves an issue preventing successful Envia deliveries in Chile. The problem stemmed from a mismatch between Odoo's state code mapping and Envia's API requirements, specifically regarding the format of the 'state' field. The code has been updated to correctly translate the Chilean state code, ensuring accurate delivery information is sent to Envia.
Original PR description
### Steps to reproduce: - Install delivery_envia - Website > Configuration > eCommerce > Delivery Methods > Envia - Enable the delivery method, sync the carrier and Publish it - With a portal user >…
### Steps to reproduce:
- Install delivery_envia
- Website > Configuration > eCommerce > Delivery Methods > Envia
- Enable the delivery method, sync the carrier and Publish it
- With a portal user > Shop > Add any product to your cart > Checkout
- Register an address a valid 'Chile' address and confirm say:
'street and Number': Avenida Providencia 1432, Depto 402
'city': Santiago 'zip': 8320000
'country': Chile 'state': Metropolitana
#### > Envia Error: Invalid Option - String is too long at #->properties:destination
### Cause of the issue:
The problem is caused by the fact that Envia's api expects a 2-3 digits to represent state codes: https://docs.envia.com/reference/state-by-code
The mapping from Odoo's code state representation to envia's one is expected ot be performed by this mapping:
https://github.com/odoo/enterprise/blob/75cba6d5a88ebc4e0f35040a173ac1c443638daf/delivery_envia/models/envia_request.py#L27-L43 when the address is converted here:
https://github.com/odoo/enterprise/blob/75cba6d5a88ebc4e0f35040a173ac1c443638daf/delivery_envia/models/envia_request.py#L535-L542 That being said, the `Chile`'s code states of have been changed in [6694a3942c58ff1a56c9e4b36edbe126dd1e66f8](https://github.com/odoo/odoo/commit/6694a3942c58ff1a56c9e4b36edbe126dd1e66f8) to match the official Iso but not in the Envia's mapping leading a failling match keeping the 4 charracter long `CL-RM` of the `Metropolitan` state provided in to the Envia's api as address data.
opw-6210007
Forward-Port-Of: odoo/enterprise#117280This update corrects a misleading warning message that appeared when a payslip was cancelled in Odoo Enterprise. The change ensures that users receive accurate information and a cleaner workflow when managing payslips. This improves the overall user experience and data consistency.
Original PR description
. Clear payslip warning after cancelling the payslip . Add corresponding tests task-6199148 Forward-Port-Of: odoo/enterprise#117507 Forward-Port-Of: odoo/enterprise#116859
This update resolves a validation error that occurred when creating intercompany invoices between companies in different regions (e.g., Belgium and Luxembourg). The fix ensures accurate tax calculations by correctly applying and recomputing taxes during intercompany transactions, preventing incompatible fiscal position warnings.
Original PR description
**Steps to reproduce:** * Install the *Accounting* module. * Install localisation modules for two different regions: * *Belgium* (**l10n_be**) * *Luxembourg* (**l10n_lu**) * Configure two companies,…
**Steps to reproduce:** * Install the *Accounting* module. * Install localisation modules for two different regions: * *Belgium* (**l10n_be**) * *Luxembourg* (**l10n_lu**) * Configure two companies, each assigned to one of the above regions. * Create fiscal positions: * In the Belgium company, create a fiscal position for Luxembourg. * In the Luxembourg company, create a fiscal position for Belgium. * Go to *Accounting > Configuration > Settings*. Enable *Inter-Company Transactions*. Enable synchronization of *Vendor Bills and Invoices* for both companies. * Create an invoice in the Luxembourg company. Select a partner belonging to the Belgium company. Add a product with applicable taxes. **Observed behavior:** * A validation error is raised: 'This entry contains taxes that are not compatible with your fiscal position. Please check the country set in the fiscal position and in your tax configuration.' **Cause:** * During intercompany bill creation, a foreign fiscal position is applied before recomputing taxes. * If no mapped foreign taxes exist, the system keeps domestic purchase taxes. * This leads to a mismatch between taxes and fiscal position, triggering the validation error. **Fix:** * Add a safeguard in *_inter_company_create_invoices()*. * After *_inter_company_sync_invoice_line_taxes()* recomputes taxes, *_inter_company_has_incompatible_fiscal_position_taxes()* checks whether the fiscal position is incompatible. * If incompatible, the fiscal position is removed and taxes are recomputed without it. opw-6103671 Forward-Port-Of: odoo/enterprise#117450 Forward-Port-Of: odoo/enterprise#115085
This fix resolves an issue where payroll account merges incorrectly combined employee analytic distributions, leading to inaccurate financial reporting. The update ensures that each employee's specific analytic distribution is accurately reflected in the generated account move, regardless of overlapping accounts. This improves the precision of payroll accounting and reporting.
Original PR description
Steps to reproduce 1. Enable "Batch Account Move Lines" in the Payroll settings. 2. Configure two employees' versions with an analytic distribution on the same analytic account but with different…
Steps to reproduce
1. Enable "Batch Account Move Lines" in the Payroll settings.
2. Configure two employees' versions with an analytic distribution on the
same analytic account but with different percentages (e.g. {acc: 50}
for the first employee and {acc: 70} for the second).
3. Generate a payslip run containing both employees and validate it.
Issue
The generated account move aggregates the two payslips into a single
line whose analytic_distribution matches only the last employee being
processed; the other employee's percentage is silently lost.
`_get_existing_lines` decides whether an incoming line can merge into an
already accumulated one. When the incoming line has an analytic
distribution, the merge condition delegates to
`_check_partially_matching_accounts`:
https://github.com/odoo/enterprise/blob/e4a1326c7a8a74da7970aeaa9900c19d01634e31/hr_payroll_account/models/hr_payslip.py#L254-L271
https://github.com/odoo/enterprise/blob/e4a1326c7a8a74da7970aeaa9900c19d01634e31/hr_payroll_account/models/hr_payslip.py#L273-L283
That helper returns True as soon as any analytic account of the new
line appears anywhere in the existing line's distribution dict, without
comparing percentages. Two distributions such as {acc: 50} and
{acc: 70} share the same account, so the helper returns True, the
lines are merged, and whichever distribution ends up on the merged line
overwrites the other — the total amount is correct but the analytic
split is wrong.
The logic introduced in commit https://github.com/odoo-dev/enterprise/commit/e40a3166286a6bc546e9543b935233d2a110dc52 successfully addressed merging for rule-level distributions
with composite keys (e.g., {'13,7,12': 40}). However, that implementation is overly inclusive for employee-specific distributions.
It fails to differentiate between cases where the same analytic account is utilized across various employees but with different percentage allocations.
Because it only checks for an account overlap rather than a perfect distributional match, it incorrectly aggregates distinct financial dimensions into a single journal line
Solution
Compare the full analytic_distribution dict by strict equality. Lines
merge only when the distribution is identical (same keys AND same
percentages), keeping the batch feature anonymizing identically
configured employees while preserving one line per distinct
distribution.
opw-6102508
Forward-Port-Of: odoo/enterprise#117453
Forward-Port-Of: odoo/enterprise#114156This update corrects a technical issue where an approval rule was being applied incorrectly due to a duplicate XML ID. By renaming the duplicate ID, we've ensured that approval rules are applied correctly based on user and manager access levels, improving the reliability of the approval process. This resolves a potential inconsistency in how approvals were handled.
Original PR description
The XMLID `approval_approver_manager` was defined twice, causing the rule to be applied with the last evaluated access configuration for both `group_approval_user` and `group_approval_manager`. This commit renames the first occurrence of the duplicated XMLID to `approval_approver_user` to restore the intended separation between user-level and manager-level approval access rules. task-6095010 Forward-Port-Of: odoo/enterprise#113480
This update fixes an error in the calculation of basic salaries for Mexican employees, ensuring accurate payments based on full calendar days, including unpaid leave. Previously, unpaid leave was incorrectly prorated; now, the salary is calculated based on the full period, aligning with Mexican regulations and improving payroll accuracy.
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#116883 Forward-Port-Of: odoo/enterprise#112524
This update resolves a limitation in the l10n_mx_edi module, allowing credit notes (out-refunds) to be configured with Payment Policy Details (PPD) as required by the Mexican SAT portal. Previously, this functionality was restricted, causing potential compliance issues. This change ensures accurate processing of Mexican tax refunds.
Original PR description
Currently, credit notes cannot be PPD (payment_policy), however, SAT portal allows it. **STEP TO REPRODUCE** 1. Install the l10n_mx_edi module. 2. Create an invoice with PPD (either changing it or through payment terms). 3. After send CFDI, generate a credit note and try to set PPD **FIX** Allow move_type = 'out_refund' to be PPD. Task-6049654 Forward-Port-Of: odoo/enterprise#114886
This update ensures that all employee groups, regardless of their type, receive the correct employer-paid rent posting account in payroll accounting. Previously, this setup was limited to a single group, leading to inconsistencies. This change maintains accurate and predictable payroll accounting behavior.
Original PR description
Before this commit, the employer-paid rent setup was only applied to one employee group. This could leave other employee groups without the expected rent posting account. After this commit, the same rent posting setup is applied for each available employee group. This keeps payroll accounting behavior consistent. Task-6175007 Forward-Port-Of: odoo/enterprise#115781
This update corrects a bug where the payment button was incorrectly displayed, leading to a blocked payment flow. Since a recent change, the system no longer verifies KYC completion before payment initiation, exposing users to a state where they cannot proceed with payments. This fix ensures the payment button accurately reflects the payment's active status.
Original PR description
Currently, is_payment_enabled is used to determine whether the payment button should be displayed. However, this field only indicates that the TPP / institution allow payment initiation, not that it's active. Since 19.2, `/initiate_payment` no longer checks whether the KYC flow has been completed before initiating a payment. As a result, users can now reach a blocked state where the payment flow is exposed but cannot actually proceed. No task ID Forward-Port-Of: odoo/enterprise#116743
This update resolves an issue where the total row in the Planning Gantt view wasn't accurately reflecting working hours when the view wasn't grouped by resources. The change improves data processing to ensure accurate working hour calculations regardless of grouping settings, enhancing planning visibility.
Original PR description
Issue: ---------------------------------------- In the Planning Gantt view when we don't group by resources, the total row is not considering the working hours. Steps to reproduce:…
Issue: ---------------------------------------- In the Planning Gantt view when we don't group by resources, the total row is not considering the working hours. Steps to reproduce: ---------------------------------------- - Open Planning - Remove the default group by resources - Have at least a planning slot for a non-flexible employee - The total row doesn't take the working schedule into account Cause: ---------------------------------------- Since [an improvement,](https://github.com/odoo/enterprise/commit/cc35e1a4729453e4f788034a94402ab048eadfcb) the working hours data in given to the `PlanningGanttRenderer` through the progress bars data. This is an issue because the progress bars are only there if we group by resources. ([src](https://github.com/odoo/enterprise/blob/423ab064847dd41d36778a812390e3bec53ba4dc/planning/models/planning_slot.py#L2669-L2678)) Solution: ---------------------------------------- In this commit we partially revert the commit adding the working intervals in the progress bars. Instead of doing it in `_gantt_progress_bar_resource_id()` we create a new method `_get_gantt_planning_data()` which is called directly in `get_gantt_data()` and returns useful information even when there are no progress bars. opw-5507063 Forward-Port-Of: odoo/enterprise#116914 Forward-Port-Of: odoo/enterprise#112522
This update resolves an issue where depositing money in Point of Sale (PoS) orders with presets enabled would incorrectly display a popup asking for a preset selection. The change ensures that PoS orders are correctly identified as 'settling accounts' immediately, preventing this unwanted popup and streamlining the deposit process. This improves the user experience for cash transactions.
Original PR description
Before this commit: ==================== depositing money for a partner in PoS with presets enabled could incorrectly trigger the preset selection popup. This happened because the order was not marked as is_settling_account early enough, so the preset selection logic did not ignore deposit orders. After this commit: ===================== is_settling_account is initialized during order setup and seeded immediately when the deposit order is fetched or created. As a result, deposit orders correctly bypass the preset selection flow. Task-6217580 Related Comm. PR-https://github.com/odoo/odoo/pull/264572 Forward-Port-Of: odoo/enterprise#117378
This update corrects a bug that was causing all employees to display a warning message during the initial payroll run, even when payslips hadn't been generated. The fix ensures that the warning only applies to payruns in the 'payslips' state, improving payroll accuracy and reducing unnecessary alerts for users.
Original PR description
The warning regarding payslips not in payrun is triggered even for the payrun you just created and for which payslips have not ye been generated. -> not considering payruns that are not in "payslips" state for user warning computation Task: 6198525
This update corrects a technical error that was consistently enabling a security feature (LNA) for all longpolling requests. The fix removes a mistakenly reintroduced parameter, ensuring LNA is only enabled when needed, improving system stability and efficiency. This resolves a potential configuration issue.
Original PR description
In odoo/enterprise#104157, the `headers` parameter was accidentally reintroduced to the `rpc` function of the longpolling class. This was causing `post` to be called with the wrong number of arguments, and a side-effect of this is that LNA was being enabled always for poll requests and never for action requests. This commit removes the headers parameter so that the function is called with the correct number of arguments. Forward-Port-Of: odoo/enterprise#117584
This update fixes an issue where the CO State Income Tax on payslips was incorrectly showing a positive value. This was due to a misinterpretation of tax withholding rules, aligning with previous fixes for Alabama. The change ensures that state income tax is accurately deducted from employee paychecks as a withholding, reflecting how individuals receive refunds when filing their income.
Original PR description
## Issue When generating a payslip for an employee of a company located in Colorado, the *CO State Income Tax* could end up positive. ## Steps to reproduce 1. Install *United States - Payroll*…
## Issue
When generating a payslip for an employee of a company located in Colorado, the *CO State Income Tax* could end up positive.
## Steps to reproduce
1. Install *United States - Payroll* (`l10n_us_hr_payroll`)
2. Set the current company's State to Colorado
3. Create an employee and a contract
- Wage: $0
- (Set the contract's status to *Running*)
- (In the payroll tab) State Withholding Allowance: $1000
4. Create a Payslip for the employee
- Structure: *"United States: Regular Pay"*
5. Compute Sheet
6. **In the _Salary Computation_ tab, the _CO State Income Tax_ line has a positive value**
## Justification
This fix is similar to the one applied for the AL(abama) state income tax by https://github.com/odoo/enterprise/commit/f0eeb55f1e3cf965c6a409675813d4a699e5fca6. That modification was justified by CAS (PO of US localizations for Payroll) in opw-5137280:
> *"Payroll taxes are always funds withheld from employee's paychecks, if there is a positive value it means the tax is a refund, not a withholding. Refunds happen when individuals file their income."*
## Note to reviewer
The test [`test_069_al_state_tax_0_income`](https://github.com/odoo/enterprise/blob/219d2a797ee2099c9d77c2defc9c9c5e1d504ffe/test_l10n_us_hr_payroll_account/tests/test_salary_rules.py#L957-L989) (added by the aforementioned commit https://github.com/odoo/enterprise/commit/f0eeb55f1e3cf965c6a409675813d4a699e5fca6) is wrongly indented and thus never executed. The test passes with the dedicated fix, and fails without it, as expected. Let me know if you want me to indent it correctly (in this commit or in an additional one).
opw-5999856
Forward-Port-Of: odoo/enterprise#117497
Forward-Port-Of: odoo/enterprise#112724This update aligns the subheaders and numerical data within Odoo's financial reports, ensuring a more visually consistent and professional presentation. Previously, the alignment of subheaders and figures was inconsistent, and this change standardizes the layout for improved readability and a better user experience.
Original PR description
Before this commit, subheaders of numeric columns were centered, while the figures in the columns were aligned to the end. This commit ensures that both the subheader and the figures are aligned the same way (center or end). task-6197223 Forward-Port-Of: odoo/enterprise#117477 Forward-Port-Of: odoo/enterprise#116578
This update fixes an error that occurred when generating the Appendix 142 report with no data. It now safely handles empty reports and updates the Vietnamese VAT return type to use a more comprehensive composite tax report. These changes ensure the report generates correctly even with limited data, improving data accuracy and reliability.
Original PR description
This commit addresses an issue where generating the Appendix 142 report with no data would result in an error, and updates the Vietnamese VAT return type to use the overarching composite tax report.…
This commit addresses an issue where generating the Appendix 142 report with no data would result in an error, and updates the Vietnamese VAT return type to use the overarching composite tax report. Modifications: - Added defensive checks to handle empty report lines. If the list is empty, it now safely returns the export HTML with default empty/zeroed contextual variables. Added bounds and existence checks for the base amount and VAT amount indexes to prevent out-of-bounds errors when evaluating purchase lines, sales lines, and section totals. - Changed the report reference on the Vietnamese tax return type record to use the composite tax report rather than the standalone form 01 report. - Swapped the data loading order in the module manifest to load tax report data before return data to resolve external ID dependencies. - Adjusted report sequences so the main Vietnamese Tax Report appears first (sequence 10) and the Purchase/Sale Invoice List appears second (sequence 20). Task-6216318
This update resolves an issue where the Attendance Discrepancies warning on the payroll dashboard incorrectly displayed all employees across all companies. The fix ensures the warning filters employees within the current company, providing more accurate and relevant reporting for payroll management. This improves the clarity and reliability of payroll data.
Original PR description
The Attendance Discrepancies warning on the payroll dashboard doesn't filter the employees in the current company and ends up showing all employees in all companies. Task: 6204269
This update fixes a potential error in calculating the employment bonus for employees on out-of-contract payslips. Previously, multiple payslips with overlapping worked hours could lead to double-counting, which has now been addressed to ensure accurate bonus calculations based on total workable hours.
Original PR description
In the case of out of contract payslips, we might have multiple payslips with worked day lines for the same month. In that case, we need to be careful to not count these hours twice when computing the employment bonus, which depends on the total "workable" hours for the month. task-6208125 Forward-Port-Of: odoo/enterprise#116862
This update fixes an issue where the 'step bubble' bar on payruns incorrectly displayed attendance status for employees. The change ensures that payrun bubbles accurately reflect employee tracking methods, resolving confusion and improving the user experience when updating employee settings.
Original PR description
Two bugs stem from the payrun "step bubble" bar (Employees → Time [→ Attendance] → Payslips): 1. When a payrun not containing attendance-tracked employees is opened first and I change one of the…
Two bugs stem from the payrun "step bubble" bar (Employees → Time [→ Attendance] → Payslips): 1. When a payrun not containing attendance-tracked employees is opened first and I change one of the employee's tracking method to attendance, going back via breadcrumb I'd see that the Attendance bubble incorrectly appears for the latter. The root cause is that cachePayRunSteps is a Map iterated in insertion order: "attendance" is appended after "payslip" the first time it is encountered, so it always renders last regardless of the server-defined canonical order. Fixed by turning it into an array overridden at every data fetch. 2. When navigating back to the payrun list via breadcrumb after changing the last of an employee's work_entry_source (e.g. removing the last attendance-tracked employee from a payrun), the bubble still shows the previous state. Fixed by marking the payrun as fresh when following specific flow, preventing the reload of the bubbles using instead the previously cached ones. task-5959087 Forward-Port-Of: odoo/enterprise#117590
This update fixes an issue where the rental report was displaying incorrect dates. The fix ensures that each row in the report accurately reflects the start and return dates of the rental order, providing more reliable reporting data. This improves the accuracy of rental tracking and reporting.
Original PR description
The rental report is a daily report with x rows by rental order, with x the days between the start and return dates. With generate_series inside the select, the query was creating x rows with the same id, resulting in the date field not being correctly displayed (one unique date, the start date). This fix corrects the generation of the report to display the real date on each row. opw-5266525 Forward-Port-Of: odoo/enterprise#116948 Forward-Port-Of: odoo/enterprise#104764
This update fixes a potential crash in the Gantt chart caused by incorrect drag initiation. The change reintroduces a safeguard to ensure the chart only initiates a drag when a valid target is available, preventing unexpected errors and improving overall stability.
Original PR description
In https://github.com/odoo/enterprise/pull/113438, it was incorrectly assumed that it would be impossible to initiate a pill drag without a valid target being found. This commit reintroduces a strict safeguard to handle scenarios where the drag is triggered with no valid cell target. This prevents unexpected crashes encountered during test executions. runbot-error-242486 Forward-Port-Of: odoo/enterprise#116619
This update fixes an issue where Knowledge articles appeared narrow when printed on large screens. The fix prevents a CSS rule from restricting the article's width, ensuring proper formatting and readability when exporting to PDF or printing. This improves the user experience for viewing and sharing Knowledge content.
Original PR description
Currently, a CSS rule forces the form container width to 1px to ensure that the nested list view can correctly compute its size. See: ```scss .o_form_view.o_xxl_form_view { .o_form_view_container {…
Currently, a CSS rule forces the form container width to 1px to ensure that the nested list view can correctly compute its size.
See:
```scss
.o_form_view.o_xxl_form_view {
.o_form_view_container {
width: 1px; /* List view needs a width value to recompute the size correctly */
}
}
```
However, since the Knowledge editor is implemented as a form view, this rule also affects Knowledge. When zooming out, the `o_xxl_form_view` class is added to the form view container, causing the rule to apply. If an article is printed while this class is present, it is constrained to an extremely narrow column, making it unreadable.
Steps to reproduce:
1. Open an article in Knowledge
2. Zoom out using `Ctrl` + `-`
3. Open the kebab menu and select "Export"
=> The article is rendered in a very narrow column.
To address this issue, we override this rule specifically for Knowledge. With this change, articles are now rendered correctly when printed or exported as PDF.
Task-5999878
Forward-Port-Of: odoo/enterprise#1032591 change
Resolved issues and error corrections
This update resolves a performance issue related to how activity notifications are processed within the Odoo Enterprise system. The change optimizes notification handling, ensuring more reliable and efficient updates. This improves the overall responsiveness of the system when activities are modified.
Original PR description
Performance tests adjustements for the community counter-part
5 changes
Resolved issues and error corrections
This update resolves two issues impacting the restaurant POS experience. The "Message" badge no longer appears incorrectly after notes are removed, and a technical error causing a popup to crash when accessing customer notes has been fixed. These changes improve the reliability and usability of the POS system.
Original PR description
Steps to reproduce: ------------------------ Issue 1: “Message” badge stays on the Send button after removing notes 1. Open POS Restaurant. 2. Add a General Note. 3. Remove the note. 4. The “Message” badge is still visible on the Send to Kitchen button. Issue 2: Customer Note popup error 1. Create an order. 2. Send the order to preparation 3. Open the Customer Note popup. 4. Traceback appears. Fix: ----------------------- - Issue 1: Corrected the logic so the “Message” badge is shown only when a real general note exists. - Issue 2: Defaulted `startingValue` to an empty string in setup(), preventing the popup error. Task - 6101501
This update ensures that the XML invoice file generated when sending invoices to Verifactu is now saved and accessible to the user. Previously, this file was discarded, causing issues when users needed to provide it to the Spanish government for assistance. Now, users can easily download and use the XML file.
Original PR description
Before these changes when the user confirms an invoice and sends it to verifactu, the system returns a JSON file. The problem was that if the user needs assistance from the government, they ask for the XML file. The XMl was being discarded. Now these changes keep the XML and attach it to the verifactu tab for the user to have it and use it with the government if they need --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves an issue that prevented users from creating new website pages when a template was marked as 'Is a Template' and the page view lacked a specific HTML element. The fix ensures the system handles missing elements gracefully, avoiding errors and allowing users to customize website pages without disruption.
Original PR description
Currently, an error is raised when creating a new website page after a custom or existing page marked as `Is a Template`, if the view architecture does not contain a div with `id="wrap"`. Steps to…
Currently, an error is raised when creating a new website page after a
custom or existing page marked as `Is a Template`, if the view architecture
does not contain a div with `id="wrap"`.
Steps to produce an error:
- Go to the website and create a new website page (e.g., test).
- Go to the newly created page and make sure the website edition menu is open
- Click on Site > Properties > Enable `Is a Template` > Save & Close
- Go to Site > Pages
- Click `Bug icon` on the above created page (or open the view of the above
created page as `website.test`).
- Remove the div that contains `id="wrap"` from the view (mostly users do it
to customize the view) and save it.
- Go to Site > Pages > Click New > An error will occur.
This error occurs because the code at line [1] tries to access the first
element of the list returned by `html_tree.xpath('//div[@id="wrap"]')`.
However, if the user has removed this `div`, the list is empty and accessing
the first element raises an error.
This commit fixes the above issue by skipping custom templates from the
result if the template does not contain a `wrap_el(id="wrap")`.
[1]: https://github.com/odoo/odoo/blob/f592fba684225f059fb60c38878e0554ae3e6ac8/addons/website/controllers/main.py#L707
Sentry-7315470405This update resolves an issue where website forms would fail to submit due to a missing required field. The fix ensures that when an integrity error occurs during form submission, the transaction is rolled back, preventing further errors and ensuring a stable user experience. This improves the reliability of custom website forms.
Original PR description
Currently an exception is generated when the user submits the custom website form after following the below steps: - Install `web_studio`, `website` and `crm` - Go to the website > Open the website…
Currently an exception is generated when the user submits the custom
website form after following the below steps:
- Install `web_studio`, `website` and `crm`
- Go to the website > Open the website editor > Add a form to the website
- Configure the form as below:
Action: Click `More models` > select `crm.tead`
Field: add any custom
- Save the form
- Now an error is generated in the backend when the user submits the form.
The error was caused by submitting a form without a required field, leading
to a `NotNullViolation` during insertion at code line [1]. This was caught as
an `IntegrityError` at code line [2], but since the transaction was not rolled
back (broken transaction), it remained in a failed state. Consequently, a
subsequent operation triggered an `InFailedSqlTransaction` error when
attempting to close the savepoint at code line [3].
This commit will solve the above issue by rolling back the cursor when
the `IntegrityError` error occurs while submitting the form.
[1]: https://github.com/odoo/odoo/blob/c21c481eecf11a2e6e8bb21aa907e0aee870e3da/addons/website/controllers/form.py#L77
[2]: https://github.com/odoo/odoo/blob/c21c481eecf11a2e6e8bb21aa907e0aee870e3da/addons/website/controllers/form.py#L98
[3]: https://github.com/odoo/odoo/blob/c21c481eecf11a2e6e8bb21aa907e0aee870e3da/addons/website/controllers/form.py#L53
Sentry-7260662088,7327198011This update fixes an issue where product prices didn't automatically update when the cost price changed. Previously, users had to manually switch price lists to trigger the update. The fix adds a direct update mechanism to ensure on-sale prices accurately reflect cost changes, improving pricing accuracy and reducing manual intervention.
Original PR description
When we create a product variant and have a pricelist which is based on the cost price, and change the cost price, the on_sale_price doesn't update. You have the change the price list to other and back to the one you want for it to trigger change because the _onchange_compute_pricing only gets triggered if there's change on pricelist (pricer_sale_pricelist_id), and sales price (lst_price). Steps to Reproduce: 1.Create a pricelist and add a line with "formula" price type, and based on "cost", 2.Create a product variant, and add the pricelist just created. 3.Change the "Cost". The "On Sale Price" doesn't update. 4.You have to change the price list to some other and back to the one you want for the "On Sale Price" to update. To fix the issue, we add the field Cost (standard_price) on api.onchange, so when we change the cost it'll update the "On Sale Price" right away. opw-5947995
2 changes
Resolved issues and error corrections
This update fixes an issue where check amounts were not being properly rounded in the Philippines (PH) version of Odoo. Previously, the check amount in words displayed an incorrect decimal format with 'ONLY' appended. This change ensures accurate check formatting for PH transactions, improving financial reporting and compliance.
Original PR description
Current behaviour: --- When paying with checks, the amount is not rounded in the check amount in words string. Steps to reproduce: --- 1. Switch to PH company 2. Set setting Check Layout as "Print Check - PH" 3. Create a new vendor bill 4. Add a product with a specific price like 91490.15 5. Confirm the bill, click on Register Payment 6. Select Payment Method "Checks", Create Payment 7. Go to the payment, Amount in Words is wrong 8. Ninety-One Thousand Four Hundred Ninety And 15000000001/100 ONLY Expected behaviour: --- The decimal amount should be rounded, and "ONLY" shouldn't appear. Fix: --- Rounded the pay amount And backported: https://github.com/odoo/enterprise/commit/bb6c9848665709c14c5113b2c98976f869cd473b opw-6058344
This update resolves a bug that prevented users from accessing the community forum when multiple forums were configured within the helpdesk. The fix corrects an error in how the forum templates were rendered, ensuring consistent functionality across different forum setups. This ensures all users can access the community forum.
Original PR description
*=website_helpdesk_slides_forum,website_helpdesk_forum Currently an exception is generated when the user tries to open the community forum of the helpdesk by following steps. - Install `Website…
*=website_helpdesk_slides_forum,website_helpdesk_forum Currently an exception is generated when the user tries to open the community forum of the helpdesk by following steps. - Install `Website Slides Forum Helpdesk (website_helpdesk_slides_forum)` - Go to `Helpdesk` > `Configuration` > `Helpdesk team` > `Customer care` - Set more than one forums inside `Community Forum` and save - Go to the website and open `Help` page - Error will generate when clicking `Ask the community` First Error: `QWebError: Error while rendering the template: KeyError: '_forums'` Second error when we try above step by only installing `website_helpdesk_forum`: `ValueError: View 'website_helpdesk_forum.forum_all' in website 1 not...` The first error occurs because the code line [1] renders the template `website_helpdesk_slides_forum.helpdesk_forums` (we will get this template id from `get_template_xml_id` method (at code line [2])), which inherits from `website_forum.forum_all_all_entries`. The inherited template expects the `_forums` variable to be defined. However, since we call the template directly without providing `_forums`, the template tries to access it and raises a KeyError. The second error occurs when rendering the `website_helpdesk_forum.forum_all` template, whose XML ID is retrieved using the `get_template_xml_id` method (see line [3]). This template does not actually exist, so when the system attempts to load it, the rendering process fails. This commit resolves the issue by rendering the `website_forum.forum_all` template instead of the template returned by `get_template_xml_id`, since the templates returned by that method either do not exist or cannot properly handle forums. The website_forum.forum_all template is designed to manage all forums, so it reliably covers the required use case. [1]: https://github.com/odoo/enterprise/blob/6658581828dcdc43ffc5823814a05cb936cd0500/website_helpdesk_forum/controllers/website_forum.py#L20-L22 [2]: https://github.com/odoo/enterprise/blob/6658581828dcdc43ffc5823814a05cb936cd0500/website_helpdesk_slides_forum/controllers/website_forum.py#L9-L10 [3]: https://github.com/odoo/enterprise/blob/6658581828dcdc43ffc5823814a05cb936cd0500/website_helpdesk_forum/controllers/website_forum.py#L24-L25 sentry-7159323242