Daily updates from Odoo
Friday, May 15, 2026
35 changes · saas-19.2
Resolved issues and error corrections
This update fixes an issue where unreconciling payments on recurring invoices would incorrectly generate a new invoice for the following month. The fix adds a context flag to prevent the automatic creation of these duplicate invoices, ensuring accurate invoice generation and reducing potential accounting errors. This improves the reliability of recurring invoice processing.
Original PR description
Issue: Unreconciling a payment in a batch payment from a recurring invoice will cause an invoice for the next recurring period to be generated Steps to reproduce: 1. Create and confirm a monthly…
Issue: Unreconciling a payment in a batch payment from a recurring invoice will cause an invoice for the next recurring period to be generated Steps to reproduce: 1. Create and confirm a monthly recurring invoice 2. Create a payment for the invoice 3. Create a batch payment and add the payment created in step 2 then validate it 4. Create a bank statement line and reconcile it with the batch payment created in step 3 5. Unreconcile the payment from the invoice from the invoice form view 6. Notice that a draft invoice for the next month’s recurring invoice is created Cause: When unreconciling the payment from the invoice via the invoice form view, the method “delete_reconciled_line” is called. In the “account_accountant_batch_payment” override of that method, it will reset the invoice back to draft and repost it. However, when posting a recurring invoice, the default behavior is to create the invoice for the next recurrence period Solution: Adding a new context flag called “skip_recurring_copy” will prevent the next period’s recurring invoice from being generated when invoices are posted through “delete_reconciled_line” opw-6158881 Forward-Port-Of: odoo/odoo#263991
This update fixes an issue where unreconciling a payment on a recurring invoice would automatically generate a new draft invoice for the following month. The change adds a context flag to prevent this behavior, ensuring invoices are created correctly after reconciliation. This improves invoice management and reduces potential errors.
Original PR description
Issue: Unreconciling a payment in a batch payment from a recurring invoice will cause an invoice for the next recurring period to be generated Steps to reproduce: 1. Create and confirm a monthly…
Issue: Unreconciling a payment in a batch payment from a recurring invoice will cause an invoice for the next recurring period to be generated Steps to reproduce: 1. Create and confirm a monthly recurring invoice 2. Create a payment for the invoice 3. Create a batch payment and add the payment created in step 2 then validate it 4. Create a bank statement line and reconcile it with the batch payment created in step 3 5. Unreconcile the payment from the invoice from the invoice form view 6. Notice that a draft invoice for the next month’s recurring invoice is created Cause: When unreconciling the payment from the invoice via the invoice form view, the method “delete_reconciled_line” is called. In the “account_accountant_batch_payment” override of that method, it will reset the invoice back to draft and repost it. However, when posting a recurring invoice, the default behavior is to create the invoice for the next recurrence period Solution: Adding a new context flag called “skip_recurring_copy” will prevent the next period’s recurring invoice from being generated when invoices are posted through “delete_reconciled_line” opw-6158881 Forward-Port-Of: odoo/enterprise#117011
This update fixes an issue where early payment discounts with cash rounding were incorrectly calculating tax amounts in payment journal entries. The change ensures that tax amounts are accurately added when using the 'Modify tax amount' cash rounding strategy, resolving discrepancies in discount calculations. This improves the reliability of financial reporting.
Original PR description
Issue: When creating a payment with an early payment discount, on an invoice using a cash rounding with a strategy of “Modify tax amount”, the early payment discount lines on the payment journal…
Issue: When creating a payment with an early payment discount, on an invoice using a cash rounding with a strategy of “Modify tax amount”, the early payment discount lines on the payment journal entry will be far off from the correct amount Steps to reproduce: 1. Create a sales tax for 8.1% 2. Create a cash rounding record for 0.05 as the rounding precision, “Modify tax amount” as the rounding strategy, and “Nearest” as the rounding method 3. Create a payment term with early payment discount of 2% if paid within 18 days. And reduced tax on early payment. With a due term of 100% 30 days after the invoice date 4. Create an invoice on 1/1 with a subtotal of 339.60 and the tax of 8.1% and add the cash rounding method and payment term created earlier 5. Create a payment for it 9 days later on 1/10 for the full amount after the early payment discount is applied Cause: tax_amounts is grabbing the amount for a certain tax from the last line on the invoice with the same tax_repartition_line_id. Usually there is only one tax line representing a certain tax on an invoice. However, when a cash rounding is applied to the invoice with a strategy of “Modify tax amount”, the cash rounding line that is created will also have the same tax_repartition_line_id. In that case, it will grab the amount on the cash rounding line instead of adding the first tax amount with the cash rounding line amount Solution: In tax_amounts, add to the accumulating value if a tax repartition line id already exists as a key otherwise, insert it into tax_amounts opw-5998497 Forward-Port-Of: odoo/odoo#259025
This update fixes a problem with the test payrun date in the Odoo Enterprise system. Previously, the test relied on the current year, which wasn't reliable for verifying salary calculations. This change ensures accurate and consistent payrun date testing, improving payroll accuracy.
Original PR description
This commit fixes year for the test payrun as relying on today's year is not reliable to verify salary computations. Runbot build error: https://runbot.odoo.com/odoo/runbot.build.error/237683 Forward-Port-Of: odoo/enterprise#117204
This update resolves an issue where surveys would freeze after a network interruption during submission. The fix ensures the submission lock is released, allowing users to retry submitting their answers after reconnecting. This improves the survey experience and prevents data loss.
Original PR description
Issue: When a user takes a survey and loses their internet connection just as the form attempts to submit (e.g., during a timed survey's auto-submit), the survey becomes completely unresponsive. Even…
Issue: When a user takes a survey and loses their internet connection just as the form attempts to submit (e.g., during a timed survey's auto-submit), the survey becomes completely unresponsive. Even if the user reconnects, they are unable to submit their answers. Steps to reproduce: 1. Start a survey that includes a time limit. 2. Disconnect your device from the internet just before the timer runs out. 3. Wait for the timer to reach zero, triggering the auto-submit. 4. Reconnect to the internet and attempt to click "Submit" manually. 5. The action is ignored and the form remains stuck. Cause: To prevent duplicate submissions, the form applies a "submitting" lock the moment a submission begins. If a network failure interrupts the process, the code execution halts abruptly. Because the process crashes before reaching the end of its routine, the lock is never removed, leaving the form permanently frozen. Solution: Guarantee that the submission lock is released regardless of the network request's outcome. By safely wrapping the submission sequence, the form will now always unlock itself even if an error interrupts the process. This allows the user to simply try submitting again once their connection is restored, while still letting the system report the initial network failure. Task-5787410 Forward-Port-Of: odoo/odoo#249514
This fix resolves an issue where Kanban progress bars for date/datetime grouped tasks appeared grey and inaccurate. The problem stemmed from a mismatch in how date/time keys were formatted on the server and client. By standardizing the key formatting process, the progress bars now accurately reflect the state of tasks within each group.
Original PR description
Steps to reproduce 1. Open any kanban view declaring a <progressbar> (e.g. Project > Tasks, or Field Service > My Tasks). 2. Group by a date or datetime field with a granularity (e.g. Creation Date:…
Steps to reproduce 1. Open any kanban view declaring a <progressbar> (e.g. Project > Tasks, or Field Service > My Tasks). 2. Group by a date or datetime field with a granularity (e.g. Creation Date: Year, planned_date_begin:day). 3. Have records spread across several groups with different state values (done, in progress, canceled, ...). 4. Observe the colored progress bar at the top of each column. Issue Every column's progress bar renders as a uniform grey block regardless of the actual state distribution of its records. The effect is visible only when grouping by a date/datetime field; grouping by stage or assignees still works. The kanban relies on two separate RPCs whose keys must match: formatted_read_group (used by web_read_group) returns the columns the client stores, and the client uses each column's formatted groupby value as the lookup key; read_progress_bar returns a dict mapping that same key to per-state counts. For a datetime group by with a time granularity, formatted_read_group goes through _web_read_group_groupby_formatter, which localizes the naive timestamp in the user's timezone and then converts it to UTC before strftime, see https://github.com/odoo/odoo/blob/8d80ed39a2b6250bc5dfbe1f0fe4c84cc1b778ce/addons/web/models/models.py#L698-L726. On the client, serializeDateTime also formats in UTC, see https://github.com/odoo/odoo/blob/8d80ed39a2b6250bc5dfbe1f0fe4c84cc1b778ce/addons/web/static/src/core/l10n/dates.js#L455-L462, so group.serverValue is the UTC-shifted string the server sent, e.g. "2025-01-01 08:00:00" for a Pacific-tz user on a 2025-year group. read_progress_bar called _read_group directly, which returns the raw naive datetime out of date_trunc, see https://github.com/odoo/odoo/blob/8d80ed39a2b6250bc5dfbe1f0fe4c84cc1b778ce/odoo/orm/models.py#L1764, so its dict was keyed by str(datetime(2025, 1, 1, 0, 0)) = "2025-01-01 00:00:00". The UTC-formatted key the client looks up in _pbCounts[groupValue], see https://github.com/odoo/odoo/blob/8d80ed39a2b6250bc5dfbe1f0fe4c84cc1b778ce/addons/web/static/src/views/kanban/progress_bar_hook.js#L69, never matched, per-state counts stayed at zero, and the synthetic "Other" bucket with color "200" (grey) absorbed the whole group.count, see https://github.com/odoo/odoo/blob/8d80ed39a2b6250bc5dfbe1f0fe4c84cc1b778ce/addons/web/static/src/views/kanban/progress_bar_hook.js#L88, hence the uniform grey bar. Non-date groupbys (many2one, selection, boolean) are unaffected because their keys are scalar ids / selection codes that round-trip identically on both sides. The "None" column also works because both sides emit the literal string "False". The regression was introduced by d5a6e97abab04282c7a69093cd790b539a958241 when read_progress_bar was switched from self.read_group(...), whose output was pre-formatted the same way the client received it, to self._read_group(...) Solution Route read_progress_bar through formatted_read_group, the same method web_read_group uses to build groups for the client. Both sides now run through _web_read_group_groupby_formatter, so the keys are produced by the same code path and match by construction for every field type, including date/datetime granularities. formatted_read_group wraps relational and date/datetime groupby values as (id, display_name) / (utc_str, label) tuples, so the adapt helper unwraps the first element to restore the scalar key shape the result dict expects. opw-6148736 Forward-Port-Of: odoo/odoo#261024
This update corrects a visual misalignment on invoices when section prices are hidden and the country of origin is displayed. The fix ensures that tax and amount information within section lines are correctly aligned in the invoice PDF, regardless of price visibility. This improves invoice presentation and accuracy.
Original PR description
The content of an invoice's section lines is not aligned with the columns when the prices of the section are hidden and the country of origin is displayed in the invoice Steps to reproduce: 1.…
The content of an invoice's section lines is not aligned with the columns when the prices of the section are hidden and the country of origin is displayed in the invoice Steps to reproduce: 1. Install account_intrastat module 2. Go to Invoicing > Customers > Products and create a new product with name "test" and in the Accounting tab, set the Country of Origin to Afghanistan 3. Go to Invoicing > Customers > Customers and change Acme Corporation's country to United Kingdom 4. Go to Invoicing > Customers > Invoices and create a new invoice for partner Acme Corporation, add a section line and in that section, add product "test" 5. Click on the three dots at the end of the section line and click on Hide Prices 6. Confirm the invoice and print it 7. The content of the section line in the invoice pdf are not aligned (the tax is in column Unit Price and the amount is in column Taxes) Issue: When a section is hidden, no column is added in the section to display the origin, resulting in a misalignment of the tax and the amount of the section Solution: Add a column for the origin country in hidden section lines and add the origin country in product lines of `_get_child_lines` opw-6147929 Forward-Port-Of: odoo/odoo#264118 Forward-Port-Of: odoo/odoo#263499
This update corrects a visual issue on invoices where section line content wasn't properly aligned when prices were hidden and the country of origin was displayed. The fix ensures that tax and amount information within hidden section lines are correctly formatted, improving invoice presentation. This resolves a misalignment problem impacting how invoices are printed.
Original PR description
The content of an invoice's section lines is not aligned with the columns when the prices of the section are hidden and the country of origin is displayed in the invoice Steps to reproduce: 1.…
The content of an invoice's section lines is not aligned with the columns when the prices of the section are hidden and the country of origin is displayed in the invoice Steps to reproduce: 1. Install account_intrastat module 2. Go to Invoicing > Customers > Products and create a new product with name "test" and in the Accounting tab, set the Country of Origin to Afghanistan 3. Go to Invoicing > Customers > Customers and change Acme Corporation's country to United Kingdom 4. Go to Invoicing > Customers > Invoices and create a new invoice for partner Acme Corporation, add a section line and in that section, add product "test" 5. Click on the three dots at the end of the section line and click on Hide Prices 6. Confirm the invoice and print it 7. The content of the section line in the invoice pdf are not aligned (the tax is in column Unit Price and the amount is in column Taxes) Issue: When a section is hidden, no column is added in the section to display the origin, resulting in a misalignment of the tax and the amount of the section Solution: Add a column for the origin country in hidden section lines and add the origin country in product lines of `_get_child_lines` opw-6147929 Forward-Port-Of: odoo/enterprise#117092 Forward-Port-Of: odoo/enterprise#115442
This update resolves an issue where service templates imported with 'tracking=none' incorrectly showed a 'Quantity on Hand' value. The fix ensures that service templates without tracking are not marked as storable, leading to more accurate stock reporting. This improves data consistency and reliability.
Original PR description
_set_tracking does write(is_storable=bool(tracking)) without looking at type. A service template imported manually with tracking='none' thus flips to is_storable=True. Restrict the inverse to consu templates. Steps to reproduce: - Import a CSV with type=service,tracking=none - You will visually see the Quantity on Hand field on the form view opw-6203593
This update allows all Point of Sale users to record cash inflows and outflows, regardless of their invoicing access rights. Previously, this functionality was restricted, which created a bottleneck. This change simplifies the cash management process within Point of Sale and aligns with existing security protocols.
Original PR description
Cash In/Out was gating on `account.group_account_invoice` even though the backend operation (`account.bank.statement.line` creation) is no different from what session closing already does under sudo(). Lower `_has_cash_move_perm` to `point_of_sale.group_pos_manager`, add `sudo()` to the create call. opw-6192176 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#263580
This update fixes an issue where the average sale price was incorrectly calculated due to tax inclusion/exclusion. The change ensures the sale average price always uses the net amount (excluding tax) from the invoice line, leading to more accurate reporting and pricing. This improves the reliability of sales data.
Original PR description
The price_unit of a account.move.line can be with or without tax. The sale_avg_price should be either incl. or excl. tax. To ensure the avg price is always excl. tax the price_subtotal can be used. Forward-Port-Of: odoo/odoo#263671 Forward-Port-Of: odoo/odoo#199209
This pull request updates the core spreadsheet component to the latest version (19.2.13). It includes fixes for a color picker issue and updates to Odoo dependencies, ensuring the spreadsheet functionality continues to operate smoothly and reliably. This is a routine maintenance update.
Original PR description
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/fece642d7c [REL] 19.2.13 [Task: 0](https://www.odoo.com/odoo/2328/tasks/0)…
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/fece642d7c [REL] 19.2.13 [Task: 0](https://www.odoo.com/odoo/2328/tasks/0) https://github.com/odoo/o-spreadsheet/commit/5117146ce2 [FIX] color_picker: prevent gradient from opening when picking a custom color [Task: 6186050](https://www.odoo.com/odoo/2328/tasks/6186050) https://github.com/odoo/o-spreadsheet/commit/0f6ba0d72e [IMP] packages: rolldown is released in 1.0.0 [](https://www.odoo.com/odoo/2328/tasks/) https://github.com/odoo/o-spreadsheet/commit/5282e3c377 [REL] 19.2.12 [Task: 0](https://www.odoo.com/odoo/2328/tasks/0) https://github.com/odoo/o-spreadsheet/commit/dfb655d7b9 [FIX] packages: update odoo dependencies [](https://www.odoo.com/odoo/2328/tasks/) https://github.com/odoo/o-spreadsheet/commit/5231677171 [FIX] package: package install is broken [Task: 0](https://www.odoo.com/odoo/2328/tasks/0) Co-authored-by: Florian Damhaut (flda) <flda@odoo.com> Co-authored-by: Anthony Hendrickx (anhe) <anhe@odoo.com> Co-authored-by: Alexis Lacroix (laa) <laa@odoo.com> Co-authored-by: Lucas Lefèvre (lul) <lul@odoo.com> Co-authored-by: Adrien Minne (adrm) <adrm@odoo.com> Co-authored-by: Ronak Mukeshbhai Bharadiya (rmbh) <rmbh@odoo.com> Co-authored-by: Dhrutik Patel (dhrp) <dhrp@odoo.com> Co-authored-by: Rémi Rahir (rar) <rar@odoo.com> Co-authored-by: Pierre Rousseau (pro) <pro@odoo.com> Co-authored-by: Vincent Schippefilt (vsc) <vsc@odoo.com> Co-authored-by: Marceline Thomas (matho) <matho@odoo.com>
This update resolves a recurring issue in the meeting tour test that caused it to fail intermittently. The change ensures a key action is completed before the next, preventing a timing conflict that previously led to unpredictable test results. This improves the reliability of our testing process.
Original PR description
The `test_04_meeting_view_tour` test sometimes fails. A race condition occurs between the initial mark as unread action, which may or may not be triggered depending on whether the thread composer has time to gain focus before the meeting view is opened, and the later mark as unread action triggered during the test. This commit ensures the initial mark as read action is completed before proceeding to the mark as unread steps, thus resolving the issue. runbot-239936 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
This update resolves an issue where changes made to timesheet data in one Odoo tab weren't consistently reflected in other tabs. The fix ensures that all modifications are saved and synchronized across different windows, improving data accuracy and reliability for users.
Original PR description
Steps to reproduce: - Open Odoo in two tabs - Open the systray in tab 1 - Change some fields - Close the systray to save - Open the systray in tab 2 All fields are not in line in both tabs. This commit, hence, ensures that all data changed in the inline form is saved and consistent across different windows. When switching window, the systray is closed and the data is saved to the local storage. When opening the systray in another tab, the local storage will be accessed to read the latests changes (i.e., the modifications done in the other tab). task-6180394
This update fixes an issue where demo data didn't correctly populate the 'Device Installation and Maintenance' worksheet in Field Service products. By loading a demo data file, the system now ensures the appropriate worksheet is used, improving the accuracy of demo data setup.
Original PR description
Load product_product_demo.xml in the 'planning_field_service_sale_worksheet' module so that the `Device Installation and Maintenance` worksheet is correctly set in Field Service product when demo data is loaded, instead of using the default worksheet.
This update fixes a potential error in the HR holidays module that could occur when using the demo user. The fix ensures that the demo user always references the correct existing employee, preventing a database constraint violation. This improves stability and reliability of the holiday reporting feature.
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
This update fixes a visual issue in the Treehouse theme where the payment confirmation message was incorrectly displayed, appearing compressed. The fix ensures the message is properly aligned and visible, providing a consistent and professional user experience for customers using this theme. This resolves a specific problem impacting only the Treehouse theme.
Original PR description
Steps to reproduce: 1) Select the Treehouse theme from the website editor 2) Add a product to the cart and proceed to payment 3) Complete the payment and reach the confirmation page Issue: - The payment success alert message is not displayed properly and appears slightly below the alignment. - Also this particular issue is coming in this Treehouse theme only in rest of the themes the alert message is coming correctly. opw-5976602 Forward-Port-Of: odoo/odoo#257768
This update fixes an issue where Colorado state income tax calculations resulted in a positive value on payslips. This ensures accurate withholding of taxes, aligning with standard tax regulations. The fix was inspired by a previous change for Alabama state taxes and validated by payroll experts.
Original PR description
## Issue When generating a payslip for an employee of a company located in Colorado, the *CO State Income Tax* could end up positive. ## Steps to reproduce 1. Install *United States - Payroll*…
## Issue
When generating a payslip for an employee of a company located in Colorado, the *CO State Income Tax* could end up positive.
## Steps to reproduce
1. Install *United States - Payroll* (`l10n_us_hr_payroll`)
2. Set the current company's State to Colorado
3. Create an employee and a contract
- Wage: $0
- (Set the contract's status to *Running*)
- (In the payroll tab) State Withholding Allowance: $1000
4. Create a Payslip for the employee
- Structure: *"United States: Regular Pay"*
5. Compute Sheet
6. **In the _Salary Computation_ tab, the _CO State Income Tax_ line has a positive value**
## Justification
This fix is similar to the one applied for the AL(abama) state income tax by https://github.com/odoo/enterprise/commit/f0eeb55f1e3cf965c6a409675813d4a699e5fca6. That modification was justified by CAS (PO of US localizations for Payroll) in opw-5137280:
> *"Payroll taxes are always funds withheld from employee's paychecks, if there is a positive value it means the tax is a refund, not a withholding. Refunds happen when individuals file their income."*
## Note to reviewer
The test [`test_069_al_state_tax_0_income`](https://github.com/odoo/enterprise/blob/219d2a797ee2099c9d77c2defc9c9c5e1d504ffe/test_l10n_us_hr_payroll_account/tests/test_salary_rules.py#L957-L989) (added by the aforementioned commit https://github.com/odoo/enterprise/commit/f0eeb55f1e3cf965c6a409675813d4a699e5fca6) is wrongly indented and thus never executed. The test passes with the dedicated fix, and fails without it, as expected. Let me know if you want me to indent it correctly (in this commit or in an additional one).
opw-5999856
Forward-Port-Of: odoo/enterprise#116831
Forward-Port-Of: odoo/enterprise#112724This update resolves a problem where users couldn't link invoices to the chatter feature in Odoo. The fix prevents a security check from failing when copying attachments, ensuring users with appropriate permissions can successfully link documents. This improves the usability of the chatter feature for sales and accounting workflows.
Original PR description
**Steps to reproduce:** 1. Create user with role: User. Sales: Administrator, Accounting: Administrator and Documents: System Administrator. 2. Create a SO, create invoice, confirm, and send. 3. Now…
**Steps to reproduce:** 1. Create user with role: User. Sales: Administrator, Accounting: Administrator and Documents: System Administrator. 2. Create a SO, create invoice, confirm, and send. 3. Now go back to the SO, and try to link the INV document to the chatter. **Cause:** When linking an existing document to the composer, the underlying attachment is copied. If the source attachment is bound to a specific field (e.g., `res_field = 'invoice_pdf_report_file'`), the `copy()` operation duplicates this field reference. Odoo's native security checks then attempt to verify access to that specific field on the target model (`mail.compose.message`). Because the composer does not have this field, the check fails and throws an AccessError, even if the user has full rights to the source document. **Solution:** Explicitly set `"res_field": False` during the copy operation. This strips the original field binding, cleanly converting the file into a standard, generic chatter attachment for the composer without bypassing the standard security framework. opw-5916364 Forward-Port-Of: odoo/enterprise#107723
This update resolves an issue where creating two overtime shifts on a Saturday (set to end at midnight) would trigger an error. The fix addresses a timing discrepancy in how overtime start and end times are calculated, preventing overlapping shifts and ensuring accurate overtime recording.
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#117094 Forward-Port-Of: odoo/enterprise#114147
A bug was preventing the 'Two-factor authentication Disabled' filter from working correctly in the user list. This update corrects a technical issue within Odoo's database search functionality, ensuring the filter accurately displays users without two-factor authentication. This ensures users can properly see and manage their two-factor authentication settings.
Original PR description
Issue: In the user view list, the "Two-factor authentication Disabled" filter doesn't work (return the same result than the "Two-factor authentication Enabled").
Explanation: The ORM normalises `=`/`!=` to `in`/`not in` with list values (commit odoo/odoo#191549 - 92301a5b300d). `_totp_enable_search` only handled the legacy scalar form: `value` is now always a list of boolean then always truthy then `[('totp_enabled', '=', False)]` returned users *with* a totp secret, the opposite of what was asked.
Fix it and add tests for it.
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#264412
Forward-Port-Of: odoo/odoo#264027This 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 emails are properly cleaned up after sending, preventing these attachments from appearing in the Chatter. This improves the clarity and usability of the Email Marketing interface.
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#262152
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 'Affect Base of Subsequent Taxes' is enabled, preventing financial discrepancies. This improves the reliability of tax calculations.
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#264434 Forward-Port-Of: odoo/odoo#259566
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, improving the overall editing experience.
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
This update resolves a technical error that prevented users from paying multiple expense bills simultaneously. The issue stemmed from incorrect data being passed during payment creation, triggering a database error. This fix ensures that users can now correctly process payments for multiple expenses without encountering this problem.
Original PR description
**Steps to reproduce:** - Install Accounting and Expenses - Create an expense: * Category: [any] * Total: [any] * Employee: [create or select one without a bank account] * Paid by: Employee (to reimburse) - Submit - Post Journal Entries (in Purchases journal) - Create another expense, submit it and post its journal entries - Go to the bills list - Select both bills created from the expenses - Click on "Pay" and then on "Create Payments" **Issue:** A traceback is raised while creating a payment. **Cause:** In the values used to create the payment, "partner_bank_id" is an empty "res.partner.bank" recordset instead of False, which leads to a SQL error because the type of the value is invalid. opw-6206315 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fix ensures that the departure date is correctly associated with employee versions, addressing an issue where the dismissal date was being used instead. This accurately reflects scenarios like employee notices and prevents incorrect version tracking, improving payroll and HR data accuracy.
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
This update fixes an issue where event tickets with fixed prices were incorrectly showing a struck-through original price, making them appear as discounts. The change ensures that fixed price rules are displayed accurately, aligning with standard eCommerce behavior and providing a clearer price representation to customers. This improves the user experience and avoids confusion regarding pricing.
Original PR description
Event tickets show a struck-through original price even when a "Fixed Price" pricelist rule is applied, making it incorrectly appear as a discount. This is inconsistent with eCommerce shop behavior.…
Event tickets show a struck-through original price even when a "Fixed Price" pricelist rule is applied, making it incorrectly appear as a discount. This is inconsistent with eCommerce shop behavior. ### Steps to reproduce 1. Create an event with a paid ticket (e.g., 100 EUR). 2. Create a pricelist with a "Fixed Price" rule for that ticket (e.g., 80 EUR). 3. Open the event registration page. 4. The 100 EUR appears struck-through next to 80 EUR. ### Cause Odoo's website only shows a struck-through original price for discount rules, not fixed price rules. By design, a fixed price replaces the original rather than reducing it. However, the event registration page used a simplified check: it compared the final price to the original and assumed any difference was a discount. This ignored the rule type, incorrectly flagging fixed price rules as discounts. ### Fix Rationale A new helper method on the event ticket model now queries the applied pricelist rule to determine if it qualifies as a discount. opw-5993477 Forward-Port-Of: odoo/odoo#264470 Forward-Port-Of: odoo/odoo#263586
This update now allows customers to cancel their Stripe payments directly through the payment terminal, both on the POS system and self-order kiosks. Previously, cancellation was only possible through the POS interface, creating a frustrating experience for customers. This change improves customer satisfaction and streamlines the payment process.
Original PR description
Before this commit, when making a payment on a Stripe terminal, the only way to cancel the payment was from the POS interface. In the self order kiosk, it was impossible to cancel the payment. After this commit, a cancel button will appear on the payment terminal for both POS and kiosk Stripe payments. task-6166789 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#264665 Forward-Port-Of: odoo/odoo#264270
This update fixes a reporting issue in the Profit & Loss report for Peruvian companies. Previously, depreciation entries were incorrectly categorized as 'Other Income.' The change ensures that depreciation expenses are now correctly classified within 'Other Operating Expenses,' improving the accuracy of financial reporting.
Original PR description
**Steps to reproduce:** - Install Accounting and l10n_pe_reports - Switch to a Peruvian company (e.g. PE Company) - Create a MISC journal entry with a line using a depreciation account (e.g. 6841000) and a debit value (e.g. 1000) - Post the entry - Check "Profit and Loss" report" **Issue:** The "Other operation income" section has an amount of 1000, even though a depreciation account (i.e. expense) was used. The amount should be in "Other operating expenses" section. **Cause:** A unique formula including accounts starting with 61, 66, 68, 71, 73, 74, 75, 76, 78, 79 and 99900 is used for "Other operation income" and "Other operating expenses" and depending on the sign of the sum, the result is reported in one of the section. **Solution:** Only report entries on "Income" accounts in "Other operation income" section and those on "Expense" accounts in "Other operating expenses". opw-6073666 Forward-Port-Of: odoo/enterprise#114362
This update ensures that livechat conversations are automatically marked as read when they end, resolving a previous issue where agents saw persistent unread indicators. The change adjusts how the chat window focuses, triggering the read state correctly regardless of whether the composer is visible. This improves agent efficiency and provides a cleaner user experience.
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#263355 Forward-Port-Of: odoo/odoo#253609
This update resolves an issue where a warning message persisted after canceling a payslip in the HR payroll module. The change ensures that the warning disappears correctly, providing a smoother user experience. This improves the reliability and usability of the payroll system.
Original PR description
. Clear payslip warning after cancelling the payslip . Add corresponding tests task-6199148 Forward-Port-Of: odoo/enterprise#117289 Forward-Port-Of: odoo/enterprise#116859
This update corrects a problem where invoices with many items caused rounding errors during discount calculations, leading to validation failures with Mexican tax authorities (SAT). The fix ensures accurate discount distribution across all invoice lines, resolving previously reported errors and improving compliance.
Original PR description
…any lines Fix SAT validation errors CFDI40111 and CFDI40108 that occur when invoices with many lines contain a small negative line, causing per-line discounts to be hidden due to currency precision. opw-6187014 Forward-Port-Of: odoo/enterprise#117375 Forward-Port-Of: odoo/enterprise#117297
This update streamlines the reconciliation process in Odoo by preventing unnecessary checks when no changes are needed. Previously, the system performed extra queries even when reconciliation wasn't required, leading to slower performance. This change improves the overall responsiveness of the accounting module.
Original PR description
Since `write` is often done record by record because the values written are different on all lines, the call to `action_undo_reconciliation` is actually not batched. Even if there is nothing to do, some queries are still done to make sure that there is nothing to do... Forward-Port-Of: odoo/odoo#264476
This change fixes an error that prevented users from being created correctly when Studio and Livechat were installed and configured. The issue stemmed from a timing problem during user setup, causing a required field to be missing. The fix ensures the 'Color Scheme' field is always populated with a default value, allowing successful user creation.
Original PR description
Steps to reproduce: 1. Install Studio and Livechat 2. In user's form view change the location of Theme field after the livechat fields. 3. Now, try to create a user from name and email only Issue: - It throws an error: The operation cannot be completed: Missing required value for the field 'Color Scheme' (color_scheme). Cause: - During user creation after studio modification, im_livechat inverse methods access res.users.settings before it is fully initialized. then later write a falsy `color_scheme` value to that settings record, violating the required constraint on res.users.settings.color_scheme. Solution: - Ensure that when creating or updating `res.users.settings`, if `color_scheme` is empty or false, It is automatically set to the default value "system" opw-5918538 Forward-Port-Of: odoo/enterprise#109062
This update resolves an issue where the Microsoft SwiftKey keyboard caused incorrect selection tracking within the HTML editor. By caching the selection state, the system now accurately reflects the user's intended selection, preventing unexpected focus shifts and ensuring proper table editing functionality. This improves the overall user experience when using keyboard input.
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#264618 Forward-Port-Of: odoo/odoo#259798