Thursday, May 22, 2025
11 changes · 17.0
Resolved issues and error corrections
Screen recording conversion in automated tests now handles browser windows with odd pixel dimensions. This prevents video generation failures and helps keep test results and diagnostics reliable.
Original PR description
Currently, the default ffmpeg configuration used for screencast conversion fails when browser dimensions result in odd-numbered width or height, as H.264 requires even dimensions. This commit adds a padding filter to ensure dimensions are even numbers. runbot-160976
Gamification challenges now avoid errors when a goal is configured to sum a non-numeric field, such as a creation date. Instead of failing, the system counts matching records so challenges can continue running reliably even if a goal definition is misconfigured.
Original PR description
The system raised a `psycopg2.errors.UndefinedFunction` error when attempting to compute a `SUM` on a `timestamp field (create_date)` in gamification goals. This is because PostgreSQL does not…
The system raised a `psycopg2.errors.UndefinedFunction` error when attempting to compute a `SUM` on a `timestamp field (create_date)` in gamification goals. This is because PostgreSQL does not support `SUM(timestamp)` — `SUM` can only be used with numeric types such as integer, float, or monetary.
Steps to reproduce:
---
- Install `Gamification` and `hr_appraisal` modules
- Create a Gamification Challenge, and also create a Goal Definition and set `Computation Mode` -> `Sum`, `Model` -> `Appraisal Goal`, `Field to Sum` -> `Created on (Appraisal Goal)`, `Filter Domain` -> `[]`
- `Start Challenge` in Gamification Challenge
Traceback:
---
```
UndefinedFunction
function sum(timestamp without time zone) does not exist LINE 1: SELECT SUM("hr_appraisal_goal"."create_date") FROM "hr_appra...
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
```
To fix this, we now check the field type before applying aggregation. If the computation mode is set to `sum` but the field is not numeric, we gracefully fallback to using `count` instead. This prevents SQL errors and ensures that goal computations remain reliable even with misconfigured definitions.
sentry-6575130734
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prThis fixes an issue in the website editor where replacing a newly added social media icon failed to open the media selection dialog. Users can now reliably customize social media icons in website footers after saving and re-entering edit mode.
Original PR description
Steps to reproduce the issue: - Enter website edit mode. - Drag and drop a "Social Media" snippet into the footer. - Click on it. - In the options, click the "Add New Social Network" button. - Save the page. - Re-enter edit mode. - Click the pencil icon of the newly added item. - In the options, click the "Replace" button. - Bug: the media dialog does not open. The bug was introduced by commit [1], where the double-click on the icon, which was triggered when clicking the "Replace" button, was replaced with a direct call to the `openMediaDialog` function. After this change, in the steps described above, the function is called when there is no selection on the page. As a result, `openMediaDialog` does not execute completely. This commit fixes the issue by selecting the icon if no selection is already present. [1]: https://github.com/odoo/odoo/commit/3c89439a16c41d553322893761a35592b73a5338 opw-4734855
Updated payment provider tests so they no longer depend on the accounting app when it is not needed. This prevents avoidable test failures in environments where accounting is not installed, improving reliability of development and release checks.
Original PR description
Some tests are failing when account isn't installed because they extend AccountTestInvoicingCommon but they have no dependencies on account: ValueError: External ID not found in the system: account.group_account_manager Each addon contains a test `test_reference_is_computed_based_on_document_name` that is already skipped if account_payment is not installed. Similar to https://github.com/odoo/odoo/commit/d844fef414fbd6f59089ce3f0dca34895badfa33 runbot-163120 runbot-163121 runbot-163122 runbot-163161 runbot-163162
Payroll batch generation for Swiss ELM transmissions now excludes contract templates, so batches are created only from actual employee contracts. This prevents incorrect payroll batch content and reduces the risk of processing errors.
Original PR description
…atch Batch generation currently takes contract templates, which it should not
The app creator box in Odoo Studio now shows the latest app icon instead of the older gradient version. This keeps the interface visually consistent with the current branding and avoids a dated look for users creating apps.
Original PR description
Prior to this commit, the creator box used the old version of the app icon (with gradients). This commit updates this icon to use the last version. task-4709035 | Before | After | |--------|--------| |  |  |
Subscription invoicing no longer creates unnecessary "Delivery creation failed" activities for subscriptions that do not require a delivery. This reduces misleading alerts and helps teams focus only on subscriptions where stock delivery actions are actually needed.
Original PR description
When the post_invoice_hook failed, and sale_subscription_stock was installed, all subscription invoiced would have a "Delivery creation failed" activity created, even if no delivery needed to be created. This commit filter out the subscriptions without any stock lines that needs the stock rule to be run. OPW-4618930
Miscellaneous changes
Scenario: - create an object_write (Update the Record) action - update a field with equation evaluation (Python expression) with an expression like "record.id" - click on "Create contextual action" - go to a list view of the model, execute the action for several records Result: the value of the field of all records are computed based on the first selected record. Issue: we don't change the "record" in the evaluation context and just keep the first record. Fix: changing the reco
Original PR description
Scenario: - create an object_write (Update the Record) action - update a field with equation evaluation (Python expression) with an expression like "record.id" - click on "Create contextual action" -…
Scenario:
- create an object_write (Update the Record) action
- update a field with equation evaluation (Python expression) with an
expression like "record.id"
- click on "Create contextual action"
- go to a list view of the model, execute the action for several records
Result: the value of the field of all records are computed based on the
first selected record.
Issue: we don't change the "record" in the evaluation context and just
keep the first record.
Fix: changing the record.
Note: without the fix, the added test fails because the city of the
second record is set to the value of the ID of the first record.
opw-4491099
__PR code note__:
I did the change in "run" but this could be done in `_run_action_object_write`, I chose run because we are already changing the action_id in it.
The "`if eval_context.get('record') is not None`" is to not change an hypothetical case where `self.model_id` doesn't match the `context.action_model`.
__PR note__:
If it was too risky, we could probably merge in an higher version, the ticket is in 17.0 and this is still happening in master.
I've not heard of this issue before so this must not be very frequent or urgent, but I guess this is because people either use a python constant or they just use a python action with a for loop in general.
Forward-Port-Of: odoo/odoo#210855Currently because of the changes in ca35adf7412b132e37c22d09 both the test `test_increase_available_quantity_3` and `test_decrease_available_quantity_3` are always skipped, even with demo data. That's because `self.stock_location` points to a new location created in `setUpClass`. So no demo data quant can have this location_id as it cannot be referenced from a demo data file. However, "stock.stock_location_stock" is actually created in a data file, `stock_data.xml`. So we can revert back to u
Original PR description
Currently because of the changes in ca35adf7412b132e37c22d09 both the test `test_increase_available_quantity_3` and `test_decrease_available_quantity_3` are always skipped, even with demo data. That's because `self.stock_location` points to a new location created in `setUpClass`. So no demo data quant can have this location_id as it cannot be referenced from a demo data file. However, "stock.stock_location_stock" is actually created in a data file, `stock_data.xml`. So we can revert back to using `env.ref` instead of creating a new location. With that both tests are properly executed when demo data are installed while they are skipped without demo data. We're also creating the quants in case they are not found in the database so we ensure the test is always run. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#204682
Speed up queries like in _check_uom_not_in_invoice Before: https://explain.dalibo.com/plan/dh442bag02518830 After: https://explain.dalibo.com/plan/db2ef078c8dd4ac0 From 12 seconds to .3ms 10 Millions account_ move_ line in the database 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#2
Original PR description
Speed up queries like in _check_uom_not_in_invoice Before: https://explain.dalibo.com/plan/dh442bag02518830 After: https://explain.dalibo.com/plan/db2ef078c8dd4ac0 From 12 seconds to .3ms 10 Millions account_ move_ line in the database 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#208992
This commit fixes an issue with the Facebook app and the management of pages. For Facebook to identify the user as able to manage a page, we need to provide another permission to the scope. The permission `business_management` is needed for the API to understand that the user is able to manage its pages. Thus we are adding it to the scope but as an optional permission. Some users may not have this permission set up for their own applications, thus we are adding the system parameter `social.
Original PR description
This commit fixes an issue with the Facebook app and the management of pages. For Facebook to identify the user as able to manage a page, we need to provide another permission to the scope. The permission `business_management` is needed for the API to understand that the user is able to manage its pages. Thus we are adding it to the scope but as an optional permission. Some users may not have this permission set up for their own applications, thus we are adding the system parameter `social.facebook_no_business_management`. This parameter blocks the addition of the permission to the scope if set to any value, if not set it adds the permission to the scope. task-4719790 Forward-Port-Of: odoo/enterprise#84032