Daily updates from Odoo
Friday, July 3, 2026
350 changes
14 changes
Enhancements to existing features
This update enhances the expense dashboard by ensuring managers can accurately view the total expenses of their team members. Previously, the dashboard's state filters didn't align with the available reporting options. Now, managers will see comprehensive expense data for those they manage, improving financial oversight.
Original PR description
For the expense dashboard with the states 'To Submit', 'Waiting Approval' and 'Waiting Reimbursement', make these states compliants with the current filters of the list view. It means, for example, that a manager can see the total amounts of the people he manages. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#273663 Forward-Port-Of: odoo/odoo#270234
Resolved issues and error corrections
This update resolves an issue where website editors encountered 'Access Error' messages when editing across different companies. The fix ensures the website editor always uses the correct company email, regardless of the user's permissions, enhancing the editing experience. It also corrects a bug related to default email settings for website form snippets.
Original PR description
### [FIX] website: guard form default email in cross-company editing Since [1], the website form uses the website's company email as the default recipient. With cross-company editing, the editor user…
### [FIX] website: guard form default email in cross-company editing
Since [1], the website form uses the website's company email as the
default recipient. With cross-company editing, the editor user may not
have access to that company's email and hits an `Access Error` when
reading `res.company`.
This commit catches the error and falls back to the editor user's email.
Steps to reproduce:
- Log in as admin
- Set demo user Access Right to `Editor and Designer` for website
- Log in as demo user
- Change company to `My US company`
- Enter website builder and edit mode on `My website`
- Drop a snippet `s_website_form`
- Save
- Traceback: `Access Error`
[1]: https://github.com/odoo/odoo/commit/10eea785e631fb3398ed5df5bfbb8d2f17453551
---
### [FIX] website: ensure default email is used for every form
Following [1], `applyDefaultValues` was no longer applied to snippets
that contain an `s_website_form` without being one themselves, such as
`s_website_form_info`.
`onSnippetDropped` only matched `.closest(".s_website_form")`,
so wrapper snippets returned early and never got their default recipient
email.
Steps to reproduce:
- Drop a `s_website_form_info`
- Click on the form
- "Recipient Emails" is empty, it should contain the company email
task-6356910
[1]: https://github.com/odoo/odoo/commit/ff44e9d56fa64f02946a1432a03f19db1b17ec37This update fixes a technical issue that caused Odoo builds to fail under certain testing conditions. The team moved assertions to their proper location, ensuring consistent build behavior across all testing environments – specifically resolving a discrepancy between 'all apps' and 'single app' modes. This improves the stability and reliability of the Odoo Enterprise platform.
Original PR description
Oversight of: https://github.com/odoo/enterprise/pull/98569 Some assertions were put in the wrong module, making the builds work in "all apps" mode but fail in "single app" mode. This commit moves assertions where they belong. Task-6353709 Forward-Port-Of: odoo/enterprise#122486
This update resolves an issue where invoices would remain open after a website payment was processed and reconciled with a bank statement. The fix restores a previous system that correctly assigned payments to invoices, preventing manual intervention. This ensures invoices are properly linked to payments, streamlining the accounting process.
Original PR description
Steps to reproduce --- 1. Pay a website sale order through a payment provider (the payment stays In Process). 2. Reconcile that provider payment with a bank statement line before invoicing. 3.…
Steps to reproduce --- 1. Pay a website sale order through a payment provider (the payment stays In Process). 2. Reconcile that provider payment with a bank statement line before invoicing. 3. Confirm the delivery and create the invoice for the order. Issue --- The invoice is posted but stays open: the linked payment is never assigned to it, even though its receivable line is still outstanding and is even offered in the invoice outstanding-credits widget. Reconciling the bank statement first fully matches the payment's liquidity line, so the payment moves to the 'paid' state while its receivable line stays open. At invoice posting, _post only auto-assigns payments still in the 'in_process' state, so a 'paid' payment is skipped and its receivable is left unreconciled, leaving the invoice open and requiring a manual intervention. The matched case was lost in 01b87f1230be, which split the former 'posted' state into 'in_process' (cash not matched) and 'paid' (cash matched) and mechanically renamed this filter to 'in_process' only, dropping the matched payments the old 'posted' used to cover. Restoring 'paid' fixes it while the existing not-reconciled guard still keeps failed payments out. https://github.com/odoo/odoo/blob/2b89d39f9329ac0fe7a2938595d1f6ee16dc2924/addons/sale/models/account_move.py#L115-L126 opw-6216259 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#270315
This update fixes an error in calculating holiday attest annual taxable income for employees on long-term sick leave (over 30 days). Previously, the calculation was incorrect due to a reliance on zero-valued payslips. Now, the system uses the employee's monthly wage to ensure accurate taxable income calculations, aligning with Belgian payroll regulations.
Original PR description
Problem ---------------------- When an employee takes a long sick leave (more than 30 days), the basic wage on the payslip is set to 0, leading to the holiday attest annual taxable income to be…
Problem ---------------------- When an employee takes a long sick leave (more than 30 days), the basic wage on the payslip is set to 0, leading to the holiday attest annual taxable income to be calculated as 0 * 12, which is incorrect. Reason ------------------- The calculation for the holiday attest uses the last payslip for the employee, and if the employee had leave type LEAVE214, the last payslip has the basic wage set to zero, so the taxable wage that is used in the annual taxable wage calculation is wrong. The monthly wage should be used as the basic wage in the payslip to get the correct computation. Solution ------------------- The GROSS (taxable income) line that is used is computed as (basic wage - ONSS total + BIK), but the basic wage was 0. This commit checks whether the basic wage is 0 and if the time off type was longterm sick leave, and simulates a payslip using the monthly wage from the contract as basic wage to get the accurate computation for the taxable income. task-6237717 Forward-Port-Of: odoo/enterprise#121742 Forward-Port-Of: odoo/enterprise#120180
A recent update to the SEPA XML processing for Sweden (l10n_se_bban) caused a test failure when combined with the account_iso20022 module. This commit resolves the test issue by temporarily skipping the failing test and adding a replacement, ensuring continued functionality for Swedish payment processing.
Original PR description
Here https://github.com/odoo/enterprise/pull/114662 we changed the way the CdtrAgt node is used in the SEPA XML file for Sweden. But this change broke a test when both account_iso20022 & l10n_se_bban are installed, leading to a Non-expected child error. This commit skip the failling test if l10n_se_bban is installed, and add a new one to replace it. runbot-938366 runbot-938367 Forward-Port-Of: odoo/enterprise#122599 Forward-Port-Of: odoo/enterprise#121485
This update fixes an issue where CFDI documents generated after payment updates incorrectly displayed rates when payments were made in foreign currencies (like USD). The fix ensures the correct payment amount and rate are reflected in the CFDI document, improving accuracy for Mexican businesses using Odoo.
Original PR description
The rate and payment amount shown on the CFDI document generated after updating payments was wrong when the payment was made in a foreign currency. Steps to reproduce: ------------------- * Create a journal that use USD as currency and set the rate to 20 MXN for 1 USD * Create an invoice in MXN and make sure it is set to PPD * Add any product to the invoice for 300$ and post it * Send the invoice to CFDI (a first document should be generated) * Create a payment of 15 USD in the new journal and reconcile it with the invoice * Go back to the invoice and click on "Update payments" to generate the second CFDI document > Observation: The payment document shows an amount of 300 USD with a rate of 1 instead of 15 USD with a rate of 20. Why the fix: ------------ We make sure to use the amount from the statement line when there is one. opw-5974519 Forward-Port-Of: odoo/enterprise#122117 Forward-Port-Of: odoo/enterprise#115779
This update fixes an issue where email attachments with unusual Content-Type headers were being corrupted, leading to data loss. The change ensures attachments are stored correctly by handling these cases gracefully, aligning with industry standards and preventing data corruption. No new functionality was added.
Original PR description
[[REF] mail: consolidate attachment Content-Type normalization](https://github.com/odoo/odoo/pull/273097/changes/ad4e34c5c79450b1e976d9ba7047487218690585) Two separate spots handled malformed…
[[REF] mail: consolidate attachment Content-Type normalization](https://github.com/odoo/odoo/pull/273097/changes/ad4e34c5c79450b1e976d9ba7047487218690585)
Two separate spots handled malformed Content-Type headers. Merge them
into one block, read the raw header once with partition(';') to have
both the type and its parameters available without re-fetching the
header for each case.
No behavior change.
[[FIX] mail: handle attachment Content-Type with no subtype](https://github.com/odoo/odoo/pull/273097/changes/7b410fbe606b7e476f0005485e42783834983b75)
Some mailers send attachments with a bare token as Content-Type instead
of a valid 'type/subtype' pair, e.g.:
Content-Type: base64; name="foo.pdf"
Content-Transfer-Encoding: base64
Python's email library normalises any MIME type without a '/' to
'text/plain'. get_content() then decodes the base64 payload as UTF-8
text, replacing invalid byte sequences with U+FFFD. The subsequent
encode('utf-8') bakes those replacements in, permanently corrupting
the stored file.
Per Postel's law [RFC 761], be liberal in what we accept: detect these
non-standard types via `not all(mimetype.partition('/'))` and fall back
to application/octet-stream, keeping the original parameters (filename,
charset, etc.) so the attachment is stored intact.
opw-6227526
Forward-Port-Of: odoo/odoo#273097This update fixes an issue where refunding a PoS order linked to a sale order didn't correctly update the sale order's invoiced quantity. Now, refund lines are properly accounted for, ensuring accurate quantity tracking when a refund is processed, regardless of whether it's initiated from the PoS or the backend. This improves the reliability of order reconciliation.
Original PR description
When making a refund of a PoS order that was created from a sale order, the sale order qty_invoice was not updated correctly. Steps to reproduce: ------------------- * Create a sale order with any product and confirm it * Open a PoS and settle the order * At this point the qty_invoiced should be 1 on the sale order line * Refund the PoS order from the PoS > Observation: The qty_invoiced is still one. Why the fix: ------------ We now take refund lines into account when computing the qty_invoiced. Note: ------------ There was an inconsistency between a refund made from the PoS and a refund made from the backend. The former is not linking the sale order line to the refund line, while the latter does. This was causing issue when refunding from the backend as it would count the refund twice. To fix this we now remove the link to the sale order line when refunding from the backend. opw-4991405 Forward-Port-Of: odoo/odoo#273425 Forward-Port-Of: odoo/odoo#259653
This update fixes an issue where overtime calculations were inaccurate when employees worked shifts that crossed midnight. The change ensures that all overlapping attendance records are considered during overtime calculations, accurately reflecting the total hours worked. This improves the reliability of overtime reporting.
Original PR description
Issue: ---------------------------------------- The overtime calculation ignores attendances overlapping midnight when creating an attendance on the day they overlap. Steps to reproduce:…
Issue:
----------------------------------------
The overtime calculation ignores attendances overlapping midnight when creating an attendance on the day they overlap.
Steps to reproduce:
----------------------------------------
- Have the standard 8 hours per day working schedule
- Use the default overtime ruleset:
- Quantity, per day, more than the contract
- Have no rule on weeks
- Create an attendance of 8+ hours overlapping midnight on a day:
- From 10pm to 10am (2h + 10h = 12h)
- Create another attendance on the day the first ended:
- From 2pm to 6pm (4h)
- The first attendance has 2h of overtime:
- 0h from the first worked day (from 10pm to midnight = 2 < 8)
- 2h on the next day (10h worked from midnight to 10am)
- The second attendance have 0h of overtime even though it should be 4h
- We only considered this attendance in the calculation, ignoring the 10h worked in the morning
Cause:
----------------------------------------
In `_update_overtime()` we create a domain to include all useful attendances in the calculation. As all rules are based on days, the domain will use the date of the attendance to get overlapping attendances. But the date of the attendance is the date of its `check_in` ([src](https://github.com/odoo/odoo/blob/4235b48c86077bd5bceb9e817cc45b2eec8697e8/addons/hr_attendance/models/hr_attendance.py#L91)). So when creating the second attendance, the domain only fetches attendance with their `date` on the same date as the `check_in` of the second one. This excludes the first one even though it overlaps on the same day.
Solution:
----------------------------------------
Don't use `date` but `check_in` and `check_out` in the domain to really get all attendances overlapping a day with an updated attendance.
As this domain was used on both `hr.attendance` and `hr.attendance.overtime.line`, we adapt it so it uses the correct fields (`time_start` and `time_stop`) from the overtime lines.
opw-6253777
Forward-Port-Of: odoo/odoo#272447This update corrects a rounding issue in overtime calculations, ensuring more precise payment amounts. Previously, overtime durations were rounded to 3 decimal places, leading to potential inaccuracies. The fix now stores overtime durations with 4 decimal places, improving the accuracy of payment calculations, particularly when dealing with fractional hours.
Original PR description
Overtime duration computed as fractional hours was rounded to 3 decimal places before being stored on the overtime line. Since 1 decimal hour = 3600 seconds, this gives only 3.6 seconds of precision and the rounding can go in the wrong direction due to floating-point representation. The fix consists in replacing the duration rounding to 4 decimals when building overtime work entries so stored durations keep sub-second precision needed for money computation. task-6212231 X-original-commit: 33759e607371bf4ef82972428df3afb56ed06e67 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update corrects a minor issue in how overtime hours are calculated and stored, ensuring more accurate payment calculations. Previously, rounding introduced small errors due to the way decimal numbers are handled, which could lead to slight discrepancies in overtime pay. This fix maintains greater precision for financial accuracy.
Original PR description
Overtime duration computed as fractional hours was rounded to 3 decimal places before being stored on the overtime line. Since 1 decimal hour = 3600 seconds, this gives only 3.6 seconds of precision and the rounding can go in the wrong direction due to floating-point representation. The fix consists in replacing the duration rounding to 4 decimals when building overtime work entries so stored durations keep sub-second precision needed for money computation. task-6212231 Forward-Port-Of: odoo/enterprise#120786 Forward-Port-Of: odoo/enterprise#119721
This update corrects a bug in gift card redemption within Point of Sale (PoS). Previously, tax calculations were inaccurate when the default tax setting was 'tax included,' leading to incorrect deductions. The fix ensures accurate tax handling and consistent totals, preventing under-deduction and re-addition of taxes.
Original PR description
We had a bug when redeeming a gift card when the default taxe of the company was tax_included. Steps to reproduce: ------------------- * Set default 15% tax to bo Tax Included * In PoS, sell a gift card * Use that gift card in a new order > Observation: Deducted amount is 43.48, that's 50 without taxes Why the fix: ------------ We now compute the gift card reward line from a tax-aware amount and choose the unit price based on whether the discount product’s tax is price-included, ensuring we deduct the full intended value while displaying the correct tax. This prevents under-deduction (untaxed base only) and avoids re-adding tax on top, keeping totals and tax lines consistent. opw-5441106 Forward-Port-Of: odoo/odoo#273579 Forward-Port-Of: odoo/odoo#244735
Features or functions removed from Odoo
This update removes a QR code that displayed product prices from gift receipts. This change ensures gift receipts maintain their intended purpose of concealing pricing information from the recipient, protecting customer privacy and preventing misuse of pricing details.
Original PR description
Gift receipts are intended to be given to the gift recipient and are designed to hide product prices. The self-service invoicing QR code could expose pricing information through the generated invoice, defeating the purpose of the gift receipt. Therefore, remove the self-invoicing QR code from gift receipts. task-6299597 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#269812
8 changes
Enhancements to existing features
This update streamlines the process of adding tracked products with lots to the Point of Sale (POS) system. Products using FIFO or LIFO removal strategies are now automatically added to the cart without requiring users to manually select a lot. This simplifies the checkout process and reduces user friction.
Original PR description
Before this commit: ==== - The lot/serial selection popup was always shown when adding products tracked by lots. Following this commit: ==== - Products configured with FIFO/LIFO removal strategies are automatically assigned the corresponding lot and added directly to the cart without opening the selection popup. - If no removal strategy is configured, the existing lot selection behavior is preserved. task-6226577 Forward-Port-Of: odoo/odoo#273323 Forward-Port-Of: odoo/odoo#265708
Resolved issues and error corrections
This update resolves an issue where invoices remained open after reconciling a website payment with a bank statement. The system incorrectly skipped 'paid' payments, leaving the associated receivable line unreconciled. The fix restores the 'paid' payment state, ensuring invoices are properly linked to payments and preventing manual intervention.
Original PR description
Steps to reproduce --- 1. Pay a website sale order through a payment provider (the payment stays In Process). 2. Reconcile that provider payment with a bank statement line before invoicing. 3.…
Steps to reproduce --- 1. Pay a website sale order through a payment provider (the payment stays In Process). 2. Reconcile that provider payment with a bank statement line before invoicing. 3. Confirm the delivery and create the invoice for the order. Issue --- The invoice is posted but stays open: the linked payment is never assigned to it, even though its receivable line is still outstanding and is even offered in the invoice outstanding-credits widget. Reconciling the bank statement first fully matches the payment's liquidity line, so the payment moves to the 'paid' state while its receivable line stays open. At invoice posting, _post only auto-assigns payments still in the 'in_process' state, so a 'paid' payment is skipped and its receivable is left unreconciled, leaving the invoice open and requiring a manual intervention. The matched case was lost in 01b87f1230be, which split the former 'posted' state into 'in_process' (cash not matched) and 'paid' (cash matched) and mechanically renamed this filter to 'in_process' only, dropping the matched payments the old 'posted' used to cover. Restoring 'paid' fixes it while the existing not-reconciled guard still keeps failed payments out. https://github.com/odoo/odoo/blob/2b89d39f9329ac0fe7a2938595d1f6ee16dc2924/addons/sale/models/account_move.py#L115-L126 opw-6216259 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#270315
This update restores a set of tests related to the Point of Sale (POS) flow within the l10n_fr_pdp module. These tests were temporarily removed during a recent integration of e-reporting and e-invoicing features. Restoring these tests ensures continued quality and reliability of the POS functionality.
Original PR description
During the merge of l10n_fr_pdp e-reporting and e-invoicing, some tests had to be removed. Task-6296356 Forward-Port-Of: odoo/odoo#273329 Forward-Port-Of: odoo/odoo#271294
A recent update to the SEPA XML processing for Sweden (l10n_se_bban) caused a test failure when combined with the account_iso20022 module. This commit resolves the test issue by temporarily skipping the failing test and adding a new test to ensure proper functionality.
Original PR description
Here https://github.com/odoo/enterprise/pull/114662 we changed the way the CdtrAgt node is used in the SEPA XML file for Sweden. But this change broke a test when both account_iso20022 & l10n_se_bban are installed, leading to a Non-expected child error. This commit skip the failling test if l10n_se_bban is installed, and add a new one to replace it. runbot-938366 runbot-938367 Forward-Port-Of: odoo/enterprise#122599 Forward-Port-Of: odoo/enterprise#121485
This update resolves an issue where the package type selection wizard wasn't displayed when using the barcode 'put in pack' function. The fix restores the wizard's display under the correct conditions, ensuring users can accurately define package types during the picking process. This improves order fulfillment accuracy and streamlines warehouse operations.
Original PR description
### Steps to reproduce: - In the settings enable: Packages - On the operation type `Delivery Order` set "Set Package Type" - Create and confirm a delivery for 1 unit of a product P + reserve it - Got…
### Steps to reproduce: - In the settings enable: Packages - On the operation type `Delivery Order` set "Set Package Type" - Create and confirm a delivery for 1 unit of a product P + reserve it - Got to the barcode app to process the delivery - Scan your product and click "put in pack" #### > The put in pack wizard allowing you to set a package type on the new package does not pop up. ### Cause of the issue: As a general rule of thumb the wizard is suppose to be displayed when the option is enabled and when a package/package type is not already provided to the call: https://github.com/odoo/odoo/blob/5dbc448d336c7ff22803ae91d5014eb6d0a07234/addons/stock/models/stock_package.py#L332-L341 https://github.com/odoo/odoo/blob/5dbc448d336c7ff22803ae91d5014eb6d0a07234/addons/stock/models/stock_move_line.py#L1236-L1238 However an override was added to the barcode module so that the wizard is never displayed when the action is launched from the barcode app: https://github.com/odoo/enterprise/blob/673d449f38cd3eff27c44270c8f7edf91d0ecd02/stock_barcode/models/stock_move_line.py#L193-L196 The idea behind this override was that you could provide the package type id via scans and hence that is was not necessary. However, if you click directly on the put in pack button, the wizard still make sense and should therefore be displayed under the same conditions. opw-6325092 Forward-Port-Of: odoo/enterprise#122308
This update fixes an issue where attachments with unusual Content-Type headers were being corrupted, leading to data loss. The change ensures attachments are stored correctly by handling diverse Content-Type formats, aligning with industry standards and preventing data corruption. No new functionality was added.
Original PR description
[[REF] mail: consolidate attachment Content-Type normalization](https://github.com/odoo/odoo/pull/273097/changes/ad4e34c5c79450b1e976d9ba7047487218690585) Two separate spots handled malformed…
[[REF] mail: consolidate attachment Content-Type normalization](https://github.com/odoo/odoo/pull/273097/changes/ad4e34c5c79450b1e976d9ba7047487218690585)
Two separate spots handled malformed Content-Type headers. Merge them
into one block, read the raw header once with partition(';') to have
both the type and its parameters available without re-fetching the
header for each case.
No behavior change.
[[FIX] mail: handle attachment Content-Type with no subtype](https://github.com/odoo/odoo/pull/273097/changes/7b410fbe606b7e476f0005485e42783834983b75)
Some mailers send attachments with a bare token as Content-Type instead
of a valid 'type/subtype' pair, e.g.:
Content-Type: base64; name="foo.pdf"
Content-Transfer-Encoding: base64
Python's email library normalises any MIME type without a '/' to
'text/plain'. get_content() then decodes the base64 payload as UTF-8
text, replacing invalid byte sequences with U+FFFD. The subsequent
encode('utf-8') bakes those replacements in, permanently corrupting
the stored file.
Per Postel's law [RFC 761], be liberal in what we accept: detect these
non-standard types via `not all(mimetype.partition('/'))` and fall back
to application/octet-stream, keeping the original parameters (filename,
charset, etc.) so the attachment is stored intact.
opw-6227526
Forward-Port-Of: odoo/odoo#273097This update fixes an issue where the 'Apply To' option in pricelist rules wasn't being saved correctly, defaulting to 'Product' instead of 'Category'. The fix ensures that the selected 'Apply To' option is preserved when the pricelist rule is reopened, maintaining accurate product categorization.
Original PR description
Steps to reproduce: ------------------------------------ 1. Install Rental(sale_renting) module and activate Pricelist. 2. Go to Rental > Products > Pricelists. 3. Open an existing pricelist or…
Steps to reproduce:
------------------------------------
1. Install Rental(sale_renting) module and activate Pricelist.
2. Go to Rental > Products > Pricelists.
3. Open an existing pricelist or create a new one.
4. Add a pricelist rule and set:
- Apply To: Category
- Configure the rule (e.g. select a category).
5. Save and close the rule, then save the pricelist.
6. Reopen the pricelist rule.
Observation:
------------------------------------
The "Apply To" option is no longer set to Category. Instead, it default value to Product, and the selected category is not saving correctly.
Issue:
------------------------------------
After [This Commit](https://github.com/odoo/odoo/commit/d2648b1d983927b5df7260a16d6d1d33c213ddeb), 'display_applied_on' is used to control the visibility of uom_id but is not defined in the list view. As a result, field parsing marks it as readonly, so its updated value is not saved.
This causes the "Apply To" option to fall back to its default value ('Product') when the pricelist rule is reopened.
Solution:
------------------------------------
Include the display_applied_on field in the pricelist item list view so the selected "Apply To" option is preserved when saving the pricelist.
opw-6346422Features or functions removed from Odoo
This update removes a self-invoicing QR code from gift receipts. Gift receipts are designed to conceal product prices from the recipient. Removing this QR code ensures the intended privacy and prevents unintended price disclosure.
Original PR description
Gift receipts are intended to be given to the gift recipient and are designed to hide product prices. The self-service invoicing QR code could expose pricing information through the generated invoice, defeating the purpose of the gift receipt. Therefore, remove the self-invoicing QR code from gift receipts. task-6299597 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#269812
34 changes
Enhancements to existing features
This update refines how employees select their favorite projects on timesheets. Previously, a project was automatically chosen based on limited criteria. Now, a project is only selected if it's linked to at least 3 of the employee's 5 most recent timesheets, ensuring a more relevant and accurate selection.
Original PR description
A favorite project is now selected only when at least 3 of the employee's 5 most recent timesheets are linked to it. task-6290859
This update improves the timesheet experience by automatically prefilling the timer with the project the employee most frequently uses. This saves time and reduces errors when logging time, as the system anticipates the user's common activity. The timer now prioritizes the project linked to the employee's recent timesheets.
Original PR description
When opening the timesheet systray, the timer is now prefilled with the project to which the employee's three most recent timesheets are all linked, since they are most likely to keep logging time on it. The currently viewed project or task takes precedence over the favorite project, and viewing a project form now prefills the timer as well, just like task views already do. task-6290859
Resolved issues and error corrections
This pull request resolves a technical issue related to temporary files used within the Odoo system. The fix ensures more stable operation by addressing a problem with temporary files, improving overall system reliability. This change primarily impacts the resource module.
This pull request addresses a temporary file issue within the Helpdesk module. The fix resolves a problem where temporary files were not being properly cleaned up, potentially impacting performance and storage. This change ensures the Helpdesk system operates more efficiently and reliably.
This update corrects a technical error that occurred when managing employee leave periods with overlapping versions. Specifically, a missing method was preventing the system from correctly updating leave statuses, leading to tracebacks. This fix ensures leave management functions reliably across different employee schedules.
Original PR description
**Steps to reproduce the issue:** - Create a leave for an employee with a period that overlaps with two versions. - Change the employee's working schedule. - You get a traceback. The issue is that the definition of the `_update_leave_state` method is missing from the `hr.version` model. task-6332404 Forward-Port-Of: odoo/odoo#272060
A recent test revealed a glitch where the 'Turn camera on' button wasn't appearing correctly during meeting transitions. This was caused by a timing issue in the test setup, specifically a delay in waiting for the meeting to fully initialize. This update ensures the button displays reliably during multi-channel meeting interactions.
Original PR description
The test starts a meeting, then switches to another channel to join its call, expecting the camera button to read "Turn camera on". Starting a meeting runs startMeeting(), which fires enterFullscreen() as a fire-and-forget tail once the meeting call is joined. The test only waited for the meeting's "Stop camera" button (set mid-join, before that tail) before navigating, so enterFullscreen could still be pending during the channel switch. When it ran late it pointed the fullscreen channel at the newly joined channel and turned isFullscreen on. That channel's in-call view is gated on showCallView (!isFullscreen), so it was torn down and the "Turn camera on" button never rendered within the 3s timeout. Wait for the meeting view to be fully active before navigating away, so the whole startMeeting chain (enterFullscreen included) has settled first. https://runbot.odoo.com/odoo/error/939805 Forward-Port-Of: odoo/odoo#273650
This update fixes an issue where the Thread component wasn't displaying messages properly due to a technical glitch in how it tracked loading status. The fix ensures that messages are correctly rendered when the Thread component is loading, improving the user experience.
Original PR description
The Thread component mirrors `thread.isLoaded` into `state.mountedAndLoaded` with a `useEffect` whose body only re-runs when the component re-renders (in `onPatched`). `reset()` forces…
The Thread component mirrors `thread.isLoaded` into `state.mountedAndLoaded` with a `useEffect` whose body only re-runs when the component re-renders (in `onPatched`). `reset()` forces `mountedAndLoaded` false and bumps `resetCount`, a dependency of that effect, so the mirror is meant to re-sync after a reset. But `resetCount` was a plain instance field. The effect's dependency function reads it, and OWL only re-renders (hence re-runs the effect) when a value the render observed changes; a plain field is not reactive, so reading it observes nothing. Bumping it therefore never scheduled a render, and the mirror only re-ran when some other reactive write happened to schedule one. When a `reset()` lands while `mountedAndLoaded` is already false (a no-op write) with `isLoaded` true, and no such write follows, no render is scheduled: the mirror never re-runs and `mountedAndLoaded` strands at false, so the empty phantom list renders no message. This happens on an out-of-render-cycle `applyScroll` (a late `onImageLoaded` or `ResizeObserver`), and when `showLoadOlder` short-circuits on `loadOlder` false and leaves the render unsubscribed from `isLoaded`. Move `resetCount` into `this.state`. Reading it in the effect's dependency array now subscribes the render to it (OWL subscribes the `useState` proxy's render callback on every read, wherever it happens), so a `reset()` bump re-renders and re-runs the mirror to re-sync `mountedAndLoaded` with `isLoaded`. Bump it only when `isLoaded`: `applyScroll` resets on every patch while `!isLoaded`, so an unconditional bump would spin the render loop during loading; the guard re-arms only in the case that heals. https://runbot.odoo.com/odoo/error/940032 Forward-Port-Of: odoo/odoo#273651
This update resolves an issue where expected working hours were incorrectly displayed for employees with variable or no set schedules. The fix ensures that expected hours are only shown when a standard schedule exists, improving the accuracy of timesheet reporting. This change simplifies timesheet management for all employees.
Original PR description
**Steps to reproduce:** 1. Create an employee without a fixed working schedule. 2. Configure the employee with variable hours per day, per week, or no working hours at all. 3. Open the Timesheet Assistant or the Timesheet systray. 4. Observe that expected hours are displayed (over 0h 00m or over 24h 00m). **Cause:** Expected working hours were always computed and displayed, even for resources without a fixed schedule. **Fix:** Only compute expected working hours when the employee has a fixed or average schedule, and rely on the computed working hours to control the display of expected hours while keeping total hours always visible. task-6321760
This update fixes an issue where clicking links within a reply message didn't open them in a new browser tab. Now, links from parent messages will correctly open in a new tab, improving the user experience when navigating between conversations. This enhancement ensures users can easily access related information without leaving the current message.
Original PR description
Before this commit, clicking on a link in a parent message was not opening it in a new tab. Now, the target and rel attributes of the parent message are passed to the inline body opening the link in a new tab if it was the case in the parent. task-6326242 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves a problem where completed documents in the sign module didn't always have consistent access rights. The fix ensures that completed documents accurately reflect the correct permissions, improving data integrity and security. This change primarily impacts the sign module's functionality.
Original PR description
Forward-Port-Of: odoo/enterprise#121576
This update fixes a potential issue where sales from European companies to Northern Ireland (XI) were incorrectly including intra-community taxes. The change adds a check to ensure these transactions are treated as standard third-country sales, aligning with tax regulations. This ensures accurate reporting and compliance.
Original PR description
…stomers The services sales done from a European company to a Northern Ireland (XI) company should not contain intra-community taxes but should be treated as third country (non-EU) transactions. We solve it by adding a check in the EC Sales List return that is only visible when a wrong record occurs. task-6007931 Forward-Port-Of: odoo/enterprise#121487
This update resolves an issue where users were incorrectly suggested as recipients after unfollowing a record in chatter. The fix ensures that the user is no longer added to the recipient list when unfollowing, preventing redundant suggestions and improving the user experience. This ensures a cleaner and more intuitive interaction.
Original PR description
### Steps to reproduce: - Open any mail thread in chatter - Click the "Send To" button once - Click "Unfollow" - You will be a suggested recipient ### Cause of Issue: The suggested recipient generation did not filter out the current user. When the user unfollows, `_message_get_suggested_recipients` is called when storing the thread, and since the user is no longer on the followers list, they get added back as a suggested recipient. https://github.com/odoo/odoo/blob/b4c7247ff218fb850fd91af3e2baa726a82d439c/addons/mail/models/models.py#L467-L468 ### Fix: Since followers are excluded from suggested recipient candidates in the mail thread, and the current user should be excluded when they unfollow, the current user is excluded altogether. This means the current user will not be suggested as a recipient again unless they re-follow the record. opw-6122351 Forward-Port-Of: odoo/odoo#269611
This update resolves a technical issue within the French tax processing module (l10n_fr_pdp) that was preventing accurate reporting. The fix corrects a flawed SQL query triggered when a specific date calculation failed, ensuring reliable data processing for French businesses. This improves the overall accuracy of tax-related reports.
Original PR description
Fixes _force_update_l10n_fr_f10_moves(). It would create a SQL query that compares a date to a bool when _pdp_get_flow_10_start_date() returned None. Forward-Port-Of: odoo/odoo#273006
This update fixes an issue where the number of expenses linked to a sales order was inconsistent, leading to confusion when using the smart button to view related expenses. The change now accurately counts all expenses associated with a sales order, ensuring the smart button displays the correct number of expenses and provides a reliable view.
Original PR description
**Before this commit** Only expenses that generated a sale order line on an SO would be counted in that SO's count of expenses, introducing confusing behavior with the smart button on the SO form view that would take the user to a list of all expenses that have anything to do with the current SO. **After this commit** We return to the behavior that was present in Odoo 18.1 where all expenses that are associated with a SO show up in that SO's "expense_count", making the number in the smart button consistent with the number of expenses that will be fetched when clicking on it. opw-6309575 Forward-Port-Of: odoo/odoo#272287
This update fixes an issue where discount code descriptions weren't consistently translating across all languages in Odoo. Now, changes made to a discount code's description will automatically update the corresponding product name in all supported languages, ensuring accurate and consistent messaging for customers.
Original PR description
### Steps to Reproduce 1. Activate any other language (ex. FR) 2. Create a new Discount code in Discount & Loyalty 3. Change your user language preference to FR, open the newly created loyalty…
### Steps to Reproduce 1. Activate any other language (ex. FR) 2. Create a new Discount code in Discount & Loyalty 3. Change your user language preference to FR, open the newly created loyalty reward, and change the Description on Order to Test Discount for both languages 4. Navigate to the backend Product Variants menu and observe how its name did not translate in English ### Description of the issue/feature this PR addresses: **Issue:** When you edit a translation for a loyalty.reward description in a multi-language setup, the product name (`discount_line_product_id.name`) fails to receive the complete translation in all languages. It only updates the current language. **Solution:** Override the 'update_field_translations' method on the loyalty.reward model. When changes are saved for the 'description' field on the discount code, intercept the payload and mirror directly at the discount product's `name` field. ### Current behavior before PR: Updating the reward description only updates the current language and all other languages do not change. ### Desired behavior after PR is merged: For all languages in which changes are made in a discount code's description, the discount line product name will reflect the same changes. opw-6314760 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#271680
This update resolves an issue where self-ordering table references were being lost when a self-order was created. The fix ensures that the original table link is maintained, allowing users to correctly associate and manage their self-ordered items. This improves the reliability of the self-ordering feature within the POS system.
Original PR description
Steps to reproduce: --------------- - Enable QR Menu & Ordering in POS - Enable Service at Table - Create a self-order from a table QR - Validate/pay the order from the POS Cause: ----------- The write override unconditionally `table_id` to `self_ordering_table_id`, even when `table_id` was falsy, clearing the original self-order table link. Fix: ---------- Only update `self_ordering_table_id` when `table_id` is explicitly set and truthy. Task-6272642 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#268459
A recent update resolved a crash that occurred when opening certain mass mailing emails. This issue stemmed from how the system handled complex QWeb templates with nested conditional statements. The fix ensures mass mailings with specific template structures can be opened and displayed correctly, improving email delivery reliability.
Original PR description
Prior to this commit, if a `<t>` node had children, the function evaluating if they should be displayed inline or not would crash. How to reproduce: - send a mass_mailing with qweb instructions: a `t-if` node containing a `t-out` - open the mass_mailing after it was sent (in readonly) Issue: - crash when opening the mass mailing (in Email Marketing) task-6250450 Forward-Port-Of: odoo/odoo#273446 Forward-Port-Of: odoo/odoo#266663
This update fixes an issue where customer addresses were excessively long in form view titles and breadcrumbs, making navigation difficult. The change ensures only the customer's name is displayed, aligning with how other related fields are formatted. This improves the user experience by providing clearer and more concise navigation.
Original PR description
- Create a new Invoice; - Assign a Customer with a multiline address; - Click on the internal link (arrow icon) of the Customer field. Before this commit, the form view title and the breadcrumb would contain not only the customer's name but also their full address. This resulted in an excessively large and unreadable breadcrumb. Now, only the name is retained. This commit applies the same behavior already used in many2one fields: the display name is split by line breaks, and only the first line is kept for the title and breadcrumb. task-id 6329662 Forward-Port-Of: odoo/odoo#272550 Forward-Port-Of: odoo/odoo#272059
A recent change in Cloudflare impacted the way turnstile callbacks functioned, causing a disruption. This pull request reverts a previous update that relied on specific implementation details, restoring the original, more robust callback system. This ensures turnstile functionality continues to operate correctly.
Original PR description
Callbacks were changed to use a single shared callback instead of a bunch of callbacks that captured a specific container. Cloudlfare since introduced a change that breaks this change by not making "this" available inside callbacks. We thus go back to the previous implementation that did not rely on implementation details of the external widget. related: 5aa5cf62a9d3f2b0c862b0aab337b22367843fa6 Forward-Port-Of: odoo/odoo#273538 Forward-Port-Of: odoo/odoo#273336
This update ensures that employees taking sick leave without a certificate receive the appropriate commission loss, aligning with Belgian payroll regulations. Previously, this calculation was missing, leading to potential inaccuracies in commission payments. This fix improves payroll accuracy and compliance.
Original PR description
Sick time off without certificate should grant loss on commissions if relevant
This update fixes an issue where the floor plan selector overlapped other elements in the restaurant POS interface. By adding horizontal scrolling, the floor plan is now displayed correctly, regardless of the number of floor plans available, ensuring a better user experience for restaurant staff.
Original PR description
In this commit: ---------------- - Added horizontal scrolling for the floor selector when multiple floor plans are available, preventing it from overlapping other components. Task: 6356983
This update ensures that return stock moves now correctly display the reference for the return picking (WH/OUT/000XX) instead of the original receipt reference. Previously, the system incorrectly linked return moves to the original receipt, making it difficult to track returns accurately. This change corrects a technical issue related to how computed fields are handled during the return process.
Original PR description
Steps to reproduce: ------------------- - Install `stock` - Create a receipt for a product with `x` quantity - Validate the receipt - Click `Return` and create a return picking - Validate the return…
Steps to reproduce:
-------------------
- Install `stock`
- Create a receipt for a product with `x` quantity
- Validate the receipt
- Click `Return` and create a return picking
- Validate the return picking
- Open the Moves History
Issue:
------
The stock move line generated by the return operation still displays the
original receipt reference (`WH/IN/000XX`) in the Reference column
instead of the return picking reference (`WH/OUT/000XX`).
As a result, the return move appears to belong to the original receipt
rather than being identified as a separate stock operation.
Cause:
--------
In this [commit](https://github.com/odoo-dev/odoo/commit/1c7d80a10b5d7db1c4163166bf52b3f3c77044ba
) `reference` is become editable field (readonly=False)
Now `stock.move.reference` is a stored, editable computed field
https://github.com/odoo/odoo/blob/53cbd4ee7e6ddc1994607d457dfff3fd03e82418/addons/stock/models/stock_move.py#L182
Since `_compute_reference` derives its value from `move.picking_id.name
https://github.com/odoo/odoo/blob/53cbd4ee7e6ddc1994607d457dfff3fd03e82418/addons/stock/models/stock_move.py#L383
Because the field is both `store=True` and `readonly=False`, the
field-setup logic in `Field._setup_attrs_` no longer applies its usual
default of disabling `copy` for computed fields
https://github.com/odoo/odoo/blob/53cbd4ee7e6ddc1994607d457dfff3fd03e82418/odoo/orm/fields.py#L460-461
With `store=True` and `readonly=False`, this condition evaluates to
`False`, so the line is skipped and `copy` falls back to the base
`Field` default of `True` instead of `False`.
https://github.com/odoo/odoo/blob/53cbd4ee7e6ddc1994607d457dfff3fd03e82418/odoo/orm/fields.py#L286
When the return wizard duplicates the original move with
https://github.com/odoo/odoo/blob/53cbd4ee7e6ddc1994607d457dfff3fd03e82418/addons/stock/wizard/stock_picking_return.py#L53
therefore copies the *old* stored `reference` value ("WH/IN/000XX") into the
`create()` vals of the new move, alongside the new `picking_id`.
`BaseModel.create()` then protects editable computed fields that
receive an explicit value in `vals` from being recomputed.
https://github.com/odoo/odoo/blob/53cbd4ee7e6ddc1994607d457dfff3fd03e82418/odoo/orm/models.py#L3996-L3999
Since `reference` is present in `vals` and `readonly=False`, it is
added to the `protected` set, so `_compute_reference` never runs for
the new move even though its `picking_id` now points to the new
return picking. The stale value from the original receipt is kept
as-is, and propagates to the move line via the related field
https://github.com/odoo/odoo/blob/53cbd4ee7e6ddc1994607d457dfff3fd03e82418/addons/stock/models/stock_move_line.py#L89
Fix:
----
Set `copy=False` explicitly on `stock.move.reference`, restoring the
behaviour it had before `readonly=False` was added (when `readonly`
defaulted to True, `copy` was already False automatically). This
keeps the field editable in the UI while preventing the stale value
from being carried over on `copy()`, so it is correctly recomputed
from the new move's own `picking_id`.
---
opw-6293019
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prThis update fixes a minor issue where the website quiz completion message wasn't clear or helpful. Now, users will see a positive and informative message confirming their quiz success. This improves the overall user experience for event registration.
Original PR description
opw-6332274 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#272593 Forward-Port-Of: odoo/odoo#272371
This update corrects a calculation error in the Swiss tax report (l10n_ch) where negative values were being used for certain lines, leading to incorrect subtractions. The change reflects a new, unified tax grid in 19.0, requiring positive values for correction lines to ensure accurate report generation. This ensures the Swiss tax report data is reliable.
Original PR description
### Issue: In 19.0, the values of lines 415 and 420 in the Swiss tax report are negative, causing line 479 to add them instead of subtracting Line 479 formula: `tax_ch_400 + tax_ch_405 + tax_ch_410 -…
### Issue: In 19.0, the values of lines 415 and 420 in the Swiss tax report are negative, causing line 479 to add them instead of subtracting Line 479 formula: `tax_ch_400 + tax_ch_405 + tax_ch_410 - tax_ch_415 - tax_ch_420` For the subtraction to be correct, 415 and 420 must be positive ### Cause: In 18.0, each tax grid had two variants (`+415`/`-415`) allowing the user to control the sign manually The double negative (`-*-`) incidentally produced positive values in the report In 19.0, the unified tax grid merges them into a single tax grid (`415`) with automatic sign handling 415 and 420 are correction lines that must appear positive in the report so that 479 subtracts them correctly The formulas were not updated to reflect this change ### Steps to reproduce: - Install `l10n_ch_reports` and `accountant` - Switch to `CH Company` - Create and confirm a Bill (Amount: 100, Tax: 8.1%) - Create and post a Journal Entry: - Account: 1170 Input Tax (VAT), Credit: 2, Tax Grids: 415 and 420 - Account: 1021 Bank, Debit: 2 - Open the Tax Report for this month Before the fix, lines 415 and 420 are negative and line 479 adds them instead of subtracting opw-6311126 Forward-Port-Of: odoo/odoo#272385
This update adjusts how the product list is displayed on tablets, ensuring it shows at its full size on medium-sized screens. Previously, it was limited to a smaller view. Additionally, the fix addresses an issue with iOS devices where the display size recalculated incorrectly when the screen rotated, providing a better user experience.
Original PR description
Previously, the product list was rendered in "small display" mode for all screen sizes below the medium breakpoint (< 992px). However, some small tablets are able to fully display the product list at the medium breakpoint (≥ 768px and ≤ 991px). After this fix, "small display" mode is only applied when the screen width is below 768px. This commit also includes a fix for iOS devices where the screen breakpoint was not correctly recomputed on orientation change. Task.6251934 Enterprise: https://github.com/odoo/enterprise/pull/119534 Forward-Port-Of: odoo/odoo#270394 Forward-Port-Of: odoo/odoo#266704
This update adjusts how the product list appears on tablets. Previously, it was always displayed in a condensed format. Now, it will display the full product list on tablets with screen sizes between 768px and 991px, improving usability and presentation.
Original PR description
Previously, the product list was rendered in "small display" mode for all screen sizes below the medium breakpoint (< 992px). However, some small tablets are able to fully display the product list at the medium breakpoint (≥ 768px and ≤ 991px). After this fix, "small display" mode is only applied when the screen width is below 768px. Task.6251934 Community: https://github.com/odoo/odoo/pull/266704 Forward-Port-Of: odoo/enterprise#120777 Forward-Port-Of: odoo/enterprise#119534
This update allows users to define default values for specific fields within Odoo, but only for fields they are authorized to access. This ensures data consistency and simplifies workflows by allowing users to pre-populate fields with information that is appropriate for their roles.
Original PR description
Users should be able to set default values only for fields they have access to. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#273619 Forward-Port-Of: odoo/odoo#273089
This update resolves an issue preventing users from creating rental orders. The fix grants the necessary access to manage rental orders and pickups, ensuring a smoother rental process. It addresses a restriction related to stock lot access within the Odoo Enterprise system.
Original PR description
Issue: --- It's not possible to create rental orders without stock.lot access. Steps to reproduce: 1- Change demo user access: - All inventory accesses: No 2- Enable `Rental Transfers`. 3- Login Demo user. 4- Create a rental order. You will get access error. Cause and Fix: --- `stock.lot` model is in only accessed by `group_stock_user`. As a result fields such as `reserved_lot_ids` will be problematic when we don't have stock access. We initially tried to fix the issue by limiting the problematic fields to group stock user. However that limits the user from rental pickup. Instead we are giving the required access to group rental picking user. opw-6281154 Forward-Port-Of: odoo/enterprise#120670
This update restores essential tests related to the flow of transactions within the l10n_fr_pdp_pos module. These tests were temporarily removed during a recent integration of e-reporting and e-invoicing features. Ensuring these tests are back in place improves the reliability and accuracy of the POS system.
Original PR description
During the merge of l10n_fr_pdp e-reporting and e-invoicing, some tests had to be removed. Task-6296356 Forward-Port-Of: odoo/odoo#273329 Forward-Port-Of: odoo/odoo#271294
This update fixes an issue where GS1-compliant product barcodes were incorrectly interpreted, leading to inaccurate quantity updates during scanning. When the 'Default GS1 Nomenclature' setting is enabled, the system now correctly processes these barcodes as product scans, ensuring accurate inventory tracking. This improves the reliability of the barcode scanning functionality.
Original PR description
In certain cases the barcode of a product could be a valid standalone GS1 sequence. In that case it needs to be be correctly interpreted as a product scan. ### Steps to reproduce: - In the settings…
In certain cases the barcode of a product could be a valid standalone GS1 sequence. In that case it needs to be be correctly interpreted as a product scan. ### Steps to reproduce: - In the settings enable "Default GS1 Nomenclature" - Create a storable product P with the barcode 3701762412212 - Create and confirm a delivery for 2 units of P and set the qty to 2 - Go to the barcode app and open your delivery - Scan 3701762412212 > The line of P is now selected with a quantity of 1/2 - Scan 3701762412212 #### > A new line is created for 1762411 units ### Cause of the issue: According to the GS1 nomenclature, the barcode 3701762412212 matches the scan of a quantity of "1762412" units of the lot name "2". As the scan of the of the product match a pattern for the GS1 nomenclature before matching a product, its barcode data is expected to be reset by these lines: https://github.com/odoo/enterprise/blob/7cceddaf086d849b8e2121e1023ef3479397534f/stock_barcode/static/src/models/barcode_model.js#L1320-L1324 In order to bypass the GS1 parser and to add 1 unit of the product. This is what happen on the first scan. However, performing the first scan also selects the associated line and, hence on the second scan the lines just above this check do set the product to match the product of the current line: https://github.com/odoo/enterprise/blob/7cceddaf086d849b8e2121e1023ef3479397534f/stock_barcode/static/src/models/barcode_model.js#L1294-L1320 In particular, we do not bypass the result provided by the GS1 parser and add `1762412` units of the product. opw-6175621 Forward-Port-Of: odoo/enterprise#122256 Forward-Port-Of: odoo/enterprise#120035
This update ensures that products added to the point-of-sale system, regardless of how they're added (via card or barcode scan), automatically assign themselves to the correct course. Previously, barcode scanning didn't apply this feature, leading to inconsistencies. This fix streamlines the ordering process and improves accuracy.
Original PR description
..., point_of_sale --- When adding a product by clicking on its card with auto course allocation enabled, the product is correctly placed inside its course. However, when adding a product by scanning its barcode, the auto course allocation was not applied. This commit fixes the issue by extracting the auto course allocation logic into a separate function and calling it in both cases: clicking on the card and scanning the barcode. --- Task: https://www.odoo.com/odoo/project/1737/tasks/6197864 Forward-Port-Of: odoo/odoo#264029
This update fixes an issue where bank reconciliation calculations were inaccurate when dealing with foreign currencies. The system now correctly converts amounts from the journal's foreign currency to the company's base currency, ensuring accurate balance calculations and preventing errors during reconciliation processes. This improves the reliability of financial reporting.
Original PR description
### Issue: When a bank journal uses a foreign currency, reconciliation model lines with `Amount Type: From Label` (regex) could raise a constraint error or produce incorrect balances on the journal…
### Issue: When a bank journal uses a foreign currency, reconciliation model lines with `Amount Type: From Label` (regex) could raise a constraint error or produce incorrect balances on the journal entry ### Cause: The `balance` of the generated move line was set to the raw value extracted by the regex, without converting it from the journal currency to the company currency This violated the sign constraint between `balance` and `amount_currency` when the exchange rate caused a mismatch, raising a `_check_amount_currency_balance_sign` error The `amount_currency` was already correctly set Only the `balance` conversion was missing ### Steps to reproduce: - Install `accountant` - Enable a foreign currency (e.g. EUR) with two rates: yesterday: ratio < 1 (e.g. 0.5), today: ratio > 1 (e.g. 2.0) - Create a Bank journal in EUR - Open Bank Reconciliation for that journal - Add two transactions (one dated yesterday, one today) (Ref: "test BANK:0001690,00EUR EXP:00033,80", amount: 1656.20) - Create a reconciliation model (3 dots > Manage Models) (name: From Label): -- Account: 101401 Bank, Amount: BANK:0*(\d+),(\d+) -- Account: 600000 Expenses, Amount: EXP:0*(\d+),(\d+) - Apply the model on both transactions Before the fix, one raised an error due to the constraint violation - From the list view, open the Journal Entry for the other transaction Before the fix, `balance` was not converted to company currency opw-6292839 Forward-Port-Of: odoo/enterprise#121114
This update fixes a caching issue that occasionally caused outdated information in the HR system. By automatically updating a version number with each data change, the system now ensures that the most current information is always displayed, improving data accuracy and reliability for HR users. This prevents future similar errors.
Original PR description
There was yet another issue with the cache but related to the contract_date_start field. To prevent any issues like this to arise again, the version_revision will have the write_date to invalidate cache everytime the model has been written to. task-6326052 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#273516 Forward-Port-Of: odoo/odoo#272855
This update resolves an issue where control panel actions were incorrectly displayed when selecting documents for attachment or linking. The change ensures that these actions are now hidden within the document selection dialog, improving the user experience and streamlining document management workflows. This was a minor bug fix.
Original PR description
When selecting documents for attachment/link, control panel actions were displayed upon selection. The document selection dialog uses the secondary documents view introduced in: https://github.com/odoo/enterprise/pull/89030/changes/f93c159c106d1dde70910ec590f8739e549b19cf Several document management actions were already hidden through the `documents_view_secondary` context, but `DocumentsAction` was still displayed upon selection. Hide `DocumentsAction` in the secondary view. Task-6236888 Forward-Port-Of: odoo/enterprise#119219
14 changes
Resolved issues and error corrections
This update fixes an issue where the 'Shop' feature wasn't automatically selected when creating an eCommerce website type in the configurator. The change involved renaming a website type internally to align with the database, ensuring the preselection functionality works correctly for new and existing website setups. This improves the user experience for eCommerce website creation.
Original PR description
### Issue: When creating a website through the configurator and selecting the website type 'an eCommerce', the shop feature is not preselected as expected. ### Steps to reproduce: - Ensure that the…
### Issue: When creating a website through the configurator and selecting the website type 'an eCommerce', the shop feature is not preselected as expected. ### Steps to reproduce: - Ensure that the eCommerce module is not installed. - Navigate to Website > Configuration > Settings. - Click on the "New Website" button to create a new website. - Select the "eCommerce" option as the website type and proceed to the next step. - On the "Add Pages and Features" screen, observe that the "Shop" option is not selected by default. ### Reason: 0cb45457 renamed the website type from `online_store` to `eCommerce`, but the related feature was not updated and still references the old name. As a result, the preselection is not triggered. ### Fix: Restore the eCommerce website type's internal name to `online_store` in the configurator. This matches the value already stored in the database for existing installations, allowing the shop feature preselection to work for existing users as well, without requiring a data update. task-[6284263](https://www.odoo.com/odoo/project/974/tasks/6284263) [1]:https://github.com/odoo/odoo/pull/223724 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves a problem where the logout button triggered duplicate requests, causing CSRF errors. It now ensures only one logout request is sent, improving website stability. Additionally, a test automation fix now automatically enables the 'Free sign up' setting, simplifying test execution and reducing manual intervention.
Original PR description
### Commit 1: [FIX] website: prevent CSRF error by blocking duplicate form submission Before this commit: Clicking the logout button from the website preview triggered two simultaneous logout…
### Commit 1:
[FIX] website: prevent CSRF error by blocking duplicate form submission
Before this commit: Clicking the logout button from the website
preview triggered two simultaneous logout requests:
1. The browser performed the default form submission with a valid
`csrf_token`, destroying the session afterward.
2. During the same click event, `setupClickListener()` intercepted
the click using `closest('[action]')`, found the parent
`/web/session/logout` form, and triggered a second POST request
using `odoo.csrf_token`.
Since the session was already destroyed by the first request, the
second request resulted in a "CSRF validation failed" error.
This commit prevents the default form submission before triggering
the manual POST request, ensuring that only one request is sent.
Runbot-940403
--------------------------------------------------------------------------------------------------------------------------------
### Commit 2:
[FIX] website: enable free sign up setting in test_auth_forms_warning
Steps to reproduce:
1. Install any website related module (e.g. `website`, `website_event`).
2. Keep the default configuration and do not manually enable
'Free sign up' in Settings.
3. Run `test_auth_forms_warning`.
Before this commit: The test did not programmatically enable the
'Free sign up' setting. As a result, it failed unless a developer
manually navigated to the setting and enabled it beforehand.
After this commit: This commit explicitly enables the "Free sign up"
configuration during test execution, allowing public access to the
`/web/signup` page and ensuring the test passes without any manual
setup.
runbot-940394
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prThis update fixes a critical issue where server reloads triggered by file changes could cause the Odoo process to crash. The fix prevents multiple signals from interrupting the server's restart process, ensuring stability and preventing service interruptions during development and deployment. This improves the reliability of the Odoo server.
Original PR description
### Summary When `dev_mode` includes `reload`, `ThreadedServer`'s FSWatcher reacts to a file change by sending the process a `SIGHUP` to trigger a phoenix restart. `signal_handler` turns `SIGHUP`…
### Summary When `dev_mode` includes `reload`, `ThreadedServer`'s FSWatcher reacts to a file change by sending the process a `SIGHUP` to trigger a phoenix restart. `signal_handler` turns `SIGHUP` into `KeyboardInterrupt`, which `ThreadedServer.run()`'s wait-loop catches. The catch is too narrow — a reload `SIGHUP` can kill the process through **three** windows that all sit outside the wait-loop's `try/except`, so the exception escapes `run()`/`main()`. Under Docker's default `restart: no`, PID 1 dies and the container stays down. ### The three windows 1. **Teardown duplicate (exit 130).** One file change can emit several FS events; the FSWatcher's `if not odoo.phoenix:` dedup races across threads and fires more than one `SIGHUP`. The first begins the phoenix teardown; the second lands during `stop()` / `watcher.stop()` / `_reexec()` and `KeyboardInterrupt` escapes. 2. **Exec-gap (exit 129).** `os.execve()` resets caught signal handlers to their default disposition (`SIGHUP` terminates) but preserves `SIG_IGN`; a `SIGHUP` arriving after the exec but before the re-exec'd process re-installs its handler kills the process outright. 3. **Startup (exit 130).** In the re-exec'd process, a `SIGHUP` anywhere in the startup section that precedes the wait-loop — `start()`, `preload_registries()` **and** `cron_spawn()` — escapes `run()`. ### Reproducer (deterministic) Boot a `ThreadedServer` (`--workers 0`) on any initialised db, then signal PID 1 a few times in quick succession: ```bash docker exec <container> sh -c 'i=0; while [ $i -lt 8 ]; do kill -HUP 1; sleep 0.1; i=$((i+1)); done' ``` Unpatched the process exits 130 or 129. Patched it stays up after one clean phoenix reload. Verified live on 17.0 and 18.0: stock `server.py` dies; the patched `server.py` survives sustained bursts (20/20 across repeated reload cycles on each version); `SIGINT`/`SIGTERM` still exit 0. ### Fix Minimal, in `signal_handler` + `run()` + `_reexec()`; `SIGINT`/`SIGTERM` untouched; one new instance attribute, no new module globals: - **Teardown duplicate:** ignore a `SIGHUP` once `quit_signals_received` is set (a restart/shutdown is already pending; the re-exec reloads fresh code). - **Startup:** a per-instance `in_preload` flag marks the entire startup section (`start()` + `preload_registries()` + `cron_spawn()`); a `SIGHUP` there sets the phoenix flag + counter and returns instead of raising, so the wait-loop exits right after startup and runs the normal restart. - **Exec-gap:** `signal.signal(signal.SIGHUP, signal.SIG_IGN)` just before `os.execve` so a `SIGHUP` in the gap is dropped rather than terminating the process. ### Related - #21209 (merged) — introduced the phoenix flag; did not guard these windows. - #206898 (merged), #207930 (open) — PreforkServer reload. ### CLA Covered by Codeforward B.V.'s corporate CLA; #269240 adds me to its contributor list (pending merge). Forward-Port-Of: odoo/odoo#269247
This update fixes an issue where package shipments processed through the Barcode app (and similar flows) were failing validation due to missing shipping weight information. The fix ensures the package's weight is correctly populated, regardless of the delivery process, preventing delivery rejections.
Original PR description
Steps to reproduce --- 1. Install a carrier that requires a positive package shipping weight (e.g. UPS) and enable Packages. 2. From the Barcode app, process a delivery and Put in Pack the products.…
Steps to reproduce --- 1. Install a carrier that requires a positive package shipping weight (e.g. UPS) and enable Packages. 2. From the Barcode app, process a delivery and Put in Pack the products. 3. Validate the transfer. Issue --- Validation is refused because the package has no positive shipping weight, even though its computed weight is correct. The package shipping weight is only set in `_post_put_in_pack_hook` from `context['weight']`, which is filled exclusively by the put in pack wizard. Flows that bypass the wizard, like the Barcode app, never provide that key, so the stored `shipping_weight` stays 0 while carriers reading it directly reject the delivery. The Barcode app suppresses the wizard through the `barcode_view` context, so its put in pack goes straight to the hook without any weight. https://github.com/odoo/enterprise/blob/6b18215bfa98ef636b63f4fafbba1d25264f4883/stock_barcode/models/stock_move_line.py#L193-L196 This handling was centralized in this hook by 9a2ff6f4033e, so every wizard-bypassed pack leaves the field empty. Defaulting it to the package computed weight via `_get_weight` when the context did not provide one makes the stored value correct for any carrier, independently of the flow that created the package. https://github.com/odoo/odoo/blob/4235b48c86077bd5bceb9e817cc45b2eec8697e8/addons/stock_delivery/models/stock_move.py#L111-L115 opw-6297689 Forward-Port-Of: odoo/odoo#272510
This update fixes an issue where bank reconciliation reports incorrectly displayed inflated tax amounts when reconciling invoices with shared VAT taxes. The fix ensures that duplicate early-payment discount lines are properly merged during batch reconciliation, resulting in accurate tax reporting. This improves the reliability of financial reporting.
Original PR description
Steps to reproduce 1. Create two customer invoices that share the same VAT tax, with a payment term granting an early payment discount. 2. Create one bank statement line whose amount equals the sum…
Steps to reproduce 1. Create two customer invoices that share the same VAT tax, with a payment term granting an early payment discount. 2. Create one bank statement line whose amount equals the sum of both invoices' discounted totals. 3. From the bank reconciliation widget, select both invoices and validate in a single batch reconciliation. 4. Open Accounting > Reporting > Tax Return, switch the variant to "Group by: Account > Tax". Issue The cash-discount expense row shows a Net base column equal to twice the real discount base. The Tax column is correct. The bank-statement reconciliation paths (set_line_bank_statement_line, set_batch_payment_bank_statement_line, _reconcile_payments) loop over each invoice and call _apply_early_payment_discount one invoice at a time. Each call writes one discount base line and one discount tax line on the resulting bank entry, so when two invoices share the same tax the bank entry ends up with two pairs carrying the same (account, partner, currency, tax_repartition_line_id, tax_ids). The SQL that feeds the tax report at https://github.com/odoo/odoo/blob/d7d0efd39a65bfb6fee307b661cd2523a6b8231d/addons/account/models/account_move_line_tax_details.py#L100 matches every base line of a tax with every tax line of that tax inside the same move. With two pairs sharing one tax that turns two rows into four, and SUM(base_amount) doubles. The Tax column does not double because the same SQL redistributes each tax line's recorded amount across its matched rows so the totals still add back to the original tax. The payment register flow does not have this problem because it calls _get_invoice_counterpart_amls_for_early_payment_discount once with every invoice, and that helper already collapses duplicates with the merge key at https://github.com/odoo/odoo/blob/f3b317310b84edb073009f7d15d7fec002f3ccf0/addons/account/models/account_move.py#L5082-L5093 opw-6199906 Forward-Port-Of: odoo/enterprise#117743
This update resolves an issue preventing users from creating rental orders. The fix grants necessary access to rental picking users, allowing them to successfully create and manage rental orders. This ensures a smoother rental process for our customers.
Original PR description
Issue: --- It's not possible to create rental orders without stock.lot access. Steps to reproduce: 1- Change demo user access: - All inventory accesses: No 2- Enable `Rental Transfers`. 3- Login Demo user. 4- Create a rental order. You will get access error. Cause and Fix: --- `stock.lot` model is in only accessed by `group_stock_user`. As a result fields such as `reserved_lot_ids` will be problematic when we don't have stock access. We initially tried to fix the issue by limiting the problematic fields to group stock user. However that limits the user from rental pickup. Instead we are giving the required access to group rental picking user. opw-6281154 Forward-Port-Of: odoo/enterprise#120670
This update corrects a bug where the quantity displayed in the barcode view was incorrect after refreshing a stock receipt. The fix ensures that quantities are properly converted to the stock move's UoM, accurately reflecting the packaged unit quantity (Pack of 6) and preventing misrepresentation of stock levels.
Original PR description
**Steps to reproduce:** - Install `stock` and `purchase` modules - Enable `Units of Measure and Packages` and `Storage Locations` from setting - Create a storable product with vendor purchase UoM set…
**Steps to reproduce:** - Install `stock` and `purchase` modules - Enable `Units of Measure and Packages` and `Storage Locations` from setting - Create a storable product with vendor purchase UoM set to "Pack of 6" - Create and confirm a Purchase Order with quantity 6 Units - Open the generated receipt - Update a move line in Detailed Operations: - Quantity: 1 - UoM: Pack of 6 - Save and open the Barcode view using smart button. - Increase quantity using "+" button by 1. - Exit barcode view without validating and refresh the receipt **Issue:** After refresh, the stock move quantity becomes 1 instead of 6, while the move line correctly shows 1 Pack of 6. **Cause:** https://github.com/odoo/enterprise/blob/2bfe0f32c0cec426fc7345ef716395146cc569ca/stock_barcode/static/src/components/main.js#L161-L162 - Exiting the barcode view triggers `__onExit()`, which forwards `reserved_uom_qty` and `qty_done` from move lines to `post_barcode_process()`. https://github.com/odoo/enterprise/blob/2bfe0f32c0cec426fc7345ef716395146cc569ca/stock_barcode/static/src/models/barcode_picking_model.js#L1885-L1898 This `post_barcode_process()` function triggers `_truncate_overreserved_moves()` https://github.com/odoo/enterprise/blob/2bfe0f32c0cec426fc7345ef716395146cc569ca/stock_barcode/models/stock_move.py#L56-L58 - During this flow, `_truncate_overreserved_moves()` updates the stock move quantity by taking the maximum of `qty_done` and `reserved_uom_qty`. However, it assigns this value directly to the move without converting it into the stock move UoM. - In this case, both values are 1 because the move line is UoM is "Pack of 6" Logically, 1 Pack corresponds to 6 units, but since the stock move UoM is in units, this conversion is skipped. As a result, the move quantity is incorrectly set to 1 instead of 6. https://github.com/odoo/enterprise/blob/2bfe0f32c0cec426fc7345ef716395146cc569ca/stock_barcode/models/stock_move.py#L52-L54 **Fix:** - Convert quantities coming from barcode processing into the stock move UoM before updating the move quantity, ensuring packaged UoM values are preserved correctly. ---- opw-5472598 Forward-Port-Of: odoo/enterprise#116022
This update fixes an issue where GS1-compliant product barcodes were incorrectly interpreted, leading to inaccurate quantity updates during scanning. Enabling 'Default GS1 Nomenclature' now ensures that GS1 barcodes are correctly recognized as product scans, resolving a potential data discrepancy.
Original PR description
In certain cases the barcode of a product could be a valid standalone GS1 sequence. In that case it needs to be be correctly interpreted as a product scan. ### Steps to reproduce: - In the settings…
In certain cases the barcode of a product could be a valid standalone GS1 sequence. In that case it needs to be be correctly interpreted as a product scan. ### Steps to reproduce: - In the settings enable "Default GS1 Nomenclature" - Create a storable product P with the barcode 3701762412212 - Create and confirm a delivery for 2 units of P and set the qty to 2 - Go to the barcode app and open your delivery - Scan 3701762412212 > The line of P is now selected with a quantity of 1/2 - Scan 3701762412212 #### > A new line is created for 1762411 units ### Cause of the issue: According to the GS1 nomenclature, the barcode 3701762412212 matches the scan of a quantity of "1762412" units of the lot name "2". As the scan of the of the product match a pattern for the GS1 nomenclature before matching a product, its barcode data is expected to be reset by these lines: https://github.com/odoo/enterprise/blob/7cceddaf086d849b8e2121e1023ef3479397534f/stock_barcode/static/src/models/barcode_model.js#L1320-L1324 In order to bypass the GS1 parser and to add 1 unit of the product. This is what happen on the first scan. However, performing the first scan also selects the associated line and, hence on the second scan the lines just above this check do set the product to match the product of the current line: https://github.com/odoo/enterprise/blob/7cceddaf086d849b8e2121e1023ef3479397534f/stock_barcode/static/src/models/barcode_model.js#L1294-L1320 In particular, we do not bypass the result provided by the GS1 parser and add `1762412` units of the product. opw-6175621 Forward-Port-Of: odoo/enterprise#122256 Forward-Port-Of: odoo/enterprise#120035
This update resolves an issue where images inserted into audit reports weren't appearing in the generated PDF documents. The fix pre-processes the document to replace embedded files with standard image elements, ensuring images are correctly displayed within the PDF.
Original PR description
Currently, when a user uses the `/file` command to insert an image into an audit report and exports the report to PDF, the image is omitted from the generated PDF. To improve the support of those blocks, we will pre-process the document and replace the embedded files that correspond to images with standard image elements before PDF generation. This will ensure that images are correctly rendered and displayed within the document's text flow in the exported PDF. Task [link](https://www.odoo.com/odoo/project.task/5115280) task-5115280 Forward-Port-Of: odoo/enterprise#121673
This update fixes an issue where bank reconciliation calculations were inaccurate when using foreign currencies. The system now correctly converts amounts from the journal currency to the company currency, ensuring accurate balance calculations and preventing constraint errors during reconciliation processes. This improves the reliability of bank reconciliation reporting.
Original PR description
### Issue: When a bank journal uses a foreign currency, reconciliation model lines with `Amount Type: From Label` (regex) could raise a constraint error or produce incorrect balances on the journal…
### Issue: When a bank journal uses a foreign currency, reconciliation model lines with `Amount Type: From Label` (regex) could raise a constraint error or produce incorrect balances on the journal entry ### Cause: The `balance` of the generated move line was set to the raw value extracted by the regex, without converting it from the journal currency to the company currency This violated the sign constraint between `balance` and `amount_currency` when the exchange rate caused a mismatch, raising a `_check_amount_currency_balance_sign` error The `amount_currency` was already correctly set Only the `balance` conversion was missing ### Steps to reproduce: - Install `accountant` - Enable a foreign currency (e.g. EUR) with two rates: yesterday: ratio < 1 (e.g. 0.5), today: ratio > 1 (e.g. 2.0) - Create a Bank journal in EUR - Open Bank Reconciliation for that journal - Add two transactions (one dated yesterday, one today) (Ref: "test BANK:0001690,00EUR EXP:00033,80", amount: 1656.20) - Create a reconciliation model (3 dots > Manage Models) (name: From Label): -- Account: 101401 Bank, Amount: BANK:0*(\d+),(\d+) -- Account: 600000 Expenses, Amount: EXP:0*(\d+),(\d+) - Apply the model on both transactions Before the fix, one raised an error due to the constraint violation - From the list view, open the Journal Entry for the other transaction Before the fix, `balance` was not converted to company currency opw-6292839 Forward-Port-Of: odoo/enterprise#121114
This update resolves an issue where users were incorrectly suggested as recipients after unfollowing a record in the chatter interface. The fix ensures that the user is no longer added to the suggested recipient list unless they re-follow the record, improving the user experience and preventing unnecessary notifications. This change was triggered by a bug in how suggested recipients were generated.
Original PR description
### Steps to reproduce: - Open any mail thread in chatter - Click the "Send To" button once - Click "Unfollow" - You will be a suggested recipient ### Cause of Issue: The suggested recipient generation did not filter out the current user. When the user unfollows, `_message_get_suggested_recipients` is called when storing the thread, and since the user is no longer on the followers list, they get added back as a suggested recipient. https://github.com/odoo/odoo/blob/b4c7247ff218fb850fd91af3e2baa726a82d439c/addons/mail/models/models.py#L467-L468 ### Fix: Since followers are excluded from suggested recipient candidates in the mail thread, and the current user should be excluded when they unfollow, the current user is excluded altogether. This means the current user will not be suggested as a recipient again unless they re-follow the record. opw-6122351 Forward-Port-Of: odoo/odoo#269611
This update fixes a minor issue where unnecessary control panel actions were displayed when selecting documents for attachment or linking. The change ensures a cleaner and more focused document selection dialog, improving usability. This resolves a visual inconsistency related to the secondary documents view.
Original PR description
When selecting documents for attachment/link, control panel actions were displayed upon selection. The document selection dialog uses the secondary documents view introduced in: https://github.com/odoo/enterprise/pull/89030/changes/f93c159c106d1dde70910ec590f8739e549b19cf Several document management actions were already hidden through the `documents_view_secondary` context, but `DocumentsAction` was still displayed upon selection. Hide `DocumentsAction` in the secondary view. Task-6236888 Forward-Port-Of: odoo/enterprise#119219
This update fixes an error in how timesheet revenue is calculated for prepaid services, ensuring accurate reporting of service costs. The previous calculation incorrectly accounted for day UoM precision, leading to inflated revenue figures. This change now uses the correct per-unit rate, reflecting discounts and ensuring accurate timesheet revenue reporting.
Original PR description
Steps to reproduce 1. Create a service product: Invoicing Policy = Prepaid/Fixed Price, Track Service = Timesheets, Unit of Measure = Days 2. Confirm a Sales Order with 2 days of that product at…
Steps to reproduce 1. Create a service product: Invoicing Policy = Prepaid/Fixed Price, Track Service = Timesheets, Unit of Measure = Days 2. Confirm a Sales Order with 2 days of that product at 800/day 3. Register 1 hour on the generated task 4. Open Timesheets > Reporting, add the "Timesheet Revenues" measure Issue `timesheet_revenues` in `timesheets.analysis.report` was computed per analytic line as `(SOL.price_subtotal / SOL.qty_delivered) * (unit_amount * sol_uom.factor / ts_uom.factor)` (https://github.com/odoo/odoo/blob/16f170619d9cc5fd86529a3f17e349da37607f73/addons/sale_timesheet/report/timesheets_analysis_report.py#L42-L44). `SOL.qty_delivered` is a stored float rounded to the day UoM precision (0.01d). For 1 hour timesheeted, qty_delivered = 1/8 = 0.125d rounds to 0.13d, so the formula yields (1600 / 0.13) × (1/8) = 1538.46 instead of the correct 100. Because `qty_delivered` is recomputed each time a timesheet is added, all existing rows shift their revenue figure with every new entry. Additionally, using `price_subtotal / qty_delivered` as the per-unit rate ignores any line discount: the rate derived from a discounted subtotal divided by a delivered quantity that differs from the ordered quantity is not the effective price per day. For prepaid lines, the effective per-unit rate is `price_subtotal / product_uom_qty` — the ordered quantity is stable and the subtotal already reflects any discount — multiplied by the timesheet hours converted to the SO line UoM. opw-6150555 Forward-Port-Of: odoo/odoo#272910 Forward-Port-Of: odoo/odoo#262524
This update resolves an issue where background and image shape colors didn't automatically update when the website's theme color was changed. The fix ensures that shape colors consistently reflect the currently selected theme color, improving website consistency and the user experience. This was achieved by updating how shape colors are linked to theme colors.
Original PR description
[*]=website 1. Sync background shape color with color preset. Steps to reproduce: 1. Go to the website and enter edit mode. 3. Drop any snippet. 4. Add a background shape. 5. Set the background shape…
[*]=website
1. Sync background shape color with color preset.
Steps to reproduce:
1. Go to the website and enter edit mode.
3. Drop any snippet.
4. Add a background shape.
5. Set the background shape color to "o-color-1".
6. Go to theme tab.
7. Change the value of theme color 1 from theme preset.
Issue:
The background shape color is not updated when the theme color changes.
Reason:
The background shape color is embedded in the URL of the "**background-image**" style attribute. When the theme color value changes, this URL is not updated. Additionally, the URL uses color variables rather than resolved hexadecimal color values as parameters. As a result, even when an updation occurs, the URL itself remains unchanged, preventing the background shape color from being updated.
2. Sync image shape color with color preset.
Steps to reproduce:
1. Go to the website and enter edit mode.
2. Drop any snippet.
4. Click on the image and add a shape.
5. Set the image shape color to "o-color-1".
6. Go to theme tab.
7. Change the value of theme color 1 from theme preset.
Issue:
The image shape color is not updated when the theme color changes.
Reason:
When the theme color value changes, the SVGs are not re-fetched. Additionally, the image "**shapeColors**" dataset stores the hexadecimal value of the theme color instead of the corresponding CSS variable. As a result, there is no way to determine which theme color was selected (for example, whether `o-color-1` or `o-color-2`), since only the hex value is available.
task-5438314
Forward-Port-Of: odoo/odoo#272191
Forward-Port-Of: odoo/odoo#2419681 change
Resolved issues and error corrections
This update corrects a bug where timesheet availability wasn't accurately reflecting an employee's personal unavailability. The fix ensures that when an employee opens the timesheet, it correctly displays their blocked days, preventing incorrect scheduling. This improves accuracy and usability of the timesheet feature.
Original PR description
To reproduce: ============= - modify Mitchel Admin's working schedule and remove a day of work - open timesheet app as Mitchel Admin - the removed day is not grayed out as unavailable Porblem: ======== the method `get_unavailabily` was handling only the case when calling it with `groupby=employee_id` otherwise it returns the company's unvailability Solution: ========= when the "My Timesheet" action is opened, the method `get_unavailabily` is now called with a specific context key, allowing to return the current user's unavailability instead of the company's one. opw-5949236 Forward-Port-Of: odoo/enterprise#122543 Forward-Port-Of: odoo/enterprise#113984
3 changes
Resolved issues and error corrections
This update fixes a usability issue in the invoice outstanding payments widget by sorting payments in descending order by date. This ensures users can easily see the most recent payments and reduces confusion when reviewing outstanding invoices. The change was driven by a user feedback request (opw-6254080).
Original PR description
Before this commit: The invoice outstanding payments widget was not sorted by date globally, which could lead to confusion for users when viewing the widget. After this commit: This commit adds a sorting mechanism to ensure that the payments are displayed in descending order based on their date and ID. opw-6254080
This update resolves an issue where the Sale Renting module wasn't properly connected to the Gantt view functionality. Previously, the module wouldn't display Gantt views correctly. This fix ensures compatibility and proper functionality for users relying on Gantt views within the Sale Renting module, aligning with recent improvements in Odoo 19 and later versions.
Original PR description
Module was introduced without a dependency on the `web_gantt` module despite using `gantt` views. Already fixed in 19+ runbot error 237883 Forward-Port-Of: odoo/enterprise#122136
This update fixes a technical issue where Odoo wasn't properly handling certificate chains. Now, Odoo correctly loads the full certificate chain, ensuring greater security and compatibility with external systems that require complete certificate validation. This improves the overall reliability of Odoo's secure connections.
Original PR description
Previously, only the leaf certificate was parsed when loading PEM-encoded data, ignoring any additional certificates in the chain. This change updates the loading logic to include the full certificate chain, ensuring proper integrity and compatibility with flows that require it. Useful for this PR: odoo/odoo#254906 Task [link](https://www.odoo.com/odoo/project.task/6053921) task-6053921 Forward-Port-Of: odoo/odoo#255100
13 changes
Enhancements to existing features
This update enhances how event names are displayed in the Calendar and Gantt views within the Appointment app. When managing capacity, the display name now includes the number of reserved or attending participants, providing clearer event information. This change improves the user experience by making it easier to understand event details.
Original PR description
- Removed the default_name of the event.
- The following display name will be shown in the Calendar and
Gantt views when an event is opened through the Appointment app.
Case 1: Manage capacity is on: EventTitle - total_capacity_reserved 🪑.
e.g., EventTitle = demo, total_capacity_reserved = 4, then display_name
will be "demo - 4🪑".
Case 2: Manage capacity is off: EventTitle - totalAttendees 👤.
e.g., EventTitle = demo, totalAttendees = 4 then display_name
will be "demo - 4👤".
Task-6194877This update simplifies the initial setup of Point of Sale sessions by requiring users to select tax inclusion options immediately. Previously, users overlooked this step, leading to later adjustments and frustration. This change ensures accurate tax calculations from the start, improving the user experience.
Original PR description
..., l10n_mx_edi_pos During onboarding, users weren't paying attention to the tax inclusion question, which caused some frustration when they had to change it later on. We now ask the user to choose the tax inclusion when they first open a session. --- Task: https://www.odoo.com/odoo/project/1737/tasks/6171257
Resolved issues and error corrections
This update reverts a recent change that allowed employees to directly edit personal information within Odoo. Management requested this change to prevent potential inaccuracies in payroll calculations and ensure compliance with tax regulations. HR team oversight will now be required for any updates to this sensitive data.
Original PR description
This reverts the recent changes that exposed the "Family" and "Personal Info" sections (such as Marital Status) in the employee's "My Preferences" menu. While the initial addition was intended to improve employee self-service, management requested this revert because allowing employees to directly edit these fields poses a risk to payroll accuracy and compliance. Data points like marital status or family dependents directly impact tax deductions and benefit enrollments. To ensure data integrity, any modifications to payroll-affecting information must remain the exclusive duty of the HR team, who can require and verify the proper legal documentation before updating the system. task-6304031
This update resolves an issue where signed documents were incorrectly placed in separate folders, leading to duplicate entries and confusion. Now, signed documents from both the Documents and HR apps appear only in their respective folders (Employee/Payroll), and no extra documents are created upon completion. This ensures data consistency and simplifies document management.
Original PR description
Before: - Documents flow: after signing, the signed copy was placed in the Sign folder instead of the same folder as the original document. - HR flow: after signing a sign.request linked to an HR…
Before: - Documents flow: after signing, the signed copy was placed in the Sign folder instead of the same folder as the original document. - HR flow: after signing a sign.request linked to an HR record (e.g. hr.employee, hr.version), the signed document appeared twice, once in the Employee/Payroll folder and again in the Sign folder. - [_sign()](https://github.com/odoo/enterprise/blob/19.0/sign/models/sign_request.py#L505) attaches a copy of the signed document to the linked record, but the missing `no_document=True` was mistakenly creating an extra document - Import from Documents flow: after signing via "Import from Documents" in the Sign app, the signed copy was placed in the original document folder instead of the Sign folder. After: - Documents flow: the signed document is now placed in the same folder as the original document. - HR flow: the signed document is created only once, in the Employee/Payroll folder. No copy is made in the Sign folder. - No extra documents are created in the background when a sign request linked to a record is completed. - Import from Documents flow: the signed document is now placed in the Sign folder. Impact: - Signed documents from the Documents app stay in the same folder. - Signed HR contracts appear only in the Employee/Payroll folder. - No duplicate documents are created on completion. Task: 6176315
This update resolves a tour test failure in the Belgian HR contract salary module. The issue stemmed from a configuration that incorrectly expected an identification number or NISS when the core payroll module was not installed. The fix ensures the necessary fields are displayed correctly when the Belgian payroll module is active, improving test reliability.
Original PR description
[FIX] l10n_be_hr_contract_salary: fix NISS runbot error in salary config Bug reproduction: 1 - Get 19.4, only install hr_contract_salary and execute tour test hr_contract_salary_employee_flow_tour 2…
[FIX] l10n_be_hr_contract_salary: fix NISS runbot error in salary config
Bug reproduction:
1 - Get 19.4, only install hr_contract_salary and execute tour test hr_contract_salary_employee_flow_tour
2 - When only single app is installed without installing l10n_be_hr_contract_salary, the tour test fails
Bug cause:
1 - When the employee's company's country is belgium we were showing NISS instead of identification number.
2 - But NISS field is appended in l10n_be_hr_contract_salary and if you do not install, there is no identification number and NISS.
3 - That's why the test fails (it looks for identification number or NISS but none of them is there)
Bug solution:
1 - I moved the code of hiding identification number or hiding NISS to the l10n_be_hr_contract_salary. So, when only hr_contract_salary is installed, identification number field won't get hided.
task - 6333129
runbot error link: https://runbot.odoo.com/odoo/error/941044
Forward-Port-Of: odoo/enterprise#121800This update removes the ability to quickly create new journals from the POS payment method form. The accounting team requested this change to ensure users only create journals within the dedicated accounting application, improving process control and data accuracy. This change applies locally and can be extended where needed.
Original PR description
Currently on the pos payment method form, if you click "Select more" on the journal field, you will see two buttons 'New' & 'Create New'. Steps to reproduce: ------------------- * Open any pos…
Currently on the pos payment method form, if you click "Select more" on the journal field, you will see two buttons 'New' & 'Create New'. Steps to reproduce: ------------------- * Open any pos payment method * Select the journal field * Select "Search more" > See two creation buttons Why the fix: ------------ One button is the standard "On search more" button which can be hidden using options such as no_create, no_create_edit, ... The second button is defined on the list view for journals and since the search more uses the list view it shows the button as well. Currently we can do that with a context key to ensure that on the "real" list view it's still visible. Why do we want to hide those buttons? Asked the R&D accounting team, it should not be allowed to create journals on the fly. You should only be able to create them inside accounting app. This behavior is not limited to this view but will only be applied locally. The fix can however be applied everywhere where needed. Before the fix: ------------------- <img width="700" height="417" alt="image" src="https://github.com/user-attachments/assets/ca11ea13-c38e-40a1-9848-cbc5edc6226e" /> <img width="1507" height="887" alt="image" src="https://github.com/user-attachments/assets/1cde5d3b-3372-4aca-b5d0-2319bd82c1de" /> After the fix: ---------------- <img width="707" height="474" alt="image" src="https://github.com/user-attachments/assets/01dc7b42-43d6-4b18-a12d-54330d51b92b" /> <img width="1457" height="870" alt="image" src="https://github.com/user-attachments/assets/ff387d3f-f59c-47ad-abfe-a2003669db1a" /> opw-6131231 Forward-Port-Of: odoo/enterprise#120379
This update fixes an error in calculating holiday attest annual taxable income for employees on long-term sick leave (over 30 days). Previously, the calculation was incorrect due to a reliance on zero-valued payslips. Now, the system uses the employee's monthly wage to ensure accurate taxable income calculations, aligning with Belgian tax regulations.
Original PR description
Problem ---------------------- When an employee takes a long sick leave (more than 30 days), the basic wage on the payslip is set to 0, leading to the holiday attest annual taxable income to be…
Problem ---------------------- When an employee takes a long sick leave (more than 30 days), the basic wage on the payslip is set to 0, leading to the holiday attest annual taxable income to be calculated as 0 * 12, which is incorrect. Reason ------------------- The calculation for the holiday attest uses the last payslip for the employee, and if the employee had leave type LEAVE214, the last payslip has the basic wage set to zero, so the taxable wage that is used in the annual taxable wage calculation is wrong. The monthly wage should be used as the basic wage in the payslip to get the correct computation. Solution ------------------- The GROSS (taxable income) line that is used is computed as (basic wage - ONSS total + BIK), but the basic wage was 0. This commit checks whether the basic wage is 0 and if the time off type was longterm sick leave, and simulates a payslip using the monthly wage from the contract as basic wage to get the accurate computation for the taxable income. task-6237717 Forward-Port-Of: odoo/enterprise#120180
This update resolves a technical issue that caused build failures in certain testing modes. The team moved assertions to their correct locations, ensuring consistent build behavior across all environments. This improves the reliability of our software development process.
Original PR description
Oversight of: https://github.com/odoo/enterprise/pull/98569 Some assertions were put in the wrong module, making the builds work in "all apps" mode but fail in "single app" mode. This commit moves assertions where they belong. Task-6353709 Forward-Port-Of: odoo/enterprise#122486
This update fixes an issue where CFDI documents generated after payment updates incorrectly displayed rates, particularly when payments were made in foreign currencies (like USD). The fix ensures the correct payment amount and rate are reflected in the CFDI document, improving accuracy and compliance for Mexican tax reporting.
Original PR description
The rate and payment amount shown on the CFDI document generated after updating payments was wrong when the payment was made in a foreign currency. Steps to reproduce: ------------------- * Create a journal that use USD as currency and set the rate to 20 MXN for 1 USD * Create an invoice in MXN and make sure it is set to PPD * Add any product to the invoice for 300$ and post it * Send the invoice to CFDI (a first document should be generated) * Create a payment of 15 USD in the new journal and reconcile it with the invoice * Go back to the invoice and click on "Update payments" to generate the second CFDI document > Observation: The payment document shows an amount of 300 USD with a rate of 1 instead of 15 USD with a rate of 20. Why the fix: ------------ We make sure to use the amount from the statement line when there is one. opw-5974519 Forward-Port-Of: odoo/enterprise#122117 Forward-Port-Of: odoo/enterprise#115779
This update fixes a vulnerability in the Odoo test for Brazilian Electronic Invoice (BR-EDI) processing. The previous test was overly reliant on a specific message format, making it prone to failure due to minor changes in invoice data. The fix now searches for the key information across all invoice messages, ensuring more reliable test results.
Original PR description
The test was relying on a fixed chatter message position. Another tracking message can be inserted before the informative taxes message, so the assertion may read the wrong body. Search the expected informative taxes content among all invoice messages instead. Broke the runbot of : https://github.com/odoo/odoo/pull/273569
Code cleanup and technical improvements
This update removes outdated code (`useLayoutEffect`) that was causing issues with the sign process. The changes replaced these calls with more modern React hooks, ensuring better performance and stability. Additionally, a related refactoring addressed compatibility issues with older Odoo versions.
Original PR description
Replaced 4 `useLayoutEffect` calls with `onMounted` (3 cases) and `useEffect` (1 case) because `useLayoutEffect` is deprecated in OWL3. 3 of the 4 effects run once at mount with an empty dependency…
Replaced 4 `useLayoutEffect` calls with `onMounted` (3 cases) and `useEffect` (1 case) because `useLayoutEffect` is deprecated in OWL3. 3 of the 4 effects run once at mount with an empty dependency array, making `onMounted` the natural fit. The remaining effect tracked `this.state.documentsWithUnsignedItems` and `this.state.openedDocumentIndex` — the state is a reactive proxy mutated via Set in-place, which would break with signals. `useEffect` auto-tracks reactive reads and preserves the exact same reactive behaviour. Note: `usePublicRefuseButton` was refactored to accept a `component` parameter instead of calling `useComponent()`, which only exists in the OWL2 compat layer `@web/owl2/utils` and is not available in OWL3. The useLayoutEffect refactored in this PR has test coverage — below are some tests that failed when the effect was commented out, and are now passing: - `@sign/document_backend/simple rendering`: getDataFromHTML step not received - `@sign/signable_sign_request/simple rendering`: getDataFromHTML step not received - `TestPortalSignFlow.test_portal_sign_document`: .o_sign_sign_item_navigator not found see commented-out runbot build: https://runbot.odoo.com/runbot/batch/2596833/build/114857629
This update streamlines the process of setting up test environments for Odoo modules. By separating environment configuration from app creation, it simplifies future updates and makes it easier to remove test environments. This change improves the reliability and maintainability of our automated testing.
Original PR description
* account_reports,documents,documents_spreadsheet,knowledge,obox,room, sign,sign_itsme,spreadsheet_dashboard_edition,spreadsheet_edition, test_spreadsheet_edition,web_studio This commit splits the app/component creation and the env creation at user pov by changing how we populate the env in tests. Now, we have to configure the env before creating the app. This will make the env removal easier in the future.
This update adjusts the Point of Sale (POS) modules and related components to align with the new OWL 3 properties syntax. This change ensures compatibility with evolving standards and improves the system's ability to handle data related to POS transactions.
Original PR description
In this commit: =============== - Update `point_of_sale` and related modules to use the OWL 3 props syntax. Task-6260271 Related Community PR: https://github.com/odoo/odoo/pull/270730
11 changes
Resolved issues and error corrections
This update corrects a formatting issue in Chilean export invoices where data was incorrectly aligned in the customs information table. The fix ensures that all columns remain in the correct position, regardless of whether the 'Origin Port' or 'Destination Port' fields are populated. This prevents data from appearing under the wrong column headings, improving invoice accuracy.
Original PR description
### Issue: On Chilean export invoices, the customs information table may display data in the wrong columns When `Origin Port` or `Destination Port` is not set, the corresponding `td` is omitted by…
### Issue: On Chilean export invoices, the customs information table may display data in the wrong columns When `Origin Port` or `Destination Port` is not set, the corresponding `td` is omitted by QWeb, causing the remaining columns to shift left This results in `Qty of Packages` appearing under `Origin Port` or `Destination Port` in the printed document ### Cause: `l10n_cl_port_origin_id` and `l10n_cl_port_destination_id` have no default value and are optional fields `t-out` on a falsy value omits the `td` entirely in QWeb, breaking the column alignment Adding `or ''` ensures an empty `td` is always rendered, preserving the table structure regardless of whether the fields are set ### Steps to reproduce: - Install `l10n_cl_edi_exports` and switch to CL Company - Create an Invoice (any customer, any line) - In the gear menu, select Print > Invoice PDF copy (Chile) Before the fix, `Qty of Packages` appears under `Origin Port` when neither port field is set opw-6304670
This update resolves an issue where KSeF vendor bill imports would fail if custom taxes were used. Now, the system automatically detects and processes FA(3) XML files, dynamically matching KSeF tax codes to the correct purchase tax rates. This ensures smoother and more accurate import of vendor bills from KSeF, regardless of the user's tax configuration.
Original PR description
…oder signature When importing a vendor bill from KSeF, the system strictly relied on official Odoo tax XML IDs (e.g., `vz_kraj_23`). If a user had custom taxes (e.g., from a third-party localization), the import would crash with a UserError indicating the tax was not found. Allow manually uploading a FA(3) XML file to vendor bills, and it is detected automatically by the system This commit fixes these issues by: 1. Implementing a smart fallback tax search. If the official XML ID is not found, it dynamically searches for a matching purchase tax based on the KSeF tax code (e.g., '23' -> 23% purchase tax, 'zw' -> 0%). 2. Adding an adapter method that matches the expected EDI decoder signature, processes the file data, and writes the parsed values to the draft invoice. task-6067168 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update corrects a problem where sending email notifications could lead to transaction errors due to concurrent updates to notification records. The fix uses a temporary savepoint to handle potential data conflicts, ensuring reliable email delivery and preventing data corruption. This improves the stability of the notification system.
Original PR description
# Description of the issue/feature this PR addresses When updating mail notifications during `mail.mail._send()`, a `SerializationFailure` raised while flushing the notification recordset leaves the…
# Description of the issue/feature this PR addresses
When updating mail notifications during `mail.mail._send()`,
a `SerializationFailure` raised while flushing the notification recordset leaves the current transaction in an aborted state.
As `_send()` continues handling the exception, accessing fields:
- https://github.com/odoo/odoo/blob/127f1316540ec6cc6880ea3515e6923ba3903bc7/addons/mail/models/mail_mail.py#L816
So, any subsequent SQL query fails with
`InFailedSqlTransaction`, masking the original concurrency error. Wrap the notification flush in a savepoint so that PostgreSQL rollbacks only the failed flush, keeping the cursor usable while preserving the original `SerializationFailure`.
A regression test is added to simulate a concurrency failure during
`flush_recordset()` and verify that the cursor is no longer left dirty
The logger for the unittest without the fix is the following:
```log
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "odoo/addons/mail/models/mail_mail.py", line 719, in _send
notifs.flush_recordset(['notification_status', 'failure_type', 'failure_reason'])
File "<string>", line 3, in flush_recordset
File "unittest/mock.py", line 1139, in __call__
return self._mock_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "unittest/mock.py", line 1143, in _mock_call
return self._execute_mock_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "unittest/mock.py", line 1204, in _execute_mock_call
result = effect(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^
File "odoo/addons/test_mail/tests/test_message_post_concurrent.py", line 93, in mocked_mail_notification_flush_recordset
return original_flush_recordset(self, *vals, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "odoo/odoo/models.py", line 6788, in flush_recordset
self._flush(fnames)
File "odoo/odoo/models.py", line 6852, in _flush
model.browse(some_ids)._write_multi(vals_list)
File "odoo/odoo/models.py", line 4938, in _write_multi
self.env.execute_query(SQL(
File "odoo/odoo/api.py", line 993, in execute_query
self.cr.execute(query)
File "odoo/odoo/sql_db.py", line 371, in execute
res = self._obj.execute(query, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
psycopg2.errors.SerializationFailure: could not serialize access due to concurrent update
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "odoo/addons/test_mail/tests/test_message_post_concurrent.py", line 107, in test_mail_send_dirty_cursor
mails.send()
File "odoo/addons/mail/models/mail_mail.py", line 652, in send
self.browse(batch_ids)._send(
File "odoo/addons/mail/models/mail_mail.py", line 818, in _send
mail.id, mail.message_id)
^^^^^^^^^^^^^^^
File "odoo/odoo/fields.py", line 1309, in __get__
self.compute_value(recs)
File "odoo/odoo/fields.py", line 1491, in compute_value
records._compute_field_value(self)
File "odoo/odoo/models.py", line 5302, in _compute_field_value
fields.determine(field.compute, self)
File "odoo/odoo/fields.py", line 113, in determine
return needle(records, *args)
^^^^^^^^^^^^^^^^^^^^^^
File "odoo/odoo/fields.py", line 710, in _compute_related
record[self.name] = self._process_related(value[self.related_field.name], record.env)
~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
File "odoo/odoo/models.py", line 7083, in __getitem__
return self._fields[key].__get__(self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "odoo/odoo/fields.py", line 1272, in __get__
recs._fetch_field(self)
File "odoo/odoo/models.py", line 4120, in _fetch_field
self.fetch(fnames)
File "odoo/addons/mail/models/mail_message.py", line 756, in fetch
return super().fetch(field_names)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "odoo/odoo/models.py", line 4158, in fetch
fetched = self._fetch_query(query, fields_to_fetch)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "odoo/odoo/models.py", line 4245, in _fetch_query
rows = self.env.execute_query(query.select(*sql_terms))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "odoo/odoo/api.py", line 993, in execute_query
self.cr.execute(query)
File "odoo/odoo/sql_db.py", line 371, in execute
res = self._obj.execute(query, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
psycopg2.errors.InFailedSqlTransaction: current transaction is aborted, commands ignored until end of transaction block
```
Real error in production:
```log
2023-04-15 10:43:14,978 106451 ERROR my_db odoo.sql_db: bad query: UPDATE "mail_notification" SET "failure_reason" = "__tmp"."failure_reason"::text, "failure_type" = "__tmp"."failure_type"::VARCHAR, "notification_status" = "__tmp"."notification_status"::VARCHAR FROM (VALUES (4426629, 'Error without exception. Probably due to concurrent access update of notification records. Please see with an administrator.', 'unknown', 'exception')) AS "__tmp"("id", "failure_reason", "failure_type", "notification_status") WHERE "mail_notification"."id" = "__tmp"."id" ERROR: could not serialize access due to concurrent update
```
```log
2023-04-14 10:43:14,978 106451 ERROR my_db odoo.sql_db: bad query: UPDATE "mail_mail" SET "failure_reason"='Error without exception. Probably due do sending an email without computed recipients.',"headers"='{''X-SMTPAPI'': ''{"ip_pool": "Transactional"}'', ''X-Odoo-Objects'': ''sale.order-1436960''}',"state"='exception',"write_uid"=1,"write_date"=(now() at time zone 'UTC') WHERE id IN (2548540)
ERROR: current transaction is aborted, commands ignored until end of transaction block
```
Commit related:
- Flushing
- https://github.com/odoo/odoo/commit/6cf8db906f595a0e579f9b0fd93e789c54c17fd4
- Using fields after psycopg errors:
- https://github.com/odoo/odoo/commit/6fa292cec861da0ccfd3afe443062080171d2fc4
Enterprise https://github.com/odoo/enterprise/pull/122393This update optimizes how Odoo tracks email interactions within the Knowledge base. The change adjusts query counts based on a new savepoint mechanism introduced during email sending, leading to more efficient data processing and improved performance. This results in faster response times when accessing knowledge articles.
Original PR description
Related to https://github.com/odoo/odoo/pull/272958
This update ensures the Account EDI Proxy Client is configured for demo environments only, aligning with the existing setup in the account_peppol module. This prevents unintended use with production data and simplifies testing within the demo system. It corrects a configuration issue that was causing the proxy client to incorrectly target production users.
Original PR description
The system parameter is already brought to demo in account_peppol module. But the current users are not for pdp. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update corrects a discrepancy in the manufacturing order forecast report. Previously, the forecast incorrectly showed inaccurate incoming quantities for finished products moving between warehouses. The fix ensures the forecast accurately reflects the actual movement of goods, resolving a reporting inconsistency.
Original PR description
Version: ---------- - 18.0+ Steps to reproduce: ---------------------- 1. Install `mrp`, create two warehouses A and B. 2. Create a storable product with Track Inventory True. 3. Create a…
Version: ---------- - 18.0+ Steps to reproduce: ---------------------- 1. Install `mrp`, create two warehouses A and B. 2. Create a storable product with Track Inventory True. 3. Create a Manufacturing Order for 10 qty with(Miscellaneous tab): - Components location = Warehouse A (raw materials) - Finished product Location = Warehouse B 4. Confirm the MO. 5. Open the Forecast report for the product. Issue: ------- - Warehouse B forecast shows the MO under the replenishment detail lines (correctly, via `location_dest_id`) but the header displays "0 Incoming", "0 Outgoing", "0 Forecasted". - Warehouse A forecast incorrectly shows "10 Incoming" in the header, even though no finished product is going there. Cause: ------- - When we create MO for finished Product move is created if there no `location_final_id` then it set mo.warehouse_id.lot_stock_id` as the `location_final_id`. https://github.com/odoo/odoo/blob/f958a323fd652af9251215b1b5a2fadc3bccba42/addons/mrp/models/stock_move.py#L466-L467 which is introduce in this [commit](https://github.com/odoo-dev/odoo/commit/95ce0ed97a160e3465c313ed6b9bef938d61586b) - The problem is that `mo.warehouse_id` is a related field computed from `mo.location_src_id.warehouse_id` https://github.com/odoo/odoo/blob/f958a323fd652af9251215b1b5a2fadc3bccba42/addons/mrp/models/mrp_production.py#L110 - this warehouse that supplies the **raw materials** (Warehouse A). When the user sets `location_dest_id` to Warehouse B's stock, `mo.warehouse_id` is still Warehouse A, so `location_final_id` is stamped with Warehouse A's stock location. - `product.incoming_qty` (used by the forecast header) evaluates non-done moves using `location_final_id` first (if set), falling back to `location_dest_id` only when `location_final_id` is False: https://github.com/odoo/odoo/blob/f958a323fd652af9251215b1b5a2fadc3bccba42/addons/stock/models/product.py#L331-L335 - Because `location_final_id` is set (to WH-A) and non-False, the second clause (which would pick up `location_dest_id` = WH-B) is never evaluated. The result: the move is counted as incoming in Warehouse A and ignored in Warehouse B. - The forecast detail *lines* use only `location_dest_id` to classify moves, so they correctly show the MO as incoming for Warehouse B — producing the inconsistency the user observes. https://github.com/odoo/odoo/blob/f958a323fd652af9251215b1b5a2fadc3bccba42/addons/stock/report/stock_forecasted.py#L42-L46 Fix: ---- - Replace `mo.warehouse_id.lot_stock_id.id` with `mo.location_dest_id.id`: - `location_final_id` is meant to track where the product ultimately ends up when the immediate destination is intermediate. The correct "final" location for a finished-product move is exactly what the user chose as `location_dest_id` on the MO — not the stock location of the warehouse that happens to supply the raw materials. - For the standard single-warehouse case, `mo.location_dest_id` equals `mo.warehouse_id.lot_stock_id`, so the behaviour is unchanged. For cross-warehouse MOs (destination = WH-B), `location_final_id` is now stamped with WH-B's stock, making `product.incoming_qty` and the forecast header consistent with the detail lines. ---- opw-6294479
This update fixes a bug preventing the automated update of CFDI invoices in Mexico. The cron job wasn't triggering correctly when there were remaining invoices after processing a batch. The fix adjusts the search method to ensure the cron is retriggered if more documents are found than the batch size, guaranteeing all invoices are updated.
Original PR description
Steps to reproduce ----------------- - Install l10n_mx_edi; - Switch to the mexican company; - Create 3 invoices for the mexican company (you will need to set an UNSPSC code on the products); - Send them to CFDI; - Go to the scheduled action "Automatic update of state on the SAT" and add "batch_size=2" to the method's parameters; - Manually run the cron; - Only two invoices will be updated, the cron is not retriggered to process the remianing one. Why is it hapening ------------------ We set a limit of batch_size + 1 in the search method, and the cron is retriggered if and only if the number of documents fetched is equal to the batch size, meaning there is no more documents to fetch. This should be triggered if we fetched more documents than the batch size. opw-6328118
A recent test failure related to holiday accrual calculations in the HR module was caused by a discrepancy in how dates were being handled in future builds. This fix adds a temporary 'freeze time' to the 2026-03-01 date, ensuring accurate accrual calculations moving forward. This prevents incorrect holiday allocation figures.
Original PR description
Problem ------------------------ test_department_accrual_allocation was failing due to the allocation being calculated as 26 days instead of 21 in faketime builds set to 2027. This was because the accrual plan was set to accrue 21 days per year and carry over 5 days from the previous year. Since the allocation was created on Jan 1st 2026, all 2027 builds were calculating the allocation to have 5 extra days. Solution ---------------------- Added freeze_time for 2026-03-01 to ensure the date stays the same. runbot-939344 task-6344033 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 clarifies extra hours reporting by renaming confusing labels like 'Difference' and 'Balance' to 'Worked Extra Hours' and 'Validated Extra Hours'. This change ensures consistent and understandable reporting across all Odoo HR attendance views, improving data clarity for users.
Original PR description
The reporting labels "Difference" and "Balance" are confusing because "Difference" tracks system-qualified overtime while "Balance" represents accepted overtime hours. There is also a lack of consistency across views. This commit renames these fields to "Worked Extra Hours" and "Validated Extra Hours" to harmonize the naming everywhere task-6352142 Description of the issue/feature this PR addresses: Confusing and inconsistent naming for extra hours Current behavior before PR: - Reporting uses "Difference" and "Balance". - Views use inconsistent labels. Desired behavior after PR is merged: Labels are consistently named "Worked Extra Hours" and "Validated Extra Hours" everywhere. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves a blocking error related to tax unit membership when filing VAT returns with HMRC. Now, the system correctly identifies the tax unit and automatically selects it for reports, ensuring accurate data transmission. This change improves the reliability of tax reporting to HMRC.
Original PR description
BEFORE: - Before this commit, when the current company is a member of the tax unit, there is no blocking level error for the user to select the tax unit. - And the vat used while creating a connection to the HMRC or while sending a tax report to the HMRC is of the current company. AFTER: - After this commit, there is one blocking level error, which tells the user that the current company is part of a tax unit, and on confirmation, the tax unit will automatically be selected for the current report. - And if the return contains the data of a tax unit, then the vat set on the tax unit will be considered while establishing the connection and sending the tax report to HMRC. Task-5865605
This update corrects a visual issue in the account module where the dropdown for account types remained in light mode when dark mode was enabled. The change ensures the dropdown background matches the dark mode theme, providing a consistent and professional user experience. This improves visual consistency across Odoo's interface.
Original PR description
Steps to reproduce: - Install `account` module - Enable dark mode - Open `view_account_form` to create a record - On the Accounting page, open type dropdown - The dropdown background remains in light mode This commit applies $dropdown-bg on `o_field_account_type_selection` as in odoo/odoo@0cd148eb389078c896aaa719af5733d05377fd1c Forward-Port-Of: odoo/odoo#271352
2 changes
Resolved issues and error corrections
This update corrects a display issue where the shipping address option remained visible on the website even when shipping addresses were disabled in the settings. The fix ensures that the shipping address field is hidden correctly when this setting is toggled, improving the user experience and preventing confusion.
Original PR description
Issue: --- Shipping address option will be still shown if the shipping address is disabled in setting. Steps to reproduce: 1- Disable shipping address in setting. 2- Navigate to shop and checkout using a public user. You can see when filling address, the shipping address option is still shown. Cause and Fix: --- The group is not added to `Ship to the same address` checkbox. Even if we add the group, the whole t-if/t-else block will not be taken, and we need explicitly set use_same when the group is not present. opw-6193161
This update fixes a bug where GIF images weren't visible in the feed comment modal. The system now correctly displays GIFs from Facebook, ensuring users can share richer content within the feed. This improves the user experience and allows for more engaging comments.
Original PR description
Bug === When opening the comments modal of the feed view, the GIF images are not visible. Technical ========= The API does not return the GIF, it only returns the MP4 and the JPG. So we show the fixed image, and when clicking on it, it opens the video on Facebook. Task-6241607 Forward-Port-Of: odoo/enterprise#118619