Daily updates from Odoo
Tuesday, April 28, 2026
317 changes
15 changes
Enhancements to existing features
This update ensures that users always see incomplete tax returns first when viewing tax returns in the kanban view, without any applied filters. This change prioritizes accurate reporting and simplifies the process of identifying outstanding returns for accounting teams.
Original PR description
When no filters are applied on the tax returns kanban view, incomplete returns should always be displayed before complete ones. This commit ensure that by ordering tax returns by `is_completed` field. task-6059414 Forward-Port-Of: odoo/enterprise#114043
Resolved issues and error corrections
This update fixes an issue where the 'Hide lines at 0' feature was removing the report-level total line from reports like the Trial Balance when printed. This commit ensures that total lines, including those without a parent, are always displayed, improving report accuracy and clarity for users. This change was implemented to maintain consistent and complete reporting.
Original PR description
When "Hide lines at 0" is enabled, printing e.g. the Trial Balance will drop the report-level "Total" line when printing. This commit fixes that. The issue was introduced in this commit[^1], which didn't consider total lines without a parent (i.e. root total lines). [^1]: https://github.com/odoo/enterprise/commit/7fec18b99eb2aa5ebc357dcad5f95f234db5b7d8 Forward-Port-Of: odoo/enterprise#115011 Forward-Port-Of: odoo/enterprise#114084
This update fixes a bug that prevented links within 'Button' snippets added to the website builder from being translated. Previously, these links were excluded from the translation process. Now, dropped button links are correctly tagged for translation, ensuring all website content can be localized.
Original PR description
Before this commit, links on `Button` inner snippets dropped from the sidebar (not through powerbox) were never translatable. `o_translate_inline` was only added in link insert flows or when already present in snippet template, not when dropping inner button snippets. As a result, dropped button anchors were missing `o_translate_inline` and were filtered out from translatable inline links. Steps to reproduce: - Enter edit mode. - Drag and drop a `Button` inner snippet. - Save. - Switch to translation mode. - Try to edit the button link: it cannot be edited. This commit adds handling on snippet drop to tag dropped anchors with `o_translate_inline`. task-5943645 Forward-Port-Of: odoo/odoo#261433 Forward-Port-Of: odoo/odoo#249019
This update resolves an issue preventing AI chat functionality on Safari devices. The fix addresses a compatibility problem with older Safari versions that don't fully support a key streaming technology. By switching to a manual reader loop, the AI chat now works reliably on Safari, ensuring a smooth user experience.
Original PR description
Steps: - Install ai - Open ai chat - Try to send a message - Traceback The AI chat was failing on iOS with a traceback when trying to process the stream response. Even though MDN suggests…
Steps: - Install ai - Open ai chat - Try to send a message - Traceback The AI chat was failing on iOS with a traceback when trying to process the stream response. Even though MDN suggests compatibility, Safari (WebKit) versions prior to 26.4 do not implement the AsyncIterator protocol on ReadableStream. This makes `for await (const chunk of response.body)` throw a TypeError as `[Symbol.asyncIterator]` is undefined. https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream This commit replaces the async iteration with a manual reader loop (`getReader().read()`). This is the low-level primitive supported by all versions of Safari and ensures the stream is properly consumed and unlocked even if the connection is interrupted. Steps to reproduce: 1. Open Discuss/AI Chat on an iPad or iPhone (eg. 26.4). 2. Send a message. 3. The response triggers a JS error. ```js Uncaught Promise > undefined is not a function (near '...chunk of asyncStream...') ``` opw-6054307 Forward-Port-Of: odoo/enterprise#113926
This update resolves an issue preventing portal users from creating tickets via email when automatic assignment is enabled. The fix ensures the system correctly accesses employee calendars across companies, eliminating access errors and restoring ticket creation functionality. This improves the portal's usability for users and streamlines the ticket submission process.
Original PR description
Problem: Portal email with auto-assignment crashes ticket creation due to calendar access. When a helpdesk ticket is created via email from a portal user and automatic assignment is enabled, the…
Problem: Portal email with auto-assignment crashes ticket creation due to calendar access. When a helpdesk ticket is created via email from a portal user and automatic assignment is enabled, the system computes working intervals for users to determine assignment. This computation goes into resource logic, where resource.calendar fields (flexible_hours) are read. If the assigned user is linked to multiple employees across companies, multiple resource.resource records are evaluated. The helpdesk email flow starts in sudo, but the employee calendar lookup explicitly drops sudo before returning the calendar. Then, the calendar is accessed in the portal context, which does not have permission to read the other company's resource.calendar, leading to an AccessError and preventing ticket creation. Although the failure is triggered from Enterprise helpdesk, the actual crash occurs in Odoo (resource.calendar), meaning the fix must be applied there. Fix: Preserve sudo when fetching employee calendars to ensure that scheduling logic does not depend on the access rights of the email sender. A test is added in helpdesk_holidays, as the issue requires both helpdesk (auto-assignment) and hr (employees/resources) to reproduce. The test simulates a portal email flow with a multi-company user linked to multiple employees and ensures ticket creation succeeds. Steps to Reproduce: 1. Install Helpdesk, Employees, and enable multi-company 2. Create two companies (e.g., Company A and Company B) 3. Create one internal user (User X) with access to both companies 4. Create two employees linked to the same user: - Employee 1 in Company A - Employee 2 in Company B Make sure they are set with a start date, but no end date. Needs to be active employee. 5. Create a Helpdesk team in Company A 6. Add Agent X as a team member 7. Enable automatic assignment 8. Configure an email alias for the helpdesk team 9. Create a portal user 10. Send an email from the portal user to the alias Related Ticket: opw-6035099 Forward-Port-Of: odoo/odoo#261156 Forward-Port-Of: odoo/odoo#257720
This update resolves an issue where portal email auto-assignment would fail due to permission problems accessing employee calendars across different companies. The fix ensures the system uses the correct security context when accessing calendar data, allowing ticket creation to proceed smoothly. This improves the reliability of the helpdesk system for portal users.
Original PR description
Problem: Portal email with auto-assignment crashes ticket creation due to calendar access. When a helpdesk ticket is created via email from a portal user and automatic assignment is enabled, the…
Problem: Portal email with auto-assignment crashes ticket creation due to calendar access. When a helpdesk ticket is created via email from a portal user and automatic assignment is enabled, the system computes working intervals for users to determine assignment. This computation goes into resource logic, where resource.calendar fields (flexible_hours) are read. If the assigned user is linked to multiple employees across companies, multiple resource.resource records are evaluated. The helpdesk email flow starts in sudo, but the employee calendar lookup explicitly drops sudo before returning the calendar. Then, the calendar is accessed in the portal context, which does not have permission to read the other company's resource.calendar, leading to an AccessError and preventing ticket creation. Although the failure is triggered from Enterprise helpdesk, the actual crash occurs in Odoo (resource.calendar), meaning the fix must be applied there. Fix: Preserve sudo when fetching employee calendars to ensure that scheduling logic does not depend on the access rights of the email sender. A test is added in helpdesk_holidays, as the issue requires both helpdesk (auto-assignment) and hr (employees/resources) to reproduce. The test simulates a portal email flow with a multi-company user linked to multiple employees and ensures ticket creation succeeds. Steps to Reproduce: 1. Install Helpdesk, Employees, and enable multi-company 2. Create two companies (e.g., Company A and Company B) 3. Create one internal user (User X) with access to both companies 4. Create two employees linked to the same user: - Employee 1 in Company A - Employee 2 in Company B Make sure they are set with a start date, but no end date. Needs to be active employee. 5. Create a Helpdesk team in Company A 6. Add Agent X as a team member 7. Enable automatic assignment 8. Configure an email alias for the helpdesk team 9. Create a portal user 10. Send an email from the portal user to the alias Related Ticket: opw-6035099 Forward-Port-Of: odoo/enterprise#114986 Forward-Port-Of: odoo/enterprise#113047
This update resolves an issue where repeatedly deleting images in an Image Wall snippet caused a technical error (traceback). The fix adds a check to ensure the element still exists in the webpage before attempting to delete it, preventing the error and ensuring smooth operation.
Original PR description
Error: Cannot read properties of null (reading 'children') Steps to reproduce: 1.Go to Website -> Edit mode. 2.Add an Image Wall snippet. 3.Click on an image, then repeatedly click the Delete button. 4.Traceback occurs. Before this commit: The first delete click correctly removes the target element from the DOM, including its parent. On subsequent rapid clicks, the handler runs again on the same already-removed element. At that point, parentElement is null, so accessing children throws a traceback. After this commit: Added a safety check using `isConnected` in the delete handler to ensure the element is still part of the DOM. If not, the handler returns early. Repeated delete clicks no longer cause a traceback. task-6033622 Forward-Port-Of: odoo/odoo#261341 Forward-Port-Of: odoo/odoo#255733
This update ensures that the Slovak VAT tax reports generated by Odoo comply with the official Slovak XML format. Specifically, it enforces the required 2 decimal place precision for editable tax report cells, aligning with the latest VAT XSD schema. This improves data accuracy and avoids potential issues with VAT reporting.
Original PR description
As per the Slovak VAT XSD schema, editable fields must use a precision of 2 decimal places. So updating here to ensure compliance with the official XML format. Reference: https://ekr.financnasprava.sk/Formulare/XSD/dph2025.xsd Forward-Port-Of: odoo/odoo#261459
This change corrects a bug where archived email templates were incorrectly displayed in the applicant refusal wizard. The fix ensures that only active email templates are suggested, preventing confusion and ensuring accurate email communication during the application refusal process. This improves the user experience and data consistency.
Original PR description
Pre-requisites: --------------- 1. Create or duplicate any `hr.applicant` email template. 2. Archive the newly created template. 3. Archive the email template linked to a refuse reason. Steps to…
Pre-requisites: --------------- 1. Create or duplicate any `hr.applicant` email template. 2. Archive the newly created template. 3. Archive the email template linked to a refuse reason. Steps to reproduce: ------------------------- 1. Install hr_recruitment. 4. Go to Recruitment > Applications > All Applications and open an applicant. 5. Click on the "Refuse" button to open the refuse wizard. 6. Click on the "Email Template" and click on 'Search More' 7. Observe available templates Issue: ------- If a refuse reason is linked to an archived email template, the wizard automatically pre-fills that archived template Cause: ---------- The `_compute_template_id` method automatically assigns the template from the refuse reason without checking whether the template is active, which allows archived templates to be pre-filled in the wizard. https://github.com/odoo/odoo/blob/aa2a7c0e5a5de970cdb8f6a7ba9f02ad75cf5078/addons/hr_recruitment/wizard/applicant_refuse_reason.py#L91-L96 Solution: ----------- - Update `_compute_template_id` to ensure only active templates are automatically assigned. opw-5974244 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#260853 Forward-Port-Of: odoo/odoo#251186
This update corrects a bug where the Gantt view incorrectly displayed maximum hours for employees with flexible work schedules. The fix ensures accurate hour calculations across all schedules, providing a clearer view of employee time tracking. This improves reporting and scheduling accuracy for flexible employees.
Original PR description
For employees having a `resource_calendar_id` with `flexible_hours`, the max hours displayed in the gantt view were incorrectly `days * hours_per_day`. This fixes it by taking the most relevant data between `days * hours_per_day`, `weeks * hours_per_week`, both, or nothing if the range is more than a month. The new calculation is `(weeks * hours_per_week) + min((days * hours_per_day), (hours_per_week))` task 5075953 Forward-Port-Of: odoo/enterprise#114661 Forward-Port-Of: odoo/enterprise#105266
This update changes the email address used for automated IAP communications from iap@odoo.com to noreply@odoo.com. This change improves email deliverability and reduces the likelihood of incorrect responses to automated messages from Odoo.
Original PR description
The current mail address is iap@odoo.com so some client respond to the automatic mail. This fix change it to noreply@odoo.com Task-6086556 Forward-Port-Of: odoo/odoo#260794 Forward-Port-Of: odoo/odoo#259691
This change updates the email address used for automated support notifications from iap@odoo.com to noreply@odoo.com. This improves email deliverability and reduces the risk of clients responding to outdated support addresses.
Original PR description
The current mail address is iap@odoo.com so some client respond to the automatic mail. This fix change it to noreply@odoo.com Task-6086556 Forward-Port-Of: odoo/enterprise#114712 Forward-Port-Of: odoo/enterprise#114097
This update ensures that replacement invoices generated from cancelled invoices accurately display the original invoice's source information (Sales Order reference). Previously, the 'Source' field was missing, hindering traceability. This fix maintains accurate record-keeping and compliance with reporting requirements.
Original PR description
### Issue before this commit: The "Source" (origin) field was missing from the PDF of replacement invoices. While the original invoice correctly displayed the Sales Order reference, the new invoice…
### Issue before this commit: The "Source" (origin) field was missing from the PDF of replacement invoices. While the original invoice correctly displayed the Sales Order reference, the new invoice generated through the request cancel process had an empty origin field. ### Steps to reproduce the issue: 1. Download Sales and l10n_mx 2. Set a UNSPSC Category for one product 3. Go to Sales, create a new Quotation and confirm it 4. Create invoice, confirm and send & print 5. Request cancel button -> create replacement invoice 6. In the new invoice there is no source origin invoice ### Cause of the issue: The invoice_origin field is defined with copy=False. Since the replacement logic uses the copy_data method without explicitly passing the origin value, the field was automatically cleared during the creation of the new invoice. ### Reason to introduce the fix: To ensure document traceability, the fix explicitly passes the invoice_origin from the original invoice to the replacement. This maintains the link to the Sales Order in the database and ensures the "Source" label appears on the printed PDF. opw-6070016 Forward-Port-Of: odoo/enterprise#114099
This update fixes an issue where the 'Configuration' menu was hidden for users with 'All Timesheets' access, preventing them from managing billing targets. The fix ensures that menu visibility updates correctly after changes to billing settings, providing consistent access for all approvers. It addresses a caching problem that caused delays in menu updates.
Original PR description
Steps to reproduce Bug 1: 1. Login as a user with "All Timesheets" (Approver) access. 2. Disable the "Timesheet Assistant" feature for this user. 3. Ensure "Billing Rate Indicators" is enabled in…
Steps to reproduce Bug 1:
1. Login as a user with "All Timesheets" (Approver) access.
2. Disable the "Timesheet Assistant" feature for this user.
3. Ensure "Billing Rate Indicators" is enabled in settings.
Steps to reproduce Bug 2:
1. Login as a user with "All Timesheets" (Approver) access.
2. Disable the "Billing Rate Indicators" setting in company settings.
3. Ensure "Timesheet Assistant" is enabled in settings.
Steps to reproduce Bug 3:
1. Only install 'sale_timesheet_enterprise'.
2. Go to Timesheets > Configuration > Settings.
3. Toggle "Billing Rate Indicators" (timesheet_show_rates) or change the encoding unit (timesheet_encode_uom_id), then save and check the menus.
Issue:
1. The "Configuration" menu is hidden, preventing access to billing targets even if the user has "All Timesheets" access.
2. The "Billing Time Targets" menu is still visible inside Configuration even if the "Billing Rate Indicators" feature is disabled in the settings.
3. Menu visibility does not update immediately after saving the settings. Menus that should appear (e.g., "Employee Billing Time Targets" or "Timesheets Assistant") remain hidden, or vice versa, until the cache is cleared or the server is restarted.
Cause:
1. The `hr_timesheet_enterprise_menu_configuration` was restricted in XML to groups that excluded "All Timesheets" users.
2. The `_load_menus_blacklist` logic in Python only blacklisted billing menus for users who were both Managers and System Admins, leaving them visible to regular Approvers even when the feature was disabled.
3. The load_menus method is decorated with @ormcache and stored in the Registry LRU cache. Menu visibility depends on timesheet_show_rates and timesheet_encode_uom_id through _load_menus_blacklist. When this field is updated, the ORM does not automatically invalidate the cached load_menus result because these specific fields are not part of the configuration fields. As a result, the stale old menu remains in memory.
Fix:
- Updated XML to include `hr_timesheet.group_hr_timesheet_approver` in the Enterprise Configuration menu permissions.
- Refactored `_load_menus_blacklist` to:
- Hide all billing-related menus for all users when the feature is disabled.
- Hide the parent Configuration menu if it would otherwise be empty.
- Override the write method in res.company in both modules and explicitly call env.registry.clear_cache() when the relevant configuration fields are modified.
task-5428010
Forward-Port-Of: odoo/enterprise#106464This update removes inactive reports from appearing in search results, enhancing the user experience. It also resolves a minor bug impacting VAT Return reports for Czech customers, ensuring accurate reporting. This improves the reliability of the reporting system.
Original PR description
When searching for reports through the search panel inactive reports still show up in the result, this change hide the inactive variant reports from the search result. Also, fixes a minor bug related the l10n_cz, When search for VAT Return (CZ) it would cause a bug due to missing the target report to look into. task: 6149101
11 changes
Enhancements to existing features
This update implements the latest withholding tax percentages required by Ecuadorian regulations (Resolución N.º NAC-DGERCGC26-00000009). It ensures Odoo accurately calculates and reports these taxes, maintaining historical data and compatibility with existing tax configurations. This update addresses specific naming inconsistencies and formatting issues for improved accuracy.
Original PR description
Implement the new withholding tax percentages according to "Resolución N.º NAC-DGERCGC26-00000009" for Ecuador, following internal implementation guidelines by TRESCLOUD. SPECIFICATION: - Created the new withholding percentages as new tax records. - Set the previous withholding percentages as inactive to preserve historical data. - Ensured compatibility with existing tax configurations and fiscal mappings. Table with the changes established in "Resolución N.º NAC-DGERCGC26-00000009". <img width="1676" height="303" alt="image" src="https://github.com/user-attachments/assets/79ae91b2-6d31-442f-af3c-74304742c8b6" /> BP: #252917 Forward-Port-Of: odoo/odoo#257513 Forward-Port-Of: odoo/odoo#254018
Resolved issues and error corrections
This update resolves an issue preventing the Odoo database from correctly processing data from IoT devices. A missing field was added to the subscription messages, ensuring the database can now successfully receive and process updates from these devices. This improves the reliability of IoT data integration.
Original PR description
In odoo/odoo#260380, a new required field was added to the websocket `subscribe` message, `check_outdated`. This commit adds this field to the subscribe message sent from the IoT box so that the DB can process it successfully. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update allows administrators to control when subscription users are automatically reset. Previously, this process was fixed, preventing flexibility. This change improves operational control over subscription management and aligns with evolving business needs.
Original PR description
After this commit, the auto resetting of subscription user is overridable. Doing business logic in CRUD methods makes them impossible to bypass, by encapsulating the logic in another method, it would be easily overridable. Forward-Port-Of: odoo/enterprise#114459 Forward-Port-Of: odoo/enterprise#114055
This update ensures Odoo accurately reflects the latest Ecuadorian withholding tax regulations (Resolución N.º NAC-DGERCGC26-00000009) for 2026. The changes involve updating unit tests to align with these new percentages, ensuring accurate reporting and compliance for our Ecuadorian clients.
Original PR description
In accordance with the implementation of the new withholding tax percentages according to "Resolución N.º NAC-DGERCGC26-00000009" for Ecuador, following internal implementation guidelines by TRESCLOUD. Unit tests are updated to be based on the new withholding percentages. BP #110343 Forward-Port-Of: odoo/enterprise#112957 Forward-Port-Of: odoo/enterprise#110712
This update resolves a bug preventing correct invoice creation when discounts are applied to sales orders using foreign currencies. The fix ensures accurate allocation of discounts across different currencies, preventing unbalanced invoice errors. This improves the reliability of financial reporting and invoicing processes.
Original PR description
**STEP TO REPRODUCE** 1. Install the sale and accounting module. 2. Create 2 products, and setup each one with a different income account. 3. From the accounting settings, setup an account for Invoice Line discount -> Customer Invoice account. 4. Enable a currency, and create a pricelist for this currency. 5. Create the following SO: pricelist -> the pricelist you created previously. currency rate : 0.000717398539 line a: product_a, price 10, discount 57.85% line b: product_b, price 70, discount 57.85% From this SO, try to create an invoice. It will fail, saying the invoice it tried to create is unbalanced. opw-5974048 Forward-Port-Of: odoo/odoo#257897
This update fixes a bug in the bank statement reconciliation process. Previously, the system incorrectly matched bank transactions from different companies with the same UUID, leading to inaccurate journal entries. The fix ensures that both the bank statement and payment belong to the same company hierarchy, preventing foreign transactions from being incorrectly added.
Original PR description
ticket-5992100 When auto-reconciling bank statement lines, the end-to-end UUID lookup correctly checked that matched AMLs and their payment belong to the same company hierarchy, but missed checking that the payment also belongs to the same company hierarchy as the bank statement line itself. This allowed a payment from an unrelated company (sharing the same end-to-end UUID from an inter-company bank transfer) to be matched against another company's bank transaction, pulling foreign tax lines into the wrong company's journal entry. Fix by adding the same parent-path company check between the bank statement line and the payment. Forward-Port-Of: odoo/enterprise#114881 Forward-Port-Of: odoo/enterprise#113279
This update resolves an issue where the quick create feature for product variants in the Bill of Materials form was incorrectly creating new, unrelated product templates instead of variant products. To ensure correct variant creation, the 'quick create' option has been disabled, requiring users to create variants directly on the product template. This prevents data inconsistencies and ensures accurate product tracking.
Original PR description
Steps to produce: --- - Install `mrp`. - Go to Manufacturing > Products > Bills of Materials. - Click Create, select a product. - In the Product Variant field, type any value and click "Create".…
Steps to produce: --- - Install `mrp`. - Go to Manufacturing > Products > Bills of Materials. - Click Create, select a product. - In the Product Variant field, type any value and click "Create". Issue: --- Using quick create on the Product Variant field does not create a variant of the selected product template. Instead, it creates a completely new, unrelated `product.template`. This is because the `create()` method on `product.product` is overridden to call super() with context `create_product_product=False`, which suppresses direct variant creation and forces creation through `product.template` instead, see [1]. **Why passing `default_product_tmpl_id` does not help:** One might expect that passing `default_product_tmpl_id` in the field context would cause the newly quick-created `product.product` to be linked to the already-selected `product.template`. However, because of the `create()` override above (introduced in [commit]), the variant creation is always redirected to `product.template`, ignoring any `default_product_tmpl_id` passed in context. It is therefore not possible in any case to quick-create a `product.product` that is correctly and directly linked to the currently selected `product.template`. Fix: --- Disable the "Create" and "Create and Edit" options. Since there is no way to quick-create a `product.product` that is correctly linked to the currently selected `product.template`, the user must create the variant directly on the product template first. [1]https://github.com/odoo/odoo/blob/f04d79d44873d0f1c35303a1a892f3a3a394ea17/addons/product/models/product_product.py#L364-L368 [commit]: https://github.com/odoo/odoo/commit/7389345696720255a9d3c72ca1d9c2f4e4ecd7b8 opw-6127738 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#261316 Forward-Port-Of: odoo/odoo#259776
This update corrects a technical issue where the AI chat window was being opened twice. This fix ensures the AI chat functionality operates reliably and efficiently, preventing potential performance problems. The change improves the overall user experience for the AI chat feature.
Original PR description
This commit removes a double call to the `thread.openChatWindow` from the `ai_chat_launcher_service`.
This update resolves a bug where basic receipts were incorrectly generated in the Point of Sale chatter even when the feature wasn't enabled. It now ensures basic receipts are only created when the option is specifically selected and prevents multiple receipt image types from being generated at once. This improves the reliability and consistency of Point of Sale reporting.
Original PR description
Before this commit: =================== - Basic receipt was generated even when the option was not selected. - Both basic and full receipt images could be generated simultaneously. After this commit: ================== - Basic receipt is generated in chatter only when the option is enabled. - Prevents simultaneous generation of both basic and full receipt images. Task - 6126775
This update resolves an issue where KSeF invoices were being rejected due to empty 'Email' and 'Telefon' tags in the invoice XML. The fix ensures these tags are only included when a buyer's email or phone number is actually provided, aligning with KSeF requirements and preventing rejection errors.
Original PR description
Before this commit: Steps 1. Create a Polish company 2. Create and send an invoice to KSeF where the buyer has no email or no phone number 3. KSeF rejects the invoice with error code 450 (semantic verification error) This happens because `Email` and `Telefon` elements are always rendered inside `DaneKontaktowe`, even when their values are empty, producing invalid empty tags. After this commit: Add `t-if="buyer.email"` and `t-if="buyer.phone"` guards on each field so that `Email` and `Telefon` are only rendered when a value is present. opw-6124187 Forward-Port-Of: odoo/odoo#259646
This update fixes an issue where the ‘Ordered Quantity’ on delivery slips was incorrectly calculated, leading to inaccurate reporting of stock movements. Now, the ‘Ordered Quantity’ always matches the actual demand, ensuring accurate inventory tracking when validating receipts with or without backorders.
Original PR description
**Steps to reproduce:** * Install the *Inventory* (`stock`) module. * Create a *Storable Product* and set some *On Hand* quantity. * Go to *Inventory → Operations → Receipts*. * Create a new receipt.…
**Steps to reproduce:**
* Install the *Inventory* (`stock`) module.
* Create a *Storable Product* and set some *On Hand* quantity.
* Go to *Inventory → Operations → Receipts*.
* Create a new receipt.
* Add the product with a *Demand* quantity (e.g. 10).
* Validate the receipt:
* Case 1: Validate with less quantity than demand (e.g. 8) and choose *No Backorder*.
* Case 2: Validate with more quantity than demand (e.g. 12).
* Click on *Print( Delivery Slip)*.
**Observed behavior:**
* The *Ordered Quantity* is equal to the *Delivered Quantity*.
* Case 1 (Demand=10, Done=8):
* Ordered = 8, Delivered = 8.
* Case 2 (Demand=10, Done=12):
* Ordered = 12, Delivered = 12.
**Expected behavior:**
* Case 1 (Demand=10, Done=8):
* Ordered = 10, Delivered = 8.
* Case 2 (Demand=10, Done=12):
* Ordered = 10, Delivered = 12.
**Cause:**
* Clicking on *Print* triggers `stock.action_report_delivery`: https://github.com/odoo/odoo/blob/5c1000cb11da64bf317f9bd9b0ae71f6fbea910d/addons/stock/views/stock_picking_views.xml#L156
* This renders `stock.report_deliveryslip`: https://github.com/odoo/odoo/blob/5c1000cb11da64bf317f9bd9b0ae71f6fbea910d/addons/stock/report/stock_report_views.xml#L14
* The QWeb template calls `report_delivery_document`: https://github.com/odoo/odoo/blob/5c1000cb11da64bf317f9bd9b0ae71f6fbea910d/addons/stock/report/report_deliveryslip.xml#L288-L292
* Which relies on `_get_aggregated_product_quantities`: https://github.com/odoo/odoo/blob/5c1000cb11da64bf317f9bd9b0ae71f6fbea910d/addons/stock/report/report_deliveryslip.xml#L157
CASE- 1
* When validating with *less quantity* and *no backorder*:
* In `_get_aggregated_product_quantities`, `qty_ordered` is initialized to `None` and only set when `backorders and not kwargs.get('strict')`: https://github.com/odoo/odoo/blob/5c1000cb11da64bf317f9bd9b0ae71f6fbea910d/addons/stock/models/stock_move_line.py#L881
* If no backorder exists, the condition fails and `qty_ordered` remains `None` and it come out of condition
* where it take quantity `'qty_ordered': qty_ordered or quantity,` https://github.com/odoo/odoo/blob/5c1000cb11da64bf317f9bd9b0ae71f6fbea910d/addons/stock/models/stock_move_line.py#L898
* As a result, *Ordered Quantity* becomes equal to *Delivered Quantity*.
CASE-2
* When validating with *more quantity* than demanded:
* `_action_done` creates an extra move using `_create_extra_move()`: https://github.com/odoo/odoo/blob/5c1000cb11da64bf317f9bd9b0ae71f6fbea910d/addons/stock/models/stock_move.py#L1936
* The extra move is merged back via `_action_confirm(merge_into=self)`: https://github.com/odoo/odoo/blob/5c1000cb11da64bf317f9bd9b0ae71f6fbea910d/addons/stock/models/stock_move.py#L1878
* The original move keeps `product_uom_qty = 10` but now has two move lines (10 + 2).
* In `_get_aggregated_product_quantities`: Both move lines share the same `line_key`
- **ML1** → `line_key` not yet in dict → enters [if] https://github.com/odoo/odoo/blob/5c1000cb11da64bf317f9bd9b0ae71f6fbea910d/addons/stock/models/stock_move_line.py#L880 **ML2** → `line_key` already in dict → enters `else` block https://github.com/odoo/odoo/blob/5c1000cb11da64bf317f9bd9b0ae71f6fbea910d/addons/stock/models/stock_move_line.py#L901-L903
→ `qty_ordered += 2` → `qty_ordered = 12` ✗ (surplus added to demand)
→ `quantity += 2` → `quantity = 12` ✓
* The `else` branch was designed to aggregate multiple lines of the
same product (e.g. two lot lines). The bug was that it added the
**done qty** of each line to `qty_ordered` unconditionally, causing
the surplus from over-delivery to inflate the ordered quantity.
* After the fix:
* Case 1 (Demand=10, Done=8):
* Ordered = 10, Delivered = 8.
* Case 2 (Demand=10, Done=12):
* Ordered = 10, Delivered = 12.
* NOTE:
Adapt the existing test case `test_kit_packaging_delivery_slip`
to reflect the corrected behavior of delivery validation.
The test was originally introduced in this [commit](https://github.com/odoo/odoo/pull/161920/changes/47da1ec13a2189e826d3b0539e6494e35990ccc1).
Its main objective is to ensure that the Delivery Slip report prints successfully
Previously, when validating a transfer with:
Delivered quantity less than the demanded quantity, No backorder created
the Ordered Quantity was being reduced(24->12) to the delivered quantity.
After the fix, the Ordered Quantity correctly remains equal(24->24) to the original demand.
<details>
<summary>Click here to see the results:</summary>
<p><strong>Before:</strong></p>
<div>
<img src="https://github.com/user-attachments/assets/88d24079-b278-4ef9-bff2-c7f14fe7ecb7" />
<img src="https://github.com/user-attachments/assets/c6181771-7d91-4ffe-9ed8-17dffac346f7" />
</div>
<p><strong>After:</strong></p>
<div>
<img src="https://github.com/user-attachments/assets/6ed57881-8af3-42ad-94d4-7c44a5b9b00e" />
<img src="https://github.com/user-attachments/assets/b5506c81-3ed9-416b-8099-108a75588b13" />
</div>
</details>
---
opw-5874759
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#25058722 changes
Enhancements to existing features
This update implements the latest withholding tax regulations for Ecuador, as mandated by "Resolución N.º NAC-DGERCGC26-00000009". It ensures Odoo accurately calculates and reports these taxes, maintaining historical data and aligning with internal TRESCLOUD guidelines. This change is crucial for compliance with Ecuadorian tax laws.
Original PR description
Implement the new withholding tax percentages according to "Resolución N.º NAC-DGERCGC26-00000009" for Ecuador, following internal implementation guidelines by TRESCLOUD. SPECIFICATION: - Created the new withholding percentages as new tax records. - Set the previous withholding percentages as inactive to preserve historical data. - Ensured compatibility with existing tax configurations and fiscal mappings. Table with the changes established in "Resolución N.º NAC-DGERCGC26-00000009". <img width="1676" height="303" alt="image" src="https://github.com/user-attachments/assets/79ae91b2-6d31-442f-af3c-74304742c8b6" /> BP: #252917 Forward-Port-Of: odoo/odoo#257513 Forward-Port-Of: odoo/odoo#254018
Resolved issues and error corrections
This update resolves an issue where the Planning app would crash when adding a new employee with no calendar. The fix addresses a problem caused by an empty time zone value, ensuring the app handles diverse employee types correctly. This improves stability and usability for all users.
Original PR description
Issue: ---------------------------------------- When we have a fully flexible employee and a public holiday for another company, opening the planning app raises a traceback. Steps to reproduce:…
Issue: ---------------------------------------- When we have a fully flexible employee and a public holiday for another company, opening the planning app raises a traceback. Steps to reproduce: ---------------------------------------- - Have Planning and Time Off installed - Create a public holiday for another company - Create an employee with no calendar - Open Planning and try to add the new employee - Traceback Cause: ---------------------------------------- This commit 55ce1e3411d0693807d883ac159039b8141ff6b6 added the new method called `_get_flexible_resource_valid_work_intervals()` which will call `_leave_intervals_batch()` on `self.env['resource.calendar']`. In `_leave_intervals_batch()`, the resource list will contain the fully flexible employee and `self.env['resource.resource']`. During the handling of the public holiday we created, we loop through the resource list. The first one is the flexible employee, but it gets skipped by the `continue` as it has a different company. Because of this the variable `tz` still equals `None`. The second resource is `self.env['resource.resource']` which doesn't validate the condition to be skipped. So it reaches the line ```py tz = tz if tz else timezone((resource or self).tz) ``` But `tz` is still `None` and both `resource` and `self` are empty, so it gives `False` to the timezone constructor, which crashes. Solution: ---------------------------------------- Add a default value to 'UTC' to handle this specific case. opw-6107269 Forward-Port-Of: odoo/odoo#259404
This update improves the Odoo accounting system for Sri Lanka by incorporating updated Chart of Accounts (CoA) and tax settings. These changes align with standard Sri Lankan accounting practices, ensuring accurate financial reporting and compliance.
Original PR description
Updates the CoA with new accounts, updated taxes, and adjusted default account mapping to better reflect standard Sri Lankan accounting practice. Enterprise PR: https://github.com/odoo/enterprise/pull/114768 task-6141758 Forward-Port-Of: odoo/odoo#260920
This update simplifies the setup of financial accounts for Sri Lankan businesses by reducing the complexity of account code formulas. It adds new lines for equity and liabilities to the Balance Sheet, providing a more complete financial picture. This change enhances flexibility and accuracy in reporting.
Original PR description
Reduces Balance Sheet account code formulas from 3-digit to 2-digit prefixes to make the COA setup more flexible. New equity and liability lines are also added to the Balance Sheet. Community PR: https://github.com/odoo/odoo/pull/260920 task-6141758 Forward-Port-Of: odoo/enterprise#114768
This update corrects a mismatch in how transaction IDs are represented when exporting financial data (FAIA). Previously, the system used different methods for identifying transactions, leading to potential errors in reporting. This change ensures all transaction IDs align, improving the accuracy and reliability of financial reports.
Original PR description
The Invoice/TransactionID element in SourceDocuments/SalesInvoices and SourceDocuments/PurchaseInvoices must match the corresponding Transaction/TransactionID in the GeneralLedgerEntries section. As the latter uses the entry name since PR odoo#58728, the former should too. opw-6111343, opw-542729 Forward-Port-Of: odoo/enterprise#113846
A recent test in the Odoo point-of-sale restaurant module experienced timing issues, leading to incorrect order data synchronization. This update slowed down the test execution to prevent the test from changing the order before the server synced it, thus resolving the data loss problem. This ensures accurate test results and reliable order processing.
Original PR description
In the tour test_customer_alone_saved, the test was creating an order, then go on the ticket screen and then come back on the product screen to change the customer to go again on the ticket screen and come back on product screen to check that the customer did not changed. The problem was that when going to the ticket screen the first time, the order was synced with the server but the answer might come after the test changed the customer. When going the second time on the ticket screen, the order was changed with the information of the backend and the user was lost. This is all due to the test that are too fast. runbot-error: 238467 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#253587
This update resolves an unexpected crash in the website's knowledge section caused by a recent update to the dropdown component. The fix ensures the component handles situations where elements are no longer available, preventing errors when the sidebar is closed.
Original PR description
The goal of this commit is to fix the `test_10_website_conditional_visibility` test in the website, which has been crashing unpredictably since the dropdown patch in knowledge. This patch does not handle the case where `dropdownActiveEl` and `this.activeEl` are `undefined` because the component has already been destroyed. In our case, we have a popover that closes when the sidebar closes, triggered by clicking the “save” button. error-243073
This update fixes an error in the Profit and Loss report for French associations in version 19.1. The report was displaying incorrect financial figures due to inverted formulas, which has now been corrected to ensure accurate reporting of income and expenses.
Original PR description
### Issue: The Profit and Loss report for associations shows incorrect values with inverted signs, leading to wrong totals in the final computation ### Cause: In 19.1, a new fiscal localization package for associations as been added In the report `account_financial_report_l10n_fr_cdr_asso`, all formulas in the `Operating income (I)` section are incorrectly inverted The equivalent section in `account_financial_report_l10n_fr_cdr_column_2024` is correct, where accounts are properly inverted in the formulas ### Steps to reproduce: - Install `l10n_fr_reports` - Create and switch to a French company - In Accounting Settings, select the fiscal localization: `France - Associations accounting plan` - Create and confirm an invoice (any amount) - Open `Profit and Loss` and select `Profit and loss account for associations (FR)` Before the fix, the Operating Income (I) is negative opw-6117967
This update resolves an issue where users could unintentionally bypass tax group checks during chart template updates in the l10n_ar module for Argentina. The change ensures that users must now explicitly handle uninstall processes, restoring previous behavior and maintaining data integrity. This prevents potential errors related to tax reporting compliance.
Original PR description
Commit 947e4dc9de3a replaced MODULE_UNINSTALL_FLAG with an explicit 'force_delete' context flag, and as the commit message warns, callees that relied on the previous flag must now detect 'force_delete' on their own. There is no automatic bypass anymore. **STEP TO REPRODUCE** 1.- Install l10n_ar 2-. Select one argentinian regime (fiscal package) & save 3-. Try to change package **FIX** Detect 'force_delete' in check_uninstall_required and return early, restoring 19.0 behavior. Manual deletions of the tax group are still blocked. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update corrects a bug in the Italian VAT (EDI) module that incorrectly determined whether a partner was a company based on their Codice Fiscale. Specifically, it now handles country-prefixed CFs correctly, ensuring the partner's company status is accurately reflected. This prevents incorrect categorization of businesses.
Original PR description
Since 5d3c73ffd0ad ("derive company status from Codice Fiscale format") is_company is True only when the CF (Codice Fiscale) is exactly 11 chars.
Two issues:
- No @api.depends on l10n_it_codice_fiscale, so editing the CF alone leaves is_company inchanged.
- A country-prefixed CF like "IT14475210960" is 13 chars and silently downgrades the partner to a natural person.
Steps to reproduce:
- On an Italian company partner, set:
VAT = IT14475210960
Codice Fiscale = MRTMTT91D08F205J
- Change the CF to IT11122244544, it will be saved but is_company will
remain False, which is wrong.
opw-6129645This update fixes a potential issue where multiple actions within a transaction could silently override role permissions when creating Sign automation rules. The change adds a check during the action creation process to ensure no conflicting role assignments are made, preventing incorrect permissions. This ensures consistent and reliable role management within the Sign app.
Original PR description
Before this commit, creating multiple server actions for the Sign app in a single transaction (e.g., when saving an Automation Rule with multiple nested actions) bypassed the `_check_sign_template_conflicts` constraint. Because the constraint only queried the database for existing links, it failed to detect conflicts within the in-memory batch, allowing the save to succeed and causing silent role overrides. This commit introduces an intra-batch check to the constraint. By tracking requested roles in memory during the loop, the constraint now correctly raises a ValidationError if multiple actions in the same transaction attempt to automate the exact same template roles. A test has been added to ensure batch creations are properly validated. Task: 6128909
This update corrects a problem preventing Worldline and Axepta payment terminal options from working correctly in Odoo's Point of Sale. The issue stemmed from an incorrect setting within the system, now resolved by aligning the payment provider selection and streamlining related images. This ensures seamless setup and operation of payment terminals for these providers.
Original PR description
In odoo/odoo#230817, the Ingenico protocol was removed and merged with worldline (since the terminals support the same protocol). However, one issue from this merge is that in the payment terminal…
In odoo/odoo#230817, the Ingenico protocol was removed and merged with worldline (since the terminals support the same protocol). However, one issue from this merge is that in the payment terminal provider cards, which allow quickly setting up a payment terminal by selecting the brand, the Worldline and Axepta options were both not working. The reason for this is that the `use_payment_terminal` field would be set to `axepta_bnpp`, which isn't a valid value and is only used for the name of the logo image. This commit changes the following: - The Worldline and Axepta BNPP cards now both correctly set `worldline` as the payment provider. - The name of the payment method is now set to either 'Worldine' or 'Axepta BNP Paribas' depending on which card is selected. - The logos for Worldline and BNP Paribas have been combined into one image, reflecting the fact that they are a single selection. The alternative would be to add new logic with a separate image path for these providers, which seemed like overkill for this edge case. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
A recent update to the Viva payment process in the POS system was causing cancellations to fail. This fix ensures that payment and cancellation transactions use the same cash register ID, resolving the "Only cash register that created the transaction can abort it" error. This ensures Viva payments can be correctly cancelled from the POS.
Original PR description
Steps to reproduce: 1. Start a Viva payment from the POS 2. Cancel the payment from the POS (not on the terminal) **Expected behaviour:** Payment cancels successfully **Actual behaviour:** Error message "Only cash register that created the transaction can abort it". The fix is to use the same cash register ID in both the payment and the cancellation transactions. The payment cash register ID was originally changed to ensure payments would work in the kiosk, but the cancellation cash register ID was never updated. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves issues where deleting sign templates caused data corruption and broken document lineage tracking. The fix ensures documents remain intact and accurately link back to their original templates, regardless of the number of templates created from the same document. This enhances data integrity and reliability for signature workflows.
Original PR description
Steps to reproduce: Bug 1 (The Crash): 1. Open Documents app, select a PDF, and click Action > Sign. 2. In the Sign app, delete the newly created Sign Template. 3. Return to the Documents app. 4. A…
Steps to reproduce:
Bug 1 (The Crash):
1. Open Documents app, select a PDF, and click Action > Sign.
2. In the Sign app, delete the newly created Sign Template.
3. Return to the Documents app.
4. A traceback occurs (`KeyError: <document_id>`) in `web_read`.
Bug 2 (The Broken Lineage):
1. Create two separate Sign Templates from the exact same Document.
2. Send a signature request from the second template.
3. The `reference_doc` on the signature request fails to link back to the original Document.
Current behavior:
When creating a sign template from a document, `documents_sign` intentionally unlinks the original `ir.attachment` (`res_model = False`) to pass custody to `sign.document`. If the template is deleted, the attachment is orphaned, permanently corrupting the original `documents.document` and crashing the UI.
Furthermore, the lineage tracking (`reference_doc`) relies strictly on a 1:1 shared `attachment_id`. If a user creates multiple templates from one document, the system is forced to make a copy for the second template, natively breaking the lineage tracking because the IDs no longer match.
Expected behavior:
Documents should not be corrupted when generating or deleting sign templates. Furthermore, lineage tracking (`reference_doc`) should successfully link back to the original document regardless of how many templates have been generated from it.
Fix:
1. Replaced the `res_model = False` custody-handoff hack in `documents_sign` with a safe `.copy({'original_id': attachment.id})`. This sandboxes the Sign app's files, completely preventing the deletion crash and the multi-template conflicts.
2. Updated the `reference_doc` computation in `sign.request` to dynamically search for both the current `attachment_id` AND its `original_id` (utilizing a minimal-diff recordset union `|`). This perfectly preserves the lineage tracking for all templates without requiring database schema changes.
Task: 5432116
Forward-Port-Of: odoo/enterprise#114221
Forward-Port-Of: odoo/enterprise#113167A recent issue prevented activity states from correctly updating across different tabs within Odoo. This fix corrects a technical error that was disrupting this shared activity state functionality. Users should now see consistent and accurate activity updates regardless of which tab they are using.
Original PR description
Since [1], the activity state, which is supposed to be shared accross tab through a broadcast channel, isn't anymore. This PR fixes the responsible typo. [1]: #161286 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#259507 Forward-Port-Of: odoo/odoo#255785
This update allows administrators to override the automatic resetting of subscription users, providing greater control over user management within the Odoo Enterprise SaaS platform. Previously, this process was inflexible, and this change enhances operational efficiency and adaptability to specific business needs. This fix addresses a previous issue and improves system resilience.
Original PR description
After this commit, the auto resetting of subscription user is overridable. Doing business logic in CRUD methods makes them impossible to bypass, by encapsulating the logic in another method, it would be easily overridable. Forward-Port-Of: odoo/enterprise#114459 Forward-Port-Of: odoo/enterprise#114055
This update ensures Odoo correctly calculates and reports Ecuadorian withholding taxes for 2026, aligning with new government regulations (Resolución N.º NAC-DGERCGC26-00000009). Updated tests reflect the new withholding percentage requirements, ensuring accurate financial reporting for Ecuadorian businesses.
Original PR description
In accordance with the implementation of the new withholding tax percentages according to "Resolución N.º NAC-DGERCGC26-00000009" for Ecuador, following internal implementation guidelines by TRESCLOUD. Unit tests are updated to be based on the new withholding percentages. BP #110343 Forward-Port-Of: odoo/enterprise#112957 Forward-Port-Of: odoo/enterprise#110712
This update resolves a bug that prevented invoices from being created correctly when discounts were applied to sales orders using foreign currencies. The fix ensures accurate discount allocation and invoice balancing, improving the reliability of financial reporting. This impacts all users utilizing multi-currency sales transactions.
Original PR description
**STEP TO REPRODUCE** 1. Install the sale and accounting module. 2. Create 2 products, and setup each one with a different income account. 3. From the accounting settings, setup an account for Invoice Line discount -> Customer Invoice account. 4. Enable a currency, and create a pricelist for this currency. 5. Create the following SO: pricelist -> the pricelist you created previously. currency rate : 0.000717398539 line a: product_a, price 10, discount 57.85% line b: product_b, price 70, discount 57.85% From this SO, try to create an invoice. It will fail, saying the invoice it tried to create is unbalanced. opw-5974048 Forward-Port-Of: odoo/odoo#257897
This update resolves an issue where the quick create feature for product variants within Bills of Materials was incorrectly creating new, unrelated product templates instead of variants. To ensure correct variant creation, the quick create option has been disabled, requiring users to create variants directly on the product template.
Original PR description
Steps to produce: --- - Install `mrp`. - Go to Manufacturing > Products > Bills of Materials. - Click Create, select a product. - In the Product Variant field, type any value and click "Create".…
Steps to produce: --- - Install `mrp`. - Go to Manufacturing > Products > Bills of Materials. - Click Create, select a product. - In the Product Variant field, type any value and click "Create". Issue: --- Using quick create on the Product Variant field does not create a variant of the selected product template. Instead, it creates a completely new, unrelated `product.template`. This is because the `create()` method on `product.product` is overridden to call super() with context `create_product_product=False`, which suppresses direct variant creation and forces creation through `product.template` instead, see [1]. **Why passing `default_product_tmpl_id` does not help:** One might expect that passing `default_product_tmpl_id` in the field context would cause the newly quick-created `product.product` to be linked to the already-selected `product.template`. However, because of the `create()` override above (introduced in [commit]), the variant creation is always redirected to `product.template`, ignoring any `default_product_tmpl_id` passed in context. It is therefore not possible in any case to quick-create a `product.product` that is correctly and directly linked to the currently selected `product.template`. Fix: --- Disable the "Create" and "Create and Edit" options. Since there is no way to quick-create a `product.product` that is correctly linked to the currently selected `product.template`, the user must create the variant directly on the product template first. [1]https://github.com/odoo/odoo/blob/f04d79d44873d0f1c35303a1a892f3a3a394ea17/addons/product/models/product_product.py#L364-L368 [commit]: https://github.com/odoo/odoo/commit/7389345696720255a9d3c72ca1d9c2f4e4ecd7b8 opw-6127738 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#261316 Forward-Port-Of: odoo/odoo#259776
This update resolves a technical issue preventing invoices sent to Poland's KSeF system from being processed correctly. Previously, the system incorrectly included empty 'Email' and 'Telefon' tags in the invoice XML, leading to rejection. This change ensures these tags are only added when actual contact information is available, improving invoice acceptance rates.
Original PR description
Before this commit: Steps 1. Create a Polish company 2. Create and send an invoice to KSeF where the buyer has no email or no phone number 3. KSeF rejects the invoice with error code 450 (semantic verification error) This happens because `Email` and `Telefon` elements are always rendered inside `DaneKontaktowe`, even when their values are empty, producing invalid empty tags. After this commit: Add `t-if="buyer.email"` and `t-if="buyer.phone"` guards on each field so that `Email` and `Telefon` are only rendered when a value is present. opw-6124187 Forward-Port-Of: odoo/odoo#259646
This update resolves an issue where expense cards were rejecting payments for certain merchant categories (airlines, car rentals, and hotels) due to missing MCC codes. The team added the necessary MCC ranges to the system, ensuring these expenses can now be processed correctly. This improves the usability of the expense card for a wider range of business travel expenses.
Original PR description
In the expense card, when a payment is made. The card can be filtered to only allow certains category of merchant. However, the 3 ranges of MCC we not added: - Airlines, air carriers: MCC's from 3000 to 3350 - Car Rental Agencies: MCC's from 3351 to 3500 - Lodging, hotels, motels and resorts: MCC's from 3501 to 3999 And since the MCC are not present in the list, they are rejected by default even the card is set to accept all MCCs. task-5486945 Forward-Port-Of: odoo/enterprise#114154
This update fixes a technical issue in the l10n_co_dian module that caused incorrect string comparisons. The change ensures accurate data processing within the Dian tax reporting system, preventing potential errors and ensuring compliance. This resolves a previously identified bug impacting the functionality of the module.
Original PR description
Issue: commit 780b12ca7e2525bfa86f00d232fa9f186c914a85 introduced incorrect string comparison opw-6077050 Forward-Port-Of: odoo/enterprise#115354
1 change
New functionality added to Odoo
This update adds the ability to export General Ledger reports as CSV files. This allows users to easily download and analyze their financial data for reporting and record-keeping purposes. This enhancement improves data accessibility and simplifies the process of extracting financial information.
Original PR description
task-5734354 Forward-Port-Of: odoo/enterprise#111776 Forward-Port-Of: odoo/enterprise#107638
17 changes
Resolved issues and error corrections
This update resolves an issue where duplicating an employee would incorrectly copy their bank account information, leading to salary payments being routed to the same account for both employees. The fix prevents the bank account from being copied during duplication, ensuring each employee has their own unique account.
Original PR description
Steps: - Duplicate an employee. - Check that the bank account is copied. - Modify the bank account on the duplicated employee. - Verify the original employee’s bank account. Issue: - When duplicating an employee, the bank account was copied as well, causing both employees to use the same account. Updating it for one also changed it for the other, leading to both salaries being paid to the same account. Fix: - Set the 'bank_account_id' field to not be copied during duplication, ensuring the field is cleared for the duplicated employee. task-6093406 Forward-Port-Of: odoo/odoo#259405
This update ensures that replacement invoices generated after a cancellation process now include the original invoice's 'Source' (origin) information. Previously, this data was missing, leading to traceability issues. This fix maintains accurate links between invoices and Sales Orders, improving document accuracy and compliance.
Original PR description
### Issue before this commit: The "Source" (origin) field was missing from the PDF of replacement invoices. While the original invoice correctly displayed the Sales Order reference, the new invoice…
### Issue before this commit: The "Source" (origin) field was missing from the PDF of replacement invoices. While the original invoice correctly displayed the Sales Order reference, the new invoice generated through the request cancel process had an empty origin field. ### Steps to reproduce the issue: 1. Download Sales and l10n_mx 2. Set a UNSPSC Category for one product 3. Go to Sales, create a new Quotation and confirm it 4. Create invoice, confirm and send & print 5. Request cancel button -> create replacement invoice 6. In the new invoice there is no source origin invoice ### Cause of the issue: The invoice_origin field is defined with copy=False. Since the replacement logic uses the copy_data method without explicitly passing the origin value, the field was automatically cleared during the creation of the new invoice. ### Reason to introduce the fix: To ensure document traceability, the fix explicitly passes the invoice_origin from the original invoice to the replacement. This maintains the link to the Sales Order in the database and ensures the "Source" label appears on the printed PDF. opw-6070016 Forward-Port-Of: odoo/enterprise#114099
This update corrects a mismatch in transaction IDs used when generating financial reports (FAIA). Previously, the system used different identifiers for invoices and purchase invoices, leading to potential reporting errors. This change ensures all transaction IDs align, improving the accuracy and reliability of financial data exports.
Original PR description
The Invoice/TransactionID element in SourceDocuments/SalesInvoices and SourceDocuments/PurchaseInvoices must match the corresponding Transaction/TransactionID in the GeneralLedgerEntries section. As the latter uses the entry name since PR odoo#58728, the former should too. opw-6111343, opw-542729 Forward-Port-Of: odoo/enterprise#113846
A bug in a test for the restaurant point-of-sale module caused order data to be incorrectly updated. The fix addresses a timing issue where the test actions were too fast, leading to data inconsistencies. This ensures accurate order tracking and reporting.
Original PR description
In the tour test_customer_alone_saved, the test was creating an order, then go on the ticket screen and then come back on the product screen to change the customer to go again on the ticket screen and come back on product screen to check that the customer did not changed. The problem was that when going to the ticket screen the first time, the order was synced with the server but the answer might come after the test changed the customer. When going the second time on the ticket screen, the order was changed with the information of the backend and the user was lost. This is all due to the test that are too fast. runbot-error: 238467 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#253587
This update fixes a technical issue that caused a traceback when canceling an empty order in the Point of Sale (POS) system, specifically when loyalty programs were enabled. The fix ensures the POS dialog is closed before order deletion, preventing a re-render and the resulting error. This improves stability and prevents unexpected errors during order cancellation.
Original PR description
Steps to reproduce: = - Enable loyalty in the POS configuration. - Add an eWallet program for this POS. - Open a table and cancel the (empty) order using the "Cancel Order" control button. Issue: = - A traceback occurs: `TypeError: Cannot read properties of undefined (reading 'getTotalWithTax')` Reason: = - When clicking "Cancel Order", the order is deleted and `currentOrder` becomes `undefined`. - During the re-render of `ControlButtons` on the product screen, there is no active order, which leads to the traceback. Fix: = - Ensure the `ControlButtons` dialog is closed before deleting the order to prevents the re-render of `ControlButtons` without an active order and avoids the traceback. task-6030182 Forward-Port-Of: odoo/odoo#254337
This update strengthens the security of our Point of Sale (POS) system by ensuring that only valid access tokens are used when displaying customer information. The `PosCustomerDisplay` controller now verifies the access token, adding a layer of protection against unauthorized access. This change enhances the overall security posture of the Odoo POS module.
Original PR description
In this commit we adapt the `PosCustomerDisplay` controller such that it checks that the correct `pos.access_token` was sent. Task: 6144690 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update ensures the IRN (Invoice Reference Number) generated during e-invoicing is correctly saved and displayed in both the invoice PDF and the invoice form view. Previously, the IRN was only present in the PDF but not on the invoice itself, now it's consistently available.
Original PR description
**Steps to reproduce:** * Install module *Indian - GSTR with E-invoice (l10n_in_edi_gstr)*. * Configure *Indian integration* with required credentials (E-Invoicing, E-Way bill, etc.). * Save the settings. * Create a *customer invoice*. * Post the invoice. * Send the invoice through *E-Invoicing (EDI)*. * Open the generated *Invoice PDF* and the *form view*. **Observed behavior:** * The *IRN number* is correctly present in the *Invoice PDF*. * However, it is *not saved/displayed* in the invoice form view. **Cause:** * The invoice flow did not store the *IRN number* on the invoice after receiving the EDI response, even though the value was available. **Fix:** * Inherit *_l10n_in_edi_send_invoice*. * Add a condition after the invoice is sent and the JSON response is received. * When the *IRN number* is present in the response, set it on the *l10n_in_irn_number* field of the invoice (in lower case). opw-6097923
This update ensures that invoices only include validated timesheets, preventing incorrect quantity calculations. Previously, invoices were incorrectly including non-validated timesheets, leading to potential over-billing. This fix corrects a logic error in the timesheet invoicing process.
Original PR description
**Steps to reproduce** - Settings: Timesheets > Invoicing policy = only validated TS. - Have a service product with an invoicing policy based on timesheets. - Create a sales order using this product.…
**Steps to reproduce** - Settings: Timesheets > Invoicing policy = only validated TS. - Have a service product with an invoicing policy based on timesheets. - Create a sales order using this product. - From the SO, click on the "Recorded" smart button and create 2 timesheets. Validate only one of them. - Invoice the SO, using a timesheets period that includes both TS. - Notice that the quantity of the invoice line includes the non-validated timesheet. **Cause** The domain excluding non-validated timesheets provided by `_timesheet_compute_delivered_quantity_domain` is not considered since c3b6053b09222d4bd2237e7de589a63fbef118f1 **Change** Since the purpose of the previous fix was to exclude timesheets linked to an invoice with a date before the "Invoicing Switch Threshold", this can be achieved by tweaking the `timesheet_domain` slightly, similar to the `_timesheet_domain_get_invoiced_lines` domain. opw-6116670 Forward-Port-Of: odoo/odoo#261077 Forward-Port-Of: odoo/odoo#259224
This update resolves a bug that prevented invoices from being created correctly when discounts were applied to sales orders using foreign currencies. The fix ensures accurate discount allocations and invoice balancing, improving the reliability of financial reporting. This impacts users handling international sales transactions.
Original PR description
**STEP TO REPRODUCE** 1. Install the sale and accounting module. 2. Create 2 products, and setup each one with a different income account. 3. From the accounting settings, setup an account for Invoice Line discount -> Customer Invoice account. 4. Enable a currency, and create a pricelist for this currency. 5. Create the following SO: pricelist -> the pricelist you created previously. currency rate : 0.000717398539 line a: product_a, price 10, discount 57.85% line b: product_b, price 70, discount 57.85% From this SO, try to create an invoice. It will fail, saying the invoice it tried to create is unbalanced. opw-5974048 Forward-Port-Of: odoo/odoo#257897
This update significantly speeds up the process of validating stock quantities within Odoo, a key function for managing inventory. The changes addressed inefficiencies in the underlying code, resulting in a dramatic reduction in processing time, particularly for large datasets. This improves overall system performance and reduces delays in order fulfillment.
Original PR description
Applying stock quants validation was performing poorly due to multiple bottlenecks in `Picking._check_entire_pack` and `StockMoveLine._apply_putaway_strategy`: * **Redundant updates** were performed…
Applying stock quants validation was performing poorly due to multiple bottlenecks in `Picking._check_entire_pack` and `StockMoveLine._apply_putaway_strategy`: * **Redundant updates** were performed on `location_dest_id` in the move lines and the package levels (which internally update all related move lines too), even when the location remained unchanged. * The main loop inside `_check_entire_pack` was **O(N^2)** time relative to the number of move lines due to internal filtering logic. * **Cache misses** triggered unnecessary SQL queries when retrieving `move_line_ids` from `package levels`, while they are already cached via the pickings and can be grouped by `package_level`. --- ### Benchmark Benchmark conducted on a customer database with **400k** `stock_move_line` records within **800** `pickings`, testing performance of the action `StockQuant.action_validate` with different sizes of move lines. Each test was run multiple times and shown is the average mean, all with negligible variance. | Metric | Before | After | Delta | | :--- | :--- | :--- | :--- | | **Benchmark (1k lines)** | 10.5s | 2.2s | -80% | | **Benchmark (5k lines)** | 121s | 8.5s | -93% | | **Benchmark (50k lines)** | 887s | 56s | -94% | | **Benchmark (400k lines)** | timeout | 777s | (within time limit) | **OPW-6045513** Forward-Port-Of: odoo/odoo#257829
This update resolves an issue where the quick create feature for product variants in the Bill of Materials form was creating unrelated product templates instead of variants. To ensure correct variant creation, the 'quick create' option has been disabled, requiring users to create variants directly on the product template.
Original PR description
Steps to produce: --- - Install `mrp`. - Go to Manufacturing > Products > Bills of Materials. - Click Create, select a product. - In the Product Variant field, type any value and click "Create".…
Steps to produce: --- - Install `mrp`. - Go to Manufacturing > Products > Bills of Materials. - Click Create, select a product. - In the Product Variant field, type any value and click "Create". Issue: --- Using quick create on the Product Variant field does not create a variant of the selected product template. Instead, it creates a completely new, unrelated `product.template`. This is because the `create()` method on `product.product` is overridden to call super() with context `create_product_product=False`, which suppresses direct variant creation and forces creation through `product.template` instead, see [1]. **Why passing `default_product_tmpl_id` does not help:** One might expect that passing `default_product_tmpl_id` in the field context would cause the newly quick-created `product.product` to be linked to the already-selected `product.template`. However, because of the `create()` override above (introduced in [commit]), the variant creation is always redirected to `product.template`, ignoring any `default_product_tmpl_id` passed in context. It is therefore not possible in any case to quick-create a `product.product` that is correctly and directly linked to the currently selected `product.template`. Fix: --- Disable the "Create" and "Create and Edit" options. Since there is no way to quick-create a `product.product` that is correctly linked to the currently selected `product.template`, the user must create the variant directly on the product template first. [1]https://github.com/odoo/odoo/blob/f04d79d44873d0f1c35303a1a892f3a3a394ea17/addons/product/models/product_product.py#L364-L368 [commit]: https://github.com/odoo/odoo/commit/7389345696720255a9d3c72ca1d9c2f4e4ecd7b8 opw-6127738 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#261316 Forward-Port-Of: odoo/odoo#259776
This update ensures that test tags are correctly configured across all Odoo versions, including 18. Previously, an error during nightly testing could incorrectly disable the entire 'hoot suite'. This change backports a fix from a larger project to ensure consistent test execution and prevent disruptions.
Original PR description
When an error is parsed during the nightly, the default test tag is not correct in 18 and 19, what could lead to disabling the complete hoot suite if not taking enough care when disabling a test. This backports part of #234937 to ensure with have the correct tag in all version supporting hoot tests. Forward-Port-Of: odoo/odoo#261618 Forward-Port-Of: odoo/odoo#261526
This update resolves an issue where KSeF invoices were being rejected due to empty 'Email' and 'Telefon' fields in the XML format. The fix ensures these fields are only included in the invoice XML when a valid email or phone number is provided, improving compatibility with the KSeF system. This prevents invoice rejections and ensures proper compliance.
Original PR description
Before this commit: Steps 1. Create a Polish company 2. Create and send an invoice to KSeF where the buyer has no email or no phone number 3. KSeF rejects the invoice with error code 450 (semantic verification error) This happens because `Email` and `Telefon` elements are always rendered inside `DaneKontaktowe`, even when their values are empty, producing invalid empty tags. After this commit: Add `t-if="buyer.email"` and `t-if="buyer.phone"` guards on each field so that `Email` and `Telefon` are only rendered when a value is present. opw-6124187 Forward-Port-Of: odoo/odoo#259646
This update fixes a discrepancy in the sale details report by accurately reflecting cash rounding adjustments. Now, the report displays the total cash rounding applied during a session, aligning with payment records and providing a clearer picture of sales transactions. This ensures greater accuracy and transparency in financial reporting.
Original PR description
The sale details report total_paid was computed from sum(order.amount_total), which does not include the cash rounding adjustment. This caused a discrepancy between the displayed total and the sum of individual payment lines when cash rounding is enabled. Use the sum of actual payment amounts instead, which naturally includes cash rounding since payments are recorded with their rounded values. opw-5253018 Forward-Port-Of: odoo/odoo#261315 Forward-Port-Of: odoo/odoo#254401
This update resolves an issue where backorders created from returns weren't properly associated with the original return. The fix ensures the `return_id` is correctly set during the backorder creation process, allowing for accurate tracking of returned items. This improves the reliability of inventory reporting and return management.
Original PR description
### Steps to reproduce: - Create, confirm and validate a delivery for 2 units of a product A - Click Return > Return All - Validate the return for 1 unit and backorder #### > The backorder does not belong to the return list of the delivery ### Cause of the issue: Backorder pickings are created by copying the picking to backorder: https://github.com/odoo/odoo/blob/9ad995ff6b59a6a2fdfbbd6cf385fe27568dd3ea/addons/stock/models/stock_picking.py#L1580-L1593 https://github.com/odoo/odoo/blob/9ad995ff6b59a6a2fdfbbd6cf385fe27568dd3ea/addons/stock/models/stock_picking.py#L1571-L1578 However, the `return_id` is a `copy=False` field that is not manully set during this copy process: https://github.com/odoo/odoo/blob/9ad995ff6b59a6a2fdfbbd6cf385fe27568dd3ea/addons/stock/models/stock_picking.py#L558 opw-6111544 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#259804
This update ensures that Quality Checks and Mass Produce options remain accessible on the Shop Floor, regardless of whether production is automatically closed. Previously, disabling auto-close production hid these critical features, preventing users from registering serial numbers and completing quality checks. Now, these options are consistently available to streamline the production process.
Original PR description
### *Why this commit*: --- Ensures Quality Checks and Mass Produce options remain available on the Shop Floor regardless of the "Auto-close Production" setting. ### *Steps to Reproduce* --- 1. Define…
### *Why this commit*: --- Ensures Quality Checks and Mass Produce options remain available on the Shop Floor regardless of the "Auto-close Production" setting. ### *Steps to Reproduce* --- 1. Define a product tracked by Serial Numbers with a Manufacturing BoM. 2. Create a Quality Control Point for the product on the Manufacturing operation. 3. In Inventory Configuration, disable "Auto-close Production" on the Manufacturing operation type. 4. Create a Manufacturing Order (MO) and open it in the Shop Floor view. 5. If the MO has no operations, try to use Mass Produce. ### *Before this PR* --- When auto_close_production was set to False, the Shop Floor card footer incorrectly hid both the Quality Checks and Mass Produce buttons. This blocked users from registering Serial Numbers and completing mandatory quality check steps. Additionally, for products without BoM operations, clicking Mass Produce triggered quality check validation instead leading to errors, preventing the generation of serial numbers. ### *After this PR* --- The visibility logic for Shop Floor actions is now decoupled from the closing permission. The workflow follows this corrected sequence: Mass Produce: Stays visible to allow serial registration and backorder creation even if the MO cannot be closed from the Shop Floor. Quality Checks: Remain accessible to ensure all mandatory tests are passed before production progresses. Close Production: Only appears if "Auto-close Production" is enabled on the operation type. OPW: 5473839
This update resolves an issue where a misleading 'Message posted' notification appeared when users discarded the full composer after replying to messages. The change ensures notifications are now only triggered when a message is actually sent, improving the clarity and accuracy of message delivery notifications within the Discuss inbox.
Original PR description
**Description of the issue/feature this PR addresses:** ---------------------------------------------- When replying to messages from the History (Inbox) view, opening the full composer and…
**Description of the issue/feature this PR addresses:** ---------------------------------------------- When replying to messages from the History (Inbox) view, opening the full composer and discarding it could incorrectly trigger a toast notification indicating that a message was posted. This behavior is misleading, as no message is actually sent when the composer is discarded. **Current behavior before PR:** ---------------------------------------------- - Replying to a message from History opens the full composer - Discarding the full composer closes the dialog normally - A “Message posted” toast is shown even though no message was sent - Notification logic depends on dialog close behavior, leading to incorrect triggers **Desired behavior after PR is merged:** ---------------------------------------------- - Discarding the full composer does not show any notification - Notifications are only shown when a message is actually sent Task-5431682 ---------------------------------------------- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
10 changes
New functionality added to Odoo
This update enables users to add employees to existing pay runs after they've been created. Previously, adding employees was impossible, leading to issues with off-cycle pay runs and new employee creation. Now, users can seamlessly add employees to pay runs, automatically generating payslips for them in draft state.
Original PR description
Before this commit, it was not possible to add an employee to a pay run after it was created. This caused problems when: - An employee was removed from an off-cycle pay run. - A new employee was created after the pay run had already been created. - Users should be able to add employees to an existing pay run. In this commit, - In the Employee step, add a new button next to Continue called "Add Employees" - When clicked, it opens the same list view used during pay run creation. - In the list view, show only active employees. - Filter employees within the pay run date range. - Match the correct payroll structure (if required). - If the pay run is validated (payslips validated), the button should be hidden. → Employees cannot be added in this state. - If the pay run is Ready (payslips created in draft state): → Adding employees should automatically generate payslips for them. Task - 5955049
Enhancements to existing features
This update streamlines the automated processing of POS orders by combining multiple cron jobs into a single, more efficient process. This reduces unnecessary system activity and improves overall performance, leading to better resource utilization. The previous redundant cron job has been removed as part of this change.
Original PR description
This commit consolidates multiple POS order-related cron jobs into a single generic cron to reduce registry wake-ups and CPU usage. A new cron `ir_cron_process_pos_orders` runs every 5 minutes and calls `_cron_process_pos_orders`, which coordinates all related tasks such as `notify_future_deliveries`. The redundant cron `cron_check_future_delivery_orders` has been removed as part of this consolidation. Task-5449515 Related PRs: - https://github.com/odoo/odoo/pull/241800 - https://github.com/odoo/upgrade/pull/9973
This update significantly improves the demo data for the Helpdesk application, making it more effective for showcasing its features and functionality to potential users. The changes include updated data within several related modules, providing a richer and more realistic demonstration of the Helpdesk app's capabilities. This will improve the quality of demos and presentations.
Original PR description
_* = helpdesk_fsm, website_helpdesk_knowledge, website_helpdesk_knowledge, website_helpdesk_slides, website_helpdesk_slides_forum Significantly improved demo data for a more effective showcase of the helpdesk app’s features and functionality. task-3186557
This update prioritizes incomplete tax returns in the tax returns kanban view when no filters are selected. This change ensures users see the most critical returns first, streamlining the process of reviewing and managing tax obligations. It’s a simple improvement to enhance usability and efficiency.
Original PR description
When no filters are applied on the tax returns kanban view, incomplete returns should always be displayed before complete ones. This commit ensure that by ordering tax returns by `is_completed` field. task-6059414 Forward-Port-Of: odoo/enterprise#114043
This update makes the 'Return Types' menu item available in the Odoo Enterprise configuration, previously restricted to debug mode. This change allows users to easily manage return types within the accounting reports, improving workflow efficiency and reporting accuracy.
Original PR description
Before, the menu return types in configuration was only available in debug mode. Now it is available for the group `account.group_account_readonly` task-5912751 Forward-Port-Of: odoo/enterprise#114830
Resolved issues and error corrections
This update resolves a failing test related to WorldLine integration within our self-order point-of-sale system. The fix ensures that the test only runs if both necessary modules (`pos_self_order_iot` and `pos_iot_worldline`) are installed, preventing errors and improving test reliability.
Original PR description
To test WorldLine in self order, we need both `pos_self_order_iot` and `pos_iot_worldline`. We then skip the test if `pos_iot_worldline` isn't installed. Forward-Port-Of: odoo/enterprise#115282
A small typo was causing a critical error when users attempted to clock in with a blackbox POS system. This update corrects the error, ensuring receipt data generation functions correctly and preventing system crashes. This resolves a technical issue impacting POS functionality.
Original PR description
There is a typo trying to assign the server version to `this` instead of the `data` object which is used for the receipt. This causes a `cannot set properties of undefined` error when trying to clock in with a blackbox Forward-Port-Of: odoo/enterprise#115098
This update fixes a technical issue that caused a traceback when viewing restaurant bookings with no bookings. The fix corrects an automatic change introduced during a migration, ensuring the correct variable is accessed within the booking list view. This improves the stability and usability of the restaurant booking module.
Original PR description
Inside the custom list renderer for booking for pos_restaurant we access `this.list.records` which doesn't exist and throws a traceback when no there are no bookings. The `this.` was added automatically by a migration script for OWL3 to force this usage to target component variables. But in this case `list` is set inside the web.ListRenderer template with `t-set`. This commit will revert the automatic change for the access to and replace `this.list.records`, with `list.records` Task-[6147678](https://www.odoo.com/odoo/project/1737/tasks/6147678) Forward-Port-Of: odoo/enterprise#114589
This update fixes a bug where bank statement reconciliation could incorrectly match transactions from different companies. The fix ensures that payments and bank statements share the same company hierarchy, preventing foreign tax lines from being added to the wrong company's accounting records. This improves the accuracy of financial reporting.
Original PR description
ticket-5992100 When auto-reconciling bank statement lines, the end-to-end UUID lookup correctly checked that matched AMLs and their payment belong to the same company hierarchy, but missed checking that the payment also belongs to the same company hierarchy as the bank statement line itself. This allowed a payment from an unrelated company (sharing the same end-to-end UUID from an inter-company bank transfer) to be matched against another company's bank transaction, pulling foreign tax lines into the wrong company's journal entry. Fix by adding the same parent-path company check between the bank statement line and the payment. Forward-Port-Of: odoo/enterprise#114881 Forward-Port-Of: odoo/enterprise#113279
This update resolves an issue where SEPA payment files generated with split payslips (using multiple bank accounts) contained duplicate transaction identifiers. The change adds a unique identifier to each transaction block, ensuring compliance with ISO 20022 standards and preventing potential payment processing errors. This ensures accurate and compliant SEPA file generation.
Original PR description
### Issue: If a payslip is split into multiple bank accounts (Salary Allocation), the generated SEPA file contains duplicate <InstrId> tags ### Cause: The `_get_payments_vals` method, `InstrId` is…
### Issue: If a payslip is split into multiple bank accounts (Salary Allocation), the generated SEPA file contains duplicate <InstrId> tags ### Cause: The `_get_payments_vals` method, `InstrId` is based on the payslip ID When a single payslip generates multiple transaction blocks, this ID is duplicated, violating the ISO 20022 requirement for unique instruction identifiers https://knowledge.xmldation.com/support/iso20022/general_rules/instrid This commit adds a unique suffix (e.g., -1, -2) to the `InstrId` for each transaction generated from the same payslip to ensure technical uniqueness Nothing change when you only have one account This is the part of the code that use the payment name: https://github.com/odoo/enterprise/blob/194a8d35ef3e9b47ff566479b0c35c0f963fb42d/account_iso20022/models/account_journal.py#L294-L299 ### Steps to reproduce: - Install `hr_payroll_account_iso20022` with demo data - On the Bank Journal, set a valid IBAN (e.g. BE04957751619131) for `Bank Account Number` - Open the Employee page for Abigail Peterson - In the Personal tab, add 2 Bank Accounts (Send Money: True, Account Number: any) - Click on Salary Allocation and Save (You'll have a 50/50 ratio) - Create a new Pay Run (for Abigail Peterson) - Open the last PaySlip and Validate - Create Payment Report (Export Format: SEPA) - Download the Payment Report and check the <InstrId> tags opw-6069670 Forward-Port-Of: odoo/enterprise#114821 Forward-Port-Of: odoo/enterprise#113113
9 changes
New functionality added to Odoo
This pull request adds new language translations for two Odoo modules: `documents_project_sign` and `l10n_eg_iot`. These updates improve the software's support for different languages, ensuring a better user experience for international customers and users.
Original PR description
- Added `documents_project_sign` - Added `l10n_eg_iot` Related: https://github.com/odoo/odoo/pull/261628
Resolved issues and error corrections
This update resolves a bug where portal payments for mixed subscription lines (recurring and one-time) weren't correctly creating recurring invoices. Previously, payments were misdirected, leading to duplicate charges. The fix ensures accurate invoice creation for these mixed subscriptions, preventing payment issues and maintaining subscription accuracy.
Original PR description
Steps to reproduce: - Create a subscription with a recurring line and a non-recurring line invoiced on delivery. - Confirm the subscription so the first period is due. - Pay it from the subscription portal. Issue: The portal charges `next_invoice_amount`, but on the first subscription period the payment can still be evaluated against the broader displayed total. In that mixed setup, the transaction is then handled through sale's generic final invoice flow instead of the subscription recurring invoice flow. As a result, the first successful portal payment may fail to create the expected recurring invoice, leaving the subscription due and allowing the subscription cron to charge it again later. Solution: For first-period `assign_token` subscription transactions without linked invoices, when the displayed total differs from `next_invoice_amount`, compare the payment against `next_invoice_amount` and create the invoice through `_create_recurring_invoice()`. opw-6114730
This update resolves an issue where commission calculations were failing for subscription plans due to an empty currency rate table. The fix adds a fallback rate, ensuring commissions are correctly calculated even when currency rates haven't been manually set. This ensures accurate commission payments for recurring subscription orders.
Original PR description
Steps to reproduce: 1- Installed sale_commission_subscription and accounting 2- Go to [Sales -> Commissions -> Commission Plans] 3- Create a new commission plan of type MRR, specify a salesperson and approve 4- Go to Subscriptions app and create a new order with a recurring monthly plan and specify the same salesperson 5- Create an invoice for the order and confirm it 6- Go back to the commission plan and click on the Commissions smart button Issue: Commissions show up as 0 Expected behavior: Should have the corresponding commission based on the rate specified Why this happens: The `res_currency_rate` table is empty by default and only gets populated if you are in a multi-currency environment and sync the rates in the settings or by manually making a currency rate entry. Since the commission calculation depends on this table, it results in 0 rows when joining the sub-query. opw-6108580
This update resolves an issue where incorrect string comparisons were occurring within the l10n_co_dian module. The fix ensures accurate data processing for the Colombian Dian tax reporting system, preventing potential errors and ensuring compliance. This change improves the reliability of the Dian localization functionality.
Original PR description
Issue: commit 780b12ca7e2525bfa86f00d232fa9f186c914a85 introduced incorrect string comparison opw-6077050
This update resolves a critical issue where deleting sign templates caused data corruption and UI crashes. The fix ensures that document lineage is accurately tracked regardless of the number of sign templates created from a single document, improving data integrity and stability for users.
Original PR description
Steps to reproduce: Bug 1 (The Crash): 1. Open Documents app, select a PDF, and click Action > Sign. 2. In the Sign app, delete the newly created Sign Template. 3. Return to the Documents app. 4. A…
Steps to reproduce:
Bug 1 (The Crash):
1. Open Documents app, select a PDF, and click Action > Sign.
2. In the Sign app, delete the newly created Sign Template.
3. Return to the Documents app.
4. A traceback occurs (`KeyError: <document_id>`) in `web_read`.
Bug 2 (The Broken Lineage):
1. Create two separate Sign Templates from the exact same Document.
2. Send a signature request from the second template.
3. The `reference_doc` on the signature request fails to link back to the original Document.
Current behavior:
When creating a sign template from a document, `documents_sign` intentionally unlinks the original `ir.attachment` (`res_model = False`) to pass custody to `sign.document`. If the template is deleted, the attachment is orphaned, permanently corrupting the original `documents.document` and crashing the UI.
Furthermore, the lineage tracking (`reference_doc`) relies strictly on a 1:1 shared `attachment_id`. If a user creates multiple templates from one document, the system is forced to make a copy for the second template, natively breaking the lineage tracking because the IDs no longer match.
Expected behavior:
Documents should not be corrupted when generating or deleting sign templates. Furthermore, lineage tracking (`reference_doc`) should successfully link back to the original document regardless of how many templates have been generated from it.
Fix:
1. Replaced the `res_model = False` custody-handoff hack in `documents_sign` with a safe `.copy({'original_id': attachment.id})`. This sandboxes the Sign app's files, completely preventing the deletion crash and the multi-template conflicts.
2. Updated the `reference_doc` computation in `sign.request` to dynamically search for both the current `attachment_id` AND its `original_id` (utilizing a minimal-diff recordset union `|`). This perfectly preserves the lineage tracking for all templates without requiring database schema changes.
Task: 5432116
Forward-Port-Of: odoo/enterprise#114221
Forward-Port-Of: odoo/enterprise#113167This update allows administrators to control when subscription users are automatically reset. Previously, this process was automatic and couldn't be altered. This change provides greater flexibility in managing subscription accounts and ensures alignment with business processes.
Original PR description
After this commit, the auto resetting of subscription user is overridable. Doing business logic in CRUD methods makes them impossible to bypass, by encapsulating the logic in another method, it would be easily overridable. Forward-Port-Of: odoo/enterprise#114459 Forward-Port-Of: odoo/enterprise#114055
This update fixes a bug that prevented users from changing the state of tax returns within the accounting dashboard. Previously, attempting to use an invalid state would cause the page to crash. This change ensures the system handles state transitions correctly, improving the reliability of tax return management.
Original PR description
Before this commit, if you were to change the states_workflow to from a some that had an option, such as submitted, to something that did not contain a state that an account_return does not have, you would crash when trying to load the page. To get to this page go to the accounting dashboard and click on the tax returns option. To change the states_workflow change go to accounting -> configuration -> return types and change the states variable. opw-6107995
This update fixes an issue where byproducts added directly to manufacturing orders weren't correctly linked to the production origin in stock movements. Now, byproducts added to MOs are accurately tracked, ensuring correct inventory reporting and shop floor visibility. This improves the accuracy of production data.
Original PR description
When we add a byproduct followed by SN directly in the MO it will not have the its location as production. Steps to reproduce: ------------------- * Create product tracked by Serial number * Create a…
When we add a byproduct followed by SN directly in the MO it will not have the its location as production. Steps to reproduce: ------------------- * Create product tracked by Serial number * Create a Manufacturing order * Add the Product tracked by serial number on the MO as byproduct * Confirm the MO * Go to shop floor * Add the by-product quantity and create a new serial number. * Close production and go back to the MO in manufacturing * Open stock moves -> the by-product does not have "production" for origin Observation: ------------- When we add the byproduct directly in the MO, they will be added to move_byproduct_ids in the MO but not in byproduct_ids on the stock.move because byproduct_ids it's a [link](https://github.com/odoo/odoo/blob/d14bf6289da21065860ff959185c47b947a7418c/addons/mrp/models/stock_move.py#L50-L52) between the stock.move and the BOM. When adding the byproduct in shopfloor, it will create the quant: https://github.com/odoo/enterprise/blob/06be616bb4d74f0a089e8e318d25c2424594f813/mrp_workorder/static/src/mrp_display/mrp_record_line/stock_move.js#L163-L171 Additionaly when creating the quant it will decide the source location depending if the product its a byproduct: https://github.com/odoo/enterprise/blob/1d10ee238a50e7bdb552efdeafc068c5127cd49a/mrp_workorder/static/src/mrp_display/mrp_record_line/stock_move.js#L189-L192 The issue arise because it check if the product it's a byproduct by checking byproduct_ids and since our product was added directly on the MO and not from the BOM it will not appear in byproduct_ids https://github.com/odoo/enterprise/blob/dc5bb0fe8e15063f977970841bdaf8aff1a61e41/mrp_workorder/static/src/mrp_display/mrp_record_line/stock_move.js#L108-L110 #### Additional notes: The default value for [byproduct_id](https://github.com/odoo/odoo/blob/abb5777cc8324cff0cdf841a8ae42413060dcf92/addons/mrp/models/mrp_production.py#L1263) when creating the stock move is false opw-5974582
This update corrects an encoding problem in the XML files used for exporting payroll data to the IRD platform in Hong Kong. The fix ensures the files meet the IRD's specific formatting requirements, preventing potential export errors and ensuring accurate data submission. Further work is needed to ensure compatibility with other file types and a robust testing process.
Original PR description
Following recent tests, we noticed that the encoding used when exporting our XML files doesn't follow the required format. We noticed two issues during testing: - The IRD platform expects the file to have BOM included. - The encoding in the header must be capitalized. We solve this in this commit by prepending the BOM bytes to the xml bytes; and making sure to capitalize the URF-8 in the header. task-6150470 --- Note: There will be a lot to do during forward ports, as these have changed quite a bit. (XML support for the other file types, and a proper testing file, at least)
7 changes
New functionality added to Odoo
This update prepares Odoo for a change in Belgian accounting regulations. Starting May 1st, businesses will need to use a new 'Tax Provision Account' (411800) instead of their existing accounts for VAT periodic returns. This ensures compliance with updated Belgian tax laws.
Original PR description
Starting May 1st, in Belgium the VAT provision account will replace the current account for periodic returns - Adding the new bank account - Adding a new account 'Tax Provision Account' 411800 Enterprise PR: odoo/enterprise#111599 Task [link](https://www.odoo.com/odoo/project.task/6044017) task-6044017
This update prepares Odoo for a new Belgian tax regulation. Starting May 1st, a dedicated 'Tax Provision Account' (411800) is required for VAT periodic returns, replacing the previous account. This change ensures compliance with updated Belgian accounting standards.
Original PR description
Starting May 1st, in Belgium the VAT provision account will replace the current account for periodic returns - Adding the new bank account - Adding a new account 'Tax Provision Account' 411800 Community PR: odoo/odoo#255272 Task [link](https://www.odoo.com/odoo/project.task/6044017) task-6044017
Resolved issues and error corrections
This update resolves an issue where power buttons were incorrectly displayed and overlapped other menu items in the HTML editor, particularly on smaller screens. The fix adjusts the editor's width detection to ensure buttons are hidden when they cause overlap, improving the user experience and visual consistency.
Original PR description
Problem: Power buttons are shown regardless of the editor field's actual rendered width, causing them to overlap other menus when the field is small. Solution: Instead of relying solely on the global…
Problem: Power buttons are shown regardless of the editor field's actual rendered width, causing them to overlap other menus when the field is small. Solution: Instead of relying solely on the global `ui.isSmall` (mobile detection), check the editor field's own width and hide power buttons whenever it falls below the overlap threshold. Before: <img width="576" height="301" alt="image" src="https://github.com/user-attachments/assets/dcebed55-5c80-4fe5-8d33-c320549cf347" /> After: <img width="542" height="336" alt="image" src="https://github.com/user-attachments/assets/34a233bb-9958-43ac-adb9-04702a2e403d" /> Steps to reproduce: - Change languange (French to have a long placeholder). - Settings > Customer Invoices > Default Terms & Conditions. - Check "Add a Note". - Resize the screen to smaller size. - Observe the power buttons overlap with the translate button. task-6117734 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update corrects a bug that prevented customers from being found correctly when searching by email address. The system was incorrectly using the phone field instead of the email field in its search criteria. This change ensures accurate customer retrieval via email, improving data accuracy and usability.
Original PR description
The email-based lookup was mistakenly checking the phone field (`phone = email`) instead of the email field. Because of this, customers could not be correctly found using their email address. This change fixes the domain to properly match on the email field.
This update fixes an issue where clicking the 'next' page button during a chatter attachment upload would incorrectly upload attachments to the wrong records. The change now disables the pager buttons while an attachment is being uploaded, preventing this behavior and ensuring attachments are correctly placed.
Original PR description
Currently, when uploading a bunch of attachments or a big one to the chatter, if you click on the pager (e.g. next) before the upload is complete, the attachments that have not yet been uploaded are uploaded to the next record. This change disables the pager buttons if there is an ongoing upload in the chatter attachment box. task-5119290
This update resolves an unexpected error that appeared when scanning barcodes offline in the Point of Sale module. The fix ensures that operations are only performed when data is available, preventing a secondary error message. This improves the user experience and stability of the PoS system.
Original PR description
**Steps to reproduce:** - Set a barcode on a product that is not in the used point of sale - Go to PoS, cut the server connection - Go to the debug window and enter the barcode - An error saying the connection is cut appears (expected) - A traceback appears (unexpected) **Why the fix:** This bug only happens in 18.0, so this is a backport of ca1ba4b which was basically fixing the same issue. We check if we have data before making some operations on them as to avoid making operations on an undefined value. opw-5450575
This update fixes an issue where the product amount in the sales preview was incorrectly displayed as excluding taxes. The change ensures that the preview and PDF reports accurately show the total price, including taxes, when 'Tax Included' is selected in company settings. This improves the accuracy of sales quotes and reports.
Original PR description
**Steps to produce:** - Install `sale_management` without demo data. - In settings > Under Taxes > Set `Tax Prices` as `Tax Included`. - Create a product with a sales price of 10. - Create a…
**Steps to produce:** - Install `sale_management` without demo data. - In settings > Under Taxes > Set `Tax Prices` as `Tax Included`. - Create a product with a sales price of 10. - Create a quotation with this product. - Confirm the line amount shows 10 (tax included). - Click on preview. **Observation:** - In the preview, the product line amount is shown as tax excluded. **Root cause:** - At [1], when in the company setting `tax included` is selected, the system displays `price_total` instead of `price_subtotal`. - This logic is not applied in the portal preview and PDF report. **Solution:** - Apply the same logic in portal preview and PDF reports: display `price_total` when taxes are included, otherwise `price_subtotal`. [1]https://github.com/odoo/odoo/blob/3dfb2849acd899ccbf4048f2a15dff3c74aed96d/addons/sale/views/sale_order_views.xml#L656-L663 Before: --- <img width="1031" height="384" alt="image" src="https://github.com/user-attachments/assets/743abbec-9225-4f77-894b-193052ee8e42" /> After: --- <img width="1052" height="391" alt="image" src="https://github.com/user-attachments/assets/61d2b331-e197-4ca0-a71d-e307d9bf80fe" /> opw-6089473 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
8 changes
Resolved issues and error corrections
This update resolves a discrepancy between Odoo and the Mexican SAT portal's requirements for electronic invoicing. Previously, credit notes couldn't utilize the 'payment_policy_payment_due' (PPD) setting. Now, credit notes with an 'out_refund' move type can correctly utilize PPD, ensuring compliance with Mexican tax regulations.
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
This update fixes a performance issue where Odoo was fetching excessive product quantities during certain on-change events. The change ensures that the system respects the specified limit when retrieving quantities, resulting in significantly faster response times. This improves the user experience, especially when dealing with products with many associated quantities.
Original PR description
## Problem: During an `onchange` call, if a field is defined in the `fields_spec` with a `limit` attribute, the `fetch` method doesn't respect it, and will fetch all records satisfying the domain. In certain circumstances, this leads to slow requests. ## Solution: Enforce the `limit` when fetching if it is present. ## Steps to reproduce: - Have a product with many quant records 1. Open a picking for this product in Barcode 2. Change the lot/serial The frontend will send an `onchange` request that includes `product_stock_quant_ids` in the `fields_spec` (with default `limit` 40). Odoo will fetch all quants for this product regardless of the limit, and the request will take a while to resolve. ## Benchmark: <table> <thead> <tr> <th># of quants</th> <th>Before</th> <th>After</th> </tr> </thead> <tbody> <tr> <td>17193</td> <td>~9s</td> <td>~400ms</td> </tr> </tbody> </table> opw-6041705
This update enhances the accuracy of partner searches within Odoo by switching to an exact name match instead of a partial match. This prevents incorrect matches and ensures that users find the intended partner more reliably. The change also limits search results to one partner for consistency.
Original PR description
Before this commit: * Partner was searched using contains on the name, which could match unrelated partners with similar names (e.g. 'Global Tech' matching 'Global Technologies Ltd'). After this commit: - Partner retrieval now uses an exact name match to avoid incorrect matches caused by partial name search. - The search limit is set to 1 to ensure a consistent result when multiple partners are found. Technical: - Replaced `ilike` with `=ilike` in the name search domain. task-5485563
This update resolves an issue where the Swedish EC Sales Report exported to KVR (a key reporting format) displayed decimal values instead of the required integer format for Swedish tax reporting. The fix ensures that all sales report values are rounded to integers, aligning with Swedish reporting regulations and improving data accuracy.
Original PR description
**PROBLEM** EC Sales Report in Sweden needs to be reported with integer values. **STEP TO REPRODUCE** 1. Install l10n_se 2. On the se company, create a invoice with lines with EU tax and confirm it. 3. Go to Accounting/Reporting/EC Sale List and export to KVR. 4. Notices the KVR uses numbers with decimals places. opw-6045289
This update fixes an issue where Datev exports were displaying incorrect currency amounts due to recomputing exchange rates. The change ensures that the original exchange rate used when creating the journal entry is consistently applied during export, aligning with the Odoo interface and improving data accuracy for financial reporting.
Original PR description
Currently, during the general ledger export to Datev format, the total price in currency and currency_rate information are recomputed using the current exchange rate at the line's date. When rates have been added or modified after the creation of entries for the same date, the account_move_lines are not recomputed to match the new rate. It results in exporting different values than what is indicated in the report from the Odoo interface. We propose to use the same exchange rate as the one originally used to convert the journal item to ensure consistency with the database. This is a backport of https://github.com/odoo/enterprise/pull/101910 opw-6096686
This update resolves a bug that prevented bank statement imports (like those from CodaBox) from completing successfully when multiple journals shared the same bank account number. The fix ensures accurate journal identification and prevents import failures, improving the reliability of financial data synchronization.
Original PR description
Behavior before: When running the CodaBox transaction fetch (via cron or manual trigger), the process would crash with an "Expected singleton: account.journal(id1, id2)" error if multiple journals…
Behavior before: When running the CodaBox transaction fetch (via cron or manual trigger), the process would crash with an "Expected singleton: account.journal(id1, id2)" error if multiple journals were found sharing the same sanitized bank account number. This made the automated import flow unusable for users with duplicate numbered bank accounts. Behavior after: The CodaBox import flow completes successfully even if multiple journals share the same account number. The system now correctly identifies and binds to a single journal record, preventing the crash and allowing the statement creation to proceed. Root Cause: In _find_additional_data(), the search for a journal based on the sanitized_account_number lacked a record limit. If a database contained multiple journals for the same IBAN, the search returned a recordset containing multiple IDs. When the flow subsequently attempted to call instance methods or access fields on this recordset, the ORM triggered a ValueError because it expected a singleton. Fix: Added limit=1 to the search in _find_additional_data(). This ensures that even if the criteria match multiple journals, only a single record is returned and used for the statement import, maintaining consistency with Odoo's singleton requirements for journal-based operations. opw-5462037
This update resolves a previous issue where exporting large General Ledger reports to PDF caused crashes due to excessive memory usage. The fix now processes data in smaller chunks, ensuring stable PDF exports even with extensive financial data. This improves the reliability of a key business reporting function.
Original PR description
Behavior before: Exporting reports relying on _get_aml_values() (e.g., General Ledger) to PDF on large datasets caused high memory consumption and could lead to out-of-memory (OOM) errors. The export process would sometimes fail due to excessive RAM usage. Behavior after: PDF exports complete successfully even with large volumes of account move lines. Memory usage remains stable during the export process, preventing crashes. Root Cause: The method _get_aml_values() used dictfetchall(), which loads the entire query result set into memory at once. During PDF export, where all lines are typically fetched without pagination, this resulted in a massive memory footprint and eventual OOM. Fix: Replaced dictfetchall() with dictfetchmany(1000) to process results in chunks. This ensures that only a limited number of rows are loaded into memory at a time, significantly reducing memory usage during PDF generation while preserving the existing logic and behavior. opw-6065292
This update fixes a security vulnerability by ensuring that users entering their email addresses during signup are validated. Previously, any string could be used, now the system enforces email format validation, enhancing data integrity and security. The update also adds autocomplete attributes to the signup form for a better user experience.
Original PR description
**Problem**
Before this commit, the email address typed in the signup form was not validated. Consequently, the user could use whatever string as email address.
**How to reproduce**
1. Activate "free sign up" ("Settings"->"Website"->"Customer Account")
2. While being signed off, navigate to "/web/signup"
3. No validation is enforced on the email field
**Fix**
The email field is correclty marked as "required", but its type was set as "text" instead of "email". This commit fixes the problem by changing the type to "email".
task-6094631