Daily updates from Odoo
Friday, May 29, 2026
22 changes · saas-18.3
Resolved issues and error corrections
This update fixes an issue where the pension fund tax was incorrectly applied to all invoice lines with the same VAT rate, leading to inaccurate accounting. The fix now correctly extracts the tax exemption reason from the XML data to ensure the pension fund tax is applied accurately to the first invoice line.
Original PR description
In `l10n_it_edi` vendor bill import, the pension fund tax was incorrectly applied to all invoice lines sharing the same VAT rate, even though they have different `l10n_it_tax_exemption_reason`s, resulting in wrong entries and document total. We now extract the Tax Exemption reason from the `DatiCassaPrevidenziale` node, and use it to search the correct tax. Steps to reproduce: 1. Install `account` and `l10n_edi_it` 2. In the `4% INPS` tax, set `TC22` in pension fund type and `N2.2` in exoneration 3. Import bill from the ticket 4. See the pension fund tax is applied to all the lines. It should only be applied only to the first one. Ticket [link](https://www.odoo.com/odoo/project.task/6212975) opw-6212975 Forward-Port-Of: odoo/odoo#265821
This update fixes an issue where payments for Mexican invoices were being sent to CFDI multiple times, leading to inaccurate reporting. The fix ensures the 'Update Payments' button only appears after the invoice payment is fully reconciled, preventing duplicate submissions and maintaining accurate financial records.
Original PR description
Issue: Sending payments to SAT before its full amount is reconciled allow sending the same invoice payment several times to CFDI. Steps to reproduce: - In a Mexican company - Create an invoice A of…
Issue: Sending payments to SAT before its full amount is reconciled allow sending the same invoice payment several times to CFDI. Steps to reproduce: - In a Mexican company - Create an invoice A of $40 to Inmobiliaria CVA - Confirm and send to CFDI - Go to bank, create a new Bank transaction of $80 - reconcile with Invoice A - Go to invoice A => click on button "Update payments" (it doesn't appear in previous versions) - Then sheet CFDI and Download There is the first XML sent to CFDI with payment for invoice A - Create an invoice B of $40 to Inmobilira CVA - Confirm and send to CFDI - reconcile the transaction with Invoice B - Go to invoice B - Click on button "Update payments" - Then sheet CFDI and Download There is the second XML sent to CFDI with payment for invoices A and B Invoice A payment was sent twice to CFDI Expected behavior: - The "Update payment" button should appear only once the invoice payment is fully reconciled. Current behavior: - The update payment button appear once the invoice is reconciled with a payment. The method `_l10n_mx_edi_cfdi_invoice_get_payments_diff` is called twice, once to check whether it's needed to display the "Update button" and once when you try to update the payment (called only after clicking on said button). opw-5432421
This update resolves an issue where Odoo failed to import simplified Italian electronic invoices (TD08) when a line consisted entirely of taxes. The fix prevents a division-by-zero error, ensuring that valid tax-only EDI documents from the Italian tax authority (Agenzia delle Entrate) can now be successfully imported. This improves the reliability of invoice processing for Italian businesses.
Original PR description
### Issue before this commit: Importing a simplified Italian electronic invoice or credit note (e.g., TD08) fails with a float division by 0 traceback if a document line consists entirely of taxes…
### Issue before this commit: Importing a simplified Italian electronic invoice or credit note (e.g., TD08) fails with a float division by 0 traceback if a document line consists entirely of taxes (where the total line amount equals the tax amount). ### Steps to reproduce the issue: 1. Download Accounting and l10n_it 2. Switch to IT company 3. Go to Vendors > Refunds 4. Try to import the xml from the ticket ### Cause of the issue: The XML parser attempts to dynamically calculate the tax percentage using the formula tax_amount / (amount - tax_amount). When a line is purely a tax adjustment, the taxable base (amount - tax_amount) evaluates to exactly zero, triggering the critical division by zero crash. https://github.com/odoo/odoo/blob/e3b0ca11d99b2ef819cdad68b169112cd73668b6/addons/l10n_it_edi/models/account_move.py#L1863-L1867 ### Reason to introduce the fix: To ensure Odoo successfully imports valid, tax-only EDI documents already accepted by the Agenzia delle Entrate. Ticket [link](https://www.odoo.com/odoo/project.task/6217373) opw-6217373 Forward-Port-Of: odoo/odoo#266930 Forward-Port-Of: odoo/odoo#266374
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 order's true date and preventing month discrepancies.
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 an issue where commission plans were incorrectly shown in a salesperson's 'Other Plans' list even when their assignment periods didn't overlap. The system now accurately checks for overlapping assignment dates, ensuring that only relevant plans are displayed, improving the accuracy of commission reporting.
Original PR description
Version - 18.0 Steps to reproduce: 1. Create a commission plan A with effective period 2025–2026 2. Assign salesperson to plan A from 01/01/2025 to 31/12/2025 3. Create another commission plan B with effective period 2026 4. Assign the same salesperson to plan B from 01/01/2026 to 31/12/2026 5. Open plan B and check the 'Other Plans' section in the salespeople tab Issue: Plans are shown in 'Other Plans' even when salesperson assignment periods do not overlap. System incorrectly relies on plan effective dates instead of salesperson-specific assignment dates Fix: A plan is now considered overlapping only if the salesperson assignment periods intersect. Non-overlapping plans are properly excluded from 'Other Plans'. Taskid-6055253 Forward-Port-Of: odoo/enterprise#118559 Forward-Port-Of: odoo/enterprise#112694
This update resolves an issue where Odoo Enterprise would generate a traceback when attempting to mark workorders as done in scenarios with no open workorders. The fix ensures the system handles empty recordsets gracefully, preventing errors and maintaining stability.
Original PR description
When calling on a empty recordset action_mark_as_done, it creates a traceback. **Observation** When calling action_mark_as_done, the method first loops over each workorder to perform various safety…
When calling on a empty recordset action_mark_as_done, it creates a traceback. **Observation** When calling action_mark_as_done, the method first loops over each workorder to perform various safety checks, and then calls button_finish to close all workorders: https://github.com/odoo/enterprise/blob/24008b550c5e7cf04cde2028c40f8a32d5b0e504/mrp_workorder/models/mrp_workorder.py#L881-L888 Inside button_finish, it retrieves all open workorders and marks them as done: - Retrieve open workorders: https://github.com/odoo/odoo/blob/36a1c6300f52f408b6af3f769e26686e07810e5a/addons/mrp/models/mrp_workorder.py#L659 - mark them as done: https://github.com/odoo/odoo/blob/36a1c6300f52f408b6af3f769e26686e07810e5a/addons/mrp/models/mrp_workorder.py#L675-L678 Returning to action_mark_as_done, it attempts to set the state to 'done' on the last workorder outside of the loop, referencing the loop variable: https://github.com/odoo/enterprise/blob/24008b550c5e7cf04cde2028c40f8a32d5b0e504/mrp_workorder/models/mrp_workorder.py#L894 -> If self is empty, the loop never executes. This leaves the loop variable empty, which ultimately triggers a traceback. opw-6239910 Forward-Port-Of: odoo/enterprise#118403
This update ensures that General Ledger exports accurately reflect search filters applied in the user interface. Previously, the export didn't consistently include all accounts matching the search criteria due to a difference in how the UI and backend search functions were implemented. This change aligns the export with the standard account search behavior, providing more reliable reporting.
Original PR description
When applying a search filter in the General Ledger, the lines displayed in the UI differ from the ones exported. The discrepancy comes from the fact that the UI search bar filters lines using a simple "contains" logic on the displayed line name, while the backend export relies on the account model’s `_name_search` behavior, just as in the chart of accounts. For example, searching for "40" displays the accounts 400000, 400010, and 124000 but the last one (124000) is not is in the export results. task: 5917435 Forward-Port-Of: odoo/enterprise#117002 Forward-Port-Of: odoo/enterprise#107928
This update prevents a critical error during bill matching in Odoo when no new purchase order lines need to be added. Previously, attempting to match a 'Posted' bill with zero residual lines would trigger a system error. Now, the system correctly handles this scenario, ensuring smooth bill matching and preventing data inconsistencies.
Original PR description
**Description of the issue/feature this PR addresses:** This PR fixes an "Invalid Operation" UserError during the Bill Matching process. The error occurs when Odoo attempts to call the line addition…
**Description of the issue/feature this PR addresses:** This PR fixes an "Invalid Operation" UserError during the Bill Matching process. The error occurs when Odoo attempts to call the line addition method on a Posted Vendor Bill, even when there are no new residual lines to add. This triggers a write attempt on read-only fields (such as invoice_line_ids) of a validated account move, which is prohibited by Odoo’s ORM. Furthermore, this addresses a functional inconsistency: Odoo allows users to select "Posted" bills in the matching view, but the underlying code is not prepared to handle a "zero residual" scenario on a validated move. If Odoo intends to prevent matching on posted bills, they should be filtered out from the view; since they are available to select, the system must be able to process them when no further modifications to the accounting entries are required. **Current behavior before PR:** When performing a match between a posted Vendor Bill and Purchase Order lines where the "residual" (lines left to add) is zero: The system executes _add_purchase_order_lines() regardless of whether the recordset of lines is empty. Odoo's ORM detects an update attempt on a posted record. A UserError is raised: "You cannot modify the following readonly fields on a posted move: invoice_line_ids". This blocks the user from completing the matching process even if the lines are already technically accounted for. **Desired behavior after PR is merged:** The system will check if residual_purchase_order_lines contains any records before attempting to update the bill. If there are no lines to add, the method call is skipped. The matching process completes successfully without attempting an illegal write on a posted move. **Steps to Reproduce** 1) Create a Purchase Order (PO): Add a product (e.g., "Acoustic Bloc Screens") and confirm the order. 2) Create a Vendor Bill manually: Do not use the "Create Bill" button from the PO. Instead, go to Accounting -> Vendors -> Bills and create a new bill for the same vendor and product. 3) Post the Bill: Set a bill date and click Confirm to move it to the "Posted" state. 4) Open Bill Matching: Go back to the Purchase Order and click the Bill Matching button (or navigate to the matching view). 5) Select Lines: Select the PO line and the corresponding Bill line (which are already equal in quantity/price). 6) Trigger the Match: Click on the Match button. Observe Error: An "Invalid Operation" popup appears, preventing the link because Odoo tries to "add" zero lines to a posted invoice. **Video:** https://drive.google.com/file/d/12aeZIx1JRRSKA9TaWfXy0TeSOgMUMQcg/view --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#241171
This update resolves a bug where formatting applied to inline code selections (like bold or italics) couldn't be consistently removed. The fix ensures that formatting nodes are correctly considered when checking for existing formatting, leading to accurate removal of applied styles. This improves the user experience when working with inline code within the To-Do module.
Original PR description
Problem: When selecting text containing `o_inline_code` and applying formatting such as bold, italic, or underline, the formatting cannot be removed. Cause: When applying formatting, nodes matching…
Problem: When selecting text containing `o_inline_code` and applying formatting such as bold, italic, or underline, the formatting cannot be removed. Cause: When applying formatting, nodes matching `is_formattable_node_predicates` are ignored. However, when checking whether the selection is already formatted, those nodes are not ignored, so the selection is erroneously considered to be only partially formatted. Solution: Take `is_formattable_node_predicates` into account when checking whether a selection is formatted. Steps to reproduce: - Go to To-Do → Create New. - Type some text and add inline code on the same line. - Select all content using Ctrl + A. - Apply formatting such as bold, italic, or underline using keyboard shortcuts (Ctrl + B / Ctrl + I / Ctrl + U). - Press the same shortcut again to remove the formatting. - Observe that the formatting is not removed. task-6229228 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#265183
A recent test failure in the link tracker module was resolved by correcting a logic error. The fix ensures that searches for short URLs with overlapping code patterns (like 'b') return the correct, distinct links. This prevents duplicate results and improves the accuracy of link searches.
Original PR description
Problem ------ The test was trying to search for links that has specific code patterns in their short_url and distinguish links using this logic. However, it did not consider the case where the same code pattern might exist in two different urls. i.e `example/r/AbC` and `example/r/DbE` both contains `b`, so when searching for `b`, both urls will be returned. FIX ------ Testing the search on different code combinations for the short_url is not the subject of that unit test, it is sufficient to search for the exact codes and see if there are conflicting results. task-6254039 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves an issue where a test in the account_payment module was unreliable due to dependencies on a module not always present. The test has been updated to use a more direct method, ensuring consistent and predictable results. This improves the overall stability of our payment processing tests.
Original PR description
The set_line_bank_statement_line method is defined in account_accountant, meaning we can't use it in account_payment as it will automatically break if enterprise is not installed. Replace it with direct call to _get_partial_amounts, which is the purpose of this test anyway. runbot-939260
This update keeps a previously removed setting in Odoo, allowing a warning message to be displayed during AI development. This change was necessary due to limitations in earlier versions of Odoo and ensures continued monitoring for potential issues. It's a minor adjustment to support ongoing development.
Original PR description
This reverts commit e1c71a90b3e7163733cba3da401eaf473f190fef. The warning is fine. https://github.com/odoo/odoo/pull/259007#issuecomment-4299650605 > il fallait justement stop le forward-port en 18.2, on veut le warning, mais on n'avait pas la possibilité d'en avoir un avant 18.1 Forward-Port-Of: odoo/odoo#262841
This update enhances Odoo's ability to receive Peppol invoices, addressing a previous limitation that prevented users from receiving fully compliant invoices with additional data. Now, users can receive these extra fields if they've already configured them using Odoo Studio, ensuring greater compliance with Peppol standards.
Original PR description
Currently, Odoo allows sending invoices with additional Peppol fields, but didn't support the receiving. This limitation prevents users from receiving fully compliant invoices. After this commit, users will be able to receive these extra fields if they already created them using Studio. task-6033667 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#262065
This update fixes an issue where manually added analytic distributions on purchase orders were lost when the line's account was changed. Now, when a purchase order line's account is modified, the associated analytic distribution remains intact, ensuring accurate tracking of costs. This prevents data inconsistencies and simplifies financial reporting.
Original PR description
__ ## Short functional explanation of the error When confirming a Purchase Order holding lines with an analytic distribution that has been manually added, and creating a vendor bill out of this PO…
__ ## Short functional explanation of the error When confirming a Purchase Order holding lines with an analytic distribution that has been manually added, and creating a vendor bill out of this PO using the Auto-Complete field. When we change the account of that line, the line loses the manually added Analytic Distribution. ## Reproduction Steps 1. Go to Accounting. Click on the tab Configuration; under the Analytic Accounting section, click on Analytic Distribution Models. 2. Create an Analytic Distribution Model for a product. 3. Go to Purchase. Create a new PO, set a Vendor and select the product you created the Analytic Distribution Model for. On the right side of the form, click on the view menu and check Analytic Distribution to make it appear. 4. Click on the Analytic Distribution of the product and add a new one; for example, select Administrative in the Departments section. 5. Confirm order. 6. Go to Accounting and click on the Vendors tab > Bills. Create a new bill, and in the field Auto-Complete, select the PO you just created. 7. Change the account of the line. ### Expected behavior Only the account should be changed on the line. ### Unexpected behavior The manually added Analytic Distribution has disappeared. ## Origin of the issue When we change the `account_id` field, the compute method `_compute_analytic_distribution` is triggered. This method retrieves the related distributions of the line: https://github.com/odoo/odoo/blob/af32885ec5f07d492f3b8e8fff1785996a739f72/addons/account/models/account_move_line.py#L1154 which, in the context of Purchase, calls this method: https://github.com/odoo/odoo/blob/af32885ec5f07d492f3b8e8fff1785996a739f72/addons/purchase/models/account_invoice.py#L540-L545 We retrieve the distribution of the related line using `self.purchase_line_id.analytic_distribution`. However, this code isn't triggered when the move line has an analytic distribution, even though the related line `purchase_line_id` might have one! Therefore, we need to execute that code whether or not our move line has an analytic distribution. Note: the same behavior is to avoid when creating invoices for quotations. __ opw-6062466 Forward-Port-Of: odoo/odoo#258380
This update corrects a reporting issue where account codes weren't consistently applied during consolidation, leading to inaccurate report totals. The fix ensures that all relevant accounts, even those without a direct code on the primary company, are included in the consolidation process, improving financial reporting accuracy. This resolves discrepancies in consolidated reports when multiple companies share account codes.
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#118336
Forward-Port-Of: odoo/enterprise#117103This update corrects a bug in the generation of FA(3) XML files for Polish VAT invoices. Previously, the system incorrectly omitted a key date ('P_6') when the invoice delivery date matched the invoice issue date. This change ensures accurate VAT reporting by aligning the system with Polish regulations.
Original PR description
**Steps to reproduce** 1. Create a customer invoice with Invoice Date `2025-05-27` and accounting Date `2026-05-04`. 2. On the *Other Info* tab, set the Delivery Date to `2026-05-04` and post the…
**Steps to reproduce** 1. Create a customer invoice with Invoice Date `2025-05-27` and accounting Date `2026-05-04`. 2. On the *Other Info* tab, set the Delivery Date to `2026-05-04` and post the invoice. 3. Generate the FA(3) XML. **Issue** `P_6` is omitted from the payload even though the delivery date differs from the invoice issue date. The FA(3) information sheet (Warsaw, September 2025, binding from 1 February 2026) defines `P_6` as *"the date of delivery [...] if such date is specified and differs from the date of issue of the invoice"*, where the date of issue is `P_1` (Art. 106e sec. 1 item 1 of the VAT Act). In Odoo `P_1` maps to `invoice_date`, but the template at https://github.com/odoo/odoo/blob/4890b8021af2a5c025944220043d295bb7bbbb9b/addons/l10n_pl_edi/data/fa3_template.xml#L132 compares `delivery_date` against `invoice.date`, the accounting/entry date. When the invoice is posted on the delivery day the accounting date equals the delivery date, the guard evaluates to false, and `P_6` is wrongly dropped. Comparing against `invoice.invoice_date` aligns the guard with `P_1` as the spec requires. Ticket [link](https://www.odoo.com/odoo/project.task/6211119) opw-6211119 Forward-Port-Of: odoo/odoo#266667
This update fixes a visual issue in the Project Kanban view where custom colors weren't being displayed correctly. The fix ensures that the Kanban status colors accurately reflect the backend data by correctly applying modulo calculations and mapping to the appropriate color variables.
Original PR description
### The Issue: The frontend Kanban view enforces a strict 12-color limit using a modulo 12 mathematical rule (which calculates the remainder after dividing by 12). When the frontend receives our high backend IDs (20-24), it runs this modulo math (e.g., 23 % 12) to force them into the allowed limit, converting them into the remainders: IDs 8, 9, 10, 11 and 0. Because stylesheet was still searching for the original high numbers (20-24) instead of these modulo results, the custom colors were completely ignored by the browser. ### The Fix: Updated the stylesheet to target the actual modulo-computed classes (.oe_kanban_color_8 through 11 and 0). Mapped these classes to their correct variables (-success, -info, -warning, -danger, -primary) and fixed the left border styling so the colors render properly. task-6064106 Forward-Port-Of: odoo/odoo#266386 Forward-Port-Of: odoo/odoo#256023
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