Daily updates from Odoo
Monday, May 18, 2026
232 changes
34 changes
Resolved issues and error corrections
This update simplifies the process of retrieving transactions from Codabox. Previously, a write access check was required, even with an established connection. This change removes that unnecessary check, streamlining the process and improving efficiency.
Original PR description
Currently, we use the `_l10n_be_codabox_verify_prerequisites` method before trying to fetch transactions. This method checks if the user has write access rights on res.company model which should not be mandatory to fetch transactions from codabox when the connexion is already created. opw-6108811 Forward-Port-Of: odoo/enterprise#117097
This update resolves an issue where pressing Enter after a styled heading created a new paragraph that incorrectly inherited the heading's formatting (like color). The fix ensures that newly created paragraphs are empty and without inherited styles, aligning with the expected behavior. This improves the consistency and predictability of the HTML editor.
Original PR description
Problem: Pressing Enter at the end of a styled heading (e.g., with a color) creates a new paragraph that inherits the heading styles. This is no longer the expected behavior. The new paragraph should be empty and without inherited styles. Solution: When splitting a heading at its boundaries and creating a base container, fill it with a `br` instead of carrying over styles. Steps to reproduce: - Add a heading. - Apply a style (e.g., color). - Place the caret at the end of the heading. - Press Enter. - Observe that the new paragraph still has the heading color. task-6147897 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#264624 Forward-Port-Of: odoo/odoo#262150
This update resolves an issue where test emails sent through the Email Marketing app would leave a related attachment visible in the chatter of contact records. The fix ensures that test messages are properly removed from the Chatter after sending, preventing clutter and improving the user experience. This improves the clarity of communication within the system.
Original PR description
**Steps to reproduce:** - Go to Email Marketing app - Create a mailing campaign - Set its recipients to Contact - Upload a file in Settings > Attach a file - Click on the test button to send a test mail to any mail - Go to the first contact record - Related attachment appears in the chatter **Issue:** Before 18.2, messages created for testing were ignored by the Chatter as they were empty (and not unlinked). But if an attachment was provided, it was linked to the test message and not deleted afterwards (which means it shows up in the record chatter). **Fix:** Ensure the related messages are unlinked at the same time as the test mail in `send_mail_test` by setting `is_notification` to False to trigger the `unlink` logic and remove the related attachments at the same time. backport of: https://github.com/odoo/odoo/commit/526b3d73886558315f2435714b2ed82fec313e78 opw-6168632 Forward-Port-Of: odoo/odoo#263139 Forward-Port-Of: odoo/odoo#262152
This fix resolves an issue where generating closing entries in the Inventory Valuation view produced incorrect results when multiple companies were selected. The update ensures that the generated account move lines accurately reflect the stock valuation data for the selected main company, preventing mismatched balances.
Original PR description
**Problem:** In view Inventory valuation, generate entry doesn't work when multiple companies are selected. In the view only the main company matters. That means that even if multiple companies are…
**Problem:** In view Inventory valuation, generate entry doesn't work when multiple companies are selected. In the view only the main company matters. That means that even if multiple companies are selected, only the stock variation lines related to the main company selected are displayed (which is expected). But if you then click on 'generate entry' the account move lines created will have wrong values (not matching the values appearing in the view) **Steps to reproduce:** - create 2 new companies (to have clean accounting) - create a warehouse for both companies - for both comp, in settings for the 'fiscal localization' set Package : Generic Chart of account, if not already set (to have account journals). From company 1 : - create a storable prod with avco perpetual category - confirm PO for 2 @ 10, receive - bill only 1 @ 10 From company 2: - make sure the category is also perpetual average from this other company - confirm PO for 2 @ 50, receive, don't bill Notice how from the 'Inventory Valuation' view, rightfully, only the main company matters (no matter what other comp are selected): - If main comp is comp 1 there is stock variation lines for amount of 10 (which is expected because we have 20 in stock and only 10 in stock valuation account) - If main comp is comp 2 there is stock variation lines for amount of 100 (which is expected because we have 100 in stock and only 0 in stock valuation account) With comp 1 and 2 selected and comp 1 as main company: - click on 'Generate Entry' **Current behavior:** - both line have a balance of 110 **Expected behavior:** - they should have a balance of 10 as we saw on the 'inventory valuation' view **Cause of the issue:** To generate the data from the 'inventory valuation' view, inside _get_report_data() we call stock_value() and stock_accounting_value() to compare values from inventory and value from accounting. https://github.com/odoo/odoo/blob/dd84309df7fd39e9e97ed02d135d25b211085135/addons/stock_account/report/stock_valuation_report.py#L36-L37 stock_value() sums total_value() of each product in the valued accounts https://github.com/odoo/odoo/blob/dd84309df7fd39e9e97ed02d135d25b211085135/addons/stock_account/models/res_company.py#L90-L94 Whereas stock_acounting_value(), sums the balance of each account move line of each valuation account https://github.com/odoo/odoo/blob/dd84309df7fd39e9e97ed02d135d25b211085135/addons/stock_account/models/res_company.py#L112-L114 All of this is related to the main company because we call _get_report_data() with context 'allowed_company_ids' set to only the main company https://github.com/odoo/odoo/blob/dd84309df7fd39e9e97ed02d135d25b211085135/addons/stock_account/report/stock_valuation_report.py#L13 But when we click on generate entry, _get_stock_valuation_account_vals() is called with no context modification to 'allowed_company_ids' so when we call stock_value(), https://github.com/odoo/odoo/blob/dd84309df7fd39e9e97ed02d135d25b211085135/addons/stock_account/models/res_company.py#L238-L239 total_value will be based on both company https://github.com/odoo/odoo/blob/dd84309df7fd39e9e97ed02d135d25b211085135/addons/stock_account/models/res_company.py#L92 Note that stock_accounting_value() is still rightfully based only on main company because we use self.id in the domain https://github.com/odoo/odoo/blob/dd84309df7fd39e9e97ed02d135d25b211085135/addons/stock_account/models/res_company.py#L105-L108 opw-6168699 Forward-Port-Of: odoo/odoo#263946 Forward-Port-Of: odoo/odoo#262776
This update fixes a visual issue in the project timesheet reporting. Previously, the 'Time Remaining' value wasn't highlighted in red when it was a negative number, which could be confusing for users. The fix ensures the value is correctly colored red when negative, improving clarity and accuracy of time tracking data.
Original PR description
**Steps to reproduce:** - Open project shared form view. - Go to the Timesheets tab. - Observe the Time Remaining value. **Issue:** - The Time Remaining label is red properly but its value does not becomes red even when the value is negative. **Fix:** - Adjusted the logic to ensure the Time Remaining value is highlighted in red when value is negative **Task-id: 5404009** Forward-Port-Of: odoo/odoo#260996 Forward-Port-Of: odoo/odoo#240489
This update corrects a visual inconsistency in the project timesheet interface. Previously, the 'Time Remaining' value wasn't highlighted in red when the time was negative. This fix ensures that negative time values are correctly displayed with a red warning indicator, improving clarity and accuracy for users managing project time.
Original PR description
**Steps to reproduce:** - Open project shared form view. - Go to the Timesheets tab. - Observe the Time Remaining value. **Issue:** - The Time Remaining label is red properly but its value does not becomes red even when the value is negative. **Fix:** In hr_timesheet, the remaining_hours field has a decoration-danger applied In sale_timesheet_enterprise, this field is overridden as portal_remaining_hours So, Added the corresponding decoration-danger on portal_remaining_hours. task-5404009 Forward-Port-Of: odoo/enterprise#114836 Forward-Port-Of: odoo/enterprise#113632
This update fixes an issue where dependent taxes weren't correctly recalculated after a base tax was removed from a sales order or invoice. The fix ensures that tax amounts are accurately computed, particularly when using the 'Affect Base of Subsequent Taxes' setting. This improves the reliability of financial reporting.
Original PR description
**Steps to reproduce:** * Install the *Accounting* module with French localization (*l10n_fr_account*). * Create a *Sales Tax* with: * A new tax group (e.g., 'Codifab'). * Enable *Affect Base of…
**Steps to reproduce:** * Install the *Accounting* module with French localization (*l10n_fr_account*). * Create a *Sales Tax* with: * A new tax group (e.g., 'Codifab'). * Enable *Affect Base of Subsequent Taxes*. * Create a *Sales Order*: * Add the first tax (with *Affect Base of Subsequent Taxes*). * Then add the second tax (eg VAT tax). * Confirm the *Sales Order*. * Create a *Down Payment Invoice* (percentage-based). * Open the generated invoice and: * Remove the first tax (the one affecting the base). **Observed behavior:** * The amount of the second tax group does not update after removing the first tax, leading to incorrect tax computation. **Cause:** * In `_import_base_line_extra_tax_data`, the condition: `all(str(tax.id) in extra_tax_data['manual_tax_amounts'] for tax in sorted_taxes)` only ensured partial matching of taxes. * This allowed reuse of stale `manual_tax_amounts` when taxes were removed or modified, causing incorrect base values for dependent taxes (e.g., *Affect Base of Subsequent Taxes*). **Fix:** * Update the condition to enforce an exact match between current taxes and cached `manual_tax_amounts` by checking both size and membership. * Prevent reuse of outdated tax data when taxes change, ensuring proper recomputation of dependent taxes. * Align Python logic with the JS implementation for consistency between `account_tax.py` and `account_tax.js`. opw-6063970 Forward-Port-Of: odoo/odoo#264710 Forward-Port-Of: odoo/odoo#259566
This update fixes an issue where the FEC file parser would fail due to empty lines. The change now automatically skips these empty lines, ensuring all valid FEC files are processed correctly and preventing errors. This improves the reliability of the French localization import process.
Original PR description
It could happens that we have some empty lines in the fec files, the parser was returning an error when that happened. We still want to process the file so we will just skip the empty lines. task-6169168 Forward-Port-Of: odoo/enterprise#115758
This update corrects a technical issue in the French Intrastat export process. Previously, supplementary unit data for products with CN codes was being incorrectly omitted from the DEBWEB2 XML file. This fix ensures that all relevant quantity information is accurately included, improving the reliability of Intrastat reporting.
Original PR description
Steps to reproduce 1. In a French company with Intrastat enabled, set up a product whose commodity code has a CN supplementary unit (e.g. 8802 30 00, "p/st") and set…
Steps to reproduce
1. In a French company with Intrastat enabled, set up a product whose commodity code has a CN supplementary unit (e.g. 8802 30 00, "p/st") and set `intrastat_supplementary_unit_amount` on it.
2. Post EU customer invoices for that product.
3. Export the DEBWEB2 XML from the Intrastat report.
Issue
The FR export collapses engine rows a second time in `_group_items`, because the DEBWEB2 format groups more aggressively than the SQL. The aggregator only declares `value` and `weight`: https://github.com/odoo/enterprise/blob/6ae5d3df6e9305416e4d6f74259cd01753025f42/l10n_fr_intrastat/models/account_intrastat_report.py#L308-L313 Items are then rebuilt as `dict(zip(grouping_key, key_tuple)) | grouped_item_values`. `SU_code` survives (it is in the grouping key), but the numeric `supplementary_units` is in neither side and is silently dropped as soon as two engine rows merge. The template then skips the element because of its `t-if="item.get('supplementary_units')"` guard: https://github.com/odoo/enterprise/blob/6ae5d3df6e9305416e4d6f74259cd01753025f42/l10n_fr_intrastat/data/intrastat_export.xml#L61
opw-6139657
Forward-Port-Of: odoo/enterprise#117357
Forward-Port-Of: odoo/enterprise#117033A recent test for live chat duration was unreliable due to a race condition in how the system handled agent state changes. This fix addresses this issue by splitting the test to avoid the problematic state transitions, ensuring the test runs consistently. This improves the overall reliability of our live chat monitoring.
Original PR description
The `show looking for help duration in the sidebar` test has been flaky since [1]. The root cause is that the agent joins at the final step, resetting the state to in_progress, then immediately…
The `show looking for help duration in the sidebar` test has been flaky since [1]. The root cause is that the agent joins at the final step, resetting the state to in_progress, then immediately switches it back to `looking_for_help`. This creates several race conditions: - Bus notifications from `join_livechat_need_help`, new message events, and any other notification carrying stale state data. - Channel state fetched after the user joins via `/mail/data`. The mock server makes these races hard to guard against: notifications arrive one by one, and there's no UI signal that guarantees all stale data has been processed. This commit splits the test to preserve coverage while avoiding the problematic rapid state transition. runbot-242278 [1]: https://github.com/odoo/odoo/pull/252738 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#264666
This update resolves an issue preventing successful Envia deliveries in Chile. The problem stemmed from a mismatch between Odoo's state code mapping and Envia's API requirements. The Envia API expects a shorter state code (2-3 digits), which wasn't being applied correctly for the 'Metropolitana' region. This fix updates the mapping to ensure accurate data transmission to Envia.
Original PR description
### Steps to reproduce: - Install delivery_envia - Website > Configuration > eCommerce > Delivery Methods > Envia - Enable the delivery method, sync the carrier and Publish it - With a portal user >…
### Steps to reproduce:
- Install delivery_envia
- Website > Configuration > eCommerce > Delivery Methods > Envia
- Enable the delivery method, sync the carrier and Publish it
- With a portal user > Shop > Add any product to your cart > Checkout
- Register an address a valid 'Chile' address and confirm say:
'street and Number': Avenida Providencia 1432, Depto 402
'city': Santiago 'zip': 8320000
'country': Chile 'state': Metropolitana
#### > Envia Error: Invalid Option - String is too long at #->properties:destination
### Cause of the issue:
The problem is caused by the fact that Envia's api expects a 2-3 digits to represent state codes: https://docs.envia.com/reference/state-by-code
The mapping from Odoo's code state representation to envia's one is expected ot be performed by this mapping:
https://github.com/odoo/enterprise/blob/75cba6d5a88ebc4e0f35040a173ac1c443638daf/delivery_envia/models/envia_request.py#L27-L43 when the address is converted here:
https://github.com/odoo/enterprise/blob/75cba6d5a88ebc4e0f35040a173ac1c443638daf/delivery_envia/models/envia_request.py#L535-L542 That being said, the `Chile`'s code states of have been changed in [6694a3942c58ff1a56c9e4b36edbe126dd1e66f8](https://github.com/odoo/odoo/commit/6694a3942c58ff1a56c9e4b36edbe126dd1e66f8) to match the official Iso but not in the Envia's mapping leading a failling match keeping the 4 charracter long `CL-RM` of the `Metropolitan` state provided in to the Envia's api as address data.
opw-6210007
Forward-Port-Of: odoo/enterprise#117280A crash in the event registration modal was resolved by ensuring the modal is fully closed before attempting to manipulate its elements. This change prevents errors that occurred when switching between event views, improving stability and user experience.
Original PR description
Steps to reproduce: =================== 1. Go to Event, open an event page 2. Click "Register" & Select a ticket and confirm 3. Switch to edit mode => crash. Cause: ====== The cleanup callback called…
Steps to reproduce: =================== 1. Go to Event, open an event page 2. Click "Register" & Select a ticket and confirm 3. Switch to edit mode => crash. Cause: ====== The cleanup callback called `hide()` followed immediately by `dispose()`. Bootstrap's `hide()` is asynchronous — it registers a `transitionend` callback that fires `_hideModal()` after the CSS transition. `dispose()` nullifies `this._element` synchronously via `BaseComponent`, so when the `transitionend` fires and `_hideModal()` tries to access `this._element.style`, it crashes with: TypeError: Cannot read properties of null (reading 'style') This happened when switching to edit mode while the event registration modal was open: the `public.interactions` service stopped the interaction, triggering the cleanup. Solution: ========= Listen for `hidden.bs.modal` (fired at the end of `_hideModal`) and only `dispose()` inside that handler, ensuring `_element` is still valid throughout the transition. task-6133395 Forward-Port-Of: odoo/odoo#264365
A recent change in the Odoo system caused the remaining time for sales projects linked to orders to no longer be displayed correctly. This PR restores a key setting that ensures the remaining time is shown, resolving this visual issue for users managing sales projects. It's a minor fix impacting the display of project timelines.
Original PR description
Steps to Reproduce: - Open any project linked with a sales order - Open task and click on Sale Oder Item dropdown. Issue: - You can see that SOL's with time remaining don't show the amount of time left Reason: - In this PR https://github.com/odoo/odoo/pull/193079 a record (view_task_form2_inherit_sale_timesheet) has been removed. - So the context key `with_remaining_hours` required to show remaining time is missing. Fix: - Add the record back which updates context task-6170953 Forward-Port-Of: odoo/odoo#262746
This update resolves an issue where the Microsoft SwiftKey keyboard caused incorrect selection updates within the HTML editor, leading to unexpected focus shifts. By caching the selection on each change, the system now accurately reflects the user's intended selection, improving the editor's stability and usability.
Original PR description
Problem: When using the Microsoft SwiftKey keyboard, placing the caret at the beginning of a table cell and triggering a `beforeinput` event can result in `getSelection()` returning an incorrect selection. Notably, the selection immediately before the event is correct, but it changes unexpectedly without firing a `selection_change` event. Solution: Cache the selection whenever a `selection_change` event fires, ensuring we keep the last correct selection set by the user or editor. Steps to reproduce: - Edit a table with an empty cell. - Place the caret inside the empty cell. - Press Backspace. - Observe that the focus moves to the previous cell unexpectedly. task-6150731 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#264769 Forward-Port-Of: odoo/odoo#259798
This update fixes an issue where the rental report was displaying incorrect dates. The fix ensures that each row in the report accurately reflects the start and return dates of the rental order, providing more reliable reporting data. This improves the accuracy of rental tracking and analysis.
Original PR description
The rental report is a daily report with x rows by rental order, with x the days between the start and return dates. With generate_series inside the select, the query was creating x rows with the same id, resulting in the date field not being correctly displayed (one unique date, the start date). This fix corrects the generation of the report to display the real date on each row. opw-5266525 Forward-Port-Of: odoo/enterprise#106235 Forward-Port-Of: odoo/enterprise#104764
This update resolves an issue where creating two overtime shifts on the same Saturday (ending at midnight) would trigger an error. The fix addresses a timing discrepancy in how overtime start and end times are calculated, preventing the 'Expected singleton' error. This ensures overtime is correctly registered for employees with complex shift schedules.
Original PR description
__ ## Short functional explanation of the error When we create 2 shifts for the same day for an employee, on a non-working day for their schedule. When trying to create the second one after setting…
__ ## Short functional explanation of the error When we create 2 shifts for the same day for an employee, on a non-working day for their schedule. When trying to create the second one after setting the end date to midnight, we get the error: `ValueError: Expected singleton: hr.attendance.overtime.line(2, 3)` ## Reproduction Steps 1. Create an Employee. In the Payroll tab, Make sure they have an active contract. Set their Working Hours to a fixed schedule, where they have saturdays as non-working days. In the Settings tab, set an Overtime Ruleset. 2. Click on the overtime ruleset. Then, for each rule, under Action, set the Work Entry Type To Use as Overtime Hours. 3. Go to Attendances. In Configuration > Settings, under Extra Hours, set the Extra Hours Validation as Approved By Manager. 4. Create an attendance for your Employee on a Saturday, from 12h to 18h. 5. Create a second attendance for your Employee on that same Saturday, from 18h to 00h00. Try to Save. Note: the timezone of your computer, the working schedule and the employee should be set at Brussels time. ### Expected behavior The Overtime is registered. ### Unexpected behavior An error occurs: `ValueError: Expected singleton: hr.attendance.overtime.line(2, 3)` ## Origin of the issue The end time of the overtime is defined as follows: https://github.com/odoo/enterprise/blob/47faff7d6c9da5572e3bad3ff5a55b40c2ba81ac/hr_work_entry_attendance/models/hr_version.py#L54-L56 However, in the case where our shift ends after the computed end of the day (in our case, the end time of the shift is 00:00:00 and the end of the day is set at 23:59:59), it creates some problems. The end time of the overtime is set 1 second too early. Later we compute the start time of the overtime as follows: https://github.com/odoo/enterprise/blob/47faff7d6c9da5572e3bad3ff5a55b40c2ba81ac/hr_work_entry_attendance/models/hr_version.py#L57 Thus, the time start of the overtime is also set one second too early. As our second shift starts right after the first one, after the execution of this code, we will get a second shift that starts before the end of the first one. Then, we add these values in a list: https://github.com/odoo/enterprise/blob/47faff7d6c9da5572e3bad3ff5a55b40c2ba81ac/hr_work_entry_attendance/models/hr_version.py#L59 which will contain overlapping timeframes, and with which we create an Interval: https://github.com/odoo/enterprise/blob/47faff7d6c9da5572e3bad3ff5a55b40c2ba81ac/hr_work_entry_attendance/models/hr_version.py#L60 But when we create an Interval with overlapping timeframes, we obtain only one interval as the timeframes are merged. https://github.com/odoo/enterprise/blob/47faff7d6c9da5572e3bad3ff5a55b40c2ba81ac/hr_work_entry_attendance/models/hr_version.py#L173 As a result, `overtime_intervals` will contain only one time frame with 2 different corresponding overtimes, which causes a singleton error when reaching: https://github.com/odoo/enterprise/blob/47faff7d6c9da5572e3bad3ff5a55b40c2ba81ac/hr_work_entry_attendance/models/hr_version.py#L179 __ opw-6096454 Forward-Port-Of: odoo/enterprise#117247 Forward-Port-Of: odoo/enterprise#114147
This update fixes an issue where scanning a packaging barcode (like '6' for a 6-pack) intermittently added quantities to the wrong line in the stock picking process. The fix ensures the barcode scan correctly identifies and updates the intended packaging unit, resolving the alternating quantity issue.
Original PR description
Issue ----- When there are 2 lines for a single product and different packaging uoms, scanning a packaging barcode alternates between lines. Steps to reproduce ----- - Enable packagings - Create a…
Issue ----- When there are 2 lines for a single product and different packaging uoms, scanning a packaging barcode alternates between lines. Steps to reproduce ----- - Enable packagings - Create a product AAA - barcode 1 - Create a packaging 6-Pack - 6 units - barcode for AAA set to 6 - Create a PO - one line for 30 units of AAA - one line for 5 6-Pack of AAA - Confirm PO and open picking in barcode - Scan "6" multiple times > Quantity increases on both lines, alternating for each scan Cause ----- Both lines can be found as matching lines when doing https://github.com/odoo/enterprise/blob/d279632db25713dd639a51385cad197dfdbd2bdc/stock_barcode/static/src/models/barcode_model.js#L1426 The reason it alternates between the lines is because we set the currently selected line first in the array - and since both lines match, the `foundLine` returned ends up being the non-selected line. https://github.com/odoo/enterprise/blob/d279632db25713dd639a51385cad197dfdbd2bdc/stock_barcode/static/src/models/barcode_model.js#L1823-L1832 We can avoid this y refining the `break` condition of the loop to also match the packaging uom. ----- Ticket: opw-6034572 Forward-Port-Of: odoo/enterprise#116961 Forward-Port-Of: odoo/enterprise#112578
This update resolves an issue preventing the MPESA payment method from correctly processing transactions initiated by Safaricom. It disables CSRF checks on callback endpoints and ensures URLs are consistently using HTTPS, addressing a common error related to invalid URLs. Additionally, the code now includes the till number for transactions, improving data accuracy.
Original PR description
1. The `MPESA` payment method needs a callback url where it does a `POST` request with the transaction details. Since the call comes from safaricom, CSRF will block those requests. This commit will…
1. The `MPESA` payment method needs a callback url where it does a `POST` request with the transaction details. Since the call comes from safaricom, CSRF will block those requests. This commit will disable CSRF checks on the callback endpoints which are expected to be called from an external service 2. Sometimes the `web.base.url` parameter is automatically set to http. But safaricom expects https for all the urls. So we need to ensure that the urls we send on `lipa_na_mpesa_register_urls` use https, otherwise the registration fails with an `invalid url` error. Additionally, I added the error message in case of error 4. In addition to the business short code we also need a till number for transactions. Since this is stable, I've added the till number as an extension of the business shortcode field and then parse it before usage. On master there is a new PR which will properly separate the fields Task-[6045833](https://www.odoo.com/odoo/project/1737/tasks/6045833) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#254993
This update corrects a display issue with the Folder report layout when using Right-to-Left (RTL) languages like Arabic. The change involves adjusting the report's image styling to ensure it aligns correctly within the RTL layout, improving readability and presentation for users in those languages. This resolves a visual bug impacting invoice printing.
Original PR description
Steps: - Enable rtlcss - Install an RTL language (e.g Arabic or change english direction to rtl) - Enable RTL language - Go to settings - Configure report layout document - Select Folder type - Try to print an invoice - The header title style is broken the svg image used in the title should be mirrored to be displayed correctly on RTL opw-6140277 Forward-Port-Of: odoo/odoo#263115 Forward-Port-Of: odoo/odoo#262830
This update corrects a technical issue that prevented accurate payroll calculations when a payrun had no associated payslips. The fix ensures the system functions correctly regardless of the number of payslips processed, improving payroll accuracy and reliability. This resolves a potential disruption to payroll processing.
Original PR description
If the payrun does not have any payslips, the _get_payslip_stp is called on an empty recordset, which causes the compute to fail. This commit fixes the _get_payslip_stp compute for empty recordset. task-6215823 Forward-Port-Of: odoo/enterprise#117198
This update corrects a technical error in the 'my department' holiday reporting test. The test was incorrectly creating duplicate employee records, which could have caused data inconsistencies. The fix ensures the test uses the existing employee record for the demo user, preventing this issue and maintaining data integrity.
Original PR description
Issue: The test was creating a new employee linked to the demo user, but if the demo user already had an employee, it would violate the (user_id, company_id) uniqueness constraint. Fix: Before creating a new employee, we check if the demo user already has one. If not, we create it, otherwise we use the existing one. task-6050719 Forward-Port-Of: odoo/odoo#263224
This update resolves an issue where a warning message persisted after canceling a payslip in the payroll system. The change ensures that the warning is cleared, providing a cleaner and more intuitive user experience. This improves the reliability and usability of the payroll module.
Original PR description
. Clear payslip warning after cancelling the payslip . Add corresponding tests task-6199148 Forward-Port-Of: odoo/enterprise#117418 Forward-Port-Of: odoo/enterprise#116859
This update fixes an issue where pasting content into the composer created excessive nested divs, preventing users from correctly deleting pasted text. The fix also adds necessary plugins to properly handle links within the composer, ensuring accurate link selection and deletion.
Original PR description
Currently, when pasting content into the composer, we sanitize it by stripping all tags except a few allowed ones, and this creates a lot of nested divs in the pasted content. This prevents the content from being deleted correctly when the user is in the nested divs and presses backspace. For links, we currently missing the plugin that correctly handles them in the composer, this commit adds it and also adds the missing plugin LinkSelectionPlugin and OdooLinkSelectionPlugin for the composer. task-6214020 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#264135
This update fixes a bug that prevented multi-day shift records from appearing on the live map. Now, technicians' locations and shifts are accurately displayed, and the map views (Gantt and Calendar) are optimized to show shifts on a daily basis, improving usability.
Original PR description
This commit changes the domains for the "My Map" and "Map By Resource" to only include shifts with a partner. Previously, it was including 'today' as part of the domain, which is incorrect as users may still want to view other days' shifts. task-6180159
This update ensures that all employee groups, regardless of their type, receive the correct employer-paid rent posting account in payroll. Previously, this setup was limited to a single group, leading to inconsistencies. This change maintains accurate and predictable payroll accounting.
Original PR description
Before this commit, the employer-paid rent setup was only applied to one employee group. This could leave other employee groups without the expected rent posting account. After this commit, the same rent posting setup is applied for each available employee group. This keeps payroll accounting behavior consistent. Task-6175007
A test was failing due to inconsistencies in how account reports were loaded during automated testing. This update ensures the test accurately reflects the system's behavior by generating the necessary account reports within the test itself. This resolves a runbot error and maintains the stability of the account reporting functionality.
Original PR description
Previously, embedded account reports always loaded the global account report. A fix introduced in version 19.0 changed this behavior so that the system now loads the most appropriate audit report,…
Previously, embedded account reports always loaded the global account report. A fix introduced in version 19.0 changed this behavior so that the system now loads the most appropriate audit report, specifically, the account report corresponding to the audit report's company (see: odoo/enterprise#101377). In version 19.1, a test was added to validate account report options. However, this test assumed that embedded account reports would always load the global account report (i.e., `account_reports.balance_sheet`). When tests run on runbot, demo data is not loaded. In that context, no report variants exist in the database, so the system falls back to the global account report, causing the test to pass. In environments where demo data is loaded, a report variant does exist, and the system correctly selects it instead of the global report. As a result, the test assertions are no longer valid and fail, leading to runbot errors. To address the issue, we will generate the account reports within the `setup` method of the test. This ensures that the assertions remain consistent, regardless of whether demo data is present. runbot-error-id~242235 Forward-Port-Of: odoo/enterprise#117075 Forward-Port-Of: odoo/enterprise#112486
This update fixes an issue where the departure date wasn't correctly displayed when an employee has multiple versions (e.g., contract and notice period). The change ensures the system accurately reflects the employee's departure date, improving payroll and reporting accuracy. This impacts how employees' end dates are tracked.
Original PR description
__ ## Short functional explanation of the error When we set the departure of an employee. The version is retrieved using the dismissal date. However, employees can work after their dismissal date,…
__ ## Short functional explanation of the error When we set the departure of an employee. The version is retrieved using the dismissal date. However, employees can work after their dismissal date, until their departure (in the case of a notice, for example). Therefore, the departure date should be chosen instead. ## Reproduction Steps 1. Go to Employees and create a new employee. In the Payroll tab, set a start date for their contract. Hit save. 2. This will create a version. You can see it top right, with the contract date. Click on the '+' next to it and set a date later. 3. Click on the cog in the top left and click End of Collaboration. Set an End Reason. Set the Dismissal Date to occur during the first version and the Departure Date to occur during the second version. Then, click Schedule. ### Expected behavior The Departure tab should appear when clicking on the second version, top right. ### Unexpected behavior The departure tab appears on the first version. ## Origin of the issue To select the version on which the departure occurs, we use this line of code: https://github.com/odoo/odoo/blob/be8b1bbad757fda27df579ce36cbc97324f58f62/addons/hr/models/hr_employee_departure.py#L117 `departure_date` should be used instead. __ opw-6079675 Forward-Port-Of: odoo/odoo#264667
This update ensures that employees on leave, even those in companies a user doesn't have access to, now correctly display a 'leave' icon in channel listings and avatar cards. Previously, the system was restricted by company access, leading to inaccurate status indicators. This change improves the user experience by providing a more complete and reliable view of employee availability.
Original PR description
* = hr_holidays Before this commit, when displaying the IM status icon for employees on leave of companies the user does not have access to, we would not display the `fa-plane` icon or the "Back on"…
* = hr_holidays Before this commit, when displaying the IM status icon for employees on leave of companies the user does not have access to, we would not display the `fa-plane` icon or the "Back on" indicator. Steps to reproduce: - Create a new company X - Create a new employee Y (with user) in company X - With a user who does not have access to company X open the General channel member list -> no leave icon, open the avatar card -> no icon This happens because since [1] the leave IM status icon is computed client side using the employee information, rather than computed on the `im_status` field itself. This however causes problem in a multi-company context due to the field `employee_ids@ResUsers` having a field-level domain restricting to the requesting user's active companies. This commit fixes the issue by fetching all of the user's employee_ids regardless of active company. [1] https://github.com/odoo/odoo/pull/210189 task-6191367 Forward-Port-Of: odoo/odoo#263024
This update resolves an issue where the chatbot restart button on the feedback panel could fail, leaving the live chat in an error state. Now, the button is disabled when the chatbot hasn't completed its process, preventing errors and ensuring a smoother user experience. This improves chatbot reliability.
Original PR description
Before this commit, it was possible to restart the chatbot on the feedback panel when closing the chat window. This was actually failing when the chatbot was stopped before the last step was completed and left the livechat state in error. Now, the button is simply disabled on feedback when we did not reach the end of the chatbot to avoid any issue. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#258601 Forward-Port-Of: odoo/odoo#257891
This change fixes an issue where products were incorrectly displayed on the website when a user's website company was set to a different company than the product's assigned company. The update ensures product searches accurately reflect the user's current company setting, preventing incorrect product visibility and potential sales order errors. This improves data accuracy and sales process reliability.
Original PR description
# Setup Have 2 companies : A & B # How to reproduce - Set your website's company to Company B - Create product X : - Company : Company A - Published - Name : xyz - Go to Users > Any User > Acces…
# Setup
Have 2 companies : A & B
# How to reproduce
- Set your website's company to Company B
- Create product X :
- Company : Company A
- Published
- Name : xyz
- Go to Users > Any User > Acces Rights > Allowed Companies => leave only Company A
- Connect as that user on the website
- Go to the Shop tab and search xyz
# The problem
The product X is displayed, even though we currently use the company B's website and the product is limited to company A.
This causes problem later when Sales Order are created using that product.
If you set the Allowed Companies of the user to both Company A and Company B, then the product is correctly hidden
# Why
When you search something in the search bar, the server does a `_search_with_fuzzy()` that ends up calling a simple `model.search()`.
In our case, this search should not return product X because there is an `ir.rule` that hides product not in the current company :
https://github.com/odoo/odoo/blob/0bb5ac6c1a87367c1ebb343ad6e6e6e56188cf13/addons/product/security/product_security.xml#L34-L38
But the `website` module has some particular rule about setting the current company :
https://github.com/odoo/odoo/blob/0bb5ac6c1a87367c1ebb343ad6e6e6e56188cf13/addons/website/models/ir_http.py#L249-L261
So, in our case, since the user does not have company B in its allowed companies, then
`allowed_company_ids` = Company A. So `('company_id', 'parent_of', company_ids)` is trucy and the product is displayed
# Proposed solution
Doing the search with `with_company` raise an AccessError because the company is not present in the allowed_companies. Chaging the allowed companies logic seems risky because it
may lead to unintended side effects.
We instead enforce the website's company in the search's domain
opw-6115647
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#262635
Forward-Port-Of: odoo/odoo#260138This update fixes an issue where payroll account merges incorrectly combined employee analytic distributions, leading to inaccurate financial reporting. The change ensures that each employee's specific distribution is preserved, preventing the overwriting of percentage allocations when multiple employees use the same accounting account. This improves the accuracy of payroll accounting and financial data.
Original PR description
Steps to reproduce 1. Enable "Batch Account Move Lines" in the Payroll settings. 2. Configure two employees' versions with an analytic distribution on the same analytic account but with different…
Steps to reproduce
1. Enable "Batch Account Move Lines" in the Payroll settings.
2. Configure two employees' versions with an analytic distribution on the
same analytic account but with different percentages (e.g. {acc: 50}
for the first employee and {acc: 70} for the second).
3. Generate a payslip run containing both employees and validate it.
Issue
The generated account move aggregates the two payslips into a single
line whose analytic_distribution matches only the last employee being
processed; the other employee's percentage is silently lost.
`_get_existing_lines` decides whether an incoming line can merge into an
already accumulated one. When the incoming line has an analytic
distribution, the merge condition delegates to
`_check_partially_matching_accounts`:
https://github.com/odoo/enterprise/blob/e4a1326c7a8a74da7970aeaa9900c19d01634e31/hr_payroll_account/models/hr_payslip.py#L254-L271
https://github.com/odoo/enterprise/blob/e4a1326c7a8a74da7970aeaa9900c19d01634e31/hr_payroll_account/models/hr_payslip.py#L273-L283
That helper returns True as soon as any analytic account of the new
line appears anywhere in the existing line's distribution dict, without
comparing percentages. Two distributions such as {acc: 50} and
{acc: 70} share the same account, so the helper returns True, the
lines are merged, and whichever distribution ends up on the merged line
overwrites the other — the total amount is correct but the analytic
split is wrong.
The logic introduced in commit https://github.com/odoo-dev/enterprise/commit/e40a3166286a6bc546e9543b935233d2a110dc52 successfully addressed merging for rule-level distributions
with composite keys (e.g., {'13,7,12': 40}). However, that implementation is overly inclusive for employee-specific distributions.
It fails to differentiate between cases where the same analytic account is utilized across various employees but with different percentage allocations.
Because it only checks for an account overlap rather than a perfect distributional match, it incorrectly aggregates distinct financial dimensions into a single journal line
Solution
Compare the full analytic_distribution dict by strict equality. Lines
merge only when the distribution is identical (same keys AND same
percentages), keeping the batch feature anonymizing identically
configured employees while preserving one line per distinct
distribution.
opw-6102508
Forward-Port-Of: odoo/enterprise#114156This update corrects a minor visual glitch where overlays (like dialog boxes) sometimes appeared twice when initially displayed. The change improves the stability and reliability of the user interface by preventing unnecessary re-renders, resulting in a smoother user experience.
Original PR description
Before this commit, sometimes an overlay such as Dialog could flicker and render twice on mount. This comes from implementation details for detecting whether the overlay comes from shadow DOM or…
Before this commit, sometimes an overlay such as Dialog could flicker and render twice on mount. This comes from implementation details for detecting whether the overlay comes from shadow DOM or website, to determine which overlay container should decide to display the overlay [1]. The code relies on presence of the root id in the DOM and overlay container was relying on presence of `ref.el` to get the root id from DOM. This was motivated by `isVisible(overlay)` whose computation was also relying on the ref [2] but this has the drawback that `ref.el` was sometimes not yet available immediately on 1st rendering. Solution of [1] was to re-renderer whenever `ref.el` is set, but another solution that prevents a re-render is to have the root id in the `env`. This commit changes the solution of [1] by instead `rootId` in the `env`. The new solution has the benefit to not require a re-render of the overlay container, which prevents undesirable flickers that may happen on mounting an overlay for the 1st time. [1]: odoo#169264 [2]: odoo#154349 Forward-Port-Of: odoo/odoo#263860
This update fixes an issue where the average inventory cost calculation in the 'Inventory at Date' report was inaccurate. Specifically, when using the AVCO cost method, the calculation was incorrectly influenced by the standard price instead of actual costs, leading to incorrect reported values. This ensures accurate inventory valuation reports.
Original PR description
When we open the Stock report at date, we filter out moves anterior to that date and, if the cost method is AVCO, Odoo recompute the `avg_cost` up to that point of time with `_run_average_batch`. However, when iterating over the moves, `move._get_value(at_date)` might return a value calculated from the current standard_price if the move is not associated with any accounting entry or PO/SO. Steps to reproduce the issue: 1. Create a new product with AVCO cost method 2. On the product form, set the cost to 5$ 3. Manually adjust the inventory to 5 units 4. Create a PO and receive 5 products at a unit cost of 10$ > Total value: 75$ > Total quantity: 10 units > avg_cost: 7.5$ 5. Navigate to Stock report and run "Inventory at Date" at current time 6. avg_cost is 8.75$ instead of 7.5$ Ticket: opw-5951072 Forward-Port-Of: odoo/odoo#257705 Forward-Port-Of: odoo/odoo#253659
This update resolves an issue where livechat conversations wouldn't automatically mark as read after ending. Now, the system correctly triggers the 'read' state when a conversation is in focus, ensuring agents see accurate read statuses for closed chats. This improves agent efficiency and provides a clearer view of ongoing interactions.
Original PR description
**Description of the issue this PR addresses:** Previously, when a livechat conversation ended, it was never automatically marked as read. The existing `mark_as_read` mechanism depends on the…
**Description of the issue this PR addresses:** Previously, when a livechat conversation ended, it was never automatically marked as read. The existing `mark_as_read` mechanism depends on the composer being focused, but ended livechat conversations hides the composer, and the chat window does not focus the thread automatically (focus only happens on explicit click). This made it impossible for the read state to be triggered through the normal path, leaving agents with persistent unread indicators on closed livechat conversations. **Desired behavior after PR is merged:** - Focus the composer when present. - Focus the conversation otherwise. This ensures the read state is correctly triggered when the conversation is effectively in focus. task-[5900038](https://www.odoo.com/odoo/project/1519/tasks/5900038) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#263607 Forward-Port-Of: odoo/odoo#253609
17 changes
Resolved issues and error corrections
This update resolves an issue where allocated leave time wasn't correctly displayed in the Time Off Request wizard when duplicate leave types were created. The fix ensures that each leave type's allocation data is accurately retrieved, regardless of shared names, preventing incorrect leave calculations.
Original PR description
Pre-requisite: --------------------------------------- 1. Install the Time Off module 2. Create a new company (e.g, Test Company) 3. Create New Timeoff Type: * Ensure a default company is set (e.g,…
Pre-requisite:
---------------------------------------
1. Install the Time Off module
2. Create a new company (e.g, Test Company)
3. Create New Timeoff Type:
* Ensure a default company is set (e.g, YourCompany)
4. Duplicate the created Time off type:
* Remove (Copy) from the name so both records share the same name
* Clear the Company field on the duplicated record
Steps to reproduce:
---------------------------------------
1. Go to Time Off type which has no Company
2. Allocation Smart button > New
3. Set allocation for some days (e. g, 10 Days) > Approve allocation
4. Now, click on Employee > Time Off smart button
5. On the Dashboard, you can see allocated leaves
6. Click on any day to create a Time Off Request
Observation:
---------------------------------------
The allocated Time Off Type is not available in the request wizard, even though allocation exists.
Issue:
---------------------------------------
When natively computing allocation statistics for the UI, the `_compute_leaves` loops through a pre-fetched `data_days` structure and incorrectly extracts the calculation metrics by matching the `holiday_status.name` string via a list comprehension lookup index (`item[0]`).
https://github.com/odoo/odoo/blob/73d73c5c6606e0b34c754bfc4de035840951dd3b/addons/hr_holidays/models/hr_leave_type.py#L288-L294
If Time Off Type A and Time Off Type B share the name 'Generic Leave', the list comprehension evaluates sequentially and forcefully maps the dictionary of whichever version structurally sits first in the memory sequence directly onto both overlapping identifiers simultaneously!
Solution:
---------------------------------------
Directly match records using their unique ID.
This ensures that each database record always retrieves its own correct data, preventing any mix-up or accidental sharing of values between records that may have the same name.
opw-6105759
Forward-Port-Of: odoo/odoo#264104
Forward-Port-Of: odoo/odoo#261680This update simplifies the process of retrieving transactions from Codabox. Previously, users needed write access to the company record, which wasn't necessary after the initial connection was established. This change streamlines the process and improves efficiency.
Original PR description
Currently, we use the `_l10n_be_codabox_verify_prerequisites` method before trying to fetch transactions. This method checks if the user has write access rights on res.company model which should not be mandatory to fetch transactions from codabox when the connexion is already created. opw-6108811 Forward-Port-Of: odoo/enterprise#117097
This update fixes an issue where the product carousel displayed fewer than 16 products when a product had over 256 variants. The previous fix was a workaround that increased search limits. Now, the system correctly handles products with a large number of variants, ensuring a complete and accurate product carousel display. This improves the user experience for browsing products with many options.
Original PR description
# How to reproduce - Create a Product with more than 256 variants - Publish it to the website - Go to the website and add a Product Carousel - Set it to display newest products & hide variants # The…
# How to reproduce - Create a Product with more than 256 variants - Publish it to the website - Go to the website and add a Product Carousel - Set it to display newest products & hide variants # The problem Fewer than 16 products are displayed # Cause This issue was already adressed by this commit : https://github.com/odoo/odoo/pull/195857 But because of limitations for specifically the "Newest Products" filter (cf. original commit message), the fix was only a workaround. Indeed, it increased the search limit to 256 before filtering out the variants, which caused problems when there was more than 256 variants. But since then, big changes made in 19.0 has allowed us to implement a better fix : https://github.com/odoo/odoo/commit/e3b062e5d3820 # Proposed Solution Since we can now pass the model in the options : https://github.com/odoo/odoo/blob/b5069328734e623c12b0de50a177d501f7f0c995/addons/website/models/website_snippet_filter.py#L90 We give "product.template" when the `hide_variants` option is enabled and we filter on products. This allows use to remove the whole workaround that needed increase the limit on product searchs then getting their templates. A recent commit blocks passing "product.template" since it does not have a dedicated snippet filter : https://github.com/odoo/odoo/pull/257208/changes/8e264ae4ea6ae16bbd410ac384733ff8759938a6 But in the commit message, they mention that this targets snippet in single-record mode, which is not our case. So, we move the logic to only be applied for single-record filters opw-6054059 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#260340
This update corrects a bug where a new paragraph created after splitting a styled heading would inherit the heading's formatting (like color). The fix ensures that newly created paragraphs are empty and without inherited styles, aligning with the expected behavior. This improves the consistency and predictability of the HTML editor.
Original PR description
Problem: Pressing Enter at the end of a styled heading (e.g., with a color) creates a new paragraph that inherits the heading styles. This is no longer the expected behavior. The new paragraph should be empty and without inherited styles. Solution: When splitting a heading at its boundaries and creating a base container, fill it with a `br` instead of carrying over styles. Steps to reproduce: - Add a heading. - Apply a style (e.g., color). - Place the caret at the end of the heading. - Press Enter. - Observe that the new paragraph still has the heading color. task-6147897 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#264624 Forward-Port-Of: odoo/odoo#262150
This fix resolves an issue where generating closing entries in the Inventory Valuation view incorrectly calculated values when multiple companies were selected. The update ensures that the generated account move lines accurately reflect the inventory valuation based on the selected main company, preventing mismatched balances.
Original PR description
**Problem:** In view Inventory valuation, generate entry doesn't work when multiple companies are selected. In the view only the main company matters. That means that even if multiple companies are…
**Problem:** In view Inventory valuation, generate entry doesn't work when multiple companies are selected. In the view only the main company matters. That means that even if multiple companies are selected, only the stock variation lines related to the main company selected are displayed (which is expected). But if you then click on 'generate entry' the account move lines created will have wrong values (not matching the values appearing in the view) **Steps to reproduce:** - create 2 new companies (to have clean accounting) - create a warehouse for both companies - for both comp, in settings for the 'fiscal localization' set Package : Generic Chart of account, if not already set (to have account journals). From company 1 : - create a storable prod with avco perpetual category - confirm PO for 2 @ 10, receive - bill only 1 @ 10 From company 2: - make sure the category is also perpetual average from this other company - confirm PO for 2 @ 50, receive, don't bill Notice how from the 'Inventory Valuation' view, rightfully, only the main company matters (no matter what other comp are selected): - If main comp is comp 1 there is stock variation lines for amount of 10 (which is expected because we have 20 in stock and only 10 in stock valuation account) - If main comp is comp 2 there is stock variation lines for amount of 100 (which is expected because we have 100 in stock and only 0 in stock valuation account) With comp 1 and 2 selected and comp 1 as main company: - click on 'Generate Entry' **Current behavior:** - both line have a balance of 110 **Expected behavior:** - they should have a balance of 10 as we saw on the 'inventory valuation' view **Cause of the issue:** To generate the data from the 'inventory valuation' view, inside _get_report_data() we call stock_value() and stock_accounting_value() to compare values from inventory and value from accounting. https://github.com/odoo/odoo/blob/dd84309df7fd39e9e97ed02d135d25b211085135/addons/stock_account/report/stock_valuation_report.py#L36-L37 stock_value() sums total_value() of each product in the valued accounts https://github.com/odoo/odoo/blob/dd84309df7fd39e9e97ed02d135d25b211085135/addons/stock_account/models/res_company.py#L90-L94 Whereas stock_acounting_value(), sums the balance of each account move line of each valuation account https://github.com/odoo/odoo/blob/dd84309df7fd39e9e97ed02d135d25b211085135/addons/stock_account/models/res_company.py#L112-L114 All of this is related to the main company because we call _get_report_data() with context 'allowed_company_ids' set to only the main company https://github.com/odoo/odoo/blob/dd84309df7fd39e9e97ed02d135d25b211085135/addons/stock_account/report/stock_valuation_report.py#L13 But when we click on generate entry, _get_stock_valuation_account_vals() is called with no context modification to 'allowed_company_ids' so when we call stock_value(), https://github.com/odoo/odoo/blob/dd84309df7fd39e9e97ed02d135d25b211085135/addons/stock_account/models/res_company.py#L238-L239 total_value will be based on both company https://github.com/odoo/odoo/blob/dd84309df7fd39e9e97ed02d135d25b211085135/addons/stock_account/models/res_company.py#L92 Note that stock_accounting_value() is still rightfully based only on main company because we use self.id in the domain https://github.com/odoo/odoo/blob/dd84309df7fd39e9e97ed02d135d25b211085135/addons/stock_account/models/res_company.py#L105-L108 opw-6168699 Forward-Port-Of: odoo/odoo#263946 Forward-Port-Of: odoo/odoo#262776
This update fixes an issue where the FEC file parser would fail when encountering empty lines. The change now automatically skips these empty lines, ensuring that all valid FEC files are processed correctly and preventing potential data loss. This improves the reliability of the French localization import process.
Original PR description
It could happens that we have some empty lines in the fec files, the parser was returning an error when that happened. We still want to process the file so we will just skip the empty lines. task-6169168 Forward-Port-Of: odoo/enterprise#115758
This update corrects a bug in the French Intrastat export process. Previously, supplementary unit data for products with CN codes wasn't being correctly included in the DEBWEB2 XML file. This fix ensures accurate reporting of product quantities for Intrastat purposes, preventing potential reporting discrepancies.
Original PR description
Steps to reproduce 1. In a French company with Intrastat enabled, set up a product whose commodity code has a CN supplementary unit (e.g. 8802 30 00, "p/st") and set…
Steps to reproduce
1. In a French company with Intrastat enabled, set up a product whose commodity code has a CN supplementary unit (e.g. 8802 30 00, "p/st") and set `intrastat_supplementary_unit_amount` on it.
2. Post EU customer invoices for that product.
3. Export the DEBWEB2 XML from the Intrastat report.
Issue
The FR export collapses engine rows a second time in `_group_items`, because the DEBWEB2 format groups more aggressively than the SQL. The aggregator only declares `value` and `weight`: https://github.com/odoo/enterprise/blob/6ae5d3df6e9305416e4d6f74259cd01753025f42/l10n_fr_intrastat/models/account_intrastat_report.py#L308-L313 Items are then rebuilt as `dict(zip(grouping_key, key_tuple)) | grouped_item_values`. `SU_code` survives (it is in the grouping key), but the numeric `supplementary_units` is in neither side and is silently dropped as soon as two engine rows merge. The template then skips the element because of its `t-if="item.get('supplementary_units')"` guard: https://github.com/odoo/enterprise/blob/6ae5d3df6e9305416e4d6f74259cd01753025f42/l10n_fr_intrastat/data/intrastat_export.xml#L61
opw-6139657
Forward-Port-Of: odoo/enterprise#117357
Forward-Port-Of: odoo/enterprise#117033A flaky test in the Live Chat module has been resolved. The issue stemmed from a race condition during agent joining, causing inconsistent test results. This update simplifies the test to ensure reliable execution and maintain coverage.
Original PR description
The `show looking for help duration in the sidebar` test has been flaky since [1]. The root cause is that the agent joins at the final step, resetting the state to in_progress, then immediately…
The `show looking for help duration in the sidebar` test has been flaky since [1]. The root cause is that the agent joins at the final step, resetting the state to in_progress, then immediately switches it back to `looking_for_help`. This creates several race conditions: - Bus notifications from `join_livechat_need_help`, new message events, and any other notification carrying stale state data. - Channel state fetched after the user joins via `/mail/data`. The mock server makes these races hard to guard against: notifications arrive one by one, and there's no UI signal that guarantees all stale data has been processed. This commit splits the test to preserve coverage while avoiding the problematic rapid state transition. runbot-242278 [1]: https://github.com/odoo/odoo/pull/252738 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#264666
This update resolves an issue preventing Envia deliveries in Chile. The problem stemmed from a mismatch between Odoo's state code representation and Envia's API requirements. A recent update to Chile's official state codes was not reflected in the system's mapping, causing delivery errors. This fix ensures accurate address data is sent to Envia, enabling successful deliveries.
Original PR description
### Steps to reproduce: - Install delivery_envia - Website > Configuration > eCommerce > Delivery Methods > Envia - Enable the delivery method, sync the carrier and Publish it - With a portal user >…
### Steps to reproduce:
- Install delivery_envia
- Website > Configuration > eCommerce > Delivery Methods > Envia
- Enable the delivery method, sync the carrier and Publish it
- With a portal user > Shop > Add any product to your cart > Checkout
- Register an address a valid 'Chile' address and confirm say:
'street and Number': Avenida Providencia 1432, Depto 402
'city': Santiago 'zip': 8320000
'country': Chile 'state': Metropolitana
#### > Envia Error: Invalid Option - String is too long at #->properties:destination
### Cause of the issue:
The problem is caused by the fact that Envia's api expects a 2-3 digits to represent state codes: https://docs.envia.com/reference/state-by-code
The mapping from Odoo's code state representation to envia's one is expected ot be performed by this mapping:
https://github.com/odoo/enterprise/blob/75cba6d5a88ebc4e0f35040a173ac1c443638daf/delivery_envia/models/envia_request.py#L27-L43 when the address is converted here:
https://github.com/odoo/enterprise/blob/75cba6d5a88ebc4e0f35040a173ac1c443638daf/delivery_envia/models/envia_request.py#L535-L542 That being said, the `Chile`'s code states of have been changed in [6694a3942c58ff1a56c9e4b36edbe126dd1e66f8](https://github.com/odoo/odoo/commit/6694a3942c58ff1a56c9e4b36edbe126dd1e66f8) to match the official Iso but not in the Envia's mapping leading a failling match keeping the 4 charracter long `CL-RM` of the `Metropolitan` state provided in to the Envia's api as address data.
opw-6210007
Forward-Port-Of: odoo/enterprise#117280A recent change in the Odoo system caused the remaining time estimates for sales projects linked to sales orders to disappear from the task display. This update restores the necessary context to accurately show the remaining time, ensuring sales teams have the correct information. The fix addresses a minor visual inconsistency.
Original PR description
Steps to Reproduce: - Open any project linked with a sales order - Open task and click on Sale Oder Item dropdown. Issue: - You can see that SOL's with time remaining don't show the amount of time left Reason: - In this PR https://github.com/odoo/odoo/pull/193079 a record (view_task_form2_inherit_sale_timesheet) has been removed. - So the context key `with_remaining_hours` required to show remaining time is missing. Fix: - Add the record back which updates context task-6170953 Forward-Port-Of: odoo/odoo#262746
This update resolves a crash that occurred when users switched to edit mode while an event registration modal was open. The fix ensures the modal is properly cleaned up after the transition, preventing errors related to accessing the modal's style properties. This improves stability and prevents unexpected application behavior.
Original PR description
Steps to reproduce: =================== 1. Go to Event, open an event page 2. Click "Register" & Select a ticket and confirm 3. Switch to edit mode => crash. Cause: ====== The cleanup callback called…
Steps to reproduce: =================== 1. Go to Event, open an event page 2. Click "Register" & Select a ticket and confirm 3. Switch to edit mode => crash. Cause: ====== The cleanup callback called `hide()` followed immediately by `dispose()`. Bootstrap's `hide()` is asynchronous — it registers a `transitionend` callback that fires `_hideModal()` after the CSS transition. `dispose()` nullifies `this._element` synchronously via `BaseComponent`, so when the `transitionend` fires and `_hideModal()` tries to access `this._element.style`, it crashes with: TypeError: Cannot read properties of null (reading 'style') This happened when switching to edit mode while the event registration modal was open: the `public.interactions` service stopped the interaction, triggering the cleanup. Solution: ========= Listen for `hidden.bs.modal` (fired at the end of `_hideModal`) and only `dispose()` inside that handler, ensuring `_element` is still valid throughout the transition. task-6133395 Forward-Port-Of: odoo/odoo#264365
This update corrects a calculation error related to non-investment savings schemes (NISS) for employees in Belgium. The change ensures that NISS contributions are accurately reflected in payroll calculations for Belgian businesses using the Enterprise module. This improves the accuracy of financial reporting and compliance for our Belgian clients.
This update corrects a display issue with the Folder report layout in Odoo when using Right-to-Left (RTL) languages like Arabic. The change adjusts the image styling to ensure proper rendering, preventing the header title from appearing broken. This ensures reports are consistently readable for all users, regardless of their language settings.
Original PR description
Steps: - Enable rtlcss - Install an RTL language (e.g Arabic or change english direction to rtl) - Enable RTL language - Go to settings - Configure report layout document - Select Folder type - Try to print an invoice - The header title style is broken the svg image used in the title should be mirrored to be displayed correctly on RTL opw-6140277 Forward-Port-Of: odoo/odoo#263115 Forward-Port-Of: odoo/odoo#262830
This update resolves a confusing issue where discount codes couldn't be re-applied after being discarded. Now, users can successfully re-apply codes even if no reward line was initially created, ensuring a smoother customer experience and eliminating a potential point of frustration. This improves the usability of our loyalty program.
Original PR description
Issue: --- ### Steps to reproduce: 1- Create a `Discount Code` program. 2- In SO, use `Coupon Code` wizard and use the code. 3- After available rewards are shown, discard the wizard. 4- Re-apply the code. Validation Error: The promo code is already applied. As the reward is not applied, this is functionally confusing. At this point We can see the reward only inside the rewards wizard view. If we allow re-apply the code in case no reward line is created for the `rule.program_id`, we can still see the reward by re-applying the same code, without any side effects. opw-6164198 Forward-Port-Of: odoo/odoo#264105 Forward-Port-Of: odoo/odoo#261950
This update resolves an issue where multi-company orders were incorrectly assigning fiscal positions, leading to 'incompatible companies' errors. The fix ensures the sale order's company is used when calculating the fiscal position, guaranteeing accurate accounting and order confirmation. This improves order processing reliability in our multi-company setup.
Original PR description
Issue: --- Due to this issue, in multi-company environment, wrong fiscal position might be assigned to the order, leading to `incompatible companies` error. Steps to reproduce: 1- On multi-company…
Issue: --- Due to this issue, in multi-company environment, wrong fiscal position might be assigned to the order, leading to `incompatible companies` error. Steps to reproduce: 1- On multi-company setup, assign a website to the second company. 2- Configure pickup method for second company. 3- Configure fiscal positions for both companies. 4- Setup auto invoice for second company. 5- Using public user, add a product to cart and checkout. 6- Use pickup method, and pay. The order is not confirmed. If you enable debug mode after payment, it will show an `incompatible companies` error. Cause: --- https://github.com/odoo/odoo/blob/43f5ceadbc1f7df9898c327bf65bffdbe9860c1c/addons/account/models/partner.py#L247-L279 `_get_fiscal_position` is using environment company to compute the fiscal position. However, `_compute_fiscal_position_id` causing the issue here is triggered inside `report_saleorder` template with user set as odoobot when trying to to send the confirmation. As a result, the odoobot company's fiscal position will be used causing this issue. Fix: --- We should ensure company from sale order is used by setting it as env company. opw-6186296 Forward-Port-Of: odoo/odoo#264123
This update corrects a technical issue where the Odoo payroll calculation process would fail when no payslips were generated for a payrun. The fix ensures the calculation works correctly even with empty payrun data, preventing potential errors and ensuring accurate payroll reporting.
Original PR description
If the payrun does not have any payslips, the _get_payslip_stp is called on an empty recordset, which causes the compute to fail. This commit fixes the _get_payslip_stp compute for empty recordset. task-6215823 Forward-Port-Of: odoo/enterprise#117198
This update fixes an issue where payroll account lines were incorrectly merging employee data, leading to inaccurate allocation of funds across different analytic accounts. The change ensures that each employee's specific analytic distribution is accurately reflected, preventing data loss and maintaining correct financial reporting. This update improves the accuracy of payroll accounting.
Original PR description
Steps to reproduce 1. Enable "Batch Account Move Lines" in the Payroll settings. 2. Configure two employees' versions with an analytic distribution on the same analytic account but with different…
Steps to reproduce
1. Enable "Batch Account Move Lines" in the Payroll settings.
2. Configure two employees' versions with an analytic distribution on the
same analytic account but with different percentages (e.g. {acc: 50}
for the first employee and {acc: 70} for the second).
3. Generate a payslip run containing both employees and validate it.
Issue
The generated account move aggregates the two payslips into a single
line whose analytic_distribution matches only the last employee being
processed; the other employee's percentage is silently lost.
`_get_existing_lines` decides whether an incoming line can merge into an
already accumulated one. When the incoming line has an analytic
distribution, the merge condition delegates to
`_check_partially_matching_accounts`:
https://github.com/odoo/enterprise/blob/e4a1326c7a8a74da7970aeaa9900c19d01634e31/hr_payroll_account/models/hr_payslip.py#L254-L271
https://github.com/odoo/enterprise/blob/e4a1326c7a8a74da7970aeaa9900c19d01634e31/hr_payroll_account/models/hr_payslip.py#L273-L283
That helper returns True as soon as any analytic account of the new
line appears anywhere in the existing line's distribution dict, without
comparing percentages. Two distributions such as {acc: 50} and
{acc: 70} share the same account, so the helper returns True, the
lines are merged, and whichever distribution ends up on the merged line
overwrites the other — the total amount is correct but the analytic
split is wrong.
The logic introduced in commit https://github.com/odoo-dev/enterprise/commit/e40a3166286a6bc546e9543b935233d2a110dc52 successfully addressed merging for rule-level distributions
with composite keys (e.g., {'13,7,12': 40}). However, that implementation is overly inclusive for employee-specific distributions.
It fails to differentiate between cases where the same analytic account is utilized across various employees but with different percentage allocations.
Because it only checks for an account overlap rather than a perfect distributional match, it incorrectly aggregates distinct financial dimensions into a single journal line
Solution
Compare the full analytic_distribution dict by strict equality. Lines
merge only when the distribution is identical (same keys AND same
percentages), keeping the batch feature anonymizing identically
configured employees while preserving one line per distinct
distribution.
opw-6102508
Forward-Port-Of: odoo/enterprise#11415620 changes
Resolved issues and error corrections
This update fixes an inconsistency in how rental prices are calculated when dealing with time-zoned dates. Previously, using relativedelta on UTC dates resulted in incorrect price calculations. Now, the system accurately calculates rental durations based on the original time zones of the start and end dates, ensuring consistent pricing across different time zones.
Original PR description
Relativedelta on UTC dates or time-zoned dates doesn't return the same result. In order to calculate consistent prices (price for 1 month in December = price for 1 month in January), we need to work…
Relativedelta on UTC dates or time-zoned dates doesn't return the same result. In order to calculate consistent prices (price for 1 month in December = price for 1 month in January), we need to work on time-zoned dates. Example: Consider a website in UTC+1 (Brussels timezone DST off). And a rental from the 01/12/2025 to the 31/12/2025 = by design, from the 01/01/2025 00h00 (start_date) to the 31/12/2025 23h59 (end_date). Converted in UTC for the back-end, we have: from the 30/11/2025 23h00 to the 31/12/2025 22h59. relativedelta(end_date, start_date) = time between the 2 dates is calculated as follow: 30/11/2025 23h00 + 1 month = 30/12/2025 23h00 +23h59 = 31/12/2025 22h59. Time difference = 1 month, 23 hours, 59 minutes. Price = 2 months. Consider a second rental from the 01/01/2026 to the 31/01/2026. 31/12/2025 23h00 + 30 days = 30/01/2026 23h + 23h59 = 31/01/2026 22h59. Time difference = 30 days, 23 hours, 59 minutes. Price = 1 month. opw-5130762 Forward-Port-Of: odoo/enterprise#114212 Forward-Port-Of: odoo/enterprise#98571
This update simplifies the process of retrieving transaction data from Codabox for users already connected. Previously, a write access check was required, which was unnecessary. This change removes this restriction, streamlining the process and improving efficiency.
Original PR description
Currently, we use the `_l10n_be_codabox_verify_prerequisites` method before trying to fetch transactions. This method checks if the user has write access rights on res.company model which should not be mandatory to fetch transactions from codabox when the connexion is already created. opw-6108811 Forward-Port-Of: odoo/enterprise#117097
This update resolves a bug that caused incorrect redirects to the receipt screen when using eWallet with automatic receipt printing and skipping the preview screen in Point of Sale. The removal of a redundant property ensures the correct feedback screen is displayed, improving the user experience for eWallet transactions.
Original PR description
- Remove unused `paymentMethodId` prop from FeedbackScreen which caused incorrect redirect to receipt screen instead of feedback screen when using eWallet with "Automatic Receipt Printing" and "Skip Preview Screen" enabled. - The prop `paymentMethodId` is already removed in versions > `19.0`. task-id: 6008245 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#252176
This update resolves an issue where pressing Enter after a styled heading created a new paragraph with the same styling. The fix ensures that newly created paragraphs are empty and without inherited styles, aligning with the expected behavior. This improves the consistency and predictability of the HTML editor.
Original PR description
Problem: Pressing Enter at the end of a styled heading (e.g., with a color) creates a new paragraph that inherits the heading styles. This is no longer the expected behavior. The new paragraph should be empty and without inherited styles. Solution: When splitting a heading at its boundaries and creating a base container, fill it with a `br` instead of carrying over styles. Steps to reproduce: - Add a heading. - Apply a style (e.g., color). - Place the caret at the end of the heading. - Press Enter. - Observe that the new paragraph still has the heading color. task-6147897 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#264624 Forward-Port-Of: odoo/odoo#262150
This update addresses an issue where customers could have orders automatically confirmed when a gift card fully covered a shopping cart. Now, Odoo will require the standard checkout step to be completed, even if a gift card brings the total to zero, ensuring accurate order processing and preventing potential errors.
Original PR description
**Before this commit** If a gift card balance fully covers a shopping cart containing multiple events, Odoo auto-confirms the order as soon as the last event is added, skipping the final checkout step. **After this commit** Sale orders will no longer be automatically confirmed when a customer registers for a paid event, even if an applied gift card brings the total balance to zero. opw-5896626 Forward-Port-Of: odoo/odoo#264599 Forward-Port-Of: odoo/odoo#246629
This update resolves an issue that occurred when loading paid orders in the Point of Sale module. The previous process incorrectly loaded account moves, leading to errors. This change streamlines the process by removing redundant loading steps, ensuring paid orders load correctly.
Original PR description
Before this commit, when loading the paid orders it would load the account move with the "account_move" key, but this key is wrong as the account move model is loaded with the "account.move". Also, the account move is already loaded by the "read_pos_data" method in the point_of_sale module, so we can just remove it from here. opw-6218467 Forward-Port-Of: odoo/enterprise#117422
This update aligns report subheaders and numeric data within reports to create a more consistent and professional appearance. Previously, the alignment was inconsistent, making the reports less readable. This change improves the overall presentation of financial reports.
Original PR description
Before this commit, subheaders of numeric columns were centered, while the figures in the columns were aligned to the end. This commit ensures that both the subheader and the figures are aligned the same way (center or end). task-6197223 Forward-Port-Of: odoo/enterprise#116578
This update fixes a minor issue where the FEC file parser would fail when encountering empty lines. The change allows the system to gracefully skip these empty lines, ensuring that all valid FEC files are processed correctly and preventing potential data loss. This improves the reliability of the French localization import process.
Original PR description
It could happens that we have some empty lines in the fec files, the parser was returning an error when that happened. We still want to process the file so we will just skip the empty lines. task-6169168 Forward-Port-Of: odoo/enterprise#115758
This update corrects a technical issue in the French Intrastat export process. Previously, crucial quantity data related to supplementary units wasn't being included in the DEBWEB2 XML file, leading to incomplete reporting. This fix ensures accurate Intrastat reporting for products with supplementary units, improving data integrity.
Original PR description
Steps to reproduce 1. In a French company with Intrastat enabled, set up a product whose commodity code has a CN supplementary unit (e.g. 8802 30 00, "p/st") and set…
Steps to reproduce
1. In a French company with Intrastat enabled, set up a product whose commodity code has a CN supplementary unit (e.g. 8802 30 00, "p/st") and set `intrastat_supplementary_unit_amount` on it.
2. Post EU customer invoices for that product.
3. Export the DEBWEB2 XML from the Intrastat report.
Issue
The FR export collapses engine rows a second time in `_group_items`, because the DEBWEB2 format groups more aggressively than the SQL. The aggregator only declares `value` and `weight`: https://github.com/odoo/enterprise/blob/6ae5d3df6e9305416e4d6f74259cd01753025f42/l10n_fr_intrastat/models/account_intrastat_report.py#L308-L313 Items are then rebuilt as `dict(zip(grouping_key, key_tuple)) | grouped_item_values`. `SU_code` survives (it is in the grouping key), but the numeric `supplementary_units` is in neither side and is silently dropped as soon as two engine rows merge. The template then skips the element because of its `t-if="item.get('supplementary_units')"` guard: https://github.com/odoo/enterprise/blob/6ae5d3df6e9305416e4d6f74259cd01753025f42/l10n_fr_intrastat/data/intrastat_export.xml#L61
opw-6139657
Forward-Port-Of: odoo/enterprise#117357
Forward-Port-Of: odoo/enterprise#117033This update enhances the reliability of Odoo's safe evaluation feature by catching and handling `IntegrityError` exceptions. This ensures consistent behavior regardless of whether the issue originates in the core business logic or within the safe evaluation environment, preventing unexpected application failures.
Original PR description
It makes sense to bubble up the `psycopg2.IntegrityError` (as well as the subcase `ConcurrencyError`) so that the retry mechanism can handle this exception. In fact, this exception can be triggered without necessarily a problem with the "logic/business code". This ensures consistent behavior between the business logic and the code executed in `safe_eval`. Task-6215886 Forward-Port-Of: odoo/odoo#264266
This update corrects an error occurring when using the Envia delivery method in Chile. The issue stemmed from a mismatch between Odoo's state code mapping and Envia's API requirements, specifically regarding the format of the 'state' field. The update now properly formats the state code to comply with Envia's specifications, enabling successful delivery processing.
Original PR description
### Steps to reproduce: - Install delivery_envia - Website > Configuration > eCommerce > Delivery Methods > Envia - Enable the delivery method, sync the carrier and Publish it - With a portal user >…
### Steps to reproduce:
- Install delivery_envia
- Website > Configuration > eCommerce > Delivery Methods > Envia
- Enable the delivery method, sync the carrier and Publish it
- With a portal user > Shop > Add any product to your cart > Checkout
- Register an address a valid 'Chile' address and confirm say:
'street and Number': Avenida Providencia 1432, Depto 402
'city': Santiago 'zip': 8320000
'country': Chile 'state': Metropolitana
#### > Envia Error: Invalid Option - String is too long at #->properties:destination
### Cause of the issue:
The problem is caused by the fact that Envia's api expects a 2-3 digits to represent state codes: https://docs.envia.com/reference/state-by-code
The mapping from Odoo's code state representation to envia's one is expected ot be performed by this mapping:
https://github.com/odoo/enterprise/blob/75cba6d5a88ebc4e0f35040a173ac1c443638daf/delivery_envia/models/envia_request.py#L27-L43 when the address is converted here:
https://github.com/odoo/enterprise/blob/75cba6d5a88ebc4e0f35040a173ac1c443638daf/delivery_envia/models/envia_request.py#L535-L542 That being said, the `Chile`'s code states of have been changed in [6694a3942c58ff1a56c9e4b36edbe126dd1e66f8](https://github.com/odoo/odoo/commit/6694a3942c58ff1a56c9e4b36edbe126dd1e66f8) to match the official Iso but not in the Envia's mapping leading a failling match keeping the 4 charracter long `CL-RM` of the `Metropolitan` state provided in to the Envia's api as address data.
opw-6210007
Forward-Port-Of: odoo/enterprise#117280This update fixes an issue where the remaining time wasn't being displayed correctly for sales orders linked to project tasks. A previous change removed a necessary context key, preventing the display of this information. The update restores this key, ensuring accurate time remaining information is shown.
Original PR description
Steps to Reproduce: - Open any project linked with a sales order - Open task and click on Sale Oder Item dropdown. Issue: - You can see that SOL's with time remaining don't show the amount of time left Reason: - In this PR https://github.com/odoo/odoo/pull/193079 a record (view_task_form2_inherit_sale_timesheet) has been removed. - So the context key `with_remaining_hours` required to show remaining time is missing. Fix: - Add the record back which updates context task-6170953 Forward-Port-Of: odoo/odoo#262746
This update resolves a crash that occurred when users switched to edit mode while an event registration modal was open. The fix ensures the modal is properly cleaned up after the transition, preventing errors related to accessing the modal's style properties. This improves stability and prevents unexpected application behavior.
Original PR description
Steps to reproduce: =================== 1. Go to Event, open an event page 2. Click "Register" & Select a ticket and confirm 3. Switch to edit mode => crash. Cause: ====== The cleanup callback called…
Steps to reproduce: =================== 1. Go to Event, open an event page 2. Click "Register" & Select a ticket and confirm 3. Switch to edit mode => crash. Cause: ====== The cleanup callback called `hide()` followed immediately by `dispose()`. Bootstrap's `hide()` is asynchronous — it registers a `transitionend` callback that fires `_hideModal()` after the CSS transition. `dispose()` nullifies `this._element` synchronously via `BaseComponent`, so when the `transitionend` fires and `_hideModal()` tries to access `this._element.style`, it crashes with: TypeError: Cannot read properties of null (reading 'style') This happened when switching to edit mode while the event registration modal was open: the `public.interactions` service stopped the interaction, triggering the cleanup. Solution: ========= Listen for `hidden.bs.modal` (fired at the end of `_hideModal`) and only `dispose()` inside that handler, ensuring `_element` is still valid throughout the transition. task-6133395 Forward-Port-Of: odoo/odoo#264365
This update ensures that donation confirmation emails are sent in the user's preferred language, regardless of their anonymous status. Previously, emails were defaulted to English, even when users selected a different language on the website. This change improves the user experience and ensures accurate communication for all donors.
Original PR description
Steps to reproduce: =================== 1. Configure website with at least 1 language installed different from English. ex: English and French. 2. As anonymous user, change wehbsite language and make…
Steps to reproduce: =================== 1. Configure website with at least 1 language installed different from English. ex: English and French. 2. As anonymous user, change wehbsite language and make a donation via the donation snippet. 3. Check the outgoing confirmation email. => Email body is rendered in English. Cause: ====== The donation confirmation email rendered with `self.partner_id.lang`. For anonymous donors, `partner_id` is the website's shared public user partner, so every anonymous donor received the email in whatever language was set on that partner (or English if unset), regardless of the language they were browsing in. Solution: ========= `payment.transaction` already has a `partner_lang` field auto-filled from `partner.lang` at creation. - override it in the `/donation/transaction` controller with `request.env.lang` when the public partner is used, capturing the request language at donation time (also works later from `_cron_post_process`, which has no request context); - render `_send_donation_email` using `self.partner_lang` instead of `self.partner_id.lang`. opw-5875338 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#259351
This update ensures Odoo correctly sets the `toStateCode` field for SEZ transactions when generating e-waybills. Previously, this was a source of API errors, particularly for export and supply transactions. By enforcing the required `toStateCode` of 99, this fix ensures compliance with e-waybill regulations and prevents disruptions to shipping.
Original PR description
For SEZ transactions, the e-waybill API requires `toStateCode` to be set to 99. Previously, this value was not enforced, leading to API errors: - 373 for export transactions - 641 for supply and CKD/SKD/lots supply This fix updates the logic to derive `toStateCode` based on the invoice's GST treatment. When the transaction is identified as SEZ, `toStateCode` is correctly set to 99, ensuring compliance with e-waybill requirements and preventing API failures. task-6117694 Forward-Port-Of: odoo/odoo#259327
This update ensures charts accurately display data when users specify custom date ranges, including open start or end dates. Previously, the chart's granularity would shift unnecessarily. Now, the chart maintains its current level of detail, regardless of the user-defined date range, providing a more consistent and reliable visualization of data.
Original PR description
The charts adapt their granularity when a date global filter is updated. But the code didn't handle the cases where the user sets a custom range with an open start or end date (eg. `until 2024-01-01`). In those case picking the best granularity is not practical (because it fully depends on the server data), so we will just keep the current granularity. Task: [6196246](https://www.odoo.com/web#id=6196246&cids=1&menu_id=4720&action=333&active_id=2328&model=project.task&view_type=form) 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#263019
This update resolves a confusing user experience where discount codes wouldn't re-apply after being discarded. Now, users can successfully re-apply a discarded code, ensuring rewards are correctly applied without creating duplicate entries or impacting existing orders. This improves the overall customer experience and simplifies the discount redemption process.
Original PR description
Issue: --- ### Steps to reproduce: 1- Create a `Discount Code` program. 2- In SO, use `Coupon Code` wizard and use the code. 3- After available rewards are shown, discard the wizard. 4- Re-apply the code. Validation Error: The promo code is already applied. As the reward is not applied, this is functionally confusing. At this point We can see the reward only inside the rewards wizard view. If we allow re-apply the code in case no reward line is created for the `rule.program_id`, we can still see the reward by re-applying the same code, without any side effects. opw-6164198 Forward-Port-Of: odoo/odoo#264105 Forward-Port-Of: odoo/odoo#261950
This update resolves an issue where multi-company orders were incorrectly assigning fiscal positions, leading to 'incompatible companies' errors. The fix ensures the sale order's company is used when calculating the fiscal position, guaranteeing accurate accounting and order confirmation. This improves order processing reliability in our multi-company setup.
Original PR description
Issue: --- Due to this issue, in multi-company environment, wrong fiscal position might be assigned to the order, leading to `incompatible companies` error. Steps to reproduce: 1- On multi-company…
Issue: --- Due to this issue, in multi-company environment, wrong fiscal position might be assigned to the order, leading to `incompatible companies` error. Steps to reproduce: 1- On multi-company setup, assign a website to the second company. 2- Configure pickup method for second company. 3- Configure fiscal positions for both companies. 4- Setup auto invoice for second company. 5- Using public user, add a product to cart and checkout. 6- Use pickup method, and pay. The order is not confirmed. If you enable debug mode after payment, it will show an `incompatible companies` error. Cause: --- https://github.com/odoo/odoo/blob/43f5ceadbc1f7df9898c327bf65bffdbe9860c1c/addons/account/models/partner.py#L247-L279 `_get_fiscal_position` is using environment company to compute the fiscal position. However, `_compute_fiscal_position_id` causing the issue here is triggered inside `report_saleorder` template with user set as odoobot when trying to to send the confirmation. As a result, the odoobot company's fiscal position will be used causing this issue. Fix: --- We should ensure company from sale order is used by setting it as env company. opw-6186296 Forward-Port-Of: odoo/odoo#264123
This update corrects a technical issue that prevented accurate payroll calculations when a payrun had no associated payslips. The fix ensures the system handles empty payrun scenarios correctly, preventing errors and maintaining payroll accuracy. This improves the reliability of the Australian HR Payroll module.
Original PR description
If the payrun does not have any payslips, the _get_payslip_stp is called on an empty recordset, which causes the compute to fail. This commit fixes the _get_payslip_stp compute for empty recordset. task-6215823 Forward-Port-Of: odoo/enterprise#117198
This fix resolves an issue where payroll account merges incorrectly combined employee payments, leading to inaccurate analytic distribution reporting. The update ensures that each employee's specific analytic distribution is correctly applied, preventing data aggregation and maintaining accurate financial reporting. This improves the reliability of payroll accounting data.
Original PR description
Steps to reproduce 1. Enable "Batch Account Move Lines" in the Payroll settings. 2. Configure two employees' versions with an analytic distribution on the same analytic account but with different…
Steps to reproduce
1. Enable "Batch Account Move Lines" in the Payroll settings.
2. Configure two employees' versions with an analytic distribution on the
same analytic account but with different percentages (e.g. {acc: 50}
for the first employee and {acc: 70} for the second).
3. Generate a payslip run containing both employees and validate it.
Issue
The generated account move aggregates the two payslips into a single
line whose analytic_distribution matches only the last employee being
processed; the other employee's percentage is silently lost.
`_get_existing_lines` decides whether an incoming line can merge into an
already accumulated one. When the incoming line has an analytic
distribution, the merge condition delegates to
`_check_partially_matching_accounts`:
https://github.com/odoo/enterprise/blob/e4a1326c7a8a74da7970aeaa9900c19d01634e31/hr_payroll_account/models/hr_payslip.py#L254-L271
https://github.com/odoo/enterprise/blob/e4a1326c7a8a74da7970aeaa9900c19d01634e31/hr_payroll_account/models/hr_payslip.py#L273-L283
That helper returns True as soon as any analytic account of the new
line appears anywhere in the existing line's distribution dict, without
comparing percentages. Two distributions such as {acc: 50} and
{acc: 70} share the same account, so the helper returns True, the
lines are merged, and whichever distribution ends up on the merged line
overwrites the other — the total amount is correct but the analytic
split is wrong.
The logic introduced in commit https://github.com/odoo-dev/enterprise/commit/e40a3166286a6bc546e9543b935233d2a110dc52 successfully addressed merging for rule-level distributions
with composite keys (e.g., {'13,7,12': 40}). However, that implementation is overly inclusive for employee-specific distributions.
It fails to differentiate between cases where the same analytic account is utilized across various employees but with different percentage allocations.
Because it only checks for an account overlap rather than a perfect distributional match, it incorrectly aggregates distinct financial dimensions into a single journal line
Solution
Compare the full analytic_distribution dict by strict equality. Lines
merge only when the distribution is identical (same keys AND same
percentages), keeping the batch feature anonymizing identically
configured employees while preserving one line per distinct
distribution.
opw-6102508
Forward-Port-Of: odoo/enterprise#1141562 changes
Resolved issues and error corrections
This update simplifies the process of fetching transactions from Codabox for users connected through Odoo. Previously, users needed write access to the company record, which wasn't necessary after an initial connection was established. This change removes that requirement, streamlining the process and improving user experience.
Original PR description
Currently, we use the `_l10n_be_codabox_verify_prerequisites` method before trying to fetch transactions. This method checks if the user has write access rights on res.company model which should not be mandatory to fetch transactions from codabox when the connexion is already created. opw-6108811 Forward-Port-Of: odoo/enterprise#117097
This update resolves a test failure in the WhatsApp discuss sidebar by aligning it with a recent change that now only considers active users when determining available commands. This ensures the test accurately reflects the current system behavior and prevents errors.
Original PR description
This PR updates the discuss sidebar testcase to match the new behavior where only active users are considered when computing main_user_id, reducing the number of available commands and fixing the failing assertion. community: https://github.com/odoo/odoo/pull/262247 task-6179486
4 changes
Resolved issues and error corrections
This update streamlines the self-order checkout process by skipping the payment page when the order total is zero. Previously, zero-amount orders were unnecessarily redirected, creating a clunky user experience. This change provides a smoother and more intuitive checkout flow for customers.
Original PR description
Before this commit: -------- - Self-orders with a total amount of zero are still redirected to the payment page, which was unnecessary. After this commit: -------- - The payment step is now skipped for zero-amount self-orders, providing a smoother checkout flow. task-5106938
This update resolves two issues impacting the website editor and donation functionality. First, it eliminates a potential infinite loop in the editor when undoing actions, ensuring a smoother user experience. Second, it corrects a bug where donation amounts weren't updating correctly after navigating back, guaranteeing accurate donation processing.
Original PR description
*:website, website_payment > Commit 1: [FIX] web_editor: prevent infinite bounce loop when clicking undo Steps to reproduce: 1. Click on a snippet without dragging it. 2. Notice that the "Drag…
*:website, website_payment > Commit 1: [FIX] web_editor: prevent infinite bounce loop when clicking undo Steps to reproduce: 1. Click on a snippet without dragging it. 2. Notice that the "Drag building blocks here" section starts bouncing. 3. Observe that a step is added to the history (Undo becomes available). 4. Click on Undo button. Issue: 1. The `o_catch_attention class` is repeatedly added and removed, creating unnecessary history steps in the editor. 2. No actual changes occur in the wrap area, yet the editor records history steps. 3. This leads to an infinite bounce loop when using Undo/Redo. Expected behavior: 1. The Undo button should not be activated. 2. Infinite bouncing should not occur. This PR prevents unnecessary history steps by disabling history tracking during this phase using `observerUnactive` and `observerActive`. This ensures that the editor does not record redundant changes, preventing infinite bounce loops. > Commit 2: [FIX] website_payment: fix donation amount not updating issue Steps to Reproduce: 1. Go to Website → Add a Donation snippet. 2. Enter a custom amount and click "Donate". You will be redirected to the donation/pay page. 3. Use the browser's back button to return to the previous page. 4. Change the amount in the custom amount field. 5. Click "Donate" again. - The old amount is still used instead of the new one. Expected Behavior: The donation amount should update correctly when changed. The issue occurs because clicking the "Donate Now" button appends a hidden value to the form snippet, which is then used in payment_form. When navigating back and selecting "Donate Now" again, a duplicate hidden value is added instead of replacing the previous one. This PR ensures that if a value already exists, it is replaced instead of being appended, resolving the issue. > Commit 3: [FIX] web_editor: fix dropdown options value Steps to reproduce: 1. Go to the website and drag and drop the form snippet. 2. Change the action to 'Subscribe to Newsletter'. 3. Click on multi-checkbox field to view its options. - Even after selecting an option, it remains in the dropdown, allowing multiple selections of the same option. Expected behaviour: - Once an option is selected, it should be removed from the dropdown. Solution: This PR removes the count from the display name, ensuring correct form behavior. task-4583314 Forward-Port-Of: odoo/odoo#234513 Forward-Port-Of: odoo/odoo#203454
This update simplifies the process of retrieving transaction data from Codabox. Previously, users needed write access to the company record, which wasn't necessary after the initial connection was established. This change streamlines the process and improves efficiency.
Original PR description
Currently, we use the `_l10n_be_codabox_verify_prerequisites` method before trying to fetch transactions. This method checks if the user has write access rights on res.company model which should not be mandatory to fetch transactions from codabox when the connexion is already created. opw-6108811 Forward-Port-Of: odoo/enterprise#117097
This update resolves issues preventing Odoo IoT boxes from successfully upgrading to newer database versions. Specifically, the system now waits after the upgrade script before attempting a git checkout, and includes necessary packages like 'geoip2' to ensure a smooth Odoo service startup. This improves upgrade reliability and stability.
Original PR description
This commit fixes two issues with upgrading from old IoT box images to 19.1+ DBs: - The IoT box would try and start checking out with git at the same time as the upgrade script rebooted the system. This would leave the git branch as the DB version (e.g. 19.2) but with the files still being at 19.1. To fix this, we sleep after the script until we reboot. - On reboot, the IoT box would then git checkout to the new version anyways. However, it would not install apt packages, leaving the Odoo service unable to start because of a missing 'geoip2' package. To fix this, we simply include this package in the upgrade script. task-6217972 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#264737
2 changes
Resolved issues and error corrections
This update simplifies the process of fetching transactions from Codabox. Previously, users needed write access to the company record, which wasn't necessary after the initial connection was established. This change ensures smoother and more efficient transaction retrieval.
Original PR description
Currently, we use the `_l10n_be_codabox_verify_prerequisites` method before trying to fetch transactions. This method checks if the user has write access rights on res.company model which should not be mandatory to fetch transactions from codabox when the connexion is already created. opw-6108811 Forward-Port-Of: odoo/enterprise#117097
This update fixes a problem where users accessing bank reconciliation within a child company couldn't correctly determine the currency. The fix adds a temporary 'sudo' command to access the necessary currency information, ensuring accurate bank reconciliation functionality for all company setups, including those with child companies.
Original PR description
The bug is easy to reproduce, but niche. 1. Have a company set up with a child company 2. Have a non admin user with administration rights for accounting 3. Create a bank statement in a journal with no set currency_id and fully reconcile it 4. While only in the child company, try to access the bank reconciliation widget -> access error The error occurs because of how journal_currency_id is computed on the bank rec widget. The fallback value for the currency is derived from the journal_id.company_id.currency_id which is inaccessible from the child company. To circumvent this, we just add sudo() to the call. Forward-Port-Of: odoo/enterprise#117005
6 changes
Resolved issues and error corrections
This update resolves a bug that prevented the JS tour for setting up overtime rules from functioning correctly. The fix ensures the tour accurately targets the correct fields and the save button is properly displayed, allowing users to successfully configure overtime rules. The test case confirms the fix.
Original PR description
Before: - Tour filled the ruleset name instead of the rule name due to selector mismatch. - Tour failed when saving ruleset because modal save did not close, hiding main save. After: - Target rule creation wizard via `.modal-dialog` selectors for accurate field editing. - Ensure modal save is clicked and form is visible before saving the ruleset. Impact: - JS tour `overtime_ruleset_flow` behaves as expected again. - Test `TestOvertimeRulesetFlow.test_overtime_ruleset_flow` passes. Task: - 5391395
This update simplifies access to Codabox transaction data. Previously, users needed write access to the company record, which wasn't necessary after the initial connection was established. This change streamlines the process and improves efficiency.
Original PR description
Currently, we use the `_l10n_be_codabox_verify_prerequisites` method before trying to fetch transactions. This method checks if the user has write access rights on res.company model which should not be mandatory to fetch transactions from codabox when the connexion is already created. opw-6108811 Forward-Port-Of: odoo/enterprise#117097
This update resolves discrepancies in order totals between Odoo and Shopee/Lazada due to rounding differences when handling marketplace discounts. The changes ensure accurate tax calculations and total amounts, improving order reconciliation and preventing financial inaccuracies.
Original PR description
Marketplace orders with discounted tax-exclusive lines could not match the platform total: Odoo accumulated a small rounding residue vs Shopee's total_amount / Lazada's order price. sale_shopee…
Marketplace orders with discounted tax-exclusive lines could not match the platform total: Odoo accumulated a small rounding residue vs Shopee's total_amount / Lazada's order price. sale_shopee ----------- - Use model_discounted_price as price_unit (discount=0) instead of a percentage discount. - Rename _recompute_subtotal to _compute_subtotal to derive tax-exclusive subtotals from tax-inclusive totals (aligned with sale_lazada). - Add _compute_reconciled_line_specs: price-include taxes keep the discounted unit price; tax-exclusive taxes use the nominal rounded tax-exclusive unit. - In _create_order_from_data, append a tax-free "Shopee Amount Adjustment" line for any residue vs Shopee total_amount. - Add a dedicated shipping line with fiscal-position-mapped taxes. - Structure SO line descriptions (SKU, promotion, original price) via _build_item_description. - Consolidate tests with build_order_mock(**extra); tax fixtures use an explicit tax group where required (Odoo 19+). sale_lazada ----------- - Port the same reconciliation model: reconciled line specs, discount=0 with discounted unit from paid_price, shipping line from shipping_fee, order-level tax-free "Lazada Amount Adjustment" vs order price. - Group by SKU: _build_item_description (SKU, voucher, original price); skip all-canceled SKU buckets. - Tests: build_order_mock(), same tax fixture pattern as sale_shopee. task-6112062
This update resolves an error that occurred when loading sample data for work orders. The issue stemmed from sample data containing missing BOM line information, which caused a system error. This fix ensures that the system only attempts to link BOM lines when they actually exist, preventing the error and allowing sample data to load correctly.
Original PR description
Currently, an error occurs when loading sample data in work orders. **Steps to Reproduce:** - Install `mrp_workorder` without demo data. - Go to `Settings` > `Users & Companies` > `Groups` and open…
Currently, an error occurs when loading sample data in work orders. **Steps to Reproduce:** - Install `mrp_workorder` without demo data. - Go to `Settings` > `Users & Companies` > `Groups` and open the `Manage Work Order Operations` group. - Add the `administrator` to the `users` list. - Open the `Shop Floor` and, if you see `Activate your Work center`, click on it and then click `Configure Later`. - Click on `Load Samples`. `AttributeError: 'NoneType' object has no attribute 'id'` After this [recent commit], sample data loading in mrp_workorder started linking Quality Points to a specific BOM line [1] using the provided sample data [2]. However, some sample entries contain None [3] as the bom_line, which raises the error [1]. This commit ensures that the BOM line ID is only set when a BOM line exists. [recent commit]: https://github.com/odoo/enterprise/commit/c2a3e89c3ff5bc201bf7307b3b7d322d7bd0eecc [1]- https://github.com/odoo/enterprise/blob/0b08377e4e485a1b1da347dd2384b6c17bbb089e/mrp_workorder/models/mrp_production.py#L233 [2]: https://github.com/odoo/enterprise/blob/0b08377e4e485a1b1da347dd2384b6c17bbb089e/mrp_workorder/models/mrp_production.py#L251 [3]: https://github.com/odoo/enterprise/blob/0b08377e4e485a1b1da347dd2384b6c17bbb089e/mrp_workorder/models/mrp_production.py#L242 sentry-7475493233 Forward-Port-Of: odoo/enterprise#117037
This update fixes an issue where the FEC import parser would fail due to empty lines in the input files. The change now automatically skips these empty lines, ensuring all valid FEC files are processed correctly and preventing import errors. This improves the reliability of the French localization import process.
Original PR description
It could happens that we have some empty lines in the fec files, the parser was returning an error when that happened. We still want to process the file so we will just skip the empty lines. task-6169168 Forward-Port-Of: odoo/enterprise#115758
This update corrects a problem in the French Intrastat export process. Previously, the system was missing crucial quantity data related to supplementary units when generating the DEBWEB2 XML file. This fix ensures that all relevant data is included, improving the accuracy of Intrastat reporting for French companies.
Original PR description
Steps to reproduce 1. In a French company with Intrastat enabled, set up a product whose commodity code has a CN supplementary unit (e.g. 8802 30 00, "p/st") and set…
Steps to reproduce
1. In a French company with Intrastat enabled, set up a product whose commodity code has a CN supplementary unit (e.g. 8802 30 00, "p/st") and set `intrastat_supplementary_unit_amount` on it.
2. Post EU customer invoices for that product.
3. Export the DEBWEB2 XML from the Intrastat report.
Issue
The FR export collapses engine rows a second time in `_group_items`, because the DEBWEB2 format groups more aggressively than the SQL. The aggregator only declares `value` and `weight`: https://github.com/odoo/enterprise/blob/6ae5d3df6e9305416e4d6f74259cd01753025f42/l10n_fr_intrastat/models/account_intrastat_report.py#L308-L313 Items are then rebuilt as `dict(zip(grouping_key, key_tuple)) | grouped_item_values`. `SU_code` survives (it is in the grouping key), but the numeric `supplementary_units` is in neither side and is silently dropped as soon as two engine rows merge. The template then skips the element because of its `t-if="item.get('supplementary_units')"` guard: https://github.com/odoo/enterprise/blob/6ae5d3df6e9305416e4d6f74259cd01753025f42/l10n_fr_intrastat/data/intrastat_export.xml#L61
opw-6139657
Forward-Port-Of: odoo/enterprise#117357
Forward-Port-Of: odoo/enterprise#1170334 changes
Resolved issues and error corrections
This update corrects a technical issue that prevented the calculation of payslips when a payrun had no associated payslips. The fix ensures the system handles empty recordsets gracefully, preventing errors and maintaining accurate payroll processing. This improves the reliability of the Australian HR Payroll module.
Original PR description
If the payrun does not have any payslips, the _get_payslip_stp is called on an empty recordset, which causes the compute to fail. This commit fixes the _get_payslip_stp compute for empty recordset. task-6215823
This update simplifies access to Codabox transaction data. Previously, users needed write access to the company record, which wasn't necessary after the initial connection was established. This change streamlines the process and improves efficiency.
Original PR description
Currently, we use the `_l10n_be_codabox_verify_prerequisites` method before trying to fetch transactions. This method checks if the user has write access rights on res.company model which should not be mandatory to fetch transactions from codabox when the connexion is already created. opw-6108811 Forward-Port-Of: odoo/enterprise#117097
This update corrects a bug where managers weren't seeing all their direct reports in the 'My Team' filter within the HR appraisal module. The fix utilizes a more accurate method for determining hierarchical relationships, ensuring managers correctly see all subordinates. This improves the usability and accuracy of the appraisal process.
Original PR description
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 tax return entries incorrectly included taxes from multiple regions (like British Columbia) instead of filtering for the specific tax return type (e.g., Manitoba PST). The change ensures that tax return entries accurately reflect the taxes owed based on the return type, improving the accuracy of VAT reporting across Canada, Ecuador, Egypt, Pakistan, Saudi Arabia, and Kenya.
Original PR description
Issue: Validating a tax return creates an entry with all the tax aml from the company instead of filtering them according to the tax return type. Steps to reproduce: - In a company in Canada - Invoice a Customer from British Columbia in the previous month (A) - Confirm - Go to tax report -> Return - Review and Validate tax return for "Manitoba PST Return (CA)" for month A - Click on the 3 dots -> View Entry Current Behavior: - Entry has lines for PST in British-Columbia and GST taxes Expected behavior: - Entry has lines for PST in Manitoba only Cause: https://github.com/odoo/enterprise/pull/98158 introduces method `_get_vat_closing_entry_additional_domain` in the wrong class. opw-6065838 Forward-Port-Of: odoo/enterprise#116366
8 changes
Resolved issues and error corrections
This update resolves issues preventing Odoo IoT boxes from successfully upgrading to newer database versions. The fix ensures the system waits after the upgrade script before attempting a new git checkout, and now includes the necessary 'geoip2' package during the upgrade process. This improves the stability and reliability of Odoo deployments on IoT boxes.
Original PR description
This commit fixes two issues with upgrading from old IoT box images to 19.1+ DBs: - The IoT box would try and start checking out with git at the same time as the upgrade script rebooted the system. This would leave the git branch as the DB version (e.g. 19.2) but with the files still being at 19.1. To fix this, we sleep after the script until we reboot. - On reboot, the IoT box would then git checkout to the new version anyways. However, it would not install apt packages, leaving the Odoo service unable to start because of a missing 'geoip2' package. To fix this, we simply include this package in the upgrade script. task-6217972 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#264737
This update resolves an issue where customers ordering 'Pick up in store' without logging in weren't receiving confirmation emails. The fix ensures that the customer's email is correctly subscribed to the delivery order, triggering the necessary notification. This improves the customer experience and reduces potential order confusion.
Original PR description
Customers placing an order without logging in and with the "Pick up in store" delivery method are not notified when the delivery is confirmed 1. Install eCommerce and Sales 2. Go to Settings >…
Customers placing an order without logging in and with the "Pick up in store" delivery method are not notified when the delivery is confirmed 1. Install eCommerce and Sales 2. Go to Settings > Website > Delivery and enable "Click & Collect" 3. Go to Settings > Inventory > Shipping and enable "Email Confirmation" 4. Go to Website > Configuration > Payment Providers and Install Demo 5. Go to Website > Configuration > Delivery Methods and open "Pick up in store", set YourCompany as warehouse and publish it 6. Go to Sales > Products, open product "Office Lamp", click on "Update Quantity" in the status bar and add 5 units 7. Log out 8. Go to the shop, add product "Office Lamp" to the cart and checkout 9. Fill in the address form and continue checkout 10. Select "Pick up in store" as delivery method and select a location 11. Confirm the order and pay with Demo 12. As user Mitchell Admin, go to Sales, remove the default filter and open the newly created sale order 13. Open the related delivery with the smart button and validate it 14. No delivery order confirmation was sent to the customer (check emails) Issue: Confirming an order with a "Pick up in store" delivery method replaces the `partner_shipping_id` of the sale order with an archived partner https://github.com/odoo/odoo/blob/d73e5662a0af7c549008661f743ba5d51f765339/addons/delivery/models/sale_order.py#L178-L192 which updates the `partner_id` of the related `stock.picking` with the archived partner https://github.com/odoo/odoo/blob/d73e5662a0af7c549008661f743ba5d51f765339/addons/sale_stock/models/sale_order.py#L130-L132 This will unsubscribe the old `partner_id` on the `stock.picking` and try to subscribe the archived partner https://github.com/odoo/odoo/blob/d73e5662a0af7c549008661f743ba5d51f765339/addons/stock/models/stock_picking.py#L1120-L1125 Because the partner we want to subscribe is archived, he will be filtered out and the subscribe action will have no effect, preventing him from receiving the delivery confirmation https://github.com/odoo/odoo/blob/d73e5662a0af7c549008661f743ba5d51f765339/addons/mail/models/mail_thread.py#L4367-L4369 Solution: Subscribe the parent of the archived partner when we write a `partner_id` on pickings with "in_store" `delivery_type`. This ensures the unarchived partner is subscribed to the picking allowing him to receive the mail confirmation. opw-6095396
This update fixes an issue where unapproved WhatsApp templates could be linked to event communications. The change disables creation features to ensure only approved templates are associated with events, improving data consistency and preventing potential misuse. This resolves a previous bug reported in opw-6047203.
Original PR description
**Steps to reproduce:** - Install Events / Whatsapp apps - Open an event - Add a communication with whatsapp type - Create and edit - Save and try to open the new communication record - Access error is raised **Issue:** Domain of the `'whatsapp.template'` search filter out unapproved templates. But when creating directly the record on the event it still gets linked to it. **Fix:** Disable `quick_create` and `create_and_edit` to prevent linking unapproved templates to an event communications (same logic as with an existing unapproved template). template search: https://github.com/odoo/enterprise/commit/659562008c090dc82039eb06fb99adf26268b3cc opw-6047203
This update fixes an issue where refunds processed with card payments didn't correctly reverse the accounting entries. The fix prevents a double accounting swap, ensuring that credit and debit values are properly inverted during refund processing, leading to accurate financial records. This improves the reliability of our Point of Sale accounting.
Original PR description
**Steps to reproduce:** - Open the PoS, make a sale and pay by card - Close the PoS - Open the PoS, refund that sale with card again - Close the PoS - Go to the accounting app -> accounting -> journal entries - Check the jounal entries created with Combine Card POS payments - They will basically be the same, only the order of the account move lines is swapped They credit/debit should be inverted **Why the fix:** This is due to a double swap, as we swapped the accounts and swapped the payment type, meaning we were basically inverting it twice, and that's why only the order changed but not the values. We now stop changing the payment_type manually to avoid this situation. opw-6074455
This update fixes a bug where selecting a table from one end would select the entire table. Now, the HTML editor correctly handles selections that begin in a table cell and extend outside of it, providing a more intuitive and reliable table selection experience. This ensures users can accurately select and manipulate tables within the editor.
Original PR description
The previous commit fixes a behavior that is expected when the user makes a selection that starts in any element and ends in a table cell (the whole table gets selected), but the reverse case was never handled, namely when the selection starts in a table cell and ends outside of it. backport-https://github.com/odoo/odoo/pull/239270/changes/68e71fad5bbb0445bb1850bf694235f3235b602f task-5420366 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update corrects a bug where portal users could inadvertently delete documents they didn't own through archiving. The fix ensures that portal users can only delete documents they own, aligning with the intended functionality. This prevents unintended data loss during the regular cron-based trash collection process.
Original PR description
Reproduce: with rpc call as portal user, you can archive documents you have access to. This is not desired as this may lead to records being deleted when the cron collects the trash, but we only wanted to support portal users deleting only records they own. What we did when calling toggle_active should be done for all calls to `write` with `active`. It also removes the need for `_raise_if_unauthorized_archive` and `_unlink_except_unauthorized`. Task-6205627
This update resolves a memory issue that could cause Odoo to crash when importing invoices or bills with a large number of products. The fix uses a more efficient batch processing method to reduce unnecessary calculations and memory usage, resulting in improved performance and stability.
Original PR description
Before this commit, for DBs with a very large number of products it was possible for the thread to run out of memory when importing an invoice or a bill. The reason is that the name on…
Before this commit, for DBs with a very large number of products it was possible for the thread to run out of memory when importing an invoice or a bill. The reason is that the name on product.product is non stored and computed. This leads to tons of recomputes, which in turn leads to reads and stores in cache of the underlying `product.product`, which down the line uses up all of the available memory for the thread. The proposed method uses batches instead of a `search_fetch` as the latter would not solve the recompute problem and hence the underlying memory problem. Another alternative approach could be going straight for the `product.template.name`, but that approach might introduce a loss of precision or functionality when searching for products at invoice import. Here is the memory graph from memray before the fix: <img width="1106" height="450" alt="opw-6168737-memray-pre-fix" src="https://github.com/user-attachments/assets/f971dc4d-aa09-41e3-a8c5-e5ca53f9786d" /> And here is the same graph after the fix: <img width="1106" height="450" alt="opw-6168737-memray-post-fix" src="https://github.com/user-attachments/assets/0a784cdc-9b40-498b-bbcb-89114eec1ec9" /> We can see a much lower peak memory usage after the fix. We an also observe that the memory complexity shifts from `O(n)` to `O(1)`, with `n` being the number of `product.product` records stored in the DB. For both presented graphs, the same, unaltered database was tested. The database contains 389 467 `product.product` records. opw-6168737 Forward-Port-Of: odoo/odoo#262591
This update ensures that the price comparison strikethrough on the shop page only appears when the compare price is higher than the sales price. Previously, it incorrectly displayed the strikethrough even when the prices were equal, creating a confusing user experience. This change improves the accuracy and clarity of product pricing.
Original PR description
Steps to produce: --- - Install website_sale module. - Enable `Comparison Price` from settings. - Create a product with sales price = 25 and compare price = 25. - Go to the shop page and search for…
Steps to produce: --- - Install website_sale module. - Enable `Comparison Price` from settings. - Create a product with sales price = 25 and compare price = 25. - Go to the shop page and search for the product. Issue: --- - The strikethrough appears on the compare price (25) even when the compare price equals the sales price. - The strikethrough should only appear when the compare price is strictly greater than the sales price. Root cause: --- - In `_search_render_results_prices` [1], the condition only checks for the presence of `compare_list_price` in `combination_info`, without verifying that it is actually greater than the sales price. This causes the strikethrough to render even when both prices are equal. Solution: --- - Added a strict greater-than check on compare price against the sales price, aligning with the existing behavior already implemented for the product page [2]. Before: --- <img width="537" height="98" alt="image" src="https://github.com/user-attachments/assets/a1524f0f-4a59-4daf-ac7d-834604710492" /> After: --- <img width="538" height="95" alt="image" src="https://github.com/user-attachments/assets/1e32269b-13c0-469b-9d1f-e6d6ced97fdd" /> [1]https://github.com/odoo/odoo/blob/4ca059731f97d0f9bce4863cf195fd68a755717e/addons/website_sale/models/product_template.py#L831-L834 [2]https://github.com/odoo/odoo/blob/4ca059731f97d0f9bce4863cf195fd68a755717e/addons/website_sale/views/templates.xml#L1340-L1346 opw-6178129 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#262434
3 changes
Resolved issues and error corrections
This update resolves an issue where the Timesheet Kanban header and dropdown menus were overlapping. The fix removed a problematic CSS setting (`position-sticky`) that created separate stacking contexts, allowing the header and Kanban view to display correctly. This ensures a cleaner and more functional user experience.
Original PR description
Steps to reproduce: - Open Timesheets. - Switch to kanban view. - Groupby any field. - Start timer and click on task/project field. Issue: - Kanban Header and Dropdown menu of selection overlap. Reason: - It is due to the usage of `postion-sticky` on the header thus creating it's own stacking context, so header and Kanban Renderer body work in different stacking context, thus overlapping each other where they shouldn't have. For more info refer: https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/position#sticky Fix: - Remove `postion-sticky` as it doesnt serve any purpose as header can now work being a static postioned node. task-4714235
This update fixes an error in the Luxembourg Annual VAT Declaration report that resulted in incorrect calculations for Appendix E 1a. The fix ensures that key financial data is accurately included in the report, improving the reliability of VAT reporting for Luxembourg businesses. This resolves a discrepancy in the reported total.
Original PR description
### Issue: The formula `L10N_LU_TAX_163` in the Luxembourg Annual VAT Declaration was incorrect: - `L10N_LU_TAX_791.year_start` was added twice - `L10N_LU_TAX_993.year_start` was missing As a result, the computed total in Appendix E 1a was incorrect ### Steps to reproduce: - Install `l10n_lu_reports` - Open the `Report: Annual VAT Declaration (LU)` - Go to `Appendix E` - Use the `Start of Financial year` pencil icons to manually set values for fields `791` and `993` - Check the computed value of field `163` After the fix, both values are included exactly once in the formula opw-6158950
This update resolves a critical issue causing OOM crashes when generating the Swedish SIE 4 report for large datasets. By optimizing the database query and data processing, the report now runs significantly faster and with reduced memory usage, improving overall system stability and efficiency.
Original PR description
### Description of the issue/feature this PR addresses: Prevent Out of Memory (OOM) crashes and drastically improve execution speed when generating the Swedish SIE4 verification export for massive…
### Description of the issue/feature this PR addresses: Prevent Out of Memory (OOM) crashes and drastically improve execution speed when generating the Swedish SIE4 verification export for massive datasets. ### Current behavior before PR: When exporting a large volume of journal entries (e.g., 190,000+ account moves), the `_export_l10n_se_sie4_verification` method relies on iterating through heavy ORM recordsets and accessing relational child fields (move.line_ids) inside a loop. This triggers a severe N+1 query problem, maxing out server RAM and causing an OOM crash. ### Desired behavior after PR is merged: The method now utilizes a hybrid data extraction approach: - The ORM is used strictly to safely evaluate domains (multi-company rules, dates, states) and fetch a lightweight list of valid move_ids. - A single SQL query with JOIN statements fetches all parent moves, child lines, and account codes in exactly one database query. - itertools.groupby chunks the flat, lightweight dictionary results back into their respective journal entries. The export now handles massive datasets in seconds with minimal memory overhead, while remaining perfectly secure. ### Benchmark: For Memory: | # Input Data | Before PR | After PR | | -------- | -------- | -------- | | ~190,000 moves | MemoryError | 407MB| | ~200,000 moves | 1.8GB | 174.8 MB| For Speed: | # Input Data | Before PR | After PR | | -------- | -------- | -------- | | ~190,000 moves | MemoryError | 5.10s | | ~200,000 moves | 1m29s| 5.3s| ### Reference: opw-6067999