Daily updates from Odoo
Tuesday, May 12, 2026
325 changes
24 changes
Enhancements to existing features
This update streamlines the process for canceling old invoices in Mexico's EDI system. When a new invoice replaces an older one, the system now automatically cancels the original invoice, eliminating a manual step for users. This improves efficiency and reduces potential errors related to invoice management.
Original PR description
Triggers the EDI document cancellation method for the substituted invoice when the substitute document is signed, removing the requirement for the user to go back and click cancel again as well as bypassing calling a wizard with no options for the user to select from. task-5927581 Forward-Port-Of: odoo/enterprise#107541
This update enhances the process of validating XML files used in Odoo's external mode billing. Developers can now use the existing IAP server file validator to test their EDI files, ensuring greater accuracy and reliability of billing data. This improves the overall quality of Odoo's billing processes.
Original PR description
There is a file validator running on the IAP server which validates different types of XML files using XSD and Schematron files. This commits allows for developers writing edi testcases to have their XML files validated by the file validator by running their tests in EXTERNAL_MODE. task-5955497 Forward-Port-Of: odoo/odoo#254991
Resolved issues and error corrections
This update fixes an issue where partners sharing the same VAT number but with individual turnovers below €250 were incorrectly excluded from VAT reports. The change groups partners by VAT number and includes them in the report if their combined turnover exceeds the threshold, ensuring accurate reporting for Belgian businesses.
Original PR description
When having different partners with the same vat number and their individual turnover values are less than the threshold they were not included in the partner vat listing report even though if the total turnover for their vat number is above the threshold. This commit handles this case by grouping by vat number and if the total turnover for a vat number is above the threshold then it will be shown in the report with another level beneath it to show the partners having this vat number even if their individual turnovers are below the threshold. task-6133010 Forward-Port-Of: odoo/enterprise#116495 Forward-Port-Of: odoo/enterprise#115251
This update resolves a bug where pressing backspace in the HTML editor, specifically at the button's edge, would cause an error. The fix ensures backspace correctly deletes characters and prevents the crash, improving the editor's stability and user experience.
Original PR description
**Description of the problem** Pressing backspace when the cursor is positioned at the very left edge of a button could trigger a traceback. Additionally, even if the crash did not occur, the…
**Description of the problem** Pressing backspace when the cursor is positioned at the very left edge of a button could trigger a traceback. Additionally, even if the crash did not occur, the backspace behavior would be incorrect, because the cursor would move across a zero-width non-breaking space (Zwnbsp) without deleting the first character to the left. **How to reproduce** In the `html_editor`, create a button. Click on its very left edge, then press backspace. An error is thrown. **Why the problem happens** 1. Traceback when backspace is pressed `LinkPlugin.handleDeleteBackward` assumes that `previousSibling` is an element node, and calls the `matches` method. However, when clicking on the very left edge of a button, the cursor is positioned such that the left sibling (`previousSibling`) is a text node. Text nodes do not implement `.matches()`, leading to the crash. 2. No deletion of the character to the left of the cursor `DeletePlugin.isVisibleChar` handles the edge cases where backspace is pressed while the cursor is positioned to the side of a button, and defines the visibility of Zwnbsp to determine how much is deleted. The padding Zwnbsp to the left of a button are considered as visible, such that the user can delete an empty button without removing also the first character on its left. Anyway, the current code does not actually check if the button is empty, thus it applies to more cases than necessary. Probably this has never been observed before, because it takes a very precise click to the left edge to position the cursor between a button and its left Zwnbsp. **Fix** 1. Prevent the crash in `LinkPlugin` `LinkPlugin.handleDeleteBackward` now ensures that `previousSibling` is an element node before calling `matches`, otherwise it returns. 2. Fix backspace behavior in `DeletePlugin` `deletePlugin.isVisibleChar` now considers as visible only the Zwnbsp positioned to the left of an empty button. This way, if the user clicks on the very left edge of a button (which moves the cursor outside the button, to the left), pressing backspace actually deletes the character on the left. task-6102282 Forward-Port-Of: odoo/odoo#258858
This update resolves an error that occurred when users attempted to mark payslips as paid, specifically when the 'Include Unpaid' option was enabled. The change ensures that the system correctly handles unpaid payslips during this process, preventing a technical error and improving the reliability of the payroll reporting feature.
Original PR description
Currently, an error occurs when a user attempts to mark a payslip as paid. **Steps to Reproduce:** - Install the `hr_payroll` module without demo data. - Go to `Payslips` and click on `New…
Currently, an error occurs when a user attempts to mark a payslip as paid. **Steps to Reproduce:** - Install the `hr_payroll` module without demo data. - Go to `Payslips` and click on `New Off-cycle`. - Create a record > `Compute` > `Validate`, and Pay. - In the wizard, enable `Include Unpaid` and select `CSV` mode. - Click `Mark as Paid`. **Error:** `UnboundLocalError: cannot access local variable 'rows' where it is not associated with a value` The error occurs when a user tries to mark a payslip as paid with Include Unpaid enabled. When the wizard is created from here [1], the default unpaid payslips are empty. In this case, the system assigns an empty set of payslips to process [2].and the rows variable is not defined because there are no payslips to work on, which raises the error [3]. This commit ensures that when the wizard is created, the matched unpaid payslips are passed to the wizard. If the Include Unpaid option is enabled, the unpaid payslips are assigned for processing, similar to [4]. The unpaid payslips cannot be empty, as they always include the currently processed payslip. Also, the rows are redefined for each payslip case and updated accordingly. Therefore, this commit ensures that the rows are created at the end from grouped payments. [1] https://github.com/odoo/enterprise/blob/a784d118e076724b02e5c59d9ce5d1815c42b0bf/hr_payroll/models/hr_payslip.py#L792-L809 [2] https://github.com/odoo/enterprise/blob/e971fca0d09e564ae9029f3d7e166e078c44dcbb/hr_payroll/wizard/hr_payroll_payment_report_wizard.py#L56 [3] https://github.com/odoo/enterprise/blob/e971fca0d09e564ae9029f3d7e166e078c44dcbb/hr_payroll/wizard/hr_payroll_payment_report_wizard.py#L97 [4]: https://github.com/odoo/enterprise/blob/a784d118e076724b02e5c59d9ce5d1815c42b0bf/hr_payroll/models/hr_payslip_run.py#L274-L288 sentry-7436885639 Forward-Port-Of: odoo/enterprise#115090
This update resolves an error that occurred when posting journal entries using accounts shared between companies during an open audit period. The issue stemmed from a permissions problem preventing users in one company from accessing audit status information, which blocked the posting process. This fix ensures accurate reporting across shared accounts.
Original PR description
Posting a journal entry using an account shared between multiple companies during an open audit period raises an AccessError. Steps to reproduce: - Configure an account to be shared between Company A and Company B. - Add Company A and Company B in 'Companies' - In the mapping tab, add a code for each company - In Company A, create a tax audit for a specific fiscal period. - Switch to Company B and keep just Company B selected. - Create and post a journal entry using the shared account within the same date period. Issue: An AccessError is raised when posting the move. The system attempts to check the status of the audit records linked to the shared account, to which the user in Company B does not have read access. opw-5993450 Forward-Port-Of: odoo/enterprise#116912 Forward-Port-Of: odoo/enterprise#115454
This update removes redundant logging messages within the account_edi_ubl_cii module. Previously, similar log entries were repeated multiple times, which didn't provide valuable insights. This change streamlines logging for better clarity and efficiency.
Original PR description
Before this commit, we had repeated logs (n-times if we had similar lines) but this doesn't help too much. To avoid this we decided to remove duplicated messages Task-None --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#263779
This update fixes an issue where currency rates were incorrectly calculated for VAT reports. Previously, the system used any invoice line, even non-product lines, leading to inaccurate rates. Now, the system prioritizes the first actual product line to ensure correct rate derivation, improving the reliability of VAT reporting.
Original PR description
The currency rate was previously computed using the first invoice line, regardless of its type. This caused incorrect rate calculation when the first line was not a product line (e.g., section, note, or display-only lines). This fix filters invoice_line_ids to use the first actual product line when extracting amount_currency and balance, ensuring that the derived rate reflects a valid monetary line. opw-5208724 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#239920 Forward-Port-Of: odoo/odoo#237535
This update fixes an issue where contacts enrolled in the same courses were incorrectly merged. Now, the system prevents this merge, displaying an error message to the user, ensuring data accuracy and preventing duplicate course information. This improves the reliability of our contact management system.
Original PR description
Expected Behaviour: Contacts enrolled in common courses should not be merged and the merge should fail. Steps to reproduce: 1- Go to one of the courses 2- Add two attendees to the course 3- Go to Contacts App 4- Select the two attendees you added to the course 5- Try merging the two contacts Actual Behaviour before the Fix: Contacts enrolled in common courses are getting merged and the common courses are kept in the destination contact. Behaviour with the Fix: Contacts enrolled in common courses are blocked from being merged and an error message is shown to the user saying that the reason the merge is blocked is a duplicate course. opw-5417223 Forward-Port-Of: odoo/odoo#263196 Forward-Port-Of: odoo/odoo#244500
This update resolves an issue where the 'Add a line' button was unresponsive at the top of mobile grid views (like Timesheets). The fix adjusts how elements are sized on smaller screens, ensuring the button is always clickable. This improves the user experience for mobile users.
Original PR description
**Steps to reproduce** On mobile: - Open a grid view (e.g. Timesheets > All timesheets) - Try to click on "Add a line" for the first employee - Issue: nothing happens. Notice that by scrolling down the list to employees at the bottom, it becomes possible to click on "Add a line". **Cause** `o_grid_cell_overlay` elements (with `h-100`) were taking more than the expected height in mobile, because the `o_grid_section_title` divs only have `position: sticky` on larger viewports. With the default `position: static`, the child element's height was exceeding its parent's height. opw-5853489 Forward-Port-Of: odoo/enterprise#113400
This update resolves a bug that prevented QR codes from being generated correctly during batch invoice sending. Previously, the QR code was calculated for all invoices before the signature was applied, resulting in an empty QR code. Now, the QR code is only generated for each invoice during the batch sending process, ensuring accurate signature application.
Original PR description
Description of the issue/feature this PR addresses: in this PR we aim to fix a bug where the l10n_sa_qr_code_str is not getting computed correctly when batch sending due to the qr_code being prematurely computed and cached before the invoice gets the signature filled. Current behavior before PR: Before this PR when batch sending the qr code was being computed for all the invoices being batch sent before each invoice runs _l10n_sa_generate_unsigned_data to set l10n_sa_invoice_signature which leads to an empty qr code. Desired behavior after PR is merged: after this PR we only compute the qr code for each invoice during sending which ensures that l10n_sa_invoice_signature was set. task-6164686 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves a technical issue preventing the correct display of the employee form within the South Africa (SA) localization of Odoo Enterprise. The fix ensures accurate data presentation and functionality for South African users, improving the overall user experience.
Original PR description
this commit fixes the broken view of employee form in SA localization. task-6205661
This update resolves an issue where setting a maximum package weight in Sendcloud prevented accurate shipping rate calculations. The fix ensures that package splitting is handled correctly, allowing rates to be generated accurately even when package weights exceed the maximum deliverable weight. This improves the reliability of shipping cost estimations.
Original PR description
Issue ----- Putting a max weight on a package type causes getting a rate with Sendcloud to fail. Steps to reproduce ----- - Setup Mondial Relay using Sendcloud - Set a default package type with max…
Issue ----- Putting a max weight on a package type causes getting a rate with Sendcloud to fail. Steps to reproduce ----- - Setup Mondial Relay using Sendcloud - Set a default package type with max weight 2kg - Create a product with a 500g weight - Create a SO with the product - Add delivery - Sendcloud Mondial Relay - Get rate > Impossible to get a rate Cause ----- When retrieving the shipping method to use when retrieving a rate, we use the real weight of the order. https://github.com/odoo/enterprise/blob/cca1433f5a064673b8e007530e20e8a9fe72949b/delivery_sendcloud/models/sendcloud_service.py#L67 https://github.com/odoo/enterprise/blob/cca1433f5a064673b8e007530e20e8a9fe72949b/delivery_sendcloud/models/sendcloud_service.py#L81 However, when making the rate call, we use the value returned by `_split_shipping` https://github.com/odoo/enterprise/blob/cca1433f5a064673b8e007530e20e8a9fe72949b/delivery_sendcloud/models/sendcloud_service.py#L91 which is equal to the maximum weight of the package. This is blocking in some cases, like if - the real weight is 750g - the package max is 2kg - Sendcloud returns a shipping method for [500g;1kg] Asking a rate for this method & a 2kg package will fail (rightfully so). Solution ----- The shipment should be split into packages before retrieving the shipping methods. Otherwise the problem might be the other way around where we retrieve a shipping method for the whole order, only to split it into multiple packages because they don't fit in one. Also, the `shipping_weight` returned by `_split_shipping` should only be different from the order's total weight if it is higher than the maximum deliverable weight. ----- Ticket: opw-5947199 Forward-Port-Of: odoo/enterprise#116415 Forward-Port-Of: odoo/enterprise#108315
This update resolves a bug that prevented price changes in the Blackbox POS module when the user's language used a comma (e.g., European format) instead of a dot as a decimal separator. The fix ensures accurate price calculations regardless of the user's locale, improving the reliability of order pricing.
Original PR description
Before this commit, when changing the price of an orderline with the blackbox installed, if the decimal separator of the user language was not a dot and was used during the price change, the price was not changed. This was due to the fact that we were comparing a string with a number, the string would be implicitly be converted to a number and, when there was a comma for example, it would return a NaN which would cause the discount to not be applied and thus the price to not change. Forward-Port-Of: odoo/enterprise#113341 Forward-Port-Of: odoo/enterprise#113151
This update fixes an issue where purchase orders merged with related sale orders didn't correctly link all associated sales. The change ensures that all linked sale orders are properly connected during the merge process, improving data accuracy and streamlining the purchasing workflow. This resolves a previous bug impacting order tracking and reporting.
Original PR description
### Steps to reproduce: - In the settings Enable: "Multi-Steps Routes" - Unarchive the MTO route - Create a storable product with MTO enabled and a set vendor - Create and confirm two sale orders for…
### Steps to reproduce: - In the settings Enable: "Multi-Steps Routes" - Unarchive the MTO route - Create a storable product with MTO enabled and a set vendor - Create and confirm two sale orders for 1 unit of that product - Go to the purchase order view, select both PO > Actions > Merge RFQs #### > The un-cancelled Purchase order is only linked to one of the 2 SOs ### Cause of the issue: The sale orders linked to a PO in this flow are linked through the stock references: https://github.com/odoo/odoo/blob/fb79136e259e2b56746afda64b2536bddf6755c0/addons/sale_purchase/models/purchase_order.py#L60-L61 https://github.com/odoo/odoo/blob/fb79136e259e2b56746afda64b2536bddf6755c0/addons/sale_purchase_stock/models/purchase_order.py#L14-L15 However, the references of the PO merged to the present one are not merged as well. opw-6150636 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#263371 Forward-Port-Of: odoo/odoo#261578
A bug causing spreadsheet image insertion requests to hang and crash due to excessive data loading has been resolved. The fix bypasses the database security filtering process, reducing the amount of data loaded into memory and preventing performance issues with large attachments.
Original PR description
To reproduce: ============= - In a db with a large amount of attachments - Insert an image in a spreadsheet - Observe the request hanging then ending with an error Problem: ======== - `ir.attachment._search` is overridden to apply security rules by building a domain based on public, `res_model`, `res_id` and `create_uid` fields - When no `res_model` restriction is present, the fallback path ORs in `res_model != False`, which matches nearly every attachment in the database - All matching records are then loaded into memory for Python-side access filtering via `_filtered_access`, causing the request to time out and crash with a memory error Solution: ========= - Set `bypass_search_access=True` on the many2many field definition so the ORM skips the `_search` override and relies on the SQL join to restrict returned records opw-6152979 Forward-Port-Of: odoo/enterprise#115766
This update fixes an issue where the HTML editor's undo function sometimes restored the selection to an incorrect position. The fix ensures the selection is properly staged before deletion, guaranteeing accurate restoration during undo operations. This improves the user experience and prevents data inconsistencies.
Original PR description
Problem: In some cases, undo restores the selection to an incorrect position. Cause: The selection state was not staged before the deletion started, leading to an inconsistent selection being restored during undo. Solution: Stage the selection before performing the deletion to ensure it can be restored to the correct position. Steps to reproduce: - Go to To-Do → Create New. - Type something on the first line and press Enter. - Type something on the second line and apply styling to it. - Use the Up arrow key to move to the first line. - Remove a character. - Press Undo (Ctrl + Z). - Observe that the selection and toolbar appear on the second line. task-6142055 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#262896 Forward-Port-Of: odoo/odoo#260630
This update resolves an issue where the table number on the kitchen display was being cut off when the order title exceeded a certain length. This prevented kitchen staff from quickly identifying the correct table for an order, leading to potential delays. The fix ensures the table number is always visible, improving kitchen efficiency.
Original PR description
**Steps to reproduce:** - Download the German language - Set the restaurant to QR + Ordering - Set the Service at Table, pay after each order - Set the language to German - Go to the Self and order…
**Steps to reproduce:** - Download the German language - Set the restaurant to QR + Ordering - Set the Service at Table, pay after each order - Set the language to German - Go to the Self and order something while the language is German - Chose table 12 - Go to the kitchen display - The title is truncated, meaning we can't see the table number **Why the fix:** If the title is more than 150px it will be truncated and "..." will replace the table number. This has been introduced in ed5b010dc7b5c11bbbc8513c1edb0ec4f58778c1 but not being able to see the table number might be bad as some people would need to spend time trying to figure out which table the order is for, instead of just having to look at the kitchen display. We now revert this change to break to a new line in the case where the card title is too long, so we can always see the table number. Before: <img width="317" height="156" alt="image" src="https://github.com/user-attachments/assets/25e76026-bdad-4639-9dfc-0d75ffa8d8c8" /> Afer: <img width="329" height="174" alt="image" src="https://github.com/user-attachments/assets/f387dd5f-96d3-4148-bc76-215393c76e67" /> opw-6096111 Forward-Port-Of: odoo/enterprise#114859
This update resolves an issue preventing the barcode app from accurately scanning pack-in-pack inventory counts. The fix ensures that the system correctly identifies and updates quantities when scanning nested packages, improving inventory accuracy. This enhancement directly addresses a reported problem during physical inventory counts.
Original PR description
### Steps to reproduce: - In the settings enable "Packages" - Create a storable product A and put 1 unit in a package P in stock - Inventory > Products > Packages > open your package P - Set a parent…
### Steps to reproduce: - In the settings enable "Packages" - Create a storable product A and put 1 unit in a package P in stock - Inventory > Products > Packages > open your package P - Set a parent package PP as container - Inventory > Operations > Adjustments > Physical Inventory - Select you product line for A > Request a count (from the control panel button) - Enable Show Expected Quantity and confirm - Go to the barcode app > Count Inventory (1) - scan your parent package PP #### > traceback: Uncaught Promise > Cannot create property 'inventory_quantity' on boolean 'false' ### Cause of the issue: When the Package scan is processed, we loop over all quants related to it: https://github.com/odoo/enterprise/blob/30a28e28f8dd27cf2c88df65e5ff47eab59360c7/stock_barcode/static/src/models/barcode_quant_model.js#L566-L569 https://github.com/odoo/enterprise/blob/30a28e28f8dd27cf2c88df65e5ff47eab59360c7/stock_barcode/static/src/models/barcode_quant_model.js#L602-L617 And for each of these we try to find an existing line representing the quant to update or we do create a new line. Now, the issue, is that the subpackages of the quant are not provided to find the quant candidate line to update. As such, no line is found we enter the else clause and try to createa a NewLine: https://github.com/odoo/enterprise/blob/30a28e28f8dd27cf2c88df65e5ff47eab59360c7/stock_barcode/static/src/models/barcode_quant_model.js#L617-L627 This time however, the appropriate subpackage (the one of the quant) is provided to the arguments. And, since the line representing this quant is already existing, the `_createNewLine` will return False: https://github.com/odoo/enterprise/blob/30a28e28f8dd27cf2c88df65e5ff47eab59360c7/stock_barcode/static/src/models/barcode_quant_model.js#L393-L399 https://github.com/odoo/enterprise/blob/30a28e28f8dd27cf2c88df65e5ff47eab59360c7/stock_barcode/static/src/models/barcode_quant_model.js#L423 This leads to a traceback at the end of the else close since `false.inventory_quantity` doe not make sense (Cannot create property 'inventory_quantity' on boolean 'false') https://github.com/odoo/enterprise/blob/30a28e28f8dd27cf2c88df65e5ff47eab59360c7/stock_barcode/static/src/models/barcode_quant_model.js#L626-L627 Fix: We adapt the `_processPackage` of the `BarcodeQuantModel` to mimic the existing 'update' behavior on the `BarcodePickingModel`: https://github.com/odoo/enterprise/blob/30a28e28f8dd27cf2c88df65e5ff47eab59360c7/stock_barcode/static/src/models/barcode_picking_model.js#L2110-L2133 Note that UOM converstion should not be required since quants are already uniformly expressed in the product uom: https://github.com/odoo/odoo/blob/30b4edace6b0859cb1b1ba4f7f2ea80ba5398e3d/addons/stock/models/stock_quant.py#L52-L54 opw-5864591 Forward-Port-Of: odoo/enterprise#116715
This update fixes an issue where credit notes related to returned stock weren't accurately calculating the cost of goods sold (COGS). The fix ensures that the correct price unit (either from the original invoice or the returned stock movement) is used, regardless of how the credit note was created, leading to accurate financial reporting. This impacts inventory valuation and reporting accuracy.
Original PR description
**Steps to reproduce:** Problem A) - create a storable product avco perpetual - add 2 unit in stock and set a cost of 10 - set the invoicing policy as "delivered quantities" - create and confirm a SO…
**Steps to reproduce:** Problem A) - create a storable product avco perpetual - add 2 unit in stock and set a cost of 10 - set the invoicing policy as "delivered quantities" - create and confirm a SO for 2 quantities - validate the delivery - click on "Create Invoice" and confirm the invoice - from the delivery, create and validate a return for 1 unit. - from the product form, change the cost to 15 - from the sale order, click on "Create Invoice" - confirm the Credit Note Problem B) - create a storable product with fifo perpetual - confirm a PO for 1 unit at 10 and validate receive - confirm a PO for 1 unit at 20 and validate receive - confirm a PO for 1 unit at 60 and validate receive - create a SO for 3 unit - deliver 1 unit with backorder - deliver another unit with backorder - deliver the last unit - create and confirm invoice - return the second delivery - from the invoice click on 'credit note' and validate the credit note with a quantity of 1 **Current behavior:** Problem A) the cogs is 25 Problem B) the cogs is 30 **Expected behavior:** Problem A) it should be 10 Problem B) the cogs should be 20 cause the move returned had a value of 20 **Cause of the issue:** Inside \_get\_cogs_value(), if there is an original invoice linked to the credit note we take the unit_price from this invoice. But, if the credit note is not created from the invoice (via the Credit Note button) but via the sale order (via create invoices), the account\_move has no reverse\_entry_id so we won't use the price_unit from the original line. https://github.com/odoo/odoo/blob/686a0cf67bb1e818baf43309fc94f3f0462097ed/addons/stock_account/models/account_move_line.py#L56-L58 So basically what we do for now is: If the credit note was created from invoice we use the unit price from original invoice in all cases. If the credit note was created from sale order we use get\_price\_unit in all cases (which will work for fifo because we'll use the value of the returned move but fail for avco if the standard price has changed cause we use the standard price) https://github.com/odoo/odoo/blob/dccd2256660b1e211707b740074f5fbba95ae149/addons/stock_account/models/stock_move.py#L261-L265 **Fix:** Regardless of how the credit note is created, if it's fifo we use get\_price\_unit to adapt to the value of the moves, if not we use the unit_price from original invoice opw-6097090 Forward-Port-Of: odoo/odoo#259630
This update corrects a display issue where the 'Reconnect Bank' button appeared incorrectly when account online consent wasn't expiring. The fix ensures the button only appears when consent is actually about to expire, preventing unnecessary prompts and improving user experience. This change ensures the system behaves as expected under normal consent scenarios.
Original PR description
Since this commit 375516ccfd20d3a969c532376d0ba9db195b35fd, the reconnect bank button is displayed when the account online link doesn't have consent expiration date, which is wrong, if the consent doesn't expire, we shouldn't display the button. Why this happens? Because we don't check if expiring_synchronization_date is falsy, we only check if expiring_synchronization_due_day <= 0, which is always true in this case, has the compute set 0 as a fallback value. no-task
This update ensures that delivery orders are created correctly when sales orders are cancelled and then settled through the Point of Sale (PoS) system. Previously, products marked as 'delivered' remained on the sale order even when the delivery order was empty. This fix resolves an issue where PoS settlements were not properly reflected in the delivery process, leading to inaccurate inventory tracking.
Original PR description
Steps to reproduce ------------------ 1. Create a sale order with 2 products, confirm it 2. Cancel the SO, then click "Set to Quotation" 3. Open PoS, settle the order and pay 4. Check the delivery…
Steps to reproduce ------------------ 1. Create a sale order with 2 products, confirm it 2. Cancel the SO, then click "Set to Quotation" 3. Open PoS, settle the order and pay 4. Check the delivery order linked to the PoS order The delivery is empty, yet the products still show as "delivered" on the sale order. Why it's happening ------------------ When the SO is cancelled, its moves go to 'cancel' state. After resetting to quotation, those moves stay cancelled. When PoS creates the delivery, the filter in `_create_move_from_pos_order_lines` checks `has_valued_move_ids()` which returns False (all moves are cancelled), and `not move_ids` is also False (cancelled moves still exist). So the lines coming from the SO are excluded from the delivery. The fix ------- We now also create deliveries for lines whose SO moves are all cancelled. These are lines coming from a cancelled SO that now need to be shipped after we have settled their order from PoS. Note ---- The commit c0f338711f028088c98ea459f27c1669b29738d7 fixes this starting from saas-18.2, by introducing a separate `pos_repair` module which simplifies the main `pos_sale` code. In 18.2+, only the test will be forward ported. opw-6055856 Forward-Port-Of: odoo/odoo#263917 Forward-Port-Of: odoo/odoo#256693
This update corrects a technical issue within the l10n_be_hr_payroll module, specifically addressing how loop variables are handled. The change ensures the system operates more reliably and efficiently. This is a routine maintenance fix to improve the stability of the payroll processing.
Original PR description
Don't use `self` in loop body. Oversight of 724edab8d5be8e774f00ae84e9ebeb5a70f4fa93. Forward-Port-Of: odoo/enterprise#116915
This update resolves a bug that caused Purchase Orders to fail when the requested quantity was less than the vendor's minimum order quantity. The fix ensures a valid supplier is always selected, preventing crashes and allowing PO lines to be updated correctly, even with small orders.
Original PR description
FIX] purchase_stock: handle missing seller during PO line update (min_qty) **Steps to Reproduce:** - Install Sale, Inventory, Manufacturing, and Purchase. - Enable MTO, Units of Measure, and Routes.…
FIX] purchase_stock: handle missing seller during PO line update (min_qty)
**Steps to Reproduce:**
- Install Sale, Inventory, Manufacturing, and Purchase.
- Enable MTO, Units of Measure, and Routes.
- Create a product:
Set a vendor price with min_qty = 1.0.
Enable MTO route.
Add a BoM with a component product.
Set quantity to 0.1 (less than vendor min_qty).
- Create a Sale Order with the same product added twice.
- Confirm the Sale Order.
**Issue:**
During procurement:
- First procurement correctly fetches the supplier.
- On PO line update (_update_purchase_order_line), seller is recomputed.
Due to min_qty filtering, no seller is returned when quantity is low.
This results in: Missing seller, Missing product_uom, Invalid price
computation, And finally causes a crash when confirming the Purchase Order,
in _get_stock_move_price_unit: ZeroDivisionErroR
Root Cause:
- _select_seller filters suppliers using min_qty.
During merge/update flow, recomputed quantity may not satisfy min_qty.
Existing valid supplier (from initial procurement) is ignored.
No fallback handling in _update_purchase_order_line.
**Solution:**
- Add fallback logic when _select_seller returns no result: Use
_prepare_sellers() to fetch a valid supplier ignoring min_qty.
- Ensure a supplier is always available for: UoM resolution, Price computation
Prevents crash and ensures consistent PO line updates.
**Result:**
- No traceback when quantity < vendor min_qty
Supplier, UoM, and price are properly set
**OPW-6106487**
Forward-Port-Of: odoo/odoo#263699
Forward-Port-Of: odoo/odoo#25989422 changes
Enhancements to existing features
This update enhances the process for testing Odoo's external mode EDI files. It allows developers to validate their XML files against established standards using a built-in validator, streamlining the testing process and ensuring data accuracy within the IAP environment. This improves the reliability of EDI transactions.
Original PR description
There is a file validator running on the IAP server which validates different types of XML files using XSD and Schematron files. This commits allows for developers writing edi testcases to have their XML files validated by the file validator by running their tests in EXTERNAL_MODE. task-5955497 Forward-Port-Of: odoo/odoo#254991
Resolved issues and error corrections
A technical issue causing a traceback in the Department Hierarchy view has been resolved. This prevented the view from loading correctly when departments had managers assigned. The fix addresses a problem with how the system handles date information, ensuring the view functions properly.
Original PR description
## Issue When opening the *Hierarchy* view of Employees > Departments, if at least one department has a manager set, a traceback appears before the view. ## Steps to reproduce 1. Install *Employees*…
## Issue
When opening the *Hierarchy* view of Employees > Departments, if at least one department has a manager set, a traceback appears before the view.
## Steps to reproduce
1. Install *Employees* (`hr`)
2. In Employees > Departments, add a manager to a department
3. Open the *Hierarchy* view
4. **A traceback appears:**
```
Caused by: TypeError: Cannot read properties of undefined (reading 'toMillis')
at get uniqueId (http://localhost:8192/web/assets/cbd2032/web.assets_web.min.js:21370:74)
at Many2OneAvatarEmployeeField.template (eval at compile (http://localhost:8192/web/assets/cbd2032/web.assets_web.min.js:1387:421), <anonymous>:25:122)
...
```
## Cause
The traceback is yielded from the `get uniqueId` getter from the `Many2OneAvatarEmployeeField` component:
https://github.com/odoo/odoo/blob/c3172d65db44c41f5619aef20532c3846494ea0e/addons/hr/static/src/views/fields/many2one_avatar_employee_field/many2one_avatar_employee_field.js#L38-L40
where `write_date` is undefined. This getter was added by https://github.com/odoo/odoo/commit/3732ca85b03bea9eabfb05cc306ce0bf5bac88d4, which handled the case of undefined `write_date` for the related Kanban component:
https://github.com/odoo/odoo/blob/c3172d65db44c41f5619aef20532c3846494ea0e/addons/hr/static/src/views/fields/many2one_avatar_employee_field/kanban_many2one_avatar_employee_field.js#L49-L52
A similar solution is applied in this problematic getter.
opw-6128837This update resolves an issue where Swedish account names were being incorrectly imported due to a character encoding mismatch. The file was originally saved in CP437, and the fix ensures the correct Swedish characters are imported, improving data accuracy for Swedish businesses using the Odoo Enterprise system.
Original PR description
Issue: Non-ASCII charatcter from sie file were lost on import. Steps to reproduce: - in a Swedish company - import the SIE4 exemple file from sie website: https://sie.se/wp-content/uploads/2024/01/SIE4-Exempelfil-Sample-file-1.zip Current behavior: - The account 1090 is imported as "vriga imm anl tillg" instead of "Övriga imm anl tillg" Expected behavior: - The account 1090 is imported as "Övriga imm anl tillg" Cause: CP437 uses 8 bits to represent data. Ö is \x99. However, file was imported using either UTF-8 or ISO-8859-1, where Ö is \xC396 and \x99 doesn't link to anything. This commit update the test file as it was save in cp437 but read as UTF-8. opw-6167408 Forward-Port-Of: odoo/enterprise#116722
This update resolves an issue where pressing backspace in the HTML editor, specifically at the button's left edge, would cause a crash. The fix ensures backspace correctly deletes characters and addresses an unintended behavior related to zero-width spaces, improving the editor's stability and user experience.
Original PR description
**Description of the problem** Pressing backspace when the cursor is positioned at the very left edge of a button could trigger a traceback. Additionally, even if the crash did not occur, the…
**Description of the problem** Pressing backspace when the cursor is positioned at the very left edge of a button could trigger a traceback. Additionally, even if the crash did not occur, the backspace behavior would be incorrect, because the cursor would move across a zero-width non-breaking space (Zwnbsp) without deleting the first character to the left. **How to reproduce** In the `html_editor`, create a button. Click on its very left edge, then press backspace. An error is thrown. **Why the problem happens** 1. Traceback when backspace is pressed `LinkPlugin.handleDeleteBackward` assumes that `previousSibling` is an element node, and calls the `matches` method. However, when clicking on the very left edge of a button, the cursor is positioned such that the left sibling (`previousSibling`) is a text node. Text nodes do not implement `.matches()`, leading to the crash. 2. No deletion of the character to the left of the cursor `DeletePlugin.isVisibleChar` handles the edge cases where backspace is pressed while the cursor is positioned to the side of a button, and defines the visibility of Zwnbsp to determine how much is deleted. The padding Zwnbsp to the left of a button are considered as visible, such that the user can delete an empty button without removing also the first character on its left. Anyway, the current code does not actually check if the button is empty, thus it applies to more cases than necessary. Probably this has never been observed before, because it takes a very precise click to the left edge to position the cursor between a button and its left Zwnbsp. **Fix** 1. Prevent the crash in `LinkPlugin` `LinkPlugin.handleDeleteBackward` now ensures that `previousSibling` is an element node before calling `matches`, otherwise it returns. 2. Fix backspace behavior in `DeletePlugin` `deletePlugin.isVisibleChar` now considers as visible only the Zwnbsp positioned to the left of an empty button. This way, if the user clicks on the very left edge of a button (which moves the cursor outside the button, to the left), pressing backspace actually deletes the character on the left. task-6102282 Forward-Port-Of: odoo/odoo#258858
This update eliminates redundant logging messages within the account_edi_ubl_cii module. Previously, excessive logging created unnecessary noise. This change streamlines logging, making it more efficient and easier to analyze when needed.
Original PR description
Before this commit, we had repeated logs (n-times if we had similar lines) but this doesn't help too much. To avoid this we decided to remove duplicated messages Task-None --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#263779
This update fixes a bug in the Belgium Payroll DMFA report that incorrectly displayed 'Days Per Week' as 5 when employees worked fewer than 5 days a week. The fix accurately calculates the number of working days based on the employee's actual schedule, ensuring accurate reporting for Belgian tax compliance.
Original PR description
## Issue When generating a DMFA report with a working schedule with more or less than 5 days a week, the *Days Per Week* value in the report is still appearing as 5. ## Steps to reproduce 1. Install…
## Issue
When generating a DMFA report with a working schedule with more or less than 5 days a week, the *Days Per Week* value in the report is still appearing as 5.
## Steps to reproduce
1. Install *Belgium - Payroll* (`l10n_be_hr_payroll`)
2. In Payroll's Settings:
- set *ONSS Registration Number* to `0830123456`
- set *DMFA Employer Class* to `083`
- create a *Work Address DMFA code* (any name, any numeral code, but set the *Working Address* to the Belgian company used for the rest of the steps)
3. In Employees' Settings, set the *Company Working Hours* to a new Working Schedule, with 9 hours/day, 4 days/week. E.g from Monday to Thursday included:
- Work from 8:00 to 12:00
- Lunch from 12:00 to 13:00
- Work from 13:00 to 18:00
4. Create an Employee E for the Belgian company:
- In the *Payroll* tab, set the start date of the contract to 01/01/2026.
- In the *Personal* tab, set the *NISS Number* to `85073003328`
5. Create the payslip for January 2026 for the Employee E.
6. In Payroll > Reporting > Belgium > DMFA, create a new DMFA for the first quarter of 2026 and generate the PDF report
7. **In the generated PDF report, the _Days per Week_ line is set to 5.**
## Cause
The number of days was calculated by multiplying `5` with the `work_time_rate` of the related calendar. This is inaccurate in the case of a company where employees are only expected to work 4 days a week.
opw-6103934
Forward-Port-Of: odoo/enterprise#116794
Forward-Port-Of: odoo/enterprise#113804Previously, the system incorrectly calculated currency rates using invoice line types other than products, leading to inaccurate VAT reports. This update fixes the system to prioritize the first product line when determining the currency rate, ensuring accurate reporting and compliance. This change improves the reliability of VAT calculations.
Original PR description
The currency rate was previously computed using the first invoice line, regardless of its type. This caused incorrect rate calculation when the first line was not a product line (e.g., section, note, or display-only lines). This fix filters invoice_line_ids to use the first actual product line when extracting amount_currency and balance, ensuring that the derived rate reflects a valid monetary line. opw-5208724 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#239920 Forward-Port-Of: odoo/odoo#237535
This update prevents unauthorized users from viewing or modifying assets linked to invoices. Previously, any user could access asset information, which created a potential security risk. Now, access is restricted to users within specific accounting groups, ensuring data integrity and security.
Original PR description
Only groups `account.group_account_readonly`, `account.group_account_invoice` or higher have access to model `account.asset`, therefore if an user goes to see an invoice with assets and they are not on either group, they will receive an error and won't be able to access said invoice. How to reproduce: - Create a vendor bill - Create an account.asset and link it to said account.move - Go to the form view with an user that it's on group "Purchase: User" for example --> They get a traceback --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/enterprise#115053 Forward-Port-Of: odoo/enterprise#112890
This update resolves an issue preventing v19.1 upgrades when managing subscriptions with service products. The problem stemmed from an incorrect comparison between date fields, leading to a TypeError. The fix ensures accurate date calculations during upgrade processes, restoring stable subscription functionality.
Original PR description
**Steps-to-Reproduce** - In v19, install subscriptions. - create new subscription + service product with allow one time sale enabled. - make a SO with that product,any reccuring plan and any end…
**Steps-to-Reproduce**
- In v19, install subscriptions.
- create new subscription + service product with allow one time sale enabled.
- make a SO with that product,any reccuring plan and any end date.
```
id | name | subscription_state | next_invoice_date | end_date
----+--------+--------------------+-------------------+------------
1 | S00001 | 1_draft | | 2026-05-02
```
- confirm the SO
```
id | name | subscription_state | next_invoice_date | end_date
----+--------+--------------------+-------------------+------------
1 | S00001 | 3_progress | 2026-05-01 | 2026-05-02
```
- remove its recurring plan (some product sold for months for testing then converted to one time sale )
```
id | name | subscription_state | next_invoice_date | end_date
----+--------+--------------------+-------------------+------------
1 | S00001 | 3_progress | | 2026-05-02
```
- upgrade to v19.1 will fail or opening sales > To Invoice > Orders To Invoice gives this error or add amount_to_invoice in list view using studio to produce in v19 :
```
File "/home/odoo/odoo18/enterprise/sale_subscription/models/sale_order_line.py",
line 175, in _compute_amount_to_invoice
and (not order.end_date or order.next_invoice_date < order.end_date)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: '<' not supported between instances of 'bool' and 'datetime.date'
```
- upgrade failing for v19.1 because amount_to_invoice added to list view [here](https://github.com/odoo/odoo/commit/427232efd121410380b62acf4fd2e9ee369e6542#diff-48cb4309a6006f91b2b40e4c1049860218d419fce1782c7dcc278329803129caR193-R213).
upg - [4220658](https://upgrade.odoo.com/odoo/upgrade.request/4220658)
opw - [6128033](https://www.odoo.com/odoo/project/70/tasks/6128033)
Forward-Port-Of: odoo/enterprise#115976This update fixes inaccuracies in the data used for calculating Belgian HR payroll through Prisma. Specifically, it addresses missing or incorrect codes related to leave types (LEAVE280, LEAVE115, LEAVE231) to ensure accurate payroll calculations and compliance with Belgian regulations. This resolves an issue identified in previous development.
Original PR description
Issue: ---------------------------------------- Some prisma codes are wrong. Solution: ---------------------------------------- Change the data files. There are some subtilities that were not implemented: - LEAVE280: 0304 (if less than a year) and 0345 (if more) - LEAVE115: 0820 (Work accident) and 0830 (Occupational Disease) opw-6090081 Forward-Port-Of: odoo/enterprise#116642 Forward-Port-Of: odoo/enterprise#112949
This update ensures that delivery orders are created accurately when sales orders are cancelled and then settled through the Point of Sale (PoS) system. Previously, products marked as delivered on the original sales order wouldn't appear on the delivery order. This fix resolves this issue, guaranteeing accurate inventory tracking and order fulfillment.
Original PR description
Steps to reproduce ------------------ 1. Create a sale order with 2 products, confirm it 2. Cancel the SO, then click "Set to Quotation" 3. Open PoS, settle the order and pay 4. Check the delivery…
Steps to reproduce ------------------ 1. Create a sale order with 2 products, confirm it 2. Cancel the SO, then click "Set to Quotation" 3. Open PoS, settle the order and pay 4. Check the delivery order linked to the PoS order The delivery is empty, yet the products still show as "delivered" on the sale order. Why it's happening ------------------ When the SO is cancelled, its moves go to 'cancel' state. After resetting to quotation, those moves stay cancelled. When PoS creates the delivery, the filter in `_create_move_from_pos_order_lines` checks `has_valued_move_ids()` which returns False (all moves are cancelled), and `not move_ids` is also False (cancelled moves still exist). So the lines coming from the SO are excluded from the delivery. The fix ------- We now also create deliveries for lines whose SO moves are all cancelled. These are lines coming from a cancelled SO that now need to be shipped after we have settled their order from PoS. Note ---- The commit c0f338711f028088c98ea459f27c1669b29738d7 fixes this starting from saas-18.2, by introducing a separate `pos_repair` module which simplifies the main `pos_sale` code. In 18.2+, only the test will be forward ported. opw-6055856 Forward-Port-Of: odoo/odoo#263917 Forward-Port-Of: odoo/odoo#256693
This update fixes an issue where contacts enrolled in the same courses were incorrectly merged. Now, the system prevents this merging process, displaying an error message to the user when a duplicate course is detected. This ensures data accuracy and avoids potential confusion for users managing course attendees.
Original PR description
Expected Behaviour: Contacts enrolled in common courses should not be merged and the merge should fail. Steps to reproduce: 1- Go to one of the courses 2- Add two attendees to the course 3- Go to Contacts App 4- Select the two attendees you added to the course 5- Try merging the two contacts Actual Behaviour before the Fix: Contacts enrolled in common courses are getting merged and the common courses are kept in the destination contact. Behaviour with the Fix: Contacts enrolled in common courses are blocked from being merged and an error message is shown to the user saying that the reason the merge is blocked is a duplicate course. opw-5417223 Forward-Port-Of: odoo/odoo#263196 Forward-Port-Of: odoo/odoo#244500
This update resolves a bug that prevented price changes in the Blackbox POS module when the user's language used a comma (e.g., European format) instead of a dot as a decimal separator. The fix ensures accurate price calculations regardless of the user's locale, improving the reliability of order pricing.
Original PR description
Before this commit, when changing the price of an orderline with the blackbox installed, if the decimal separator of the user language was not a dot and was used during the price change, the price was not changed. This was due to the fact that we were comparing a string with a number, the string would be implicitly be converted to a number and, when there was a comma for example, it would return a NaN which would cause the discount to not be applied and thus the price to not change. Forward-Port-Of: odoo/enterprise#113341 Forward-Port-Of: odoo/enterprise#113151
This update resolves an issue preventing accurate inventory counts when scanning pack-in-pack items. The fix ensures the system correctly identifies and updates quantities during inventory adjustments, allowing users to reliably track stock levels within nested packaging.
Original PR description
### Steps to reproduce: - In the settings enable "Packages" - Create a storable product A and put 1 unit in a package P in stock - Inventory > Products > Packages > open your package P - Set a parent…
### Steps to reproduce: - In the settings enable "Packages" - Create a storable product A and put 1 unit in a package P in stock - Inventory > Products > Packages > open your package P - Set a parent package PP as container - Inventory > Operations > Adjustments > Physical Inventory - Select you product line for A > Request a count (from the control panel button) - Enable Show Expected Quantity and confirm - Go to the barcode app > Count Inventory (1) - scan your parent package PP #### > traceback: Uncaught Promise > Cannot create property 'inventory_quantity' on boolean 'false' ### Cause of the issue: When the Package scan is processed, we loop over all quants related to it: https://github.com/odoo/enterprise/blob/30a28e28f8dd27cf2c88df65e5ff47eab59360c7/stock_barcode/static/src/models/barcode_quant_model.js#L566-L569 https://github.com/odoo/enterprise/blob/30a28e28f8dd27cf2c88df65e5ff47eab59360c7/stock_barcode/static/src/models/barcode_quant_model.js#L602-L617 And for each of these we try to find an existing line representing the quant to update or we do create a new line. Now, the issue, is that the subpackages of the quant are not provided to find the quant candidate line to update. As such, no line is found we enter the else clause and try to createa a NewLine: https://github.com/odoo/enterprise/blob/30a28e28f8dd27cf2c88df65e5ff47eab59360c7/stock_barcode/static/src/models/barcode_quant_model.js#L617-L627 This time however, the appropriate subpackage (the one of the quant) is provided to the arguments. And, since the line representing this quant is already existing, the `_createNewLine` will return False: https://github.com/odoo/enterprise/blob/30a28e28f8dd27cf2c88df65e5ff47eab59360c7/stock_barcode/static/src/models/barcode_quant_model.js#L393-L399 https://github.com/odoo/enterprise/blob/30a28e28f8dd27cf2c88df65e5ff47eab59360c7/stock_barcode/static/src/models/barcode_quant_model.js#L423 This leads to a traceback at the end of the else close since `false.inventory_quantity` doe not make sense (Cannot create property 'inventory_quantity' on boolean 'false') https://github.com/odoo/enterprise/blob/30a28e28f8dd27cf2c88df65e5ff47eab59360c7/stock_barcode/static/src/models/barcode_quant_model.js#L626-L627 Fix: We adapt the `_processPackage` of the `BarcodeQuantModel` to mimic the existing 'update' behavior on the `BarcodePickingModel`: https://github.com/odoo/enterprise/blob/30a28e28f8dd27cf2c88df65e5ff47eab59360c7/stock_barcode/static/src/models/barcode_picking_model.js#L2110-L2133 Note that UOM converstion should not be required since quants are already uniformly expressed in the product uom: https://github.com/odoo/odoo/blob/30b4edace6b0859cb1b1ba4f7f2ea80ba5398e3d/addons/stock/models/stock_quant.py#L52-L54 opw-5864591 Forward-Port-Of: odoo/enterprise#116715
A bug causing spreadsheet image inserts to crash due to excessive data loading has been resolved. The fix bypasses a security check within the database, allowing for more efficient image handling and preventing memory errors when dealing with large attachments. This ensures stable and reliable spreadsheet functionality.
Original PR description
To reproduce: ============= - In a db with a large amount of attachments - Insert an image in a spreadsheet - Observe the request hanging then ending with an error Problem: ======== - `ir.attachment._search` is overridden to apply security rules by building a domain based on public, `res_model`, `res_id` and `create_uid` fields - When no `res_model` restriction is present, the fallback path ORs in `res_model != False`, which matches nearly every attachment in the database - All matching records are then loaded into memory for Python-side access filtering via `_filtered_access`, causing the request to time out and crash with a memory error Solution: ========= - Set `bypass_search_access=True` on the many2many field definition so the ORM skips the `_search` override and relies on the SQL join to restrict returned records opw-6152979 Forward-Port-Of: odoo/enterprise#115766
This update provides pre-configured Italian accounting data for easier testing and demonstrations of the Odoo system. The data includes sample partners, bank accounts, invoices, and bills, along with necessary e-invoicing information. This simplifies the process of verifying the Italian localization and ensures accurate demonstrations.
Original PR description
Purpose: Load a pre-configured set of Italian accounting sample data to facilitate localization testing and demonstrations. Specifications: This commit introduces comprehensive sample data for the Italian localization, configuring the following: * Partners * Bank Accounts * Invoices & Bills * Dynamic Dates: All generated moves use a relative date format to ensure testing data remains relevant and doesn't expire on runbot. * EDI Data: Populates necessary e-invoicing fields (`l10n_it_codice_fiscale`, `l10n_it_pa_index`) for the created partners. task-6103257 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#262711
This update resolves issues with how notes are replied to using the HTML composer, ensuring correct formatting and spacing. Previously, replies could lose formatting or introduce extra spaces. Now, replies maintain formatting and add trailing spaces correctly, improving the user experience when responding to notes.
Original PR description
Before this PR, Replying to a note with the HTML composer enabled had several issues. - The mention added did not include a trailing space. - If the composer already contained formatted content, reply action discarded all formatting because the content was overwritten using composerText, which is not formatting-aware. - the composer sometimes showed extra spacing between lines because the base container used a `<p>` tag instead of a `<div>`. This PR fixes these issues by - inserting the mention directly into composerHtml with an editable trailing space instead of mutating composerText. This preserves existing formatting, and correctly adds spacing after mentions. - The base container always use a `<div>`, preventing unwanted line spacing task-[5454785](https://www.odoo.com/odoo/project/1519/tasks/5454785) Forward-Port-Of: odoo/odoo#242748
This update resolves an error that occurred when calculating overtime deductions for employees with specific filing statuses (beyond 'single' or 'jointly'). The fix ensures the system correctly handles a wider range of filing statuses, preventing unexpected crashes. This improves the accuracy of overtime calculations for US-based employees.
Original PR description
Issue: ---------------------------------------- When having an employee with `l10n_us_filing_status` not in `['single', 'jointly']` and evaluating the rule parameter…
Issue: ---------------------------------------- When having an employee with `l10n_us_filing_status` not in `['single', 'jointly']` and evaluating the rule parameter `l10n_us_qualified_overtime_deduction_cap` an error occurs. Cause: ---------------------------------------- `l10n_us_filing_status` can have 5 values: `['single', 'jointly', 'separately', 'head', 'survivor']` But only `['single', 'jointly']` are defined for `l10n_us_qualified_overtime_deduction_cap` ([src](https://github.com/odoo/enterprise/blob/2d2056766441157dc45ebc37b677841c44e5c513/l10n_us_hr_payroll/data/hr_rule_parameters_data.xml#L48)). When running the rule "Qualified Overtime", the custom Python crashes because we read a key that is not there: https://github.com/odoo/enterprise/blob/2d2056766441157dc45ebc37b677841c44e5c513/l10n_us_hr_payroll/data/hr_salary_rule_data.xml#L56 Solution: ---------------------------------------- In the custom Python condition, we first check if the key is there. The custom Python computation also tries to read the key, but it is run only if the condition is validated. So we don't need to change it. Also fixed indentation of test 069. opw-6129657 Forward-Port-Of: odoo/enterprise#116551 Forward-Port-Of: odoo/enterprise#115754
This update resolves a crash that could occur when attempting to 'Unassign' items from the stock reception report if the linked source document (like an order) was empty. The fix prevents the system from trying to remove references to non-existent documents, making the report more reliable and robust, particularly for clients with custom configurations.
Original PR description
#### Issue: Clicking `Unassign` from the stock reception report could raise a traceback when the outgoing move source document was empty. ``ValueError: Expected singleton: mrp.production()`` Please…
#### Issue: Clicking `Unassign` from the stock reception report could raise a traceback when the outgoing move source document was empty. ``ValueError: Expected singleton: mrp.production()`` Please note that this is not expected in standard Odoo, where reception report moves should normally be linked to a source document, such as an MO, SO, or picking. This case seems specific to the client database and may be due to a customization, but handling it makes the reception report more robust. #### Cause: The reception report built report lines from `source = (move._get_source_document(),)` and checked `if not source`. Since the tuple itself is truthy, moves whose `_get_source_document()` returned an empty recordset were not filtered out. For example if `out_move._get_source_document()` returns `mrp.production()`, then `source = (mrp.production(),)` is still truthy, so the report keeps the line even though the source document is empty. later `action_unassign()` called `_remove_reference()` on that empty source document, which crashed on `ensure_one()`. #### Fix: Added a helper function that skips moves where `_get_source_document()` is empty. Also skip reference synchronization in `_action_assign()` and `_action_unassign()` when the source document is empty just for more protection. opw-6174870 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#263366
This update fixes an issue where image data lingered in the website builder's code after shapes were removed, leading to potential performance problems. The change adds a cleanup process to remove outdated image data, ensuring a cleaner and more efficient website builder experience. This improves the overall stability and responsiveness of images on the Odoo website.
Original PR description
Steps to see the issue: - Add a shape to an image - Remove it => Image element in the DOM still has some data related to the shape. This commits adds a shared method to `ImageShapeOptionPlugin` to…
Steps to see the issue: - Add a shape to an image - Remove it => Image element in the DOM still has some data related to the shape. This commits adds a shared method to `ImageShapeOptionPlugin` to clean shape-related data when we apply a shape, or remove it, the method mirrors the behavior we had before the [html builder refactoring]. Also, commit [1] fixed the issue when the builder transfered shape or hover related data to incompatible images, when replacing an image with a shape/hover on it. However if these data attributes had already been saved prior to that commit, it would stay there indefinitely. The same could happen with hover effects attributes. Therefore, we add a resource that we call before saving data to clean any stale image data. Example of a CORS protected image: [2] [1]: https://github.com/odoo-dev/odoo/commit/137a6d7e59e1d788745c3b796a14839e52a8c5bc [2]: https://tinyjpg.com/images/social/website.jpg [html builder refactoring]: github.com/odoo/odoo/9fe45e2b7ddbbfd0445ffe25a859e67a316d02b2 task-5172640 Forward-Port-Of: odoo/odoo#263662 Forward-Port-Of: odoo/odoo#259226
This update fixes an issue where the timesheet forecasting report incorrectly included public holidays from other companies. The change ensures that only public holidays relevant to the employee's company are considered, improving the accuracy of planned hour calculations. This prevents over-reporting of time spent on holidays.
Original PR description
## Steps to reproduce: - Install project_timesheet_forecast module - Create a public holiday in one company - In another company create a planning slot for an employee that overlaps with the holiday - Go to Timesheets/Planning analysis report - Notice the report is not showing planned hours for the employee on the day of the public holiday ## Cause: When filtering the resource_calendar_leaves we don't check for the company so any public holiday in any company will be taken into account even if it doesn't affect the employee ## Fix: Exclude holidays that has different company than the planning slot opw-5027070 Forward-Port-Of: odoo/enterprise#116263
This update fixes an issue where loyalty point transactions in POS orders were only recorded as a net difference, not the individual earned and spent amounts. The change ensures that the loyalty history accurately reflects the complete transaction, providing a more precise record of customer loyalty activity. This improves reporting and data accuracy for loyalty programs.
Original PR description
When a loyalty card both earned and spent points in the same POS order, the history entry only reflected the net difference instead of the gross amounts. The root cause was that the JS payload sent only a single `points` field representing the net change. Fix by tracking `points_earned` and `points_spent` separately in `couponData` and sending them to the server. opw-6041420 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#261399 Forward-Port-Of: odoo/odoo#256022
15 changes
Enhancements to existing features
This update refines how Odoo automatically matches bank statements to invoices and payments. Previously, it prioritized the closest date, which wasn't always accurate. Now, it only matches if there's one prior statement candidate, ensuring more reliable reconciliation and reducing potential errors in financial reporting.
Original PR description
Before this pr, we decided that when there was multiple candidates, we would take the one closer to the date of the statement line but it is not always what we want. We decided to change that so that it would match only if there is one candidate prior the date of the statement line. Exemple: Invoice 1 the 10/06 and invoice 2 the 20/06 → Payment the 05/06 → no matching (0 before) → Payment the 15/06 → match with invoice 1 (only 1 before) → Payment the 25/06 → no matching (More than 1 invoice open before) task-6143809 Forward-Port-Of: odoo/enterprise#115284
Resolved issues and error corrections
This update ensures that when reserving stock with packaged items, the system correctly considers the total available quantity, regardless of how it's divided into full packaging units. Previously, a large stock level was incorrectly limiting reservations. This fix improves the accuracy of stock availability calculations and prevents over-reservation issues.
Original PR description
Issue ----- Forced full packaging reservation setting is ignored when there is a big quant in stock. Steps to reproduce ----- - Enable packagings - Create a product category "Super Category" -…
Issue
-----
Forced full packaging reservation setting is ignored when there is a big quant in stock.
Steps to reproduce
-----
- Enable packagings
- Create a product category "Super Category"
- Reserve Packagings: Reserve Only Full Packagings
- Create a stored product "AAA"
- Product Category: Super Category
- 50 units on hand
- Packaging: 6-Pack (6 units)
- Create a delivery for 15 units of AAA
> Reservation is made for 15 units
Cause
-----
The rounding to a multiple of the packaging quantity takes the stock quant into account. For our example case, we have 8 full 6-Packs on hand, so the `available_quantity` gets set to 48 when doing
https://github.com/odoo/odoo/blob/5e458236ca2ff2ab92c4893495e7a721be902c40/addons/stock/models/stock_quant.py#L923-L925
This leads to the reservation quantity being min(15, 48) = 15
https://github.com/odoo/odoo/blob/5e458236ca2ff2ab92c4893495e7a721be902c40/addons/stock/models/stock_quant.py#L927
-----
Ticket:
opw-5974333
Forward-Port-Of: odoo/odoo#263114
Forward-Port-Of: odoo/odoo#257342This update fixes an issue where currency rates were incorrectly calculated for VAT reports. Previously, the system used any invoice line, even non-product lines, to determine the rate. This change ensures the rate is derived from the first valid product line, guaranteeing accurate VAT calculations. This improves the reliability of VAT reporting.
Original PR description
The currency rate was previously computed using the first invoice line, regardless of its type. This caused incorrect rate calculation when the first line was not a product line (e.g., section, note, or display-only lines). This fix filters invoice_line_ids to use the first actual product line when extracting amount_currency and balance, ensuring that the derived rate reflects a valid monetary line. opw-5208724 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#239920 Forward-Port-Of: odoo/odoo#237535
This update resolves an issue where scanning packaging barcodes (like '6-Pack') intermittently added quantities to the wrong line in the stock picking process. The fix ensures the barcode scan correctly identifies and updates the intended packaging unit, eliminating the alternating quantity behavior. This improves the accuracy of stock management.
Original PR description
Issue ----- When there are 2 lines for a single product and different packaging uoms, scanning a packaging barcode alternates between lines. Steps to reproduce ----- - Enable packagings - Create a…
Issue ----- When there are 2 lines for a single product and different packaging uoms, scanning a packaging barcode alternates between lines. Steps to reproduce ----- - Enable packagings - Create a product AAA - barcode 1 - Create a packaging 6-Pack - 6 units - barcode for AAA set to 6 - Create a PO - one line for 30 units of AAA - one line for 5 6-Pack of AAA - Confirm PO and open picking in barcode - Scan "6" multiple times > Quantity increases on both lines, alternating for each scan Cause ----- Both lines can be found as matching lines when doing https://github.com/odoo/enterprise/blob/d279632db25713dd639a51385cad197dfdbd2bdc/stock_barcode/static/src/models/barcode_model.js#L1426 The reason it alternates between the lines is because we set the currently selected line first in the array - and since both lines match, the `foundLine` returned ends up being the non-selected line. https://github.com/odoo/enterprise/blob/d279632db25713dd639a51385cad197dfdbd2bdc/stock_barcode/static/src/models/barcode_model.js#L1823-L1832 We can avoid this y refining the `break` condition of the loop to also match the packaging uom. ----- Ticket: opw-6034572 Forward-Port-Of: odoo/enterprise#112578
This update prevents unauthorized users from viewing or modifying assets linked to invoices. Previously, users on lower access groups could access asset information, creating a potential security vulnerability. Now, only users in specific accounting groups have access, ensuring data integrity and security.
Original PR description
Only groups `account.group_account_readonly`, `account.group_account_invoice` or higher have access to model `account.asset`, therefore if an user goes to see an invoice with assets and they are not on either group, they will receive an error and won't be able to access said invoice. How to reproduce: - Create a vendor bill - Create an account.asset and link it to said account.move - Go to the form view with an user that it's on group "Purchase: User" for example --> They get a traceback --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/enterprise#115053 Forward-Port-Of: odoo/enterprise#112890
This update corrects inaccuracies in the data used for calculating payroll in Belgium using the Prisma system. Specifically, it addresses missing or incorrect codes related to leave types (LEAVE280, LEAVE115, and LEAVE231), ensuring accurate tax and benefit calculations. This resolves a previous issue impacting Belgian employee payroll.
Original PR description
Issue: ---------------------------------------- Some prisma codes are wrong. Solution: ---------------------------------------- Change the data files. There are some subtilities that were not implemented: - LEAVE280: 0304 (if less than a year) and 0345 (if more) - LEAVE115: 0820 (Work accident) and 0830 (Occupational Disease) opw-6090081 Forward-Port-Of: odoo/enterprise#116642 Forward-Port-Of: odoo/enterprise#112949
This update resolves issues with note replies using the HTML composer, ensuring correct formatting and spacing are maintained. Previously, replies lost formatting and introduced extra line breaks. Now, replies preserve existing formatting and add trailing spaces correctly.
Original PR description
Before this PR, Replying to a note with the HTML composer enabled had several issues. - The mention added did not include a trailing space. - If the composer already contained formatted content, reply action discarded all formatting because the content was overwritten using composerText, which is not formatting-aware. - the composer sometimes showed extra spacing between lines because the base container used a `<p>` tag instead of a `<div>`. This PR fixes these issues by - inserting the mention directly into composerHtml with an editable trailing space instead of mutating composerText. This preserves existing formatting, and correctly adds spacing after mentions. - The base container always use a `<div>`, preventing unwanted line spacing task-[5454785](https://www.odoo.com/odoo/project/1519/tasks/5454785) Forward-Port-Of: odoo/odoo#242748
This update resolves a bug where price changes within the Blackbox POS module didn't consistently apply correctly, depending on the user's language settings (specifically, the decimal separator). The fix ensures accurate price calculations regardless of the user's locale, preventing incorrect order totals.
Original PR description
Before this commit, when changing the price of an orderline with the blackbox installed, if the decimal separator of the user language was not a dot and was used during the price change, the price was not changed. This was due to the fact that we were comparing a string with a number, the string would be implicitly be converted to a number and, when there was a comma for example, it would return a NaN which would cause the discount to not be applied and thus the price to not change. Forward-Port-Of: odoo/enterprise#113341 Forward-Port-Of: odoo/enterprise#113151
This update resolves an issue preventing accurate inventory counts when scanning pack-in-pack items. The fix ensures the system correctly identifies and updates quantities during inventory adjustments, allowing for reliable tracking of stock levels. This improves the accuracy of inventory management.
Original PR description
### Steps to reproduce: - In the settings enable "Packages" - Create a storable product A and put 1 unit in a package P in stock - Inventory > Products > Packages > open your package P - Set a parent…
### Steps to reproduce: - In the settings enable "Packages" - Create a storable product A and put 1 unit in a package P in stock - Inventory > Products > Packages > open your package P - Set a parent package PP as container - Inventory > Operations > Adjustments > Physical Inventory - Select you product line for A > Request a count (from the control panel button) - Enable Show Expected Quantity and confirm - Go to the barcode app > Count Inventory (1) - scan your parent package PP #### > traceback: Uncaught Promise > Cannot create property 'inventory_quantity' on boolean 'false' ### Cause of the issue: When the Package scan is processed, we loop over all quants related to it: https://github.com/odoo/enterprise/blob/30a28e28f8dd27cf2c88df65e5ff47eab59360c7/stock_barcode/static/src/models/barcode_quant_model.js#L566-L569 https://github.com/odoo/enterprise/blob/30a28e28f8dd27cf2c88df65e5ff47eab59360c7/stock_barcode/static/src/models/barcode_quant_model.js#L602-L617 And for each of these we try to find an existing line representing the quant to update or we do create a new line. Now, the issue, is that the subpackages of the quant are not provided to find the quant candidate line to update. As such, no line is found we enter the else clause and try to createa a NewLine: https://github.com/odoo/enterprise/blob/30a28e28f8dd27cf2c88df65e5ff47eab59360c7/stock_barcode/static/src/models/barcode_quant_model.js#L617-L627 This time however, the appropriate subpackage (the one of the quant) is provided to the arguments. And, since the line representing this quant is already existing, the `_createNewLine` will return False: https://github.com/odoo/enterprise/blob/30a28e28f8dd27cf2c88df65e5ff47eab59360c7/stock_barcode/static/src/models/barcode_quant_model.js#L393-L399 https://github.com/odoo/enterprise/blob/30a28e28f8dd27cf2c88df65e5ff47eab59360c7/stock_barcode/static/src/models/barcode_quant_model.js#L423 This leads to a traceback at the end of the else close since `false.inventory_quantity` doe not make sense (Cannot create property 'inventory_quantity' on boolean 'false') https://github.com/odoo/enterprise/blob/30a28e28f8dd27cf2c88df65e5ff47eab59360c7/stock_barcode/static/src/models/barcode_quant_model.js#L626-L627 Fix: We adapt the `_processPackage` of the `BarcodeQuantModel` to mimic the existing 'update' behavior on the `BarcodePickingModel`: https://github.com/odoo/enterprise/blob/30a28e28f8dd27cf2c88df65e5ff47eab59360c7/stock_barcode/static/src/models/barcode_picking_model.js#L2110-L2133 Note that UOM converstion should not be required since quants are already uniformly expressed in the product uom: https://github.com/odoo/odoo/blob/30b4edace6b0859cb1b1ba4f7f2ea80ba5398e3d/addons/stock/models/stock_quant.py#L52-L54 opw-5864591 Forward-Port-Of: odoo/enterprise#116715
This update resolves an issue where subsections remained visible on invoices even after the 'Hide Composition' feature was enabled. The fix adjusts how invoice reports display information, ensuring consistency between invoices and quotations. This improves the user experience by accurately hiding detailed invoice components as intended.
Original PR description
### Steps to reproduce: - Download 'Sales' app and create a product - Create an invoice with a section and a subsection - Set `Hide Composition` on the section - Add a product line under the subsection - Confirm and preview the invoice report > The subsection is still visible _Same issue occurs when activating 'Hide Prices'_ ### Cause of Issue: The `report_invoice.xml` file didn't include the right conditions to display the subtotals and unit prices in case of 'Hide Composition'/'Hide Prices'. Also, taxes were returned in `account_move_line` when they shouldn't be visible in case of 'Hide Prices'. ### Fix: Altered the conditions for sections and subsections, so that the information showing in 'Quotations' and 'Invoices' are consistent. opw-6069334 Forward-Port-Of: odoo/odoo#258628
This update fixes an error in the WPS payroll report generation process. Specifically, it ensures the Payment Date is correctly validated against the Value Date, preventing incorrect report data. The changes also improve the clarity of the report's data fields.
Original PR description
In this commit, we: - corrected the tooltip description of `l10n_sa_wps_value_date`; - added back the Debit Date to the WPS file and assigned it the value of the `effective_date`; - added back the user error in case the Payment Date is greater than or equal to the Value Date. TaskID-6130969
This update fixes a recurring error (924) that occurred when eTIMS processing failed due to network issues. The change improves Odoo's ability to retry sending invoices to eTIMS, ensuring successful transaction processing for Kenyan e-invoicing. It enhances reliability and avoids data inconsistencies.
Original PR description
When the network drops after eTIMS processes a transaction but before Odoo receives the confirmation, Odoo would retry with the same invoice number, causing eTIMS error 924 (Invoice number already…
When the network drops after eTIMS processes a transaction but before Odoo receives the confirmation, Odoo would retry with the same invoice number, causing eTIMS error 924 (Invoice number already exists). For POS orders, the old code decremented the sequence on any error (including timeout), so the next retry consumed the same invcNo. If eTIMS had already recorded the original send, the retry was rejected with 924. Fix by introducing a fetch-first strategy: on retry, if a pending invcNo is found in l10n_ke_order_json, call selectInvoiceDetails before sending. If eTIMS already has the invoice, recover the receipt data directly without resending. If eTIMS does not have it, resend with the same invcNo safely. On timeout errors, the sequence is no longer decremented so the invcNo is preserved in l10n_ke_order_json for the next idempotent retry. For customer invoices, the existing fetch-first logic only bailed out on TIM (timeout) errors, falling through on CON (connection) errors and retrying blindly. Additionally, if saveTrnsSalesOsdc returned 924, there was no recovery path and the invoice number would be cleared. Fix by also bailing on CON in the fetch block, and adding an explicit 924 handler that calls selectInvoiceDetails to recover the existing receipt instead of failing. opw-6105693
This update resolves an issue preventing accurate translation exports from the Web Studio interactive editor. A specific code formatting style (backslash and newline) was causing errors in the export process. The fix eliminates this formatting issue, ensuring that code translations are correctly exported and applied.
Original PR description
It seems that the Babel Javascript tokenizer is not able to correctly parse a template string starting with a backslash and a newline. This caused it to extract pieces of code coming after it. The code excerpts would be exported in the POT file, but not applied to the JS code of course. The original message was not exported though, so it was not possible to translate it. This commit rewrites the template string to not use a backslash and a newline. This way the string is properly extracted and the code after it is not. Change was introduced by this commit[^1]. [^1]: https://github.com/odoo/enterprise/commit/56a2d9c4c2cc655af0469038d4c483581ac78864
This update resolves a technical issue where merging restaurant tables could cause a system crash due to an infinite loop. The fix ensures that the system correctly handles table relationships, preventing this error and improving stability when merging tables, even offline.
Original PR description
Before this commit, it could happen that we try to link a restaurant table to another that was already its parent (for example by merging them while offline, we couldn't know that they were in a prent-child relation). This would lead to an infinite loop when trying to get the position of the table since it was computed based on the parent position so when a table is its own grand-parent, we get an active infinite loop. We solve the problem by going through the backend to merge tables. Task-id: 6183779 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#262509
This update resolves inconsistencies and errors with the timesheet timer functionality. Specifically, the timer now displays correctly in both the project header and the timesheets tab, and avoids issues with multiple timers running or timers continuing to run after being stopped. This ensures accurate time tracking.
Original PR description
## Issues When starting a timer from a task within a project, the timer appears in two locations: the page header, and the task's *Timesheets* tab. The latter does not behave as expected: when…
## Issues When starting a timer from a task within a project, the timer appears in two locations: the page header, and the task's *Timesheets* tab. The latter does not behave as expected: when opening the *Timesheets* tab, the timer resets to 00:00, and if the timer was started more than a minute earlier, it begins counting down (00:00, then -00:59, and so on). (**I1**) A second issue (**I2**), introduced at the same time, is that two timers can run simultaneously if the database is reloaded while a timer is active. A third issue (**I3**) happens after starting and stopping a timer from the Project app: the timer seems to still be running in the Timesheet app. ## Steps to reproduce 1. Install *Timesheets* (`timesheet_grid`) 2. Create a Project P and a Task T 3. Start the timer for Task T, wait a few seconds, then open the *Timesheets* tab 4. **The timer from the _Timesheets_ tab does not match the one on top of the page** 5. Wait for the timer in the header to reach 00:01:00, then open the *Timesheets* tab again 6. **The timer is going backward** For the second issue (**I2**), after executing the steps above: 7. Do not stop the timer, but stop the database and start it again 8. Create a new Project P2 and a Task T2 9. Start the timer for Task T2 10. **The timer in the header blinks between the timer from T1 and the newly started timer for T2**  For the third issue (**I3**): 1. In the project app, (create a project and a task and) start then stop a timer. Log the time 2. Open the timesheet app 3. **A timer is running** ## Cause The issues are introduced by the following commit: https://github.com/odoo/enterprise/commit/f4c7115fdf. The commit aimed to resolve an issue in which timers for sample data would start automatically, and the *Stop* button would throw an error. The issue was addressed by updating the condition that defines the `timerRunning` variable, which controls whether the *Stop* button in the Timesheets app is displayed. https://github.com/odoo/enterprise/blob/ac186aa71cd7e1b80b307ea12c7eaca246afd649/timesheet_grid/static/src/components/timesheet_display_timer/timesheet_display_timer.js#L57-L64 Issue **I1** is a side effect of this change in the Project app, where the `timerRunning` variable is evaluated to `true`, causing the timer to be displayed when it should not. The multiple timers running simultaneously (**I2**) stems from the `timerRunning` variable being initiated to false by default in the props. https://github.com/odoo/enterprise/blob/64f813dab727d76286c1ff6c80c08cb6a6737b49/timesheet_grid/static/src/components/timesheet_display_timer/timesheet_display_timer.js#L47-L50 The *Stop* button appearing after logging a task (**I3**) stems from the condition of the patch using `is_timer_running` over `timer_start`. https://github.com/odoo/enterprise/blob/64f813dab727d76286c1ff6c80c08cb6a6737b49/timesheet_grid/static/src/hooks/sample_server_patch.js#L9-L15 ## Fix This commit reverts the problematic segments from the previous commit. opw-5870756 opw-5879176 opw-5961764 Forward-Port-Of: odoo/enterprise#107014
2 changes
Resolved issues and error corrections
This update fixes an issue where importing changes to a sold subscription product bypassed a necessary warning. Now, when a product's subscription type is altered via import, a warning is automatically displayed, preventing unintended modifications to existing sales records. This ensures data integrity and prevents incorrect subscription settings.
Original PR description
__ ## Short functional explanation of the error When we have a subscription product that has already been sold. If we try to import a product with the same ID but where we change the subscription…
__ ## Short functional explanation of the error When we have a subscription product that has already been sold. If we try to import a product with the same ID but where we change the subscription type of the product, the import is executed without issue. However, this leads to undesired behavior: when we go to the product page and try to manually change the subscription type (set it back to subscription), the change is not applied as a warning is raised. ## Reproduction Steps Make sure you have debug mode enabled. 1. Create a product, and check the Subscription box. 2. Click on Orders and create a Quotation with this product, then confirm. 3. Go to Products > Products. Select the list view and search for the product you just created. Select it, and click Actions > Export. 4. Check the import compatible field. Select the fields to export: name, id and recurring_invoice. Upon exporting, a file is downloaded. 5. Access that file and change the recurring_invoice to FAUX or FALSE if your computer is in English. Save the changes. 6. Unselect the product and click on the cog, top right > Import. Click on Upload Data File and select the file that you have downloaded upon exporting, then import. ### Expected behavior A user warning is raised: we shouldn't be able to change the subscription type of the product when it has already been sold. ### Unexpected behavior The import is processed normally. Then, when we access the product page, and try to check the Subscriptions box again, a warning is raised. ## Origin of the issue Nothing prevents the import from occurring in that case. __ opw-6143789 Forward-Port-Of: odoo/enterprise#116922 Forward-Port-Of: odoo/enterprise#115046
This update fixes an issue where newly created stock batches were incorrectly named 'New' instead of following the standard 'BATCH/<TYPE>/000NN' naming convention. The fix ensures batches are correctly named, improving data consistency and reporting accuracy within the delivery order process.
Original PR description
Steps to reproduce 1. Open the Barcode app > Operations > Delivery Orders. 2. Switch to the "Batches" tab. 3. Create a new one. Issue The created batch keeps the placeholder name "New" instead of…
Steps to reproduce
1. Open the Barcode app > Operations > Delivery Orders.
2. Switch to the "Batches" tab.
3. Create a new one.
Issue
The created batch keeps the placeholder name "New" instead of being
renamed to `BATCH/<TYPE>/000NN`.
The barcode kanban "New" button calls `open_new_batch_picking`, which
runs `Batch.create({})` while the action context carries
`default_picking_type_id` set by `stock.picking.type._get_action` at
https://github.com/odoo/odoo/blob/f768f276171b079a76324d40307db385f558dda6/addons/stock/models/stock_picking.py#L432.
Since `vals` itself doesn't carry `picking_type_id`, the lookup in
`stock.picking.batch.create()` at
https://github.com/odoo/odoo/blob/f768f276171b079a76324d40307db385f558dda6/addons/stock_picking_batch/models/stock_picking_batch.py#L181
returns an empty recordset, so the sequence-based rename branch is
skipped and the name stays at the field default `'New'`. The
subsequent `super().create` then applies the context default, so the
batch is correctly linked to a picking type but with the wrong name.
opw-61683204 changes
Resolved issues and error corrections
This update fixes an issue where the currency rate used for VAT reporting was incorrectly calculated. Previously, it relied on the first invoice line, even if it wasn't a product. This change ensures the rate is derived from the first *actual product line*, guaranteeing accurate VAT reporting. This improves the reliability of financial data.
Original PR description
The currency rate was previously computed using the first invoice line, regardless of its type. This caused incorrect rate calculation when the first line was not a product line (e.g., section, note, or display-only lines). This fix filters invoice_line_ids to use the first actual product line when extracting amount_currency and balance, ensuring that the derived rate reflects a valid monetary line. opw-5208724 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#237535
This update resolves an issue where freight charges were incorrectly applied to all pickings, including backorders. The fix ensures freight costs are only included in the initial picking associated with a sales order, aligning with how delivery costs should be handled and improving invoice accuracy.
Original PR description
Commit 28b840b introduced logic to include `freight_costs` in the customs document generated bySendcloud. It introduced 2 new issues as a result: 1. When creating backorders, the `freight_costs` are…
Commit 28b840b introduced logic to include `freight_costs` in the customs document generated bySendcloud. It introduced 2 new issues as a result: 1. When creating backorders, the `freight_costs` are not divided but instead propagated to all of the pickings. 2. When there is no SO, we were taking the total value of all delivered goods, which doesn't make much sense considering the `freight_costs` field should be the cost of the delivery itself. Solution ----- For the first problem, there are a couple things to keep in mind: - the total `freight_costs` declared to the customs entity should be the amount invoiced to the customer - products can be added and removed from the picking after the SO has been confirmed - actual delivery cost can change between invoice date and actual delivery date - picking can be split into multiple packages at the user's discretion Considering all of the above, we will simply forward the invoiced amount with the first confirmed picking and none of the backorders. ----- Ticket: opw-6013387 Forward-Port-Of: odoo/enterprise#111304
This update fixes a minor discrepancy in the Norwegian tax settings. The tax code 32's rate was incorrectly set to 11.0. This change ensures accurate tax calculations for Norwegian businesses using Odoo, aligning with official tax regulations. This was coordinated with a related Enterprise PR.
Original PR description
The tax rate(`amount`) for code 32 was mistakenly set to '11.0'. To properly align with the official Norwegian tax rates, it needs to be updated to '11.11'. Related Enterprise PR: https://github.com/odoo/enterprise/pull/110792 task-6033027 Forward-Port-Of: odoo/odoo#263805 Forward-Port-Of: odoo/odoo#258390
This update resolves issues preventing Odoo's Norwegian VAT XML reports from passing validation by Skatteetaten. The changes ensure correct decimal formatting, mathematical precision, and the inclusion of required legal notes, guaranteeing accurate VAT returns and avoiding delays.
Original PR description
Before commit: The Norwegian VAT XML export fails Skatteetaten validation due to incorrect decimal formatting, mathematical rounding mismatches between base and tax amounts, missing mandatory legal…
Before commit: The Norwegian VAT XML export fails Skatteetaten validation due to incorrect decimal formatting, mathematical rounding mismatches between base and tax amounts, missing mandatory legal notes, and invalid KID number formats. Fix: To strictly follow Skatteetaten validation rules for the Norway VAT XML, the following changes were implemented: - Ensured standard rates drop the decimal (e.g, `25.0` to `25`), and formatted fractional rates like `11.11` to `11,11` in XML. - Rounded down the `tax_amount` to align precisely with government mathematical expectations. - `base_amount` converted into absolute value to ensuring the calculation (`base * rate = tax`) resolves perfectly. - Add the mandatory `<merknad>` explaining the reverse charge method for codes 81, 83, 86, 88, and 91. - Clean the `company_kid` by safely stripping the 'NO' prefix, and 'MVA' suffix. Expect: The generated XML payload now adheres perfectly to Skatteetaten's strict structural and mathematical rules, allowing the VAT return to pass government validations successfully. Related Community PR: https://github.com/odoo/odoo/pull/258390 Task-6033027 Forward-Port-Of: odoo/enterprise#116897 Forward-Port-Of: odoo/enterprise#110792
13 changes
New functionality added to Odoo
This update adds missing translations for several Odoo Enterprise modules, primarily within the Arabic, Azerbaijani, Bulgarian, Catalan, Czech, Danish, German, Greek, Hebrew, Hindi, Croatian, Hungarian, and Spanish language versions. These additions ensure the software is accessible and usable for a wider range of international customers. The translations were copied from a previous release (saas-19.3) to maintain consistency.
Original PR description
Related: https://github.com/odoo/odoo/pull/254667 Forward-Port-Of: odoo/enterprise#113055 Forward-Port-Of: odoo/enterprise#111141
This update introduces full-week calendars for Odoo's payroll modules in the UAE, Egypt, and Saudi Arabia. It allows for defining different work entry types for weekends, ensuring accurate payroll calculations and compliance with local labor laws. This improves the system's functionality for businesses operating in these regions.
Original PR description
- add full week calendars with a different work entry type for weekends for ae/eg/sa localizations task-id: 5155770
Enhancements to existing features
This update simplifies the process for Spanish users to access and manage tax reports. The menu structure has been reorganized to create clearer, more explicit links to the various Spanish tax models, enhancing usability and reducing confusion. This change improves the overall user experience for our Spanish-speaking customers.
Original PR description
The current menu structure makes finding specific Spanish tax models difficult. This commit reorganizes the tax reports menu to improve user experience. - Create explicit menu items for tax models under the Fiscal menu. - Add translations for the menu items Task-ID: 6036564
This update enhances Odoo's translation capabilities by standardizing the use of `self.env._()` for string translations, addressing potential issues and aligning with best practices. This change ensures more reliable and consistent translations across various modules, improving the overall user experience.
Original PR description
*: payment_sepa_direct_debit, sale_(stock_)renting, sale_(amazon,lazada,shopee),website_sale_(stock_)renting - Replace imports of `_` with calls to `self.env._()`. - Since…
*: payment_sepa_direct_debit, sale_(stock_)renting, sale_(amazon,lazada,shopee),website_sale_(stock_)renting - Replace imports of `_` with calls to `self.env._()`. - Since https://github.com/odoo/odoo/pull/174844, it is supported to translate Python strings through the environment using `self.env._()` instead of the bare `_()` function. - Using bare `_` has become bad practice as it causes confusion with the Python convention of `_` as a throwaway variable, and fails in edge cases such as lambdas and generators where frame-based language detection does not work correctly. - Therefore, within our scope, all occurrences of `_()` are replaced with `self.env._()` (or the relevant environment reference such as `request.env._()`) wherever possible. - Module-level constants that require lazy evaluation are updated to use `LazyTranslate(__name__)` in place of the old `_lt` import. SEE ALSO: - Community PR:https://github.com/odoo/odoo/pull/262235 task-6139904
This update prepares Odoo for the new Belgian VAT reporting requirements, effective May 1st. It adds a dedicated 'Tax Provision Account' (411800) to accurately reflect VAT adjustments for periodic returns. This ensures compliance with updated Belgian tax regulations.
Original PR description
Starting May 1st, in Belgium the VAT provision account will replace the current account for periodic returns - Adding the new bank account - Adding a new account 'Tax Provision Account' 411800 Community PR: odoo/odoo#255272 Task [link](https://www.odoo.com/odoo/project.task/6044017) task-6044017 Forward-Port-Of: odoo/enterprise#116432 Forward-Port-Of: odoo/enterprise#111599
Resolved issues and error corrections
This update fixes a reporting issue related to Goods and Services Tax (GST) filings in India. Previously, reverse charge tax entries were incorrectly placed in a specific table. Now, these entries are correctly reported in the appropriate table, ensuring accurate tax reporting and compliance.
Original PR description
Previously, journal items for import of services with reverse charge tax were shown only in table 4(A)(2) and not in table 3.1(d). However, since table 3.1(d) is meant for supplies liable to reverse charge, those entries should also be reported there. With this commit, import of service reverse charge entries are now correctly included in table 3.1(d) as well. Forward-Port-Of: odoo/enterprise#116827 Forward-Port-Of: odoo/enterprise#116708
This update resolves an issue where GOSI integration problems previously halted payroll processing. Now, GOSI configuration errors are logged as warnings instead of blocking errors, allowing payroll to continue processing without interruption. This improves payroll efficiency and reduces potential delays.
Original PR description
In this commit, the GOSI integration configuration issue is changed from a blocking error to a non-blocking warning during payslip validation. TaskID-6130969
This update resolves an issue where creating a picking type via the quick create function would trigger an error. The fix disables quick creation for picking types to prevent this error, ensuring a smoother user experience when creating receipts.
Original PR description
Currently an error occurs when user quick creates a picking type and tries to create a receipt with it. Steps to replicate: - Install stock. - Go to Inventory > Receipts and create a new receipt >…
Currently an error occurs when user quick creates a picking type and tries to create a receipt with it. Steps to replicate: - Install stock. - Go to Inventory > Receipts and create a new receipt > Save it. - Clear the Operation Type field, type `test` and quick create it. - Save and the error will occur. Error: ``` UndefinedFunction: operator does not exist: integer = boolean LINE 1: SELECT number_next FROM ir_sequence WHERE id=false FOR UPDAT... ``` Cause: - As the user quick created the picking type, the `sequence_code` field was not set and it is a required field [1], when we try to get `next_number` to create the name for the current stock picking this error occurs. - In the versions before `saas-19.1` trying to quick create picking type will lead to a `Not-Null Violation` as `sequence_code` is a required field and then stock picking type form view will open up. - This error occurs only after `saas-19.1` and above versions because this [PR] made the `sequence_code` field into a related field so its required constraint was removed and hence quick create creates a new picking type. Solution: - Disabled quick create for stock picking type. [1]: https://github.com/odoo/odoo/blob/fe0550ad23ff9128099e7e4994938879a971dcc8/addons/stock/views/stock_picking_type_views.xml#L93 [PR]: https://github.com/odoo/odoo/pull/190305/changes#diff-79cbc763115661182c02285c07320098510f5686700359ddee67443b4893dc30L32-R32 sentry-7383206579
This update replaces outdated code related to handling asynchronous operations (Deferred) with a more modern Promise-based approach. This change enhances the stability and performance of key Odoo modules, particularly those related to approvals and knowledge management. It’s a routine maintenance update ensuring Odoo continues to run efficiently.
Original PR description
*: approvals, knowledge Community: https://github.com/odoo/odoo/pull/260618 [Task-5262203](https://www.odoo.com/odoo/1519/tasks/5262203)
This update refines how live chat pop-up windows are closed within Odoo Enterprise. Specifically, it automatically closes the action panel when a chat window is closed, providing a smoother user experience. This ensures users can easily exit chat sessions without needing to manually navigate back.
Original PR description
https://github.com/odoo/odoo/pull/263590
This update resolves a bug that prevented price changes in the Blackbox POS module when the user's language used a comma (e.g., European format) instead of a dot as a decimal separator. The fix ensures accurate price calculations regardless of the user's locale, improving the reliability of order pricing.
Original PR description
Before this commit, when changing the price of an orderline with the blackbox installed, if the decimal separator of the user language was not a dot and was used during the price change, the price was not changed. This was due to the fact that we were comparing a string with a number, the string would be implicitly be converted to a number and, when there was a comma for example, it would return a NaN which would cause the discount to not be applied and thus the price to not change. Forward-Port-Of: odoo/enterprise#113341 Forward-Port-Of: odoo/enterprise#113151
A bug causing spreadsheet image insertion requests to hang and crash due to excessive data loading has been resolved. The fix bypasses the database security filtering process, reducing the amount of data loaded into memory and preventing performance issues with large attachments.
Original PR description
To reproduce: ============= - In a db with a large amount of attachments - Insert an image in a spreadsheet - Observe the request hanging then ending with an error Problem: ======== - `ir.attachment._search` is overridden to apply security rules by building a domain based on public, `res_model`, `res_id` and `create_uid` fields - When no `res_model` restriction is present, the fallback path ORs in `res_model != False`, which matches nearly every attachment in the database - All matching records are then loaded into memory for Python-side access filtering via `_filtered_access`, causing the request to time out and crash with a memory error Solution: ========= - Set `bypass_search_access=True` on the many2many field definition so the ORM skips the `_search` override and relies on the SQL join to restrict returned records opw-6152979 Forward-Port-Of: odoo/enterprise#115766
This update resolves a minor technical issue by removing an unnecessary console.log statement from the Gantt chart module. This ensures a cleaner user experience and prevents potential performance impacts, improving the overall stability of the application.
Original PR description
Before this PR, a console.log was left out. task-6201248 Forward-Port-Of: odoo/enterprise#116614
8 changes
Resolved issues and error corrections
This update resolves an issue where managers weren't seeing all their direct reports in the 'My Team' filter. The fix utilizes a more accurate domain filter ('is_subordinate') to ensure the filter correctly identifies and displays all subordinates within the management hierarchy. This improves reporting accuracy and manager oversight.
Original PR description
*: hr_attendance, hr_expense, hr_timesheet_attendance Before this commit: If A is a manager of B and B is a manager of C, A cannot see C under My Team filter. Fix: Use is_subordinate. task-6204754
This update fixes an issue where flexible employee time off wasn't accurately displayed in the attendance calendar. Now, the calendar correctly shows hours from midnight to 11 PM grayed out for flexible time off, ensuring accurate representation of absences across different views (day, week, month).
Original PR description
__ ## Short functional explanation of the error When setting a time off for an employee who has a flexible schedule, in the attendance app, on the calendar with the 'days' view. We can see that the…
__ ## Short functional explanation of the error When setting a time off for an employee who has a flexible schedule, in the attendance app, on the calendar with the 'days' view. We can see that the hours are grayed out from 8 hours to 16 hours. However, according to this message: https://www.odoo.com/mail/message/1027495005 "[...] the entire day of absence might not be represented as such, which is an issue (for example if a flexible employee with 8h/day takes a day off, the duration of the leave should be 1 day/8 hours but on the gantt view everything should be gray from midnight to midnight)". Moreover, when we select the Week or Month view on the calendar, the day off isn't grayed out. This comes from the fact that, for a flexible schedule, we consider that any time of the day can be a working hour; and we only grey out days in the calendar where no hour has been worked at all. Hence, the hours considered during a flexible day off should be from midnight to 23:59:59. ## Reproduction Steps 1. Go to an employee's profile and set their schedule to flexible. 2. Create a time off of a one-day duration for this employee. 3. Go to the attendance app and see the calendar. ### Expected behavior When clicking on the Day view, all hours from midnight to 11pm should be grayed out. When clicking on the Week/month view, the day of the time off should be grayed out. ### Unexpected behavior When clicking on the Day view, hours from 8am to 4pm are grayed out. When clicking on the Week/month view, the day of the time off isn't grayed out. ## Origin of the issue First, we only consider the leave if the resource is fully flexible, i.e if the employee has no working calendar set: https://github.com/odoo/odoo/blob/394a30f8a2814d460cfe220b5017e7ac95d8cddc/addons/resource/models/resource_calendar.py#L546 However, if the schedule of the employee is flexible, the leave resource isn't considered as fully flexible, thus leading us to a leave from 8 am to 4 pm. Moreover, when processing flexible leaves, we return the unavailable intervals with the timezone of the employee: https://github.com/odoo/odoo/blob/394a30f8a2814d460cfe220b5017e7ac95d8cddc/addons/resource/models/resource_calendar.py#L589-L592 Whereas when we process fixed leaves, we return the unavailable intervals under utc: https://github.com/odoo/odoo/blob/394a30f8a2814d460cfe220b5017e7ac95d8cddc/addons/resource/models/resource_calendar.py#L597-L601 This leads us to display problems: when the user is under European/ Brussels time in summer, the leave starts at 2 am and ends at 11pm, instead of starting at midnight. Note: after discussion with AJU, it has been agreed that the behavior should be the same on the Planning app. __ opw-6030212
This update fixes a bug that occurred when users tried to reschedule marketing activities within a running campaign. The change prevents errors related to activity hierarchy updates, ensuring campaigns run smoothly and avoiding disruptions. It prioritizes stability and prevents user errors during campaign management.
Original PR description
**Steps to reproduce:** - Create a new marketing campaign with two activities - Set them to occur some number of days after the beginning - Save the campaign and start it - Modify one of the…
**Steps to reproduce:** - Create a new marketing campaign with two activities - Set them to occur some number of days after the beginning - Save the campaign and start it - Modify one of the activities to occur some number of days after the other activity and save - Modify the child activity by changing the number of days after its parent that it should run and save - An error will be thrown **Issue:** The trace related to the child activity has no parent when trying to reschedule it in `_update_schedule_date`. This causes an issue when trying to get the first mailing_trace_ids using index 0 in this line: `base_dt_str = trace.parent_id.schedule_date or trace.parent_id.mailing_trace_ids[0].write_date or trace.participant_id.create_date` **Fix:** Prevent the activity hierarchy to be modified on started campaigns. We also change the indexing to avoid further out of range issue and properly default on the participant create value. Trying to match existing traces to their parents has too many edge cases when trying to avoid duplicates, and might often need to reset the whole trace chain to work properly. This approach avoids user mistakes on running campaigns, but if a user tries to launch a test (even on draft campaign) he won't be able to modify the hierarchy further without deleting/recreating some activities/traces. So we should ignore this for test traces, but it could impact the behavior between test and actual executions. opw-5362978
This update corrects a bug where unreconciling a payment from a recurring invoice would automatically generate a new draft invoice for the following period. The fix adds a context flag to prevent this behavior, ensuring invoices are created correctly after reconciliation. This improves invoice management and avoids unnecessary invoice generation.
Original PR description
Issue: Unreconciling a payment in a batch payment from a recurring invoice will cause an invoice for the next recurring period to be generated Steps to reproduce: 1. Create and confirm a monthly…
Issue: Unreconciling a payment in a batch payment from a recurring invoice will cause an invoice for the next recurring period to be generated Steps to reproduce: 1. Create and confirm a monthly recurring invoice 2. Create a payment for the invoice 3. Create a batch payment and add the payment created in step 2 then validate it 4. Create a bank statement line and reconcile it with the batch payment created in step 3 5. Unreconcile the payment from the invoice from the invoice form view 6. Notice that a draft invoice for the next month’s recurring invoice is created Cause: When unreconciling the payment from the invoice via the invoice form view, the method “delete_reconciled_line” is called. In the “account_accountant_batch_payment” override of that method, it will reset the invoice back to draft and repost it. However, when posting a recurring invoice, the default behavior is to create the invoice for the next recurrence period Solution: Adding a new context flag called “skip_recurring_copy” will prevent the next period’s recurring invoice from being generated when invoices are posted through “delete_reconciled_line” Community PR: https://github.com/odoo/odoo/pull/263991 opw-6158881
This update fixes an error in the Austrian localization reports by accurately reflecting the official VAT return and EC sales list filing deadlines. Previously, a fixed 15-day rule was used, which didn't align with Austrian regulations. This change ensures accurate reporting and compliance.
Original PR description
**[FIX] l10n_at_reports: correct Austrian return deadlines** The Austrian localization used a fixed `15 days` rule for both VAT returns and EC sales lists. This does not match the filing deadlines: the VAT return is due on the 15th day of the second following month while the EC sales list is due by the end of the following month (sources below). This fix replaces the hardcoded day offset with month-based deadline computation sources: https://www.usp.gv.at/themen/steuern-finanzen/umsatzsteuer-ueberblick/weitere-informationen-zur-umsatzsteuer/umsaetze-mit-auslandsbezug/zusammenfassende-meldung-zm.html https://www.usp.gv.at/en/themen/steuern-finanzen/umsatzsteuer-ueberblick/weitere-informationen-zur-umsatzsteuer/entstehen-der-steuerschuld-und-pflichten/umsatzsteuervoranmeldung.html opw-6147343
This update resolves an issue where rapid actions in the account reports module were creating duplicate records in the database. The fix prevents multiple simultaneous processes from attempting to create the same check, ensuring data integrity. This improves the stability and performance of the account reporting feature.
Original PR description
Issue -------------- When refreshing checks on account returns (e.g. from rapid successive clicks or component re-renders), multiple concurrent RPC calls to `refresh_checks` were being dispatched to…
Issue
--------------
When refreshing checks on account returns (e.g. from rapid successive clicks or component re-renders), multiple concurrent RPC calls to `refresh_checks` were being dispatched to the server. This created a race condition that resulted in duplicate `account.return.check` records being generated in the database.
steps to reproduce demonstrated in video: https://drive.google.com/file/d/1-A0ZHdYGdv-UL0dqClqK6Kos_iVXoZai/view?usp=sharing
When this happen the `runAllReturnChecks` method fires parallel RPC calls to [`refresh_checks`](https://github.com/odoo/enterprise/blob/55bfd499660d3eda0abfc9e8ed8c9a2befbd394b/account_reports/models/account_return.py#L1974-L1992) on the server. In the case of instant multiple RPC calls, parallel threads are dispatched which causes the data preparation stage to run simultaneously.
Because both threads run in parallel, Thread 2 runs its [preparation and existing ](https://github.com/odoo/enterprise/blob/55bfd499660d3eda0abfc9e8ed8c9a2befbd394b/account_reports/models/account_return.py#L1986-L1987 )check mechanism before Thread 1 has reached the actual `create()` function [trigger](https://github.com/odoo/enterprise/blob/55bfd499660d3eda0abfc9e8ed8c9a2befbd394b/account_reports/models/account_return.py#L1998-L1999). Consequently, Thread 2's existence check fails to find the record (since Thread 1 hasn't committed it to the database yet), and it considers the record eligible for creation—even though the exact same record is already prepared for creation by Thread 1. This race condition leads to duplicate `account.return.check` records.
Logs to demonstrate the thread execution:
--------
```python
2026-04-16 08:30:51,493 14 INFO bsra_4165887_upg werkzeug: 202.131.97.106 - - [16/Apr/2026 08:30:51] "GET /websocket?version=19.0-2 HTTP/1.0" 400 - 1 0.000 0.002
2026-04-16 08:30:51,662 14 INFO bsra_4165887_upg werkzeug: 202.131.97.106 - - [16/Apr/2026 08:30:51] "POST /web/dataset/call_kw/account.report/dispatch_report_action#account.report.dispatch_report_action HTTP/1.0" 200 - 17 0.006 0.012
2026-04-16 08:30:51,847 14 INFO bsra_4165887_upg werkzeug: 202.131.97.106 - - [16/Apr/2026 08:30:51] "POST /web/dataset/call_kw/account.return/get_views#account.return.get_views HTTP/1.0" 200 - 26 0.009 0.025
2026-04-16 08:30:52,099 14 INFO bsra_4165887_upg werkzeug: 202.131.97.106 - - [16/Apr/2026 08:30:52] "POST /web/dataset/call_kw/account.return/web_read_group#account.return.web_read_group HTTP/1.0" 200 - 95 0.029 0.064
2026-04-16 08:30:52,320 14 INFO bsra_4165887_upg werkzeug: 202.131.97.106 - - [16/Apr/2026 08:30:52] "POST /web/dataset/call_kw/account.return/get_next_returns_ids#account.return.get_next_returns_ids HTTP/1.0" 200 - 2 0.001 0.004
THREAD NAME: odoo.service.http.request.137360481711808 Thread ID: 137360481711808
REFRESH CHECK START:--------------------------------------------
Thread ID: 137360481711808 -------------DATA PREPARING STAGE------------
Thread ID: 137360481711808
Thread ID: 137360481711808 RECORD EXISTING CHECK: None
2026-04-16 08:30:53,842 14 INFO bsra_4165887_upg werkzeug: 202.131.97.106 - - [16/Apr/2026 08:30:53] "GET /odoo/tax-report/tax-return?debug=1 HTTP/1.0" 200 - 29 0.020 0.021
2026-04-16 08:30:54,066 14 INFO bsra_4165887_upg werkzeug: 202.131.97.106 - - [16/Apr/2026 08:30:54] "GET /web/webclient/load_menus HTTP/1.0" 200 - 4 0.002 0.009
2026-04-16 08:30:54,351 14 INFO bsra_4165887_upg werkzeug: 202.131.97.106 - - [16/Apr/2026 08:30:54] "GET /web/manifest.webmanifest HTTP/1.0" 200 - 6 0.003 0.005
2026-04-16 08:30:54,493 14 INFO bsra_4165887_upg werkzeug: 202.131.97.106 - - [16/Apr/2026 08:30:54] "GET /web/webclient/translations?hash=bb5aa713d587cc7dd07b13d1d7efc2c525517e99&lang=en_US HTTP/1.0" 200 - 1 0.000 0.002
2026-04-16 08:30:54,586 14 INFO bsra_4165887_upg werkzeug: 202.131.97.106 - - [16/Apr/2026 08:30:54] "GET /web/bundle/web_tour.interactive?lang=en_US&debug=1 HTTP/1.0" 200 - 1 0.001 0.003
2026-04-16 08:30:54,640 14 INFO bsra_4165887_upg werkzeug: 202.131.97.106 - - [16/Apr/2026 08:30:54] "POST /web/action/load_breadcrumbs HTTP/1.0" 200 - 7 0.003 0.006
2026-04-16 08:30:54,710 14 INFO bsra_4165887_upg werkzeug: 202.131.97.106 - - [16/Apr/2026 08:30:54] "POST /web/dataset/call_kw/ir.http/lazy_session_info#ir.http.lazy_session_info HTTP/1.0" 200 - 2 0.001 0.004
2026-04-16 08:30:54,753 14 INFO bsra_4165887_upg werkzeug: 202.131.97.106 - - [16/Apr/2026 08:30:54] "GET /bus/websocket_worker_bundle?v=19.0-2 HTTP/1.0" 304 - 3 0.004 0.006
2026-04-16 08:30:54,766 14 INFO bsra_4165887_upg werkzeug: 202.131.97.106 - - [16/Apr/2026 08:30:54] "GET /web/image?model=res.users&field=avatar_128&id=2 HTTP/1.0" 304 - 9 0.012 0.013
2026-04-16 08:30:54,777 14 INFO bsra_4165887_upg werkzeug: 202.131.97.106 - - [16/Apr/2026 08:30:54] "POST /mail/data HTTP/1.0" 200 - 34 0.034 0.020
2026-04-16 08:30:54,824 14 INFO bsra_4165887_upg werkzeug: 202.131.97.106 - - [16/Apr/2026 08:30:54] "POST /web/dataset/call_kw/account.return/get_views#account.return.get_views HTTP/1.0" 200 - 3 0.001 0.010
2026-04-16 08:30:54,934 14 INFO bsra_4165887_upg werkzeug: 202.131.97.106 - - [16/Apr/2026 08:30:54] "POST /web/dataset/call_kw/account.return/web_read_group#account.return.web_read_group HTTP/1.0" 200 - 88 0.029 0.051
2026-04-16 08:30:55,107 14 INFO bsra_4165887_upg werkzeug: 202.131.97.106 - - [16/Apr/2026 08:30:55] "POST /web/dataset/call_kw/account.return/get_next_returns_ids#account.return.get_next_returns_ids HTTP/1.0" 200 - 2 0.001 0.005
THREAD NAME: odoo.service.http.request.137360513177280 Thread ID: 137360513177280
REFRESH CHECK START:--------------------------------------------
Thread ID: 137360513177280 -------------DATA PREPARING STAGE------------
Thread ID: 137360513177280
Thread ID: 137360513177280 RECORD EXISTING CHECK: None
2026-04-16 08:30:55,589 14 INFO bsra_4165887_upg werkzeug: 202.131.97.106 - - [16/Apr/2026 08:30:55] "GET /websocket?version=19.0-2 HTTP/1.0" 400 - 1 0.001 0.006
2026-04-16 08:30:56,702 14 INFO bsra_4165887_upg werkzeug: 202.131.97.106 - - [16/Apr/2026 08:30:56] "GET /web/service-worker.js HTTP/1.0" 200 - 1 0.000 0.003
2026-04-16 08:30:58,893 14 INFO bsra_4165887_upg werkzeug: 202.131.97.106 - - [16/Apr/2026 08:30:58] "GET /websocket?version=19.0-2 HTTP/1.0" 400 - 1 0.006 0.023
2026-04-16 08:31:05,296 14 INFO bsra_4165887_upg werkzeug: 202.131.97.106 - - [16/Apr/2026 08:31:05] "GET /websocket?version=19.0-2 HTTP/1.0" 400 - 1 0.001 0.002
Thread ID: 137360481711808 DATA to_create: 168
Thread ID: 137360481711808 done process create
2026-04-16 08:31:10,132 14 INFO bsra_4165887_upg werkzeug: 202.131.97.106 - - [16/Apr/2026 08:31:10] "POST /web/dataset/call_kw/account.return/refresh_checks#account.return.refresh_checks HTTP/1.0" 200 - 513 11.611 6.039
Thread ID: 137360513177280 DATA to_create: 168
Thread ID: 137360513177280 done process create
```
- OPW: 5917459This update resolves a problem where the tour worksheet wasn't being saved correctly due to a timing issue. The fix adds a delay to ensure the HTML field is fully loaded before the worksheet is saved, preventing the random failure. This ensures tour worksheets are reliably saved.
Original PR description
Currently, the test tour loads too quickly, so the worksheet is not saved properly. The issue happens because the worksheet is not yet visible on the portal view side. Therefore, i added an extra step to wait for the HTML field to load, giving enough time for the worksheet to be fully loaded. runbot error-242479
This update resolves a technical issue that prevented the system from correctly identifying project documents when a project lacked a designated folder. The fix ensures the system functions reliably regardless of whether a folder is specified, improving the stability of project document retrieval.
Original PR description
The `_compute_documents()` method was expecting that the `documents_folder_id` field was always set.
However, the field is not required and can be empty.
This is not an issue if the compute is called on a single record, but when called on a recordset with :
- A project with related folder with at least one document
- A project with `documents_folder_id` empty The compute will fail because it calls `startswith()` with a parameter that is `False`.
```python
File "/home/odoo/src/enterprise/19.0/documents_project/models/project_project.py", line 50, in <lambda>
document_ids = documents.filtered(lambda doc: doc.parent_path.startswith(project.documents_folder_id.parent_path))
TypeError: startswith first arg must be str or a tuple of str, not bool
```
Solution:
Check for project-related documents only if the dedicated folder is set.11 changes
Resolved issues and error corrections
This update fixes an issue where kit component descriptions were missing from delivery slips. Now, when printing delivery slips for kit products, the kit name is correctly displayed, providing clearer information for order fulfillment. This ensures accurate tracking and reporting of kit components.
Original PR description
__ ## Short functional explanation of the error When printing delivery slips, the description of kit components isn't shown. Therefore, we only see the components on the slip, and not the kit they…
__ ## Short functional explanation of the error When printing delivery slips, the description of kit components isn't shown. Therefore, we only see the components on the slip, and not the kit they come from. ## Reproduction Steps 1. Go to settings. Under Inventory, in the Operations section, enable Packages. 2. Go to Sales and create a new quotation. Select a customer and add a kit product. Click on confirm. 3. Click on the Delivery smart button. Click on Put in Pack and Validate. 4. Click on the small cog > Print > Delivery Slip. ### Expected behavior The kit from which the components belong should be indicated somewhere on the slip. ### Unexpected behavior The kit isn't indicated. ## Origin of the issue When we print a delivery slip without putting in pack, we can see on the slip that the first line, in bold, corresponds to the kit name. However, after putting in pack, the first line, in bold, indicates the Package id: https://github.com/odoo/odoo/blob/80b602f2fa82366280f9beaa3414c27293bdc4f6/addons/stock/report/report_deliveryslip.xml#L116 Thus, the lines after will correspond to the components, of which we retrieve the details with: https://github.com/odoo/odoo/blob/80b602f2fa82366280f9beaa3414c27293bdc4f6/addons/stock/report/report_deliveryslip.xml#L125 However, in `_get_aggregated_product_quantities`, we set the description of the components to an empty string under that case: https://github.com/odoo/odoo/blob/80b602f2fa82366280f9beaa3414c27293bdc4f6/addons/mrp/models/stock_move.py#L180-L181 leaving us with no description for the components, and therefore not indicating the kit to which they belong. __ opw-6006514
This update corrects a technical issue that prevented automatic product label printing from working correctly. The change ensures that the necessary action is called when a work order is marked as complete, streamlining the label generation process. This improves the efficiency of our product labeling workflow.
Original PR description
The `button_mark_done` method called through the ORM returns a client action (`do_multi_print`) that should be called by the js code. This is useful in the case of automatic printing of product labels for example. The action call was missing, this commit adds it. opw-5388271
This update corrects a problem in our sale stock test environment. The test was incorrectly running due to outdated cached data, which allowed it to pass even when it shouldn't. This change ensures the test accurately reflects the system's behavior and prevents false positives.
Original PR description
When running the test, `button_validate()` was called twice in succession. - Once explicitly - Once through `process_cancel_backorder()` The first time it is called though, it's not through the restricted user that we want to test, allowing some access rights checks to run smoothly. The second time it's called with the restricted user, the cache still contains some data that should be no longer accessible, allowing the test to run even though it shouldn't. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update corrects a bug that prevented standard sales users from accessing related sales orders, regardless of whether they were inter-company transactions. Previously, users would encounter access errors when validating sales orders, disrupting the sales process. This fix ensures all users can properly manage sales orders.
Original PR description
When running `button_validate`, a regular stock user won't be able to access the related SO to check whether the partner is another company or not. This will raise access errors for all regular SO deliveries, regardless of being inter-company or not.
This update resolves an issue where the Table of Contents in the HTML editor wasn't updating correctly after editing headings. The fix ensures the ToC always updates, even after merging headings with previous text, improving the user experience when creating and managing content.
Original PR description
Steps to Reproduce : - Go to To-Do → Create New and add a Table of Content block - Type text → in new line create /h1 → it appears in ToC - Place cursor before /h1 and press Backspace → it merges with paragraph Description of the issue: Table of Content block does not update accordingly Cause: After the heading is merged with the previous paragraph, `delayedUpdateTableOfContents` is triggered, but at that time no heading is available in the editable area. As a result, instead of updating the Table of Contents, it returns without making any changes. Solution: If Table of content already contains heading, then update regardless of whether editable contains heading elements or not. task-6150579
This update resolves a technical issue preventing invoices with Early Payment Discounts (EPD) and 0% tax from passing schematron validation, a requirement for Peppol compliance. The fix ensures correct VAT breakdown generation, eliminating a previous error where duplicate tax information was created and a hardcoded tax category was used. This ensures invoices are correctly formatted for international transactions.
Original PR description
Before this commit, creating an invoice with an Early Payment Discount (EPD) as a payment term could cause the schematron validation of the generated invoice to fail when an invoice line had a 0% tax. The issue was caused by generating two TaxSubtotal nodes for the same TaxCategory (0%, exemption code 'E'): - one for the 0% VAT - one for the EPD discount applied to the total amount However, Peppol requires a single VAT breakdown (TaxSubtotal) per VAT category (in this case: E) Additionally, when VAT was set to 0%, the allowance charge TaxSubtotal incorrectly used 'S' as a hardcoded tax category code. This commit fixes both issues. task-5900496 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#254199
This update resolves issues that occurred when archiving employees with attendance and planning modules. Specifically, it ensures employees are properly checked out of attendance and planning slots during archiving, preventing access errors and data inconsistencies. The fix utilizes a 'sudo' method to grant necessary permissions for updates.
Original PR description
- Attendance checkout - Step to reproduce: with attendance installed and an employee checked in, archive that employee by HR user. If missing attendance rights, the employee will be archived but not…
- Attendance checkout
- Step to reproduce: with attendance installed and an employee checked in, archive that employee by HR user. If missing attendance rights, the employee will be archived but not checked out from its ongoing attendance.
- Cause: if no role set for Attendance (default), no permission to update the employee attendance while archiving.
- Solution: using sudo method so that any user with sufficient rights to archive an employee, can trigger check out of the corresponding attendance.
- Planning access error (fixed in 18.0 by https://github.com/odoo/odoo/pull/219395)
- Step to reproduce: with attendance and planning installed, archive an employee having planning slots. If missing planning rights, an access error is raised
- Cause: on employee archive, the corresponding planning.slots are updated and some fields recomputed with insufficient rights.
- Solution: using sudo method for recompute.
Task: 6131692
Forward-Port-Of: odoo/odoo#260566This pull request addresses inconsistencies in the XML structure used for Swedish bank payments within the Odoo Enterprise system. The changes ensure accurate formatting of critical data fields like 'CdtrAgt' and 'FinInstnId', aligning with current banking standards and improving data reliability for payment processing. This resolves a technical issue related to Swedish bank integration.
Original PR description
Here is few fixes added to the swedish iso 20022 XML: - CdtrAgt seems to be always mandatory, change the condition in `_skip_CdtrAgt` to always use the CdtrAgt if payment_method is iso20022_se - The `_is_se_bban` is too restrictive, this should be always True when payment method is swedish iso - The `FinInstnId` node can either contain BIC or ClrSysMmbId. But as ClrSysMmbId seems to change from one bank to another, it's more relevant to always use the BIC. opw-5395736
This update resolves an issue where users with planning manager permissions couldn't copy planning slots to employees with flexible calendars due to access restrictions. Now, users with planning manager rights can successfully copy and move slots, improving workflow efficiency and reducing potential disruptions.
Original PR description
**Purpose**: A user with planning manager rights but no access to employee and contract records should be able to copy and movea planning slot to an employee with a flexible resource_calendar without getting an access rights error. **Before this commit:** When copying a planning slot, the system tries to compute the working hours over the period of the slot. This will raise an access rights error if the user doesn't have access to employee and contract records when the slot is moved to a flexible resource_calendar. **After this commit:** The user can copy a planning slot without access rights error with only planning manager rights, even if the slot is moved to a flexible resource_calendar. **Steps to reproduce:** 1.Install Planning and Planning Contract modules. 2.Create a user with only planning manager rights and no access to employee and contract records. 3.Copy a planning slot to an employee with a flexible resource_calendar. opw-6166557
This pull request addresses a bug in the stock account testing process. A test related to product tracking was identified and corrected, ensuring the accuracy of inventory data. This fix improves the reliability of our stock management system.
Original PR description
runbot-243298 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fix addresses a bug that caused invoices to be deleted during cash rounding with specific configurations. The issue stemmed from how the system handled partner IDs, leading to errors when the invoice's customer address wasn't correctly defined. The update ensures the commercial partner is set on the rounding line, preventing the deletion and allowing invoices to be processed correctly.
Original PR description
When applying a cash rounding with 'biggest tax' strategy, it happens that we end up with a MissingError when the invoice's partner is not defined as commercial_partner_id. Steps: - Install…
When applying a cash rounding with 'biggest tax' strategy, it happens that we end up with a MissingError when the invoice's partner is not defined as commercial_partner_id. Steps: - Install membership module - Create a cash rounding with the 'biggest tax' strategy and 0.05 rounding - Enable customer addresses and create a partner P with an invoice address I - Create an invoice, select I as customer (P will be assigned as delivery address but this is not relevant) - Add an invoice line for 100.03 and any tax and apply the cash rounding - Confirm -> MissingError: record has been deleted Cause: - When creating the cash rounding lines, we set the `partner_id` from the invoice's partner (in our case partner I, which has P as `commercial_partner_id`). - When posting the invoice we look for lines that have partner id different than the invoice's commercial partner id and we call the write method to set the commercial partner id instead https://github.com/odoo/odoo/blob/832165841f66675c0238652c5b0e5e0b6f75ca43/addons/account/models/account_move.py#L5234-L5239 - In some cases, for example in the `membership` module, the override of the write method calls the super() before using `self`. https://github.com/odoo/odoo/blob/832165841f66675c0238652c5b0e5e0b6f75ca43/addons/membership/models/account_move.py#L45-L49 But the super triggers the `_sync_tax_lines` mechanism, during which the rounding line in deleted https://github.com/odoo/odoo/blob/832165841f66675c0238652c5b0e5e0b6f75ca43/addons/account/models/account_tax.py#L3102-L3110 https://github.com/odoo/odoo/blob/832165841f66675c0238652c5b0e5e0b6f75ca43/addons/account/models/account_move.py#L3113-L3114 Therefore `self` doesn't exist anymore when comming back in the override Fix: Setting the commercial partner on the rounding line to avoid calling the write method opw-6128868
1 change
Resolved issues and error corrections
This update fixes a reporting issue in the Profit & Loss report for Peruvian companies. Previously, depreciation entries were incorrectly categorized as 'Other Income.' The change ensures that depreciation entries (expenses) are now correctly classified within 'Other Operating Expenses,' improving the accuracy of financial reporting.
Original PR description
**Steps to reproduce:** - Install Accounting and l10n_pe_reports - Switch to a Peruvian company (e.g. PE Company) - Create a MISC journal entry with a line using a depreciation account (e.g. 6841000) and a debit value (e.g. 1000) - Post the entry - Check "Profit and Loss" report" **Issue:** The "Other operation income" section has an amount of 1000, even though a depreciation account (i.e. expense) was used. The amount should be in "Other operating expenses" section. **Cause:** A unique formula including accounts starting with 61, 66, 68, 71, 73, 74, 75, 76, 78, 79 and 99900 is used for "Other operation income" and "Other operating expenses" and depending on the sign of the sum, the result is reported in one of the section. **Solution:** Only report entries on "Income" accounts in "Other operation income" section and those on "Expense" accounts in "Other operating expenses". opw-6073666