Daily updates from Odoo
Friday, May 29, 2026
245 changes
5 changes
Resolved issues and error corrections
This update fixes a problem where the bank statement KPI wasn't being updated correctly when no statements were processed. Now, if no bank statements are available, the KPI column is automatically cleared, ensuring accurate reporting. This prevents misleading KPI data related to bank statement processing.
Original PR description
The aim of this commit is to update the integer kpis when those aren't received. ### Context: The account module report the bank statement in draft to process. When all bank statement have been processed, there isn't any and thus, the module send back an empty list. ### Before this commit: The bank statement kpi wasn't updated as we didn't received anything about that specific kpi. ### After this commit: Any kpi that wouldn't be reported would get it's column emptied. opw-6170973 Forward-Port-Of: odoo/enterprise#115695
This update optimizes a key query used to retrieve reconciliation models, resulting in significantly faster performance. By correcting a technical issue with how the database searches for matching records, the system now responds much quicker, particularly when the database's memory is not fully warmed up. This improves overall system responsiveness.
Original PR description
The CTE `model_fees` is supposed to get the reconciliation models that match conditions that involves a join with the ir.model.data table. One of these conditions is filtering based on the `name`…
The CTE `model_fees` is supposed to get the reconciliation models that match conditions that involves a join with the ir.model.data table. One of these conditions is filtering based on the `name` field with an `LIKE` operator. On databases that has a GIST index on the field `name`, the planner will prefer to filter the records based using the GIST index and add the extra filters as a filtering criteria after the index condition if the index-condition wasn't possible to be switched to a range-query. The condition is supposed to be a prefix-matching, which can be evaluated directly by a B-TREE if the field had an index and the planner can convert the condition to a range-query. Apparently the `_` in `account_reco_models_fees_%%` was evaluated as a wild-card, making the condition a substring-matching rather than direct prefix-matching. In this PR, I have modified the condition to escape the '_' wildcards. The benchmark done below was on a database that has around **10^7** `ir.model.data` records and 1K `account.reconciliation.model` records. I have split the benchmark into two cases, a case where the buffer-pool of postgres warmed-up and a case where it is not. After Worst case -> https://explain.dalibo.com/plan/975geg1f1h109d5c Before Worst case -> https://explain.dalibo.com/plan/0ce9bf3g0ad8f98b After Best Case -> https://explain.dalibo.com/plan/1a77459dadb0gfc4 Definition of ir_model_data_name_idx2 -> CREATE INDEX ir_model_data_name_idx2 ON public.ir_model_data USING gist (name gist_trgm_ops) Definition of ir_model_data_module_name_uniq_index -> CREATE UNIQUE INDEX ir_model_data_module_name_uniq_index ON public.ir_model_data USING btree (module, name) | PostgreSQL Buffer Pool Status | Before | After | | :--- | :--- | :--- | | Not warmed up (Cold) | 11s | 130ms | | Warmed up (Hot) | 0.022ms | 0.097ms | Forward-Port-Of: odoo/enterprise#117746
This update resolves an issue in the Italian annual tax report where incorrect values (both positive and negative) were displayed for tax lines. The fix ensures that only the positive balance for each pair of tax lines (VL3/VL4 and VL32/VL33) is shown, aligning with tax reporting requirements. This improves the accuracy of the report for Italian businesses.
Original PR description
### Issue In the Italian annual tax report, both VL3/VL4 and VL32/VL33 values could be displayed at the same time However, according to the report logic, only the positive balance should be shown for…
### Issue In the Italian annual tax report, both VL3/VL4 and VL32/VL33 values could be displayed at the same time However, according to the report logic, only the positive balance should be shown for each pair: - VL3 (Tax Due) or VL4 (Tax Credit) - VL32 (Tax Due) or VL33 (Tax Credit) The other one should stay 0 If the global balance is null, both can be 0 ### Cause The lines VL3, VL4, VL32, and VL33 were using the shortcut field `aggregation_formula` directly on the `account.report.line` record This shortcut format does not evaluate or support conditional subformulas like `if_above(EUR(0))` As a result, the report computed and displayed both lines of each pair without filtering out the negative or unwanted values ### Steps to reproduce - Install `l10n_it` and `accountant` and switch to IT Company - Create a balanced Journal Entry for any account - Add the Tax Grid v20 on one of the lines to impact the annual report - Open the `Annual Tax Report (IT)` - Go to the `VL` section - Check the value of VL3/VL4 and VL32/VL33 After the fix, only one value can be positive and the other 0 Ticket [link](https://www.odoo.com/odoo/project.task/6212694) opw-6212694 Forward-Port-Of: odoo/odoo#264294
This update fixes issues related to text selection within the website interface, particularly around nested uncrossable elements. It ensures that selections are correctly maintained, even with complex HTML structures, and improves the overall user experience by accurately reflecting user selections.
Original PR description
*: html_editor, html_builder ### Commit 1: [FIX] html_editor, website: improve helper util setSelection and tests **Before this commit**: after the selection restriction commit…
*: html_editor, html_builder ### Commit 1: [FIX] html_editor, website: improve helper util setSelection and tests **Before this commit**: after the selection restriction commit (https://github.com/odoo/odoo/commit/d09c8fd428315b8c3bf08c43d55da50fcd77f2ae), the tests have to dispatch events specifically to mimic the selection made by mouse. **After this commit:** we improve the setSelection helper to include a flag isMouseEventSimulated and simplify the tests. task-6143995 ### Commit 2: [FIX] html_builder*: improve selection correction for nested uncrossable *: website **Before this commit:** correctSelectionOnUncrossable is not exhaustive for complex html snippets. When there are multiple uncrossable elements in the selection, and there's a parent uncrossable element including other uncrossable ones, the selection is only restricted on the parent uncrossable element. We had a fix for the select all behavior but not for mouse selection. Reproduction: - Have a blockquote snippet with some text around it - Select the text from the blockquote to the text after it => it will keep the authors info selected - And then, if I click on the text, the selection will restrict to the text without the author infos **After this commit:** We now always correct the selection on uncrossable in an iterative way, until the selection is not corrected anymore or a maximum of attempts is reached. We didn't use the loop condition like previously done. Because there can still be an uncrossable inside the selection, when the closest uncrossable elements of the focus node and anchor node are the same. Instead, we stop the looping when the selection isn't being corrected anymore. task-6143995 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update fixes a technical issue where the AI system was occasionally encountering an error (keyerror) when retrieving tool call IDs from the Gemini language model. The fix ensures the system correctly handles cases where the ID is missing, preventing disruptions in AI functionality. This improves the reliability of the AI-powered features.
Original PR description
The functionCall parts returned by Gemini may or may not have an id depending on the LLM model used (Gemini 2.5 doesn't include an id in functionCall parts but Gemini 3 does). So, there is some code that checks whether there is an id and generates a uuid if none exists. This code had a bug because it was accessing the id directly on the functionCall part which may not exist and a keyerror was thrown in such cases. This commit solves the issue by using get instead of direct key access.
11 changes
Resolved issues and error corrections
This update resolves an issue that caused errors when sending shifts involving multiple resources. The fix ensures the system correctly handles shifts with multiple assigned employees, preventing a traceback and improving the reliability of shift scheduling. This enhances the overall planning process for users.
Original PR description
Steps to reproduce: - Install Planning - Create two resources - Enable "Employee Unavailabilities > Unassign themselves from shifts - Create a shift with multiple resources - Send the shift Issue: A traceback occurred when sending a shift linked to multiple resources. Cause: The unavailability URL was generated using `employees.token`, which expects a single employee record. Fix: Handle shifts with multiple resources correctly when generating the unavailability URL to avoid the traceback when sending shifts. issue commit-https://github.com/odoo/enterprise/pull/106700/commits
This update ensures that when an analytic plan with mandatory 'Expense' domains is set up, users must now correctly provide an analytic distribution when posting expenses. Previously, expenses could be posted without this distribution, leading to potential accounting discrepancies. This change improves data accuracy and compliance.
Original PR description
When posting expenses, if the expense domain is set as mandatory in any of the analytic plans, users can still post expenses without entering an analytic distribution. Steps to reproduce: 1. Create an analytic plan with the "Expense" domain and set it as mandatory. 2. Create a new expense and submit it. 3. Don't enter any analytic distribution. 4. Post Journal Entries for the expense. 5. Notice how the expense is posted without any error message. Ticket [link](https://www.odoo.com/odoo/project.task/6187340) opw-6187340 Forward-Port-Of: odoo/odoo#266399
This update fixes a problem where selecting the start date first would incorrectly set both the start and end dates for postponed accounting periods. Previously, selecting the end date first resulted in dates being displayed in reverse order. This change ensures the system correctly calculates and displays deferred period dates, improving data accuracy and usability.
Original PR description
The issue is when selecting deferred dates, if the start date is selected first, the system will set both the start and end dates. However, when selecting the end date first, the period appears backwards example ( 2026 - 2025 ). task: 6140024 Forward-Port-Of: odoo/enterprise#114866
This update corrects a reporting issue where bank statement KPIs wouldn't update when no statements were processed. Previously, an empty list returned by the system resulted in the KPI remaining unchanged. Now, any unreported KPI column is cleared, ensuring accurate reporting of bank statement processing status.
Original PR description
The aim of this commit is to update the integer kpis when those aren't received. ### Context: The account module report the bank statement in draft to process. When all bank statement have been processed, there isn't any and thus, the module send back an empty list. ### Before this commit: The bank statement kpi wasn't updated as we didn't received anything about that specific kpi. ### After this commit: Any kpi that wouldn't be reported would get it's column emptied. opw-6170973 Forward-Port-Of: odoo/enterprise#115695
This update resolves an issue where Odoo would crash when a customer canceled a Redsys payment and returned to the system. Previously, the system didn't handle missing payment details correctly, leading to an error. Now, Odoo gracefully handles payment cancellations, ensuring a smoother customer experience.
Original PR description
Description of the issue/feature this PR addresses: Prevent an internal server error when a customer cancels a Redsys payment and returns to Odoo. Current behavior before PR: When the customer…
Description of the issue/feature this PR addresses: Prevent an internal server error when a customer cancels a Redsys payment and returns to Odoo. Current behavior before PR: When the customer cancels the payment from the Redsys checkout page, Redsys redirects back to Odoo without the `Ds_MerchantParameters` parameter. The payment flow assumes the parameter is always present and tries to decode it unconditionally, causing an internal server error. Desired behavior after PR is merged: Odoo gracefully handles payment cancellations when `Ds_MerchantParameters` is missing from the callback parameters. The customer is redirected correctly without triggering a server error. Steps to reproduce: 1. Install the Redsys payment provider. 2. Configure a test environment. 3. Create a sales order or invoice. 4. Start the payment process. 5. Cancel the payment from the Redsys checkout page. 6. Return to Odoo. 7. Observe the internal server error caused by the missing `Ds_MerchantParameters` parameter. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#265655
This update fixes an issue where internal links within the Timesheet Assistant's custom form view opened in a separate window, disrupting the user's workflow. Now, these links open within a modal, keeping users seamlessly within the Timesheets Assistant menu for a smoother experience.
Original PR description
This commit opens the internal links in the custom form view displayed in the timesheet assistant inside a modal to stay in Timesheets Assistant menu. task-[6132392](https://www.odoo.com/odoo/project/4105/tasks/6132392) Forward-Port-Of: odoo/enterprise#114596
This update fixes a bug that prevented users from opening project records in a new tab. Previously, records opened directly in the current browser tab. Now, users can open records in a new tab by using Ctrl+click, improving workflow efficiency and user experience.
Original PR description
Steps to reproduce ================== - Install project,board - Go to project - Open any project - Click on the cog menu - Click on Dashboard > Add to my dashboard - Confirm - Open the dashboard app > My dashboard - ctrl+click on a record => The record is opened in the current tab Cause of the issue ================== The params newWindow passed to the selectRecord props was ignored Forward-Port-Of: odoo/odoo#266729
This update resolves an issue where the Italian annual tax report incorrectly displayed both positive and negative values for related tax lines (VL3/VL4 and VL32/VL33). The fix ensures that only the positive balance is shown, aligning with the report's logic and improving data accuracy for Italian tax reporting.
Original PR description
### Issue In the Italian annual tax report, both VL3/VL4 and VL32/VL33 values could be displayed at the same time However, according to the report logic, only the positive balance should be shown for…
### Issue In the Italian annual tax report, both VL3/VL4 and VL32/VL33 values could be displayed at the same time However, according to the report logic, only the positive balance should be shown for each pair: - VL3 (Tax Due) or VL4 (Tax Credit) - VL32 (Tax Due) or VL33 (Tax Credit) The other one should stay 0 If the global balance is null, both can be 0 ### Cause The lines VL3, VL4, VL32, and VL33 were using the shortcut field `aggregation_formula` directly on the `account.report.line` record This shortcut format does not evaluate or support conditional subformulas like `if_above(EUR(0))` As a result, the report computed and displayed both lines of each pair without filtering out the negative or unwanted values ### Steps to reproduce - Install `l10n_it` and `accountant` and switch to IT Company - Create a balanced Journal Entry for any account - Add the Tax Grid v20 on one of the lines to impact the annual report - Open the `Annual Tax Report (IT)` - Go to the `VL` section - Check the value of VL3/VL4 and VL32/VL33 After the fix, only one value can be positive and the other 0 Ticket [link](https://www.odoo.com/odoo/project.task/6212694) opw-6212694 Forward-Port-Of: odoo/odoo#264294
This update resolves an issue preventing Belgian employees on flexible work schedules from requesting multi-day leave. The fix ensures that the system correctly handles flexible schedules, avoiding an error related to time credit attendance calculations. This enhancement improves the functionality for Belgian businesses using the l10n_be_hr_payroll module.
Original PR description
## Steps to reproduce: - Install l10n_be_hr_payroll module - Create a flexible working schedule and set the company to the Belgian company - Create an employee and assign the created schedule to him - Try to take a multi-day leave for this employee - Notice number of days is 0 - Try to validate the leave - An exception is raised 'The following employees are not supposed to work during that period' ## Cause: When fetching the work intervals for a belgian flexible employee we first fetch the normal work intervals then we call the same method but to filter the time credit attendance and since for the flexible employee there are not specific attendances we return the same normal work intervals and it will subtract those from the main work intervals which will result in an empty intervals to be returned ## Fix: Check if the working schedule is flexible and if so we don't check the time credit attendances at all. opw-6237642 Forward-Port-Of: odoo/enterprise#118528
A recent update incorrectly added attributes to all website select elements, causing performance issues and database clutter. This fix removes the problematic code, ensuring website performance and data integrity. It's a routine maintenance update to improve the system's efficiency.
Original PR description
Commit [1] introduced an option to link state and country, which uses the data-link-state-to-country attribute. However, because parentheses were missed, it added the mentioned attribute to all select elements, which polluted the dom and the database. [1]: https://github.com/odoo/odoo/commit/7a43c49441b5a50168c3919fb8e8b658686363b5 Forward-Port-Of: odoo/odoo#266986
This update fixes an issue where the calculation of the gross total on invoices wasn't accurately accounting for both line and global discounts. The change ensures the correct raw total is calculated before taxes and discounts, leading to more accurate invoice totals and improved financial reporting. This resolves a discrepancy impacting global discount implementations.
Original PR description
Problem: When both line discounts and global discounts are applied on a product in an invoice, the method `_add_and_round_raw_gross_total_excluded_and_discount` does not return the exact…
Problem: When both line discounts and global discounts are applied on a product in an invoice, the method `_add_and_round_raw_gross_total_excluded_and_discount` does not return the exact raw_gross_total_excluded before the modification done by other AccountTax helper methods, such as dispatching and squashing global discount lines. Current Behavior: The calculation is done in the wrong order of operations. For example, there is an invoice for Product A valued at $100 with a discount of 10% and a global discount of $10. The raw_total_excluded will be $80 after the both discounts. The discount_factor is based on only the line discount of 10%. The formula of the current calculation for raw_gross_total_excluded is: (raw_total_excluded / (1 - (line_discount / 100))) - global_discount = (80 / 0.90) - (-10) = 98.889 This does not equal the expected outcome of $100. Expected Behavior: Based on the previous example, the formula for the calculation should be: (raw_total_excluded - global_discount) / (1 - (line_discount/100)) = (80 - (-10)) / 0.9 = 100 The global discount needs to be added back to the raw_total_excluded to get the line discounted amount in order to divide by the discount_factor to gain the expected raw_gross_total_excluded before taxes and discounts. Steps to reproduce the issue: - Bug was encountered when implementing a global discount solution for l10n_co_dian. - Create an invoice with a product line and in-line discount and another line for global discount - Setup the base lines for the invoice and attempt the following: - _dispatch_global_discount_lines - _squash_global_discount_lines - _add_and_round_raw_gross_total_excluded_and_discount opw-5412446 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#266584 Forward-Port-Of: odoo/odoo#262137
6 changes
Resolved issues and error corrections
This update fixes a technical issue preventing AI responses from being correctly delivered when AI Livechat is embedded on another website. The fix involves changing how the AI response stream is handled, ensuring proper CORS routing and allowing the embedded Livechat to receive the necessary data. This improves the overall functionality and reliability of the embedded AI Livechat experience.
Original PR description
AI livechat embedded on another origin could not receive AI responses. The response stream is requested with fetch(), so it bypassed the livechat CORS routing that only wraps RPC calls. The matching CORS controller was also exposed as JSON-RPC, which cannot return the streamed HTTP response correctly. Expose the CORS endpoint as an HTTP stream, route the embedded fetch call to it, and pass the livechat guest token explicitly. task-id-6201054
This update resolves an error that prevented users from canceling draft POS orders. The issue stemmed from a recent code change that incorrectly returned order data. The fix removes this problematic code, restoring the ability to cancel draft orders as intended.
Original PR description
Currently an error is generated when the user tries to cancel a draft POS order as follows: - Install the `pos_enterprise` module with demo data - Open the register of `Furniture store` and select…
Currently an error is generated when the user tries to cancel a draft POS order as follows: - Install the `pos_enterprise` module with demo data - Open the register of `Furniture store` and select any product - Click on the `Upload` icon to save the draft order and go to the backend. - Navigate Orders > Orders > open Draft order - Click the `cog` icon and click `Cancel Order` >>> Error occurs This issue is caused by the recent refactor introduced in [1]. The `action_pos_order_cancel` action now returns the `order` (`pos.order` recordset) instead of default returning `None`. As a result, the `action` variable contains a `pos.order` recordset, and an error is raised at line [2] when `setdefault` is called on it, since `setdefault` expects a dictionary-like object. This commit fixes the above issue by removing the code that returns the `pos.order` object from the action. As a result, the action now behaves as expected and returns the default value (`None`). [1]: https://github.com/odoo/enterprise/commit/27f57036a1d0468efe6e68d7aceafe0f01b21f93 [2]: https://github.com/odoo/odoo/blob/48f93ca056633bd5cba36b66ee1008fb57ca666c/addons/web/controllers/utils.py#L24 Sentry-7354160052
This update corrects a reporting issue in the Italian annual tax report. Previously, both positive and negative values for VL3/VL4 and VL32/VL33 were displayed, which was incorrect according to tax regulations. The fix ensures only the positive balance is shown, aligning with the required reporting format.
Original PR description
### Issue In the Italian annual tax report, both VL3/VL4 and VL32/VL33 values could be displayed at the same time However, according to the report logic, only the positive balance should be shown for…
### Issue In the Italian annual tax report, both VL3/VL4 and VL32/VL33 values could be displayed at the same time However, according to the report logic, only the positive balance should be shown for each pair: - VL3 (Tax Due) or VL4 (Tax Credit) - VL32 (Tax Due) or VL33 (Tax Credit) The other one should stay 0 If the global balance is null, both can be 0 ### Cause The lines VL3, VL4, VL32, and VL33 were using the shortcut field `aggregation_formula` directly on the `account.report.line` record This shortcut format does not evaluate or support conditional subformulas like `if_above(EUR(0))` As a result, the report computed and displayed both lines of each pair without filtering out the negative or unwanted values ### Steps to reproduce - Install `l10n_it` and `accountant` and switch to IT Company - Create a balanced Journal Entry for any account - Add the Tax Grid v20 on one of the lines to impact the annual report - Open the `Annual Tax Report (IT)` - Go to the `VL` section - Check the value of VL3/VL4 and VL32/VL33 After the fix, only one value can be positive and the other 0 Ticket [link](https://www.odoo.com/odoo/project.task/6212694) opw-6212694 Forward-Port-Of: odoo/odoo#264294
This update fixes a critical issue where users could accidentally add snoozed products to orders, leading to order inaccuracies. The changes now include warnings before adding snoozed items and improved detection across all POS and self-order flows, ensuring orders are built correctly and preventing user errors.
Original PR description
### Before this commit: - Snoozed products could still be selected from the product screen and combo configurator without any warning. - Users could add snoozed products to the order by mistake. - In self-order, snoozed products were still selectable in combo items. - Snooze checking was only based on product template id. For product variants (`product.product`), the `product_tmpl_id` was not checked. ### After this commit: - Add a `canAddProductToCurrentOrder` method to show a warning before adding a snoozed product. - Apply this check in the product screen and combo configurator. - Improve snooze detection by supporting both `product.template` and `product.product` (via `product_tmpl_id`). - In self-order, If a product is snoozed, show it as 'Out of stock'. - If a product is not available in self-order, do not show it in the list. - Fix the radio input attribute in the snooze dialog. Task:6012412
This update corrects a problem with Odoo's Mexican CFDI (electronic invoice) exports. Previously, cash rounding lines were incorrectly included, causing the XML to be rejected by tax authorities (SAT). The fix ensures that only the pre-rounding amounts are reported, complying with SAT regulations and preventing export errors.
Original PR description
When using the 'add_invoice_line' cash rounding strategy, Odoo adds a journal line with display_type='rounding'. This line has no product and therefore no ClaveProdServ, causing PAC to reject the XML with error 301. Per SAT regulations, cash rounding is not a valid CFDI concept. The CFDI must report the pre-rounding amounts (e.g. 99.80); the rounding difference (e.g. 0.20) belongs only in the journal entry on the accounting side. opw-6024078 Forward-Port-Of: odoo/enterprise#112633
This update fixes an issue where the calculation of the gross total on invoices with both line and global discounts was incorrect. The change ensures accurate gross total calculations, particularly when global discounts are applied, leading to more reliable invoice totals and improved financial reporting. This resolves a discrepancy impacting invoice accuracy.
Original PR description
Problem: When both line discounts and global discounts are applied on a product in an invoice, the method `_add_and_round_raw_gross_total_excluded_and_discount` does not return the exact…
Problem: When both line discounts and global discounts are applied on a product in an invoice, the method `_add_and_round_raw_gross_total_excluded_and_discount` does not return the exact raw_gross_total_excluded before the modification done by other AccountTax helper methods, such as dispatching and squashing global discount lines. Current Behavior: The calculation is done in the wrong order of operations. For example, there is an invoice for Product A valued at $100 with a discount of 10% and a global discount of $10. The raw_total_excluded will be $80 after the both discounts. The discount_factor is based on only the line discount of 10%. The formula of the current calculation for raw_gross_total_excluded is: (raw_total_excluded / (1 - (line_discount / 100))) - global_discount = (80 / 0.90) - (-10) = 98.889 This does not equal the expected outcome of $100. Expected Behavior: Based on the previous example, the formula for the calculation should be: (raw_total_excluded - global_discount) / (1 - (line_discount/100)) = (80 - (-10)) / 0.9 = 100 The global discount needs to be added back to the raw_total_excluded to get the line discounted amount in order to divide by the discount_factor to gain the expected raw_gross_total_excluded before taxes and discounts. Steps to reproduce the issue: - Bug was encountered when implementing a global discount solution for l10n_co_dian. - Create an invoice with a product line and in-line discount and another line for global discount - Setup the base lines for the invoice and attempt the following: - _dispatch_global_discount_lines - _squash_global_discount_lines - _add_and_round_raw_gross_total_excluded_and_discount opw-5412446 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#266584 Forward-Port-Of: odoo/odoo#262137
1 change
Resolved issues and error corrections
This update improves the accuracy of consolidated financial reports by ensuring that all accounts, even those without a direct code mapping, are included in the consolidation process. Previously, accounts lacking a code on the company selector were filtered out, leading to incorrect report totals. This fix ensures all relevant accounts are considered for consolidation, providing more reliable financial data.
Original PR description
When having an horizontal group with domain including two companies that share the same account codes, report lines with account codes engine don't display the two companies values when both are…
When having an horizontal group with domain including two companies that
share the same account codes, report lines with account codes engine
don't display the two companies values when both are selected in the
company selector.
Steps to reproduce:
- Install l10n_ch and create two CH companies (CH1 and CH2)
- Create an horizontal group with the field 'Company' and domain '["|",
("name", "=", "CH Company"), ("name", "=", "CH 2")]"
- Apply the Horizontal group to CH balance sheet report
- Select both companies in the company selector
- Open CH BS report and activate the horizontal group
-> Only the column of one company is filled
Fix:
https://github.com/odoo/enterprise/commit/9b775ed9d8b2a18e708219c72e95652571f3936a
was introduced in 19.0 to fix the same issue, we fix by backporting it
but we also need to backport this perf commit https://github.com/odoo/enterprise/commit/7da3123dc4487a7092deef8503a9791ceffddcfb
that refactored the code before in a first place
opw-6204601
Forward-Port-Of: odoo/enterprise#118544
Forward-Port-Of: odoo/enterprise#1171035 changes
Resolved issues and error corrections
This update fixes an issue where vendor bills weren't automatically attaching the embedded PDF from Peppol/UBL XML files received via email. The fix ensures that PDFs are correctly extracted and attached to vendor bills, streamlining invoice processing and improving data accuracy. This resolves a previous problem impacting invoice delivery.
Original PR description
When receiving a Peppol/UBL XML file containing an embedded PDF via an email alias, the PDF is not extracted and attached to the resulting vendor bill. Steps to reproduce: - Set up a BE Company - Configure an incoming mail server - Set up an email alias for the Vendor Bill journal - Receive a Peppol XML with embedded PDF via alias - Check the created Bill Issue: PDF has not been extracted from the xml This occurs because the received xml is set as main attachment for the record and in this case we skip extraction opw-6075250 Forward-Port-Of: odoo/odoo#262724 Forward-Port-Of: odoo/odoo#262047
This update corrects a reporting issue in the Italian annual tax report. Previously, both positive and negative tax values (VL3/VL4 and VL32/VL33) were displayed simultaneously. Now, only the positive balance is shown, ensuring accurate reporting according to Italian tax regulations.
Original PR description
### Issue In the Italian annual tax report, both VL3/VL4 and VL32/VL33 values could be displayed at the same time However, according to the report logic, only the positive balance should be shown for…
### Issue In the Italian annual tax report, both VL3/VL4 and VL32/VL33 values could be displayed at the same time However, according to the report logic, only the positive balance should be shown for each pair: - VL3 (Tax Due) or VL4 (Tax Credit) - VL32 (Tax Due) or VL33 (Tax Credit) The other one should stay 0 If the global balance is null, both can be 0 ### Cause The lines VL3, VL4, VL32, and VL33 were using the shortcut field `aggregation_formula` directly on the `account.report.line` record This shortcut format does not evaluate or support conditional subformulas like `if_above(EUR(0))` As a result, the report computed and displayed both lines of each pair without filtering out the negative or unwanted values ### Steps to reproduce - Install `l10n_it` and `accountant` and switch to IT Company - Create a balanced Journal Entry for any account - Add the Tax Grid v20 on one of the lines to impact the annual report - Open the `Annual Tax Report (IT)` - Go to the `VL` section - Check the value of VL3/VL4 and VL32/VL33 After the fix, only one value can be positive and the other 0 Ticket [link](https://www.odoo.com/odoo/project.task/6212694) opw-6212694 Forward-Port-Of: odoo/odoo#264294
This update resolves an issue where branch users without access to a parent company couldn't create transactions in the parent company's currency. The fix ensures accurate currency conversion by temporarily elevating permissions during the transaction process, allowing branch users to manage transactions in parent company journals.
Original PR description
**Problem:** When a branch user with no access to the parent company tries to create a transaction for a parent company's journal with a foreign currency set, this will raise an access error. **Steps…
**Problem:** When a branch user with no access to the parent company tries to create a transaction for a parent company's journal with a foreign currency set, this will raise an access error. **Steps to Reproduce:** - Make a branch of "My Company (San Francisco)" - Set user "Marc Demo" to only have access to the branch - Add a new bank journal set to "EUR" currency - Switch to Marc Demo - Try to add a transaction in the new bank journal **Root Cause:** When a transaction is created, Odoo determines the amount in company currency by converting it from the foreign currency. The method to convert currency uses "with_company()" to use the company's rates, but the allowed companies of the branch user does not have access to the parent company, causing an access error. **Solution:** Call the currency conversion with sudo() to ensure access to the relevant companies. Ticket [link](https://www.odoo.com/odoo/project.task/6186901) opw-6186901 Forward-Port-Of: odoo/odoo#263668 Forward-Port-Of: odoo/odoo#263425
This update resolves an issue where orders placed via mobile self-order with 'Pay After Meal' and online payment were not being sent to the kitchen for preparation. The fix ensures that all orders, regardless of payment type, are now correctly displayed in the Preparation Display, improving order flow and kitchen efficiency. This impacts Restaurant and Self-Order modes.
Original PR description
pos* = pos_self_order_preparation_display, pos_online_payment_self_order_preparation_display Configuration: -------------- - Restaurant Mode - Self-Order Mode: "QR + Ordering" - Service At: Table - Pay after meal (Online Payment) Issue: ------ Orders created via mobile self-order using "Pay After Meal" + online payment were not appearing in the Preparation Display. Steps to Reproduce: ------------------- 1. Create an order from mobile self-order. 2. Open the restaurant POS, the order is visible there, but it does not appear on the preparation display. Cause: --------------- - The system only sent paid orders to the kitchen when online payment is set, skipping pay-after-meal case. Fix: ------------ - Updated logic to send all orders to the kitchen when “Pay After Meal” is selected, Task: 5929555
This update resolves a critical issue that caused OOM crashes when generating the Swedish SIE 4 report with large datasets. By optimizing the database query and using efficient data processing techniques, the report now runs significantly faster and uses far less memory, improving overall system performance.
Original PR description
### Description of the issue/feature this PR addresses: Prevent Out of Memory (OOM) crashes and drastically improve execution speed when generating the Swedish SIE4 verification export for massive…
### Description of the issue/feature this PR addresses: Prevent Out of Memory (OOM) crashes and drastically improve execution speed when generating the Swedish SIE4 verification export for massive datasets. ### Current behavior before PR: When exporting a large volume of journal entries (e.g., 190,000+ account moves), the `_export_l10n_se_sie4_verification` method relies on iterating through heavy ORM recordsets and accessing relational child fields (move.line_ids) inside a loop. This triggers a severe N+1 query problem, maxing out server RAM and causing an OOM crash. ### Desired behavior after PR is merged: The method now utilizes a hybrid data extraction approach: - The ORM is used strictly to safely evaluate domains (multi-company rules, dates, states) and fetch a lightweight list of valid move_ids. - A single SQL query with JOIN statements fetches all parent moves, child lines, and account codes in exactly one database query. - itertools.groupby chunks the flat, lightweight dictionary results back into their respective journal entries. The export now handles massive datasets in seconds with minimal memory overhead, while remaining perfectly secure. ### Benchmark: For Memory: | # Input Data | Before PR | After PR | | -------- | -------- | -------- | | ~190,000 moves | MemoryError | 407MB| | ~200,000 moves | 1.8GB | 174.8 MB| For Speed: | # Input Data | Before PR | After PR | | -------- | -------- | -------- | | ~190,000 moves | MemoryError | 5.10s | | ~200,000 moves | 1m29s| 5.3s| ### Reference: opw-6067999 Forward-Port-Of: odoo/enterprise#117577 Forward-Port-Of: odoo/enterprise#113227
3 changes
Resolved issues and error corrections
A recent update caused the Helpdesk Kanban view to crash. This fix removes a lingering reference to a previously removed color field, resolving the instability. This ensures the Kanban view functions reliably for users.
Original PR description
Steps to Reproduce: - Open Helpdesk app. - Open Helpdesk Stages from configurartion. - Switch to Kanban view. Issue: - View crashes. Reason: - Residual usage of color field which removed in https://github.com/odoo/enterprise/pull/105595 is being used in kanban highlight color. Fix: - Remove the kanban highlight color attribute. task-5485507
This update resolves inconsistencies in the demo data for the sales commission module, specifically related to date calculations. Previously, the demo data would fail to load correctly depending on when the module was installed, leading to inaccurate reporting. This fix ensures the demo data always functions as expected, providing reliable demonstration of the module's features.
Original PR description
Before this commit, issue could be observed with demo data sometimes: - If the module was installed on the 31th of decembre --> the date_from of the second sale.commission.plan.user would start after the date_to of the plan, causing an error. - If the module was installed on the first of January --> the date_to of the first period would be the 28th of February, which does not correspond to the end of the first quarter. It is possible to reproduce the issue with faketime: faketime "2027-01-01 23:59 UTC" ./odoo-bin -c ../launch.conf -d post -i sale_commission runbot-939060
A crash in the template editor within Odoo 19.4 has been resolved. The issue occurred when users navigated back to the template list after editing a template, resulting in a blank screen. This fix ensures proper state cleanup during editor closure, improving stability and preventing disruptions for users.
Original PR description
Version: - saas 19.4 Steps to reproduce: - Open a template in the template editor - Click the Templates button to go back to the template list Issue: Clicking the Templates button while in the template editor caused a blank screen and a js crash due to incorrect state cleanup when the editor was closing. Fix: Fixed the crash by correctly clearing the editor state through the parent component instead of directly writing to a prop when the template editor closes. taskid - 6247092
4 changes
Resolved issues and error corrections
This update automatically adds the staff user to appointment attendee lists when creating new appointments through the Gantt view. Previously, staff members weren't automatically included, requiring manual addition. This change improves the user experience by streamlining appointment creation and ensuring staff are always part of the meeting.
Original PR description
### Steps to reproduce: - Install 'Appointment' app - Configure an Appointment Type with your user as staff member - Go to the Appointments Gantt view - Click on the 'New' button to create a new appointment > The staff member is not automatically added to the meeting's attendees (guests) list. ### Cause of Issue: When generating the default values for a new calendar event from the Gantt view (indicated by `booking_gantt_create_record` in the context), the base `default_get` method doesn't account for auto-adding staff members in obvious cases (when there's only one staff member available or the current user is one of the staff). ### Fix: Override `default_get` in `calendar.event` to automatically add these staff members when they are the only available option, providing a smarter and more seamless UX. opw-6181794
This update resolves an issue where appointment scheduling displayed 'no slots available' for future-starting appointments. The fix accurately calculates the displayed month based on the appointment's start date, ensuring correct slot availability is shown in the calendar. This improves the user experience for scheduling appointments that begin in a later month.
Original PR description
The "show only 1 month at a time" optimization computes the navigated month as datetime.now() + month_id, so the controller passes that (month, year) tuple to _get_appointment_slots:…
The "show only 1 month at a time" optimization computes the navigated month as datetime.now() + month_id, so the controller passes that (month, year) tuple to _get_appointment_slots: https://github.com/odoo/enterprise/blob/57ec37b74a60c7e879a8afa66df5ab22a92c5bcd/appointment/models/appointment_type.py#L833 For a punctual appointment whose Allow Bookings range starts in a future month, the first displayed month is start_datetime.month, so the (month, year) tuple doesn't match the month the visitor is looking at. The model fills an empty month and the recovery loop refills the first displayed month (where slots actually live): https://github.com/odoo/enterprise/blob/57ec37b74a60c7e879a8afa66df5ab22a92c5bcd/appointment/models/appointment_type.py#L973-L988 The calendar the visitor just navigated to comes back empty. Compute the navigation base from start_datetime when it lies in the future and keep datetime.now() otherwise. month_id is added on top of that base so it always matches the displayed month index. Introduced by https://github.com/odoo/enterprise/commit/664857dd2c4ae2bc0dde8f44cb94136659ed2fe2 Steps to reproduce: 1. Open the Appointments app 2. Open an appointment type and set Schedule to Weekly and Allow Bookings to On specific dates with a range starting in a future month (for example 1 September to 31 December) 3. Save and click the Preview button in the header 4. Pick a staff member to reach the calendar 5. Click the right arrow to navigate to the next month => the next month shows "Sorry, we have no more slots available for this month" opw-6206293
This update fixes an issue where global invoices created after a POS order at the end of the month were incorrectly displaying the following month. The system now accurately converts POS order dates to the correct Mexican timezone, ensuring invoices reflect the accurate order date and month.
Original PR description
**PROBLEM** When creating a global invoice, with the last order being at the end of the last day of the month, the month of the global invoice will not be correct. (e.g, order made at the end of May and global invoice created for June). date_order is stored in utc. To compute the day the order was made, we need to convert to a MX timezone. **STEP TO REPRODUCE** 1. Create an pos order at the end of the last day of a month (for example, at 10PM in local MX time). 2. Create a global invoice with this order. 3. Notice the global invoice month will be the month after the one of the order. opw-6221049 Forward-Port-Of: odoo/enterprise#118170
This update fixes a potential issue where users could incorrectly select inactive Intrastat codes when configuring products. The system now displays a warning message if an inactive code is chosen, ensuring data accuracy and preventing incorrect reporting. This improves data integrity for Intrastat compliance.
Original PR description
Problem: When choosing an intrastat code on a product, all the codes are shown, even the ones that are expired or not yet active. Users can select an intrastat code that is not active. Steps to reproduce: 1. Check the intrastat code list and find a code with a start date in the future or an expiry date in the past 2. Note the code description 3. Open a product form view and try to set/change the intrastat code 4. Search for the code description noted in step 2 5. Note that the code is proposed while it should not be proposed Solution: When an intrastat code is selected, if the code is not active, a warning message is shown to the user. opw-6217915 Forward-Port-Of: odoo/enterprise#118569 Forward-Port-Of: odoo/enterprise#117884
6 changes
Resolved issues and error corrections
This update resolves an issue where VeriFactu invoices were failing due to an error when using prefixes or suffixes on the invoice sequence. The fix now gracefully handles these cases, preventing crashes and guiding users to remove the prefix/suffix for successful invoice generation. This ensures VeriFactu integration continues to function smoothly.
Original PR description
**Steps to reproduce:** 1. Install l10n_es_edi_verifactu. 2. Switch to a ES company. 3. Create a customer invoice and send it to VeriFactu. 4. Enable Developer Mode. 5. Go to Settings > Technical >…
**Steps to reproduce:** 1. Install l10n_es_edi_verifactu. 2. Switch to a ES company. 3. Create a customer invoice and send it to VeriFactu. 4. Enable Developer Mode. 5. Go to Settings > Technical > Sequences & Identifiers > Sequences. 6. Search for the `Sequence Code: l10n_es_edi_verifactu` and open it. 7. Set a prefix or suffix using any alphabetical character. 8. Create a new invoice and send it to VeriFactu **Issue:** Traceback on sending Veri*Factu: `ValueError: invalid literal for int() with base 10: 'F260001'` **Cause:** The value returned by `ir.sequence.next_by_id()` may contain alphabetical characters (due to prefix/suffix), while the field `chain_index` expects an integer. The raw sequence value was directly assigned, causing the conversion to fail. **Fix:** Catch the ValueError raised by int() when the sequence value contains non-numeric characters (e.g. due to a prefix/suffix). Instead of crashing, surface a user-friendly error on the document telling the user to remove the prefix/suffix from the sequence configuration. **opw-6037528**
The Point of Sale receipt now accurately displays the change amount as a positive value instead of a negative one. This change was made to ensure customers receive correct information about their refunds and improve the overall customer experience. The issue was resolved by removing an unnecessary negation step in the receipt printing process.
Original PR description
**Issue:** The printed receipt in Point of Sale displayed a negative change amount when the customer paid more than the order total. **Before:** The receipt showed the change as a negative value…
**Issue:** The printed receipt in Point of Sale displayed a negative change amount when the customer paid more than the order total. **Before:** The receipt showed the change as a negative value (e.g., `-$5,504.00`), which was misleading for customers. **After:** The receipt now correctly displays the change as a positive value (e.g., `$5,504.00`). **Steps to Reproduce:** 1. Open a Point of Sale session 2. Add products to the cart (example total: `$49,496.00`) 3. Select the **Cash** payment method 4. Enter an amount greater than the order total (example: `$55,000.00`) 5. Observe that the **Change** field displays a negative value 6. Confirm the payment 7. Print the receipt and observe that the change amount is also negative **Root Cause:** The issue was caused by an unnecessary negation in the `export_for_printing()` method in `pos_order.js`. The `get_change()` method already returns the correct positive change amount. However, the code applied an extra negation (`-this.get_change()`), which converted the value into a negative amount before rendering it on the receipt. **Fix:** Removed the unnecessary negation in `export_for_printing()` so the receipt now displays the correct positive change amount. Video reproducing the issue: [[Click here to view the video](https://drive.google.com/file/d/1QnQ47qlTFvv98K0J_NzreBVeIh-J2XcF/view?usp=sharing)] opw-6211988 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves an issue in the Italian annual tax report where both positive and negative values for VL3/VL4 and VL32/VL33 were displayed simultaneously. The fix ensures that only the positive balance is shown for each pair, aligning with tax reporting logic and improving report accuracy. This change impacts the Italian tax reporting process.
Original PR description
### Issue In the Italian annual tax report, both VL3/VL4 and VL32/VL33 values could be displayed at the same time However, according to the report logic, only the positive balance should be shown for…
### Issue In the Italian annual tax report, both VL3/VL4 and VL32/VL33 values could be displayed at the same time However, according to the report logic, only the positive balance should be shown for each pair: - VL3 (Tax Due) or VL4 (Tax Credit) - VL32 (Tax Due) or VL33 (Tax Credit) The other one should stay 0 If the global balance is null, both can be 0 ### Cause The lines VL3, VL4, VL32, and VL33 were using the shortcut field `aggregation_formula` directly on the `account.report.line` record This shortcut format does not evaluate or support conditional subformulas like `if_above(EUR(0))` As a result, the report computed and displayed both lines of each pair without filtering out the negative or unwanted values ### Steps to reproduce - Install `l10n_it` and `accountant` and switch to IT Company - Create a balanced Journal Entry for any account - Add the Tax Grid v20 on one of the lines to impact the annual report - Open the `Annual Tax Report (IT)` - Go to the `VL` section - Check the value of VL3/VL4 and VL32/VL33 After the fix, only one value can be positive and the other 0 Ticket [link](https://www.odoo.com/odoo/project.task/6212694) opw-6212694 Forward-Port-Of: odoo/odoo#264294
This update resolves an issue where clicking outside a table while in transfer mode incorrectly canceled order transfers. Previously, the system would silently transfer orders after a misclick, leading to a confusing user experience. Now, the transfer listener is removed immediately when transfer mode ends, ensuring clicks outside a table truly cancel the action.
Original PR description
Description of the issue/feature this PR addresses: In pos_restaurant, the document click listener used for table transfer is only removed on the success path, leaking on misclick. Regression from [29d06d76889c](https://github.com/odoo/odoo/commit/29d06d76889c) Current behavior before PR: Cashier hits Transfer / Merge, clicks somewhere that isn't a table: the "transfer ongoing" banner disappears, so the action looks cancelled. Any later click on a table silently transfers the order to it. Nasty on floorplans with many tables. Desired behavior after PR is merged: removeEventListener fires as soon as transfer mode exits, regardless of whether the click hit a table. Misclick truly cancels; cross-floor transfer (via .button-floor) still works --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update fixes an issue where the payment link wizard's copy button would overflow on smaller mobile screens. The button's long label caused it to extend beyond the available space, making it appear partially hidden. This change ensures the button fits correctly within the mobile view, improving usability.
Original PR description
Description of the issue/feature this PR addresses: The payment link wizard copy button can overflow horizontally on small screens because of its long label. Current behavior before PR: On mobile view, the copy button may appear partially hidden. Desired behavior after PR is merged: The payment link wizard copy button properly fits within the available width on mobile view. Before: <img width="514" height="667" alt="image" src="https://github.com/user-attachments/assets/9060bf5a-9590-47a6-b322-220ed0a871be" /> After: <img width="514" height="667" alt="image" src="https://github.com/user-attachments/assets/3b257e73-3744-4236-b28c-bad1a46ca92d" /> @Tecnativa TT58871 @CarlosRoca13 please review --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves an issue where the inventory counting barcode app would fail when using archived units of measure. The fix ensures that archived UOMs are correctly loaded into the inventory count cache, allowing accurate barcode scanning and count operations. This improves the reliability of physical inventory processes.
Original PR description
### Steps to reproduce: - In the settings enable: "Units of Measure & Packagings", "Storage Locations" - Create a product in units and register 1 unit in stock - Inventory > Operations > Adjustments…
### Steps to reproduce: - In the settings enable: "Units of Measure & Packagings", "Storage Locations" - Create a product in units and register 1 unit in stock - Inventory > Operations > Adjustments > Physical Inventory - Select your line and request a count > Set Current Value - Inventory > Configurations > units of measures > UOM categories - Select unit and archive it - Go to the barcode app > Click Count inventory ### > Owl error: Uncaught promise ### Cause of the issue: Since the uom used on the quant is archived, it is not found by the search used to fill the barcodeCache: https://github.com/odoo/enterprise/blob/26546bcd3beebc7f65ce08385441b6284b46598e/stock_barcode/static/src/components/main.js#L209-L213 https://github.com/odoo/enterprise/blob/26546bcd3beebc7f65ce08385441b6284b46598e/stock_barcode/models/stock_quant.py#L104-L106 https://github.com/odoo/enterprise/blob/26546bcd3beebc7f65ce08385441b6284b46598e/stock_barcode/static/src/components/main.js#L229 https://github.com/odoo/enterprise/blob/26546bcd3beebc7f65ce08385441b6284b46598e/stock_barcode/static/src/models/barcode_model.js#L37-L39 However, if the uom is not present in the barcode cache the `BarcodeQautnModel` will fail to createLinesState whihc raises a missing error: https://github.com/odoo/enterprise/blob/26546bcd3beebc7f65ce08385441b6284b46598e/stock_barcode/static/src/models/barcode_quant_model.js#L712 https://github.com/odoo/enterprise/blob/26546bcd3beebc7f65ce08385441b6284b46598e/stock_barcode/static/src/lazy_barcode_cache.js#L107-L110 opw-6250090
4 changes
Resolved issues and error corrections
This update resolves an issue where the Profitability report's Cost of Goods Sold dashboard didn't display correctly when multiple invoices were associated with a project. The fix ensures that all related journal entries are accurately reflected, regardless of the number of invoices generated.
Original PR description
Steps to reproduce: ------------------- 1. Install `sale_project_stock` and Accounting. 2. Create a storable product with **Real-time valuation** and configure the COGS account in the product…
Steps to reproduce: ------------------- 1. Install `sale_project_stock` and Accounting. 2. Create a storable product with **Real-time valuation** and configure the COGS account in the product category expense account. (Ensure you have enabled automatic & analytic accounting from accounting>config.) 3. Create a project with a specific analytic account and ensure the project is billable. 4. Create a sale order with the created product and set the same analytic account in the analytic distribution. 5. Confirm the order, deliver the product, generate the invoice, and post it. 6. Open the project and go to the *Profitability* report. 7. Click on the **Cost of Goods Sold** dashboard item. 8. Repeat steps 4–7 with multiple invoices. Issue: ------ When there is only one invoice, clicking the COGS dashboard item correctly displays the related move lines. However, when there are multiple invoices, the action opens with empty results. Cause: ------ `_get_action_for_profitability_section` sets `res_id` only when a single record exists. When multiple records are present, `res_id` becomes `False`, which causes the action to open without results. https://github.com/odoo/odoo/blob/8f79d407724f40ba8e48f1747b2e87311b7fb49e/addons/project_account/models/project_project.py#L78-L83 Solution: --------- When `res_id` is not set, search `account.move` records using the domain to retrieve the relevant move IDs, then apply a proper domain to display all related COGS journal items. opw-5949261 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves an issue where importing Peppol/UBL XML files with multiple embedded PDFs resulted in PDFs being split into separate invoices. The fix adjusts the system's sorting logic to ensure all embedded PDFs are correctly included within the primary invoice. This improves the accuracy of invoice data during import.
Original PR description
When importing a Peppol/UBL XML file containing multiple embedded PDFs the first PDFs is extracted in the same invoice, all the other in separate documents. Steps to reproduce: - Set up a BE Company - Import a Peppol XML with multiple embedded PDF - Check the created Bills Issue: First embedded PDF is extracted in the bill along with the source XML. Other documents are expanded in separate Bills. This occurs because the sort weight of the additional embedded document is the same, causing the system to separate them from the main invoice. opw-6231265
This update corrects a bug where non-purchasable products were incorrectly displayed when searching using vendor product codes. The fix ensures that the system properly ignores the 'can be purchased' setting during these searches, preventing inaccurate results and improving the accuracy of vendor-based product lookups.
Original PR description
**Issue**: Non-purchasable products can still be found when searching using a vendor product code. **Steps to reproduce**: - Create a product - Add a vendor with a vendor product code (use a code…
**Issue**: Non-purchasable products can still be found when searching using a vendor product code. **Steps to reproduce**: - Create a product - Add a vendor with a vendor product code (use a code that does not match any product name) - Untick the "can be purchased" box - Create a PO with the same vendor - Search for product using the vendor product code -> The product can be found while not purchasable **Cause**: While searching for a product, `_name_search` is called: https://github.com/odoo/odoo/blob/2083a2515c2855dd53991cbcc6e8b43c3e7f0256/addons/product/models/product_product.py#L543 If no product is found (which is very likely since we use vendor product code): https://github.com/odoo/odoo/blob/2083a2515c2855dd53991cbcc6e8b43c3e7f0256/addons/product/models/product_product.py#L580-L581 Then check all the vendor list associated to the vendor product code (`product_code`) and extract the associated product: https://github.com/odoo/odoo/blob/2083a2515c2855dd53991cbcc6e8b43c3e7f0256/addons/product/models/product_product.py#L582-L588 However, this fallback search does not reuse the original `domain`: https://github.com/odoo/odoo/blob/2083a2515c2855dd53991cbcc6e8b43c3e7f0256/addons/product/models/product_product.py#L543 therefore conditions such as `purchase_ok = True` are ignored. **Solution** Backport the fix from this commit: https://github.com/odoo/odoo/commit/c2d47b976d1ac0eba6bd16add3d54f84e5e2d3d3. And in particular: https://github.com/odoo/odoo/blob/299b3b833a2198c6814141c037a9bd6c69f14ee3/addons/product/models/product_product.py#L647-L648 opw-6214085
This update fixes an issue where taxes weren't correctly applied when using amount discounts on sales orders. The fix backports a previous resolution, ensuring that taxes are now accurately calculated and reflected on discounts, improving sales reporting and financial accuracy. This resolves a reported problem (opw-6219611) impacting sales order processing.
Original PR description
Issue: --- Tax is not mapped on amount discount line. To reproduce: 1- Create a SO. 2- Add a SOL with a tax. 3- Add a Fixed-Amount discount. As you see, no tax is mapped. This fix is a backport of the 4ea8e9f7d4755107df9a31b66ef09a75e9593b16. opw-6219611