Daily updates from Odoo
Tuesday, May 19, 2026
133 changes
15 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 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 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 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
This update fixes an issue where e-Faktura invoices for non-Polish customers incorrectly included the country code in the VAT number. The change 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 several bugs impacting the AI Fields functionality within Odoo Enterprise. Specifically, it corrects an error message that previously appeared to users and ensures accurate source citations are used when generating AI responses, improving the reliability of the AI Fields tool. This enhances the overall user experience and data integrity.
Original PR description
This commit fixes the following bugs: - In 99f76c1, tools.py was moved from ai_fields module instead ai_fields_tools in the ai module. However, the 'odoo.addons.ai_fields.tools.UnresolvedQuery' error which is caught in _computeAiField method wasn't changed to reflect the new file path which made the error appear to the user instead of just being a toaster message. - When performing web_grounding, the URL citations are replaced by [WEB_SOURCE:<id>] to prevent LLM hallucinating sources during the agentic_loop. These placeholders are replaced again by the actual URLs before sending the response back to the user. However, this wasn't done in the case of _get_direct_response when the web_grounding completion option was set to True and was only done if the custom web_search tool was used. This caused these placeholders to appear in AI Fields. task-6209766
This update resolves an issue where users couldn't create new templates after undoing a previous template conversion. The fix ensures the original project documents folder is properly restored, eliminating a conflict that prevented subsequent template creation. This improves the user experience and workflow for managing project templates.
Original PR description
Steps to Reproduce: --- 1. Create a new project. 2. Convert it into a template. 3. Click on "Undo". 4. Try to convert the project into a template again. Issue: --- After undoing the template…
Steps to Reproduce: --- 1. Create a new project. 2. Convert it into a template. 3. Click on "Undo". 4. Try to convert the project into a template again. Issue: --- After undoing the template conversion, the project's original documents folder remained archived while the template's documents folder stayed active. This inconsistent state prevented subsequent template creation from the same project. Current behaviour: --- A UserError is raised: "You cannot duplicate document(s) in the Trash." Expected behaviour: --- Undoing the template conversion should properly restore the original project's documents folder to active state and clean up the template's documents folder, allowing template conversion again without document folder conflicts. Fix: --- - Archive original project's documents folder during template creation to prevent mixed active/inactive states during copy operations - Implement callback system to properly unarchive original project's documents folder during undo task-4916027 Forward-Port-Of: odoo/odoo#264429 Forward-Port-Of: odoo/odoo#223152
This update resolves a bug where undoing a template conversion would leave the project's documents folder in an inconsistent state, preventing further template creation. The fix ensures the original project's documents are properly restored and cleaned up during the undo process, improving template management.
Original PR description
Steps to Reproduce: --- 1. Create a project with documents. 2. Convert it into a template. 3. Click on "Undo". 4. Try to convert the project into a template again. Issue: --- After undoing the template conversion, the project's original documents folder remained archived while the template's documents folder stayed active. This inconsistent state prevented subsequent template creation from the same project. Current behaviour: --- A UserError is raised: "You cannot duplicate document(s) in the Trash." Expected behaviour: --- Undoing template conversion should properly restore original project's documents folder and clean up template's documents folder. Fix: --- - Archive original project's documents folder during template creation - Implement documents folder unarchival during undo operations task-4916027 Forward-Port-Of: odoo/enterprise#117303 Forward-Port-Of: odoo/enterprise#91595
This update fixes an issue where prepaid tax calculations were inaccurate due to rounding errors, specifically when dealing with downpayment invoices. The change ensures that tax amounts are calculated correctly using global rounding, preventing discrepancies and improving financial reporting accuracy. This impacts users relying on the l10n_sa_edi module for Saudi Arabian tax compliance.
Original PR description
### Steps to reproduce: - Download 'Sales', 'Accounting', and 'l10n_sa_edi' modules - Settings > Accounting > Rounding Method > Enable global rounding - Create sale order with 8 lines at 29.7 each…
### Steps to reproduce: - Download 'Sales', 'Accounting', and 'l10n_sa_edi' modules - Settings > Accounting > Rounding Method > Enable global rounding - Create sale order with 8 lines at 29.7 each with 15% taxes (triggers rounding precision issues) - Create and confirm 100% downpayment invoice - Deliver, then create final invoice with downpayment lines - Call `_l10n_sa_get_prepaid_amount()` on final invoice > Tax amount was calculated as 35.67 instead of correct 35.64 ### Cause of Issue: The prepaid amount calculation was summing pre-rounded `tax_amount_currency` values from individual downpayment lines (4.45 + 4.46 + 4.46... = 35.67), instead of summing unrounded `raw_tax_amount_currency` values (4.455 × 8 = 35.64) to calculate `tax_amount`. https://github.com/odoo/odoo/blob/27930ae41a5f03bd499983109de7f632472c3650/addons/l10n_sa_edi/models/account_edi_xml_ubl_21_zatca.py#L227-L240 This violates Odoo's [recent change](https://github.com/odoo/odoo/pull/180062) in `round_globally` pattern which states: https://github.com/odoo/odoo/blob/8a88756bed194910bc5a47e93f0e29610dbeee1f/addons/account/models/account_tax.py#L2208 ### Fix: Ensure cumulative rounding errors are avoided and correct global rounding is applied. opw-5881564 Forward-Port-Of: odoo/odoo#264713 Forward-Port-Of: odoo/odoo#261278
This update resolves an issue where dragging calendar events with their popovers open was impossible. The fix ensures that the popover closes automatically during a drag, allowing for smooth event movement. It also eliminates popover flickering that occurred during the drag and drop process.
Original PR description
[FIX] web: fix event drag and drop with opened popover Fix impossible event drag and drop when the event has its popover opened. On drag start, the popover should close to allow dragging the event. [FIX] web,calendar: fix popover flicker on event drag Fix the popover flickering when drag and dropping an event with its popover opened. Task-5965017 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#264347
This update fixes an issue where POS Managers couldn't access key features after a system update. The changes granted POS Managers the necessary permissions to access customer information and navigate the system, ensuring they can perform their roles effectively. A duplicate test was also removed to streamline the testing process.
Original PR description
POS Manager heavily relied on stock user to access many different models, after the seperation of `point_of_sale` and `pos_stock`, we needed to allow `point_of_sale` users to access `res.partners` as well as adding `group_user` to it, so it can access the home menu, which without it managers aren't able to do a bunch of actions. Morever, there was a duplicated test that was removed. Runbot Error: 242929 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update optimizes a key calculation within the MRP subcontracting purchase module, reducing unnecessary database queries. By checking if a product is linked to a bill of materials, the system avoids redundant searches, particularly when processing a large number of order points. This results in significantly faster lead time calculations, improving overall system performance.
Original PR description
When computing `qty_to_order` 1-3 extra queries are made by `get_lead_days()`, which can cause performance issues when computing `qty_to_order` for a large number of orderpoints. This commit aims to…
When computing `qty_to_order` 1-3 extra queries are made by `get_lead_days()`, which can cause performance issues when computing `qty_to_order` for a large number of orderpoints. This commit aims to prevent these extra queries by returning early if the current product is not associated with a bom. The amount this commit speeds up the compute depends on how many of products passed into `_get_lead_days()` are associated with a bom. `qty_to_order` is no longer a stored field after this commit: https://github.com/odoo/odoo/pull/159432 This benchmark was done in 18.0 on /stock.warehouse.orderpoint/search_panel_select_range. This call does not trigger the compute on all orderpoints in 17.0 as the field is stored but calling the compute directly on all orderpoints results in the same speed up as seen in 18.0. | Orderpoints | % of products linked to a bom | Time before | Queries before | Time after | Queries After | |-------------|-------------------------------|-------------|----------------|------------|---------------| | 800 | 50% | 2.8s | 1570 | 2.3s | 818 | | 8,000 | 0% | 28.2s | 16,698 | 15.3s | 242 | | 8,000 | 25% | 29.6s | 16,833 | 19.2s | 4497 | | 8,000 | 50% | 29.8s | 16,925 | 23.2s | 8693 | | 8,000 | 75% | 31.6s | 16,949 | 27.6s | 12827 | Forward-Port-Of: odoo/odoo#264848 Forward-Port-Of: odoo/odoo#262321
16 changes
Enhancements to existing features
This update ensures the "Save Order" button remains consistently available for users. This allows them to seamlessly save their order progress and resume it later, regardless of the device they're using within the same session. This improves the user experience and reduces frustration when working with point-of-sale orders.
Original PR description
The "Save Order" button is now always available, allowing users to easily save and resume their orders on different devices within the same session. task-id: 5966678 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#261809 Forward-Port-Of: odoo/odoo#250405
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 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 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 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 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 an issue where tax return entries incorrectly included all tax amounts, regardless of the specific tax return type. Previously, tax returns for regions like Manitoba were generating entries with incorrect tax calculations. This change ensures that tax return entries accurately reflect the taxes due for the specific region, improving tax reporting accuracy.
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
This update fixes a rounding error in the calculation of prepaid taxes for invoices in Saudi Arabia. The previous calculation was leading to inaccurate tax amounts, particularly when using global rounding. This change ensures accurate tax calculations for downpayment invoices, improving financial reporting.
Original PR description
### Steps to reproduce: - Download 'Sales', 'Accounting', and 'l10n_sa_edi' modules - Settings > Accounting > Rounding Method > Enable global rounding - Create sale order with 8 lines at 29.7 each…
### Steps to reproduce: - Download 'Sales', 'Accounting', and 'l10n_sa_edi' modules - Settings > Accounting > Rounding Method > Enable global rounding - Create sale order with 8 lines at 29.7 each with 15% taxes (triggers rounding precision issues) - Create and confirm 100% downpayment invoice - Deliver, then create final invoice with downpayment lines - Call `_l10n_sa_get_prepaid_amount()` on final invoice > Tax amount was calculated as 35.67 instead of correct 35.64 ### Cause of Issue: The prepaid amount calculation was summing pre-rounded `tax_amount_currency` values from individual downpayment lines (4.45 + 4.46 + 4.46... = 35.67), instead of summing unrounded `raw_tax_amount_currency` values (4.455 × 8 = 35.64) to calculate `tax_amount`. https://github.com/odoo/odoo/blob/27930ae41a5f03bd499983109de7f632472c3650/addons/l10n_sa_edi/models/account_edi_xml_ubl_21_zatca.py#L227-L240 This violates Odoo's [recent change](https://github.com/odoo/odoo/pull/180062) in `round_globally` pattern which states: https://github.com/odoo/odoo/blob/8a88756bed194910bc5a47e93f0e29610dbeee1f/addons/account/models/account_tax.py#L2208 ### Fix: Ensure cumulative rounding errors are avoided and correct global rounding is applied. opw-5881564 Forward-Port-Of: odoo/odoo#264713 Forward-Port-Of: odoo/odoo#261278
This update resolves an issue where dragging events with open popovers was impossible. The fix ensures that the popover closes automatically during a drag, allowing users to seamlessly move events. It also eliminates popover flickering that occurred during the drag-and-drop process.
Original PR description
[FIX] web: fix event drag and drop with opened popover Fix impossible event drag and drop when the event has its popover opened. On drag start, the popover should close to allow dragging the event. [FIX] web,calendar: fix popover flicker on event drag Fix the popover flickering when drag and dropping an event with its popover opened. Task-5965017 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#264347
This update fixes an issue where invoices generated for non-Polish customers incorrectly included the country code in the VAT number field. The change ensures the correct VAT number format is used for KSeF compliance, preventing potential errors when submitting invoices to the tax authorities. This ensures accurate and compliant e-invoicing.
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 an issue where undoing a template conversion prevented users from creating new templates from the same project. The fix ensures that the original project's documents are properly restored and cleaned up after an undo, allowing for seamless template creation again. This improves the user experience and avoids frustrating errors.
Original PR description
Steps to Reproduce: --- 1. Create a new project. 2. Convert it into a template. 3. Click on "Undo". 4. Try to convert the project into a template again. Issue: --- After undoing the template…
Steps to Reproduce: --- 1. Create a new project. 2. Convert it into a template. 3. Click on "Undo". 4. Try to convert the project into a template again. Issue: --- After undoing the template conversion, the project's original documents folder remained archived while the template's documents folder stayed active. This inconsistent state prevented subsequent template creation from the same project. Current behaviour: --- A UserError is raised: "You cannot duplicate document(s) in the Trash." Expected behaviour: --- Undoing the template conversion should properly restore the original project's documents folder to active state and clean up the template's documents folder, allowing template conversion again without document folder conflicts. Fix: --- - Archive original project's documents folder during template creation to prevent mixed active/inactive states during copy operations - Implement callback system to properly unarchive original project's documents folder during undo task-4916027 Forward-Port-Of: odoo/odoo#264429 Forward-Port-Of: odoo/odoo#223152
This update corrects a bug that prevented users from recreating templates after undoing a previous conversion. The fix ensures that project documents are properly archived and cleaned up during the undo process, resolving a user error and allowing for seamless template management. This improves the reliability of the template creation workflow.
Original PR description
Steps to Reproduce: --- 1. Create a project with documents. 2. Convert it into a template. 3. Click on "Undo". 4. Try to convert the project into a template again. Issue: --- After undoing the template conversion, the project's original documents folder remained archived while the template's documents folder stayed active. This inconsistent state prevented subsequent template creation from the same project. Current behaviour: --- A UserError is raised: "You cannot duplicate document(s) in the Trash." Expected behaviour: --- Undoing template conversion should properly restore original project's documents folder and clean up template's documents folder. Fix: --- - Archive original project's documents folder during template creation - Implement documents folder unarchival during undo operations task-4916027 Forward-Port-Of: odoo/enterprise#117303 Forward-Port-Of: odoo/enterprise#91595
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 and improves the reliability of payroll reporting.
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#116907 Forward-Port-Of: odoo/enterprise#114970
This update fixes an issue where the bank statement import process could fail due to incorrect journal selections. The system now automatically validates currency and IBAN matches, ensuring the correct journal is used and preventing user errors. This improves the reliability and accuracy of importing bank statements.
Original PR description
Behavior before: The import flow could crash with an "Expected singleton" error if multiple journals shared an IBAN. Additionally, the system blindly accepted the current context ('self') as the…
Behavior before:
The import flow could crash with an "Expected singleton" error if multiple
journals shared an IBAN. Additionally, the system blindly accepted the
current context ('self') as the target journal, even if its currency or
bank account mismatched the statement, often leading to avoidable
UserErrors.
Behavior after:
The system now validates 'self' against the statement's currency and IBAN
before assignment. If a mismatch is found, it automatically searches for
the correct journal. The search is now restricted by currency and includes
a limit=1 to prevent crashes and ensure accurate selection.
Root Cause:
In _find_additional_data(), 'journal = self' was assigned without validation.
Furthermore, the fallback search lacked a record limit and currency matching
logic, allowing multiple records to be returned when duplicates or
multi-currency setups existed.
Fix:
- Added validation for the initial 'self' candidate (currency and IBAN match).
- Refined the search domain to include currency matching (journal or
company fallback).
- Added limit=1 to the search to guarantee a singleton recordset.
opw-5462037
Forward-Port-Of: odoo/enterprise#117376
Forward-Port-Of: odoo/enterprise#115475This update optimizes a key calculation within our MRP subcontracting process, specifically when determining lead times for order points. By preventing unnecessary database queries, the change significantly reduces processing time, particularly when dealing with a large number of order points. This results in a faster and more responsive system for users.
Original PR description
When computing `qty_to_order` 1-3 extra queries are made by `get_lead_days()`, which can cause performance issues when computing `qty_to_order` for a large number of orderpoints. This commit aims to…
When computing `qty_to_order` 1-3 extra queries are made by `get_lead_days()`, which can cause performance issues when computing `qty_to_order` for a large number of orderpoints. This commit aims to prevent these extra queries by returning early if the current product is not associated with a bom. The amount this commit speeds up the compute depends on how many of products passed into `_get_lead_days()` are associated with a bom. `qty_to_order` is no longer a stored field after this commit: https://github.com/odoo/odoo/pull/159432 This benchmark was done in 18.0 on /stock.warehouse.orderpoint/search_panel_select_range. This call does not trigger the compute on all orderpoints in 17.0 as the field is stored but calling the compute directly on all orderpoints results in the same speed up as seen in 18.0. | Orderpoints | % of products linked to a bom | Time before | Queries before | Time after | Queries After | |-------------|-------------------------------|-------------|----------------|------------|---------------| | 800 | 50% | 2.8s | 1570 | 2.3s | 818 | | 8,000 | 0% | 28.2s | 16,698 | 15.3s | 242 | | 8,000 | 25% | 29.6s | 16,833 | 19.2s | 4497 | | 8,000 | 50% | 29.8s | 16,925 | 23.2s | 8693 | | 8,000 | 75% | 31.6s | 16,949 | 27.6s | 12827 | Forward-Port-Of: odoo/odoo#262321
22 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 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 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 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
This update fixes an issue where tax returns were incorrectly including all tax amounts, regardless of the specific region (e.g., British Columbia vs. Manitoba). The change ensures that tax return entries accurately reflect taxes owed only for the correct tax jurisdiction, improving the accuracy of tax reporting. This impacts companies using Odoo's tax return functionality in Canada, Ecuador, Egypt, Paraguay, South Africa, and Kenya.
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
This update fixes a rounding error in the calculation of prepaid taxes for invoices in Saudi Arabia. The previous calculation was leading to incorrect tax amounts, particularly when using global rounding. This change ensures accurate tax calculations, aligning with Odoo's global rounding standards.
Original PR description
### Steps to reproduce: - Download 'Sales', 'Accounting', and 'l10n_sa_edi' modules - Settings > Accounting > Rounding Method > Enable global rounding - Create sale order with 8 lines at 29.7 each…
### Steps to reproduce: - Download 'Sales', 'Accounting', and 'l10n_sa_edi' modules - Settings > Accounting > Rounding Method > Enable global rounding - Create sale order with 8 lines at 29.7 each with 15% taxes (triggers rounding precision issues) - Create and confirm 100% downpayment invoice - Deliver, then create final invoice with downpayment lines - Call `_l10n_sa_get_prepaid_amount()` on final invoice > Tax amount was calculated as 35.67 instead of correct 35.64 ### Cause of Issue: The prepaid amount calculation was summing pre-rounded `tax_amount_currency` values from individual downpayment lines (4.45 + 4.46 + 4.46... = 35.67), instead of summing unrounded `raw_tax_amount_currency` values (4.455 × 8 = 35.64) to calculate `tax_amount`. https://github.com/odoo/odoo/blob/27930ae41a5f03bd499983109de7f632472c3650/addons/l10n_sa_edi/models/account_edi_xml_ubl_21_zatca.py#L227-L240 This violates Odoo's [recent change](https://github.com/odoo/odoo/pull/180062) in `round_globally` pattern which states: https://github.com/odoo/odoo/blob/8a88756bed194910bc5a47e93f0e29610dbeee1f/addons/account/models/account_tax.py#L2208 ### Fix: Ensure cumulative rounding errors are avoided and correct global rounding is applied. opw-5881564 Forward-Port-Of: odoo/odoo#264713 Forward-Port-Of: odoo/odoo#261278
This update fixes an issue where returned subcontracted products were incorrectly routed to the subcontractor's location instead of the user's stock. When returning products 'for exchange', the system now correctly directs returned items to the subcontractor's location and new deliveries to the user's stock, ensuring accurate inventory tracking and order fulfillment. This prevents misdirected stock movements and improves the efficiency of subcontracting operations.
Original PR description
## Issue When making a request for quotation for a subcontracted product and returning the delivery "for exchange", the new incoming delivery does not have the correct destination. Instead of having…
## Issue
When making a request for quotation for a subcontracted product and returning the delivery "for exchange", the new incoming delivery does not have the correct destination. Instead of having the stock of the user, the destination of the new incoming delivery is the same as its source: the subcontracting location.
<img width="1254" height="257" alt="5479900" src="https://github.com/user-attachments/assets/c7e6d392-8328-4a03-a71e-466e768f448b" />
## Steps to reproduce
1. Install MRP Subcontracting (`mrp_subcontracting`) and Purchase (`purchase`)
2. In Settings, enable *Subcontracting*
3. Create a Product P and a subcontracting BoM with Subcontractor S
4. Create a Request for Quotation
- Vendor: Subcontractor S
- Product: Product P (any quantity > 0)
5. Confirm the RFQ, receive the PO, validate the picking
6. On the validated picking, click *Return*, set the quantity of products to return, and click *Return for Exchange*
- This creates two new pickings, one to return the product(s) we received, and one to receive new products
7. Validate the two new pickings
8. **In Inventory > Reporting > Moves History, the very last `stock.move.line` has the same location in the *From* (`location_id`) and the *To* (`location_dest_id`) columns**
## Cause
The `location_dest_id` of the new `stock.move` is updated in `StockReturnPickingLine._prepare_move_default_values`.
https://github.com/odoo/odoo/blob/fb534f1eadcb8ef74e2ee6fd5b68872dddb978e3/addons/mrp_subcontracting/wizard/stock_picking_return.py#L20-L25
The condition added by https://github.com/odoo/odoo/commit/5404b426aac9 sets the destination of all returned subcontracted moves to the subcontractor location. This is incorrect when using "return for exchange", as in this case, the return move is directed towards the user's stock. In fact, when using "return for exchange", the following pickings are created:
| id | name | return_id | |
|:--:|--------------|:---------:|---|
| 1 | WH/IN/00001 | | Initial RFQ delivery |
| 2 | WH/OUT/00001 | 1 | Return of the initial RFQ delivery |
| 3 | WH/IN/00002 | 2 | New products delivery to replace the initial delivery. The stock.move.line of this stock.picking has a wrong `location_dest_id` |
## Fix
In the context of return for exchanges, the returned item must be directed to the *Subcontracting Location* while the new item must be directed to the *Stock*. In the `_prepare_move_default_values`, we should only set the `location_dest_it` to the subcontractor location for outgoing pickings.
opw-5479900
Forward-Port-Of: odoo/odoo#264798
Forward-Port-Of: odoo/odoo#245905This update ensures that fiscal category and product information is automatically loaded when using the self-order blackbox feature. Previously, this data wasn't consistently available, leading to potential inaccuracies. This change improves the reliability and accuracy of self-order transactions.
Original PR description
Before this commit, the fiscal category and the products work in and work out weren't necessarily automatically loaded when using the self with a blackbox, it is now the case. Forward-Port-Of: odoo/enterprise#117044
This update fixes an issue where dragging events with open popovers was impossible. The fix ensures that the popover closes automatically during drag-and-drop, allowing users to seamlessly move events. It also eliminates popover flickering that occurred during the drag process.
Original PR description
[FIX] web: fix event drag and drop with opened popover Fix impossible event drag and drop when the event has its popover opened. On drag start, the popover should close to allow dragging the event. [FIX] web,calendar: fix popover flicker on event drag Fix the popover flickering when drag and dropping an event with its popover opened. Task-5965017 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#264347
This update enhances self-attendance rights by allowing employees to modify their attendance records, including overtime, unless approved by their manager. It also restricts editing capabilities in the Gantt view and hides overtime details for self-attendance users, improving data accuracy and control. This change ensures employees have greater flexibility while maintaining appropriate managerial oversight.
Original PR description
Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: . Add new behavior so that self attendance right should be able to modify his attendances, even if they have overtime, unless this overtime has been approved by Manager . Disable attendance modify/drag/extend on the gantt view for self attendance right if not supposed to edit . Hide Overtime Details page for self attendance right if not supposed to edit . Add corresponding tests task-6067711 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update enhances self-attendance employees' ability to modify their own attendance records, including overtime, unless approved by a manager. It also restricts editing capabilities in the Gantt view and hides overtime details for these users, ensuring data integrity and streamlined workflows. This change improves employee self-service and reduces administrative overhead.
Original PR description
Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: . Add new behavior so that self attendance right should be able to modify his attendances, even if they have overtime, unless this overtime has been approved by Manager . Disable attendance modify/drag/extend on the gantt view for self attendance right if not supposed to edit . Hide Overtime Details page for self attendance right if not supposed to edit . Add corresponding tests task-6067711
A recent change incorrectly set a single deadline for all stock moves on a Sale Order, regardless of individual line lead times. This resulted in inaccurate delivery scheduling. This fix removes the automatic assignment of a commitment date, allowing deadlines to be correctly calculated based on each line's lead time.
Original PR description
Version: -------- - saas-19.1+ Step to reproduce: ---------------------- * Install *sale_management* and *stock* modules. * Create a Sale Order with at least two order lines. * Set different…
Version:
--------
- saas-19.1+
Step to reproduce:
----------------------
* Install *sale_management* and *stock* modules.
* Create a Sale Order with at least two order lines.
* Set different *Customer Lead Time* (it is optional hide by default)
on each line:
* Line A: 5 days
* Line B: 10 days
* Confirm the Sale Order.
* Open the generated Delivery Order.
* Enable the *Deadline* field on stock moves (it is optional hide by default).
* Check the *Deadline* value for each move
issue:
-----
* Both stock moves have the same *Deadline*, corresponding to the minimum
lead time (earliest date), instead of their respective values.
Root cause:
-----------
1. User confirms a Sale Order with two lines:
- Line A: customer_lead = 5 → _expected_date() = order_date + 5
- Line B: customer_lead = 10 → _expected_date() = order_date + 10
2. sale.order.action_confirm()
└─ Before calling `_action_confirm()`, the method set:
`order.commitment_date = order.expected_date`
where `expected_date = min(all line._expected_date()) = order_date + 5`
3. sale.order._action_confirm()
└─ calls order_line._action_launch_stock_rule()
https://github.com/odoo/odoo/blob/00edcf55380431c454857b2749f2fe4930b1e758/addons/sale_stock/models/sale_order.py#L209
4. sale.order.line._action_launch_stock_rule()
└─ per line: calls line._prepare_procurement_values()
5. sale.order.line._prepare_procurement_values()
└─ date_deadline = self.order_id.commitment_date or self._expected_date()
Because commitment_date was force-set in step 2, BOTH lines resolve to
order_date + 5 instead of their individual values.
https://github.com/odoo/odoo/blob/00edcf55380431c454857b2749f2fe4930b1e758/addons/sale_stock/models/sale_order_line.py#L281
NOTE:
------
This issue originates from changes introduced in task: https://www.odoo.com/odoo/project/966/tasks/4687135
That task aimed to add the Promise Date to Purchase Order Lines and, during
confirmation, assign it as the expected arrival date.
* This behavior works correctly in Purchase Orders because the Promise Date is
applied at the purchase order line level and aligned with each
line’s expected arrival date. It does not participate in the computation of
date_deadline.
- In the purchase flow:
The incoming stock move date_deadline is directly derived from each line’s
expected arrival date.
https://github.com/odoo/odoo/blob/00edcf55380431c454857b2749f2fe4930b1e758/addons/purchase_stock/models/purchase_order_line.py#L308
There is no dependency on a promise date.
As a result, deadlines remain per-line and accurate.
However, in the Sale Order flow, the same approach introduces an issue.
Here:
The Promise Date (commitment_date) exists at the order level, not at line level.
During confirmation, it is set using the minimum of all line expected dates.
The delivery stock move date_deadline depends on this commitment_date.
As a consequence:
Setting a single order-level promise date overrides all per-line expected dates.
All stock moves receive the same (minimum) deadline.
Additionally, this is not aligned with the business logic:
Example:
Line A → lead time = 5 days
Line B → lead time = 10 days
Current behavior sets deadline = min(5, 10) = 5 days for all moves,
which incorrectly forces later deliveries to be scheduled earlier than intended.
Solution:
---------
* Remove the automatic assignment of commitment_date = expected_date in action_confirm().
commitment_date is a user-defined promised delivery date and should not be
implicitly set during confirmation. By leaving it unset, procurement values
correctly fall back to line._expected_date(), restoring per-line deadline
computation.
---
opw-6106045This update fixes an issue where the Point of Sale (PoS) system incorrectly displayed order prices as $0. The change ensures the correct order total is calculated and shown on the feedback screen, even when requests are delayed. It also prevents the PoS from finalizing validation if an error occurs, improving overall order processing reliability.
Original PR description
We now call manually `setOrderPrices` on order validation to ensure `amount_total` is set on the order before displaying the feedback screen which depends on it. The issue is that requests to the FdM delay the call to this method, making the PoS display `0` as the amount is `undefined` in the meantime. We also ensure the PoS doesn't finalize the validation if an error occurs. see odoo/odoo#244298 Forward-Port-Of: odoo/enterprise#104468
This update resolves an issue where undoing a template conversion would prevent creating new templates from the same project. The fix ensures the original project's documents are properly restored and cleaned up after the undo, allowing users to create templates again without errors. This improves the usability of the project template feature.
Original PR description
Steps to Reproduce: --- 1. Create a new project. 2. Convert it into a template. 3. Click on "Undo". 4. Try to convert the project into a template again. Issue: --- After undoing the template…
Steps to Reproduce: --- 1. Create a new project. 2. Convert it into a template. 3. Click on "Undo". 4. Try to convert the project into a template again. Issue: --- After undoing the template conversion, the project's original documents folder remained archived while the template's documents folder stayed active. This inconsistent state prevented subsequent template creation from the same project. Current behaviour: --- A UserError is raised: "You cannot duplicate document(s) in the Trash." Expected behaviour: --- Undoing the template conversion should properly restore the original project's documents folder to active state and clean up the template's documents folder, allowing template conversion again without document folder conflicts. Fix: --- - Archive original project's documents folder during template creation to prevent mixed active/inactive states during copy operations - Implement callback system to properly unarchive original project's documents folder during undo task-4916027 Forward-Port-Of: odoo/odoo#264429 Forward-Port-Of: odoo/odoo#223152
This update resolves a bug that prevented users from recreating templates after undoing a previous conversion. The fix ensures that the original project's documents folder is properly restored during the undo process, eliminating a frustrating error message. This improves the stability and usability of the template creation feature.
Original PR description
Steps to Reproduce: --- 1. Create a project with documents. 2. Convert it into a template. 3. Click on "Undo". 4. Try to convert the project into a template again. Issue: --- After undoing the template conversion, the project's original documents folder remained archived while the template's documents folder stayed active. This inconsistent state prevented subsequent template creation from the same project. Current behaviour: --- A UserError is raised: "You cannot duplicate document(s) in the Trash." Expected behaviour: --- Undoing template conversion should properly restore original project's documents folder and clean up template's documents folder. Fix: --- - Archive original project's documents folder during template creation - Implement documents folder unarchival during undo operations task-4916027 Forward-Port-Of: odoo/enterprise#117303 Forward-Port-Of: odoo/enterprise#91595
This update prevents users from archiving Point of Sale (POS) configurations while an active sales session is running. This change ensures data integrity and avoids potential disruptions to sales transactions. The update includes a new test case to verify this protection.
Original PR description
Add 'active' to _get_forbidden_change_fields to block archiving a Point of Sale configuration while a session is still open. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#246760
5 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 update fixes an issue where freight charges were incorrectly applied to all pickings, particularly with backorders. The change ensures freight costs are accurately reflected only in the initial, confirmed picking, aligning with how delivery costs should be billed to customers.
Original PR description
Commit 28b840b introduced logic to include `freight_costs` in the customs document generated bySendcloud. It introduced 2 new issues as a result: 1. When creating backorders, the `freight_costs` are…
Commit 28b840b introduced logic to include `freight_costs` in the customs document generated bySendcloud. It introduced 2 new issues as a result: 1. When creating backorders, the `freight_costs` are not divided but instead propagated to all of the pickings. 2. When there is no SO, we were taking the total value of all delivered goods, which doesn't make much sense considering the `freight_costs` field should be the cost of the delivery itself. Solution ----- For the first problem, there are a couple things to keep in mind: - the total `freight_costs` declared to the customs entity should be the amount invoiced to the customer - products can be added and removed from the picking after the SO has been confirmed - actual delivery cost can change between invoice date and actual delivery date - picking can be split into multiple packages at the user's discretion Considering all of the above, we will simply forward the invoiced amount with the first confirmed picking and none of the backorders. ----- Ticket: opw-6013387 Forward-Port-Of: odoo/enterprise#116639 Forward-Port-Of: odoo/enterprise#111304
This update fixes an issue where project update descriptions incorrectly showed inflated budget totals after budget revisions. The fix ensures that only the active, confirmed budget revision is used, providing accurate budget information for project updates. This improves the reliability of project cost tracking.
Original PR description
**Problem:** When a project analytic budget is revised, the project update description shows an inflated total budget — the sum of both the original and the revised amounts — instead of reflecting…
**Problem:** When a project analytic budget is revised, the project update description shows an inflated total budget — the sum of both the original and the revised amounts — instead of reflecting only the active (confirmed) revision. **Steps to reproduce:** 1. Create a project with an analytic account 2. Create an analytic budget of $10,000 and confirm it 3. Create a revision of that budget for $15,000 and confirm it 4. Create a new project update 5. The update shows "$25,000" as the total budget instead of "$15,000" **Current behavior:** The project update displays the sum of all budget revisions ($25,000), regardless of their state. **Expected behavior:** Only the active confirmed budget ($15,000) should be used. **Cause of the issue:** `_compute_budget` queries all `budget.line` records matching the project's analytic account without filtering by the parent `budget.analytic` state. When a budget is revised, the original transitions to state `revised` while the new one becomes `confirmed`. Because `_compute_budget` has no state filter, it sums both, producing an inflated `total_budget_amount`. This field is then used in the project update template to compute the displayed budget total and percentage. By contrast, `_get_budget_items` — used for the detail rows — already applies `state in ['confirmed', 'done']`, so the two methods were inconsistent. **Fix:** Applying the same state filter to `_compute_budget` as already present in `_get_budget_items` ensures both methods draw from the same set of active budgets, keeping the project update totals consistent with the budget detail rows. opw-6128855 Forward-Port-Of: odoo/enterprise#116670 Forward-Port-Of: odoo/enterprise#115285
This update resolves an issue causing errors with the Envia delivery method in Chile and Colombia. The fix ensures Odoo correctly formats address data for Envia, aligning with their API requirements for state codes. This prevents errors related to incorrect zip code formatting and ensures successful delivery processing.
Original PR description
## Issue 1: Backport of 7654c558c4d517807884b0a82323dd160feeda2a For Colombia, Envia expects the municipality/DANE-style code in the address payload, not the raw postal code. When `l10n_co_edi` was…
## Issue 1:
Backport of 7654c558c4d517807884b0a82323dd160feeda2a
For Colombia, Envia expects the municipality/DANE-style code in the address payload, not the raw postal code.
When `l10n_co_edi` was not installed, the Envia integration fell back to the partner zip code and padded it locally before sending it as both `postalCode` and `city`. This produced incorrect values such as turning the Ibagué zip code `730001` into `73000100`, while Envia geocodes resolves that zip code to `73001000`.
Use Envia geocodes to resolve the Colombia zip fallback and retrieve the `stat_8digit` code expected by Envia instead of deriving it locally.
## Issue 2:
### 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 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-6083181
opw-6210007
Forward-Port-Of: odoo/enterprise#1174148 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 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 custom text attributes on products weren't correctly displayed when settling website orders through the POS system. Previously, the POS showed a placeholder instead of the customer's entered text. The fix ensures that custom attribute data is accurately transferred and displayed in the POS order lines.
Original PR description
When a sale order containing a product with a custom (free text) attribute was settled in POS, the order line displayed the placeholder attribute value name (e.g. "Custom") instead of the actual text…
When a sale order containing a product with a custom (free text) attribute was settled in POS, the order line displayed the placeholder attribute value name (e.g. "Custom") instead of the actual text entered by the customer. Steps to reproduce: ------------------- * Create a product with a free text attribute (create_variant='no_variant', is_custom=True) * Go to the website's shop (works best in a new private tab) * Fill the free text attribute and add the product to the cart * Click on checkout * In POS, open Quotation/Order and settle the order > Observation: the order line shows "Custom" instead of the text Why the fix: ------------ `SaleOrderLine._load_pos_data_fields` was not exposing `product_no_variant_attribute_value_ids` nor `product_custom_attribute_value_ids`, so the JS `settleSO` function received no attribute data on the `line` object. As a result, the new POS order line was created with empty `attribute_value_ids` and `custom_attribute_value_ids`, leaving `constructFullProductName` unable to find the custom text. The fix adds both fields to `_load_pos_data_fields` and updates `settleSO` to use them when building the new POS order line. The dynamic fetch path (`_getSaleOrder`) is also updated to explicitly read the `product.attribute.custom.value` records so the data is available for orders loaded at runtime. opw-5958678 Forward-Port-Of: odoo/odoo#263913 Forward-Port-Of: odoo/odoo#251993
This update fixes an issue where project update descriptions incorrectly showed inflated budget totals after budget revisions. The fix ensures that only the active, confirmed budget revision is used, providing accurate budget information for project updates. This improves the reliability of project cost tracking.
Original PR description
**Problem:** When a project analytic budget is revised, the project update description shows an inflated total budget — the sum of both the original and the revised amounts — instead of reflecting…
**Problem:** When a project analytic budget is revised, the project update description shows an inflated total budget — the sum of both the original and the revised amounts — instead of reflecting only the active (confirmed) revision. **Steps to reproduce:** 1. Create a project with an analytic account 2. Create an analytic budget of $10,000 and confirm it 3. Create a revision of that budget for $15,000 and confirm it 4. Create a new project update 5. The update shows "$25,000" as the total budget instead of "$15,000" **Current behavior:** The project update displays the sum of all budget revisions ($25,000), regardless of their state. **Expected behavior:** Only the active confirmed budget ($15,000) should be used. **Cause of the issue:** `_compute_budget` queries all `budget.line` records matching the project's analytic account without filtering by the parent `budget.analytic` state. When a budget is revised, the original transitions to state `revised` while the new one becomes `confirmed`. Because `_compute_budget` has no state filter, it sums both, producing an inflated `total_budget_amount`. This field is then used in the project update template to compute the displayed budget total and percentage. By contrast, `_get_budget_items` — used for the detail rows — already applies `state in ['confirmed', 'done']`, so the two methods were inconsistent. **Fix:** Applying the same state filter to `_compute_budget` as already present in `_get_budget_items` ensures both methods draw from the same set of active budgets, keeping the project update totals consistent with the budget detail rows. opw-6128855 Forward-Port-Of: odoo/enterprise#116670 Forward-Port-Of: odoo/enterprise#115285
This update fixes an issue where service products didn't consistently apply user-defined unit of measure defaults. The change ensures that product units are correctly set based on the product type, improving accuracy in sales time tracking and invoicing. This resolves a previous bug impacting service product calculations.
Original PR description
A user-defined default on `product.template` Unit is not applied when the product is of type Service 1. Install Sales and Sales Timesheet 2. Go to Settings > Sales > Product Catalog and enable Units of Measure & Packagings 3. Enable debug mode 4. Go to Sales > Products, open a new product form and set unit to Days 5. In the debug menu (bug icon in the top right), select Set Default Values for Unit = Days and save 6. Reload the page 7. Set the type to Service 8. Unit changes from Days to Hours Same issue happens for `product.product` Issue: User default values are overwritten when certain conditions are met by https://github.com/odoo/odoo/blob/6955370fd2d62c83f0ea24247abf7a9e4b4ebed3/addons/sale_timesheet/models/product_template.py#L55-L57 Solution: Use the user defined default on `uom_id` except for service products that are invoiced with timesheets as they need a time unit of measure opw-6139603
This update corrects a bug where the delivered quantity for dropship products was incorrectly set to 1 before order confirmation. The fix ensures accurate delivery quantity calculations based on stock availability, resolving a discrepancy in how the system handles manual service types.
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 resolves an issue causing errors with the Envia delivery method in Chile and Colombia. The fix ensures Odoo correctly formats address data for Envia, aligning with their API requirements for state codes. This prevents errors related to overly long destination strings and ensures accurate delivery information is sent to Envia.
Original PR description
## Issue 1: Backport of 7654c558c4d517807884b0a82323dd160feeda2a For Colombia, Envia expects the municipality/DANE-style code in the address payload, not the raw postal code. When `l10n_co_edi` was…
## Issue 1:
Backport of 7654c558c4d517807884b0a82323dd160feeda2a
For Colombia, Envia expects the municipality/DANE-style code in the address payload, not the raw postal code.
When `l10n_co_edi` was not installed, the Envia integration fell back to the partner zip code and padded it locally before sending it as both `postalCode` and `city`. This produced incorrect values such as turning the Ibagué zip code `730001` into `73000100`, while Envia geocodes resolves that zip code to `73001000`.
Use Envia geocodes to resolve the Colombia zip fallback and retrieve the `stat_8digit` code expected by Envia instead of deriving it locally.
## Issue 2:
### 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 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-6083181
opw-6210007
Forward-Port-Of: odoo/enterprise#1174143 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 resolves an issue causing errors with the Envia delivery method in Chile and Colombia. The fix ensures Odoo correctly formats address data for Envia, aligning with their API requirements for state codes. This prevents errors related to incorrect zip code formatting and ensures successful delivery processing.
Original PR description
## Issue 1: Backport of 7654c558c4d517807884b0a82323dd160feeda2a For Colombia, Envia expects the municipality/DANE-style code in the address payload, not the raw postal code. When `l10n_co_edi` was…
## Issue 1:
Backport of 7654c558c4d517807884b0a82323dd160feeda2a
For Colombia, Envia expects the municipality/DANE-style code in the address payload, not the raw postal code.
When `l10n_co_edi` was not installed, the Envia integration fell back to the partner zip code and padded it locally before sending it as both `postalCode` and `city`. This produced incorrect values such as turning the Ibagué zip code `730001` into `73000100`, while Envia geocodes resolves that zip code to `73001000`.
Use Envia geocodes to resolve the Colombia zip fallback and retrieve the `stat_8digit` code expected by Envia instead of deriving it locally.
## Issue 2:
### 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 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-6083181
opw-6210007
Forward-Port-Of: odoo/enterprise#11741420 changes
New functionality added to Odoo
This update enables Peruvian withholding agents to automatically generate and submit electronic retention documents (Comprobantes de Retención) to SUNAT. It streamlines the process of sending UBL 2.0 XML files via SUNAT, Estela, or IAP, ensuring compliance with local regulations. The changes improve reusability and flexibility for handling retention payments.
Original PR description
Appointed withholding agents in Peru need to submit a Comprobante de Retención to SUNAT when paying vendor bills with IGV retention. This module handles generating the UBL 2.0 XML, signing it, and sending it to SUNAT's Otroscpe endpoint. Supports SUNAT, Estela, and IAP providers. Also refactors `l10n_pe_edi` to extract `_l10n_pe_edi_send_bill_sunat_estela` as a reusable `@api.model` method and fixes the `@api.model` annotations on shared helpers (`_l10n_pe_edi_sign`, `_l10n_pe_edi_decode_soap_response`, `_l10n_pe_edi_extract_cdr_status`) so they can be called from other models. task-4980644 odoo/odoo#259771
Enhancements to existing features
This update automatically calculates and corrects missing simple and double holiday pay at year-end and contract termination, ensuring accurate payroll calculations. Previously, manual adjustments were required; now, the system automatically addresses discrepancies based on payment history. Users retain the ability to manually adjust the results if needed.
Original PR description
This commit removes the holiday pay recovery wizard and replaces it with salary rules applied automatically in December payslips and in termination fees payslips for joint committee 200. The…
This commit removes the holiday pay recovery wizard and replaces it with salary rules
applied automatically in December payslips and in termination fees payslips for
joint committee 200.
The regularization now computes the missing simple and double holiday pay when the
amount paid during the year is lower than the amount due, both at year-end and at
contract end. If the amount already paid is higher, no correction is applied.
The implementation:
- computes remuneration N-1 including fictive salary for assimilated absences
- applies a different N-1 remuneration depending on the context:
- departure attest: includes 13th month salary
- December settlement: excludes 13th month salary
- computes simple holiday pay due as 7.67% of remuneration N-1
- computes simple holiday pay recovery as max(due - received, 0)
- computes double holiday pay due based on the higher of:
- 7.67% of remuneration N-1
- the wage of the month when the employee reached half of their legal holidays
- computes double holiday pay recovery as max(due - received, 0)
- splits double holiday pay into base and complementary components
- uses the Partena-based logic to determine the main holiday month
Users can still manually adjust the result directly on payslip lines when needed.
Related PRs:
upgrade: [github.com/odoo/upgrade/pull/9628](http://github.com/odoo/upgrade/pull/9628)
task-5429973This update ensures that employees' departure dates are now accurately reflected on their final payslip, including the period covered by that payslip. This change also adds the departure date to termination holiday attestations, providing clearer and more complete payroll and HR documentation. This improves data accuracy and simplifies reporting.
Original PR description
After this commit, the departure date of the employee is shown on their last payslip (departure date included in the pay period of the payslip) as well as on their termination holiday attest. task-6227661
This update automatically scrolls the knowledge sidebar to highlight the currently active article, making it easier for users to find related content. This enhancement streamlines navigation within the knowledge base, reducing user friction. A key change prevents scrolling when accessing favorites, ensuring a smooth experience.
Original PR description
This PR introduces auto-scroll in the sidebar for knowledge articles, so that the active article will always be visible in the left-side menu. This improves navigation, ensuring that users can easily access related articles without manually scrolling the sidebar. Note: Clicking on an article in favorites section, it shouldn't scroll to try to find it at the bottom of the workspace. Task-5448667
This update enhances the frontdesk module to comply with GDPR regulations by adding required data disclosure fields. Additionally, a critical bug causing the frontdesk to fail to open in debug mode has been resolved, ensuring proper functionality.
Original PR description
Adds two fields displayed on the frontdesk for legal compliance reasons, to detail what is the data used for. This PR also fixes a bug, where the frontdesk fails opening due to missing props when we try in debug mode. Task-6123620
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 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 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 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 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 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 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 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 allows users to reorder rental orders through the portal, addressing a previous limitation where the 'Order Again' button was missing. This enhancement improves the user experience for rental order management and ensures users can easily modify their rental agreements.
Original PR description
Rental orders could not be reordered from the portal because the "Order Again" button was not displayed. This commit enables the reorder flow for rental orders as well. task-6140187
This update resolves issues with the Swedish ISO 20022 XML format used for bank payments. Specifically, it ensures mandatory fields are always included and updates the structure to align with current banking standards, particularly regarding bank identification codes (BIC) for greater accuracy and compatibility with Nordea bank.
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 return entries incorrectly included taxes from multiple regions (like British Columbia). Now, tax return entries accurately reflect taxes specific to the return type and region (e.g., Manitoba PST), ensuring accurate tax reporting for businesses. This improves the reliability of tax return validation.
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
This update resolves an issue where timesheet data wasn't consistently saved and displayed across multiple Odoo tabs. The fix ensures that any changes made in the timesheet form are reliably synchronized, regardless of which tab you're working in. This improves data accuracy and reduces the risk of lost updates.
Original PR description
Steps to reproduce: - Open Odoo in two tabs - Open the systray in tab 1 - Change some fields - Close the systray to save - Open the systray in tab 2 All fields are not in line in both tabs. This commit, hence, ensures that all data changed in the inline form is saved and consistent across different windows. When switching window, the systray is closed and the data is saved to the local storage. When opening the systray in another tab, the local storage will be accessed to read the latests changes (i.e., the modifications done in the other tab). task-6180394 Forward-Port-Of: odoo/enterprise#117486 Forward-Port-Of: odoo/enterprise#116007
7 changes
New functionality added to Odoo
This update introduces support for e-invoicing requirements in Pakistan, allowing businesses to comply with local regulations. The new module integrates with the Odoo IAP system to automatically generate and send invoices to the Pakistan Government via API. This ensures accurate and timely reporting for Pakistani customers.
Original PR description
Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
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 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 barcode scanning incorrectly reflected delivered quantities on sales orders, leading to backorders. The fix ensures that quantities are accurately updated when scanning lots, resolving a discrepancy between the order and the delivered stock. This improves order fulfillment accuracy and reduces manual intervention.
Original PR description
Currently when user adds adds quantity in barcode using lots it leads to incorrect sale order quantities. ## Steps to replicate: - Install Sales and Barcode (no demo data). - Enable Lots & Serial…
Currently when user adds adds quantity in barcode using lots it leads to incorrect sale order quantities.
## Steps to replicate:
- Install Sales and Barcode (no demo data).
- Enable Lots & Serial Numbers in settings.
- Create Test Product with Tracking by Lots.
- Go to Inventory > Products>Lots & Serial Numbers and create 3 lots for the product.
- Update each lot’s on-hand quantity to 10 from the product page.
- Create and confirm a Sales Order for the product (lines: qty 3 and 2 units).
- Open the delivery in the Barcode app:
- Scan lot 2 > increase qty to 3 using +1 button
- Scan lot 3 > increase qty to 2 using +1 button
- Validate and go to the sale order.
## Observed Behavior:
The sale order delivered quantities are flipped and a backorder is created even though the quantity for the product is satisfied.
## Root cause:
The issue occurs because when a sales order is confirmed, the system defaults to
using lot 1 on the delivery receipt. When a user scans lot 2, the `_processBarcode` function is triggered, which calls `_findLine` at [1] to select the appropriate line on the receipt.
As the loop in `_findLine` iterates through `pageLines` with values like:
```
[{display_name: "Test product", quantity: 3, lot_id: { name: 'lot1' }},
{display_name: "Test product", quantity: 2, lot_id: { name: 'lot1' }}]
```
During the first iteration, `foundLine` is set at [2] for the line with quantity 3 . Since the subsequent if condition is not satisfied, the loop hits the continue block at [3].
On the next iteration, the line with quantity 2 causes `foundLine` to be overwritten at [2], and the continue block is executed again at [3].
This results in the line with quantity 2 being selected as the line to update at the end of the function.
When the user manually increases the quantity to 3, the line that originally required quantity 2 is updated and fulfilled.
Later, when lot 3 is scanned, the line that required quantity 3 is selected for update, and manually increasing the quantity to 2 before validating the order leads to a backorder and causes the delivered quantities to be flipped.
[1]:
https://github.com/odoo/enterprise/blob/81eaeb4b18d849c644160234def6c69013591abe/stock_barcode/static/src/models/barcode_model.js#L1335-L1337 [2]:
https://github.com/odoo/enterprise/blob/81eaeb4b18d849c644160234def6c69013591abe/stock_barcode/static/src/models/barcode_model.js#L1690-L1699 [3]:
https://github.com/odoo/enterprise/blob/81eaeb4b18d849c644160234def6c69013591abe/stock_barcode/static/src/models/barcode_model.js#L1727-L1729
## Solution:
Avoid grouping lines from different moves unless using batch transfers. This ensures that backorders are not created when the barcode lines are fulfilled.
opw-5423943This update corrects a bug where tax calculations were incorrectly splitting taxes on discount lines, particularly when changing the fiscal position to Quebec. The fix ensures accurate tax reporting by preventing the duplication of tax rates on discount orders, maintaining consistency across different fiscal settings.
Original PR description
Steps to produce: --- - Install `website_sale`, `l10n_ca` & `accountant` modules with demo data. - Switch to a `Canadian (CA) company.` - Go to Settings and enable` Discounts, Loyalty & Gift Cards`.…
Steps to produce: --- - Install `website_sale`, `l10n_ca` & `accountant` modules with demo data. - Switch to a `Canadian (CA) company.` - Go to Settings and enable` Discounts, Loyalty & Gift Cards`. - Go to` Website > eCommerce > Loyalty > Discount & Loyalty.` - Create a new program > Set Program Type to Discount Code > Under Conditional Rules, set Minimum Purchase to 0 > Under Rewards, choose Discount on Order. - Go to `website > configuration > websites` > Create a new website for the CA company > Set it as default (first in sequence). - Create new product > Set Sales Taxes to` 14.975% GST + QST` > Publish the product. - Open the website in an incognito window > Add the product to the cart > Apply the discount code. - In the main tab > Go to Website > eCommerce > Orders > Open the corresponding order > In the Other Info tab, change the fiscal position to Quebec (QC) > Click to update taxes. Issue: --- - The tax on the discount line is split into: 14.975% GST + QST & 9.975% QST. Root cause: --- - When a discount is applied in the cart, the discount line initially carries split taxes: 5% GST and 9.975% QST. - After changing the fiscal position to Quebec (QC), the system replaces 5% GST with 14.975% GST + QST because 5% GST is present in replace of 14.975% GST. so at [1] it replaces 5% GST with 14.975% GST and do nothing for 9.975% QST. - In 17.0, the discount line directly uses 14.975% GST + QST (no tax splitting), so this issue does not occur. - In 18.0, at [2], taxes are explicitly split and added to the base line, and the same split taxes are reused during grouping. This leads to multiple taxes being displayed on the sale order line. Fix: --- - Avoid splitting taxes on the discount line in the sale order. - Keep the original tax structure intact to prevent duplication after fiscal position changes. [1]https://github.com/odoo/odoo/blob/c6d9fa5873eb759846e9be5b66eedb8b00c5ac11/addons/account/models/partner.py#L151-L156 [2]https://github.com/odoo/odoo/blob/c6d9fa5873eb759846e9be5b66eedb8b00c5ac11/addons/sale_loyalty/models/sale_order.py#L296 opw-6145674 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves an issue where signed PDF documents lost their bookmarks and links after signing. The fix ensures that signed documents retain their original structure and navigation, maintaining document integrity and allowing users to easily navigate signed content. This improves the usability and reliability of the document signing process.
Original PR description
Version - 18.0 Steps to reproduce: 1. Upload a PDF document containing bookmarks and internal/external links. 2. Sign the document and download the signed PDF. 3. Open the downloaded file and check the bookmarks and links. Issue: When a signed document was downloaded, the original PDF bookmarks And the links were not working. This broke structured navigation and affected document integrity. Fix: The PDF signing process has been updated to preserve the original bookmarks and ensure internal and external links remain functional after signing. Impact: - Signed documents remain navigable and consistent with the original PDF. - Preserves document structure and integrity. Task- 4915124
This fix ensures that attendee invitation emails for paid appointments display the correct company branding (the one the customer booked with) instead of the user's default company. Previously, the email layout incorrectly used the default company, leading to a mismatched brand experience. This improves customer communication and brand consistency.
Original PR description
The calendar event for a paid appointment is created from account.move._post() once the invoice is confirmed by the payment transaction. At that point there is no website request, so env.company…
The calendar event for a paid appointment is created from account.move._post() once the invoice is confirmed by the payment transaction. At that point there is no website request, so env.company falls back to the user's default allowed company instead of the company the booking was made on. The attendee invitation mail rendered from the new event then carries that default company's branding in its header and footer rather than the company the customer booked on. Read the booking's company from the existing record it already carries (its invoice in the direct payment flow, its sale order line in the eCommerce flow added by website_appointment_sale) and re-apply it via with_company when creating the calendar event so the mail layout picks the right company. The lookup is exposed as a hook on calendar.booking so each module can extend it for its own payment record. Reachable since the feature was added in https://github.com/odoo/enterprise/commit/ce6bc7150457c8f4da331abb359ec99badca5ab3. Steps to reproduce: 1. In a multi-company environment with two companies A and B, give the staff user access to both with company A as their default. 2. Create a website tied to company B. 3. Activate the Demo payment provider in test mode on both companies. 4. From company B, create an appointment type with an up-front payment, staffed by that user and tied to company B's website. 5. From company B's public website, open the appointment page, pick a slot, fill in the customer info and proceed to payment. 6. Pay via Demo. 7. Open the attendee invitation email in the mail catcher. => The email header and footer show company A instead of company B. Ticket [link](https://www.odoo.com/odoo/project.task/5106795) opw-5106795
4 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
This update corrects an inconsistency in how Odoo calculates available quantities for rental kits compared to standard products. Previously, the calculation was behaving differently depending on whether a product was rented. This fix standardizes the calculation, ensuring accurate availability figures for all rental kits, resolving a potential discrepancy in inventory reporting.
Original PR description
The behavior for computing _compute_qty_at_date fields(virtual_available_at_date, scheduled_date, forecast_expected_date, free_qty_today, qty_available_today) with kit products differs unexpectably with rentals vs. non-rentals. This change unifies their behavior by avoiding kit products (through display_qty_widget) field in sale_stock_renting. Steps to Reproduce: 1. Create 2 products, both with kit BOMs, one rental, one non-rental 2. Give components non-zero 3. Create a rental order with both products 4. Odoo Inspect / Studio add above fields to view 5. See computed difference opw-6141580
This update ensures that sales services from European companies to Northern Ireland customers are correctly excluded from the EC Sales List report. This change aligns with regulations and avoids inaccurate reporting. The update was specifically tested and implemented for the Belgium localization due to its unique handling of tax data.
Original PR description
…in EC Sales List The services sales done from a european company to a Northern Ireland company should not be included in the EC Sales List Report. It should however be the case for goods and triangular transactions. test is added in Belgium localization because only localizations have handlers using tax tags instead of taxes, and services/goods/triangular sales distinction can be made with these. task-6007931