Wednesday, March 6, 2024
35 changes · saas-17.1
Resolved issues and error corrections
When users add a Tax ID, some invalid or unknown number parts were being logged as errors even when they did not require action. This change records those cases as warnings instead, reducing unnecessary error noise for support and monitoring teams.
Original PR description
``One of the parts of the number are invalid or unknown`` error occurs when the user adds a Tax ID. This commit changes the logger exception to a warning to avoid an unnecessary error in the log. sentry-4880057848, 4972280626 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
PDF files in the Documents app that use a specific encoded file type will now generate and show thumbnails as expected. This makes it easier for users to visually identify documents without opening each file.
Original PR description
Steps to reproduce =================== - Open the documents module. - thumbnail of the some pdfs are not displayed. Technical =================== As we made some changes https://github.com/odoo/enterprise/pull/49111 here related to thumbnail thumbnail_status for the 'application/pdf;base64' type pdfs are set to be false instead of 'client_generated'. After this PR =================== thumbnail for the 'application/pdf;base64' mimetype pdfs will be generated. Task-3753929
Fixes a problem that caused the Salary Configurator to fail when holiday-related benefit information was missing. This helps HR users open and use the configurator reliably when preparing salary packages.
Original PR description
A trackback arises because the holiday key is not included in the benefits. This commit led to the issue -issue.https://github.com/odoo/odoo/commit/e0a739897e170c5f08c1cf4ca3a98638ad664027 task-3740939
The Salary Configurator now keeps the correct employee structure type when generating an offer. This prevents missing benefits and avoids an error that could block recruitment users from preparing salary offers.
Original PR description
Issue: - When we open the Salary Configurator, the employee structure type is set in the contract. Then, a new employee is created and the structure-type employee is replaced by `United States: Employee`. - _get_salary_package_values() does not get any benefits because the structure type of the contract is `United States: Employee`. - ROLLBACK the transaction, so the structure type is an employee instead of `United States: Employee`. - Salary_package/update_salary method inside get `holidays` benefits because search with employee structure type This commit led to the issue -issue.https://github.com/odoo/odoo/commit/e0a739897e170c5f08c1cf4ca3a98638ad664027 task-3740939
This update corrects a problem that occurred during Odoo upgrades, specifically related to how account report expressions were managed. The change ensures that report expression records are properly removed when updating, preventing database errors and maintaining a stable system. This resolves a potential upgrade disruption.
Original PR description
Cascade removal of account.report.expression records to corresponding account.report.external.value, avoiding the following issue when upgrading: ``` Traceback (most recent call last): File…
Cascade removal of account.report.expression records to corresponding account.report.external.value, avoiding the following issue when upgrading:
```
Traceback (most recent call last):
File "/home/odoo/src/odoo/17.0/odoo/service/server.py", line 1302, in preload_registries
registry = Registry.new(dbname, update_module=update_module)
File "<decorator-gen-16>", line 2, in new
File "/home/odoo/src/odoo/17.0/odoo/tools/func.py", line 87, in locked
return func(inst, *args, **kwargs)
File "/home/odoo/src/odoo/17.0/odoo/modules/registry.py", line 113, in new
odoo.modules.load_modules(registry, force_demo, status, update_module)
File "/home/odoo/src/odoo/17.0/odoo/modules/loading.py", line 536, in load_modules
env['ir.model.data']._process_end(processed_modules)
File "/tmp/tmpwrjjshgf/migrations/base/0.0.0/pre-models-no-model-data-delete.py", line 103, in _process_end
return super(IrModelData, self)._process_end(modules)
File "/home/odoo/src/odoo/17.0/odoo/addons/base/models/ir_model.py", line 2562, in _process_end
self._process_end_unlink_record(record)
File "/home/odoo/src/odoo/17.0/addons/website/models/ir_model_data.py", line 36, in _process_end_unlink_record
return super()._process_end_unlink_record(record)
File "/home/odoo/src/odoo/17.0/odoo/addons/base/models/ir_model.py", line 2491, in _process_end_unlink_record
record.unlink()
File "/home/odoo/src/odoo/17.0/odoo/models.py", line 4218, in unlink
cr.execute(SQL(
File "/home/odoo/src/odoo/17.0/odoo/sql_db.py", line 332, in execute
res = self._obj.execute(query, params)
psycopg2.errors.ForeignKeyViolation: update or delete on table "account_report_expression" violates foreign key constraint "account_report_external_value_target_report_expression_id_fkey" on table "account_report_external_value"
DETAIL: Key (id)=(94) is still referenced from table "account_report_external_value".
```
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#154191This update fixes a problem where QR codes weren't printed when automatically generating receipts. The change ensures the QR code image is loaded *before* sending the receipt to the printer, guaranteeing its inclusion on the printed document. This improves the user experience for receiving and scanning receipts.
Original PR description
Prior to this commit, enabling auto receipt printing resulted in the QR code not being printed on the receipt. This was due to the QR image being fetched post printing. This commit addresses the issue by first loading the QR code image, then sending it to the printer, ensuring its presence on the printed receipt. opw-3763169 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#155354
This update fixes an issue where service purchase orders weren't automatically generating linked purchase orders. The change ensures the correct company context is used when creating purchase orders linked to service orders, resolving a problem where POs weren't being created when a specific company was designated for the service.
Original PR description
Steps to reproduce: - Setup two companies and a product - For one of the company activate "Subcontract Service" on the product - Make an SO with the product and in Other Infos set the company with the one that has subcontract service on - Confirm the SO with the company that doesn't have it on Issue: No PO is generated. Solution: Make sure we got the right context when generating purchase. opw-3622278 Forward-Port-Of: odoo/odoo#150626
This update resolves an issue where moving tables in the restaurant point-of-sale system didn't correctly update the backend. The change ensures that table selections are saved when a table is moved from or the move edit is closed, maintaining accurate table management.
Original PR description
After this pr https://github.com/odoo/odoo/pull/148139 the table moves where not saved anymore. This commit makes sure that when a table is unselected or the edit move is exited, the selected tables are updated in the backend. Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves an issue where combo products weren't correctly updating references when new variants were created. Now, when a combo product's details are saved as a variant is made, the reference is updated to include all newly created variants, ensuring accurate tracking of product combinations in point of sale transactions.
Original PR description
-When product in combo choices are being archived because of variants creation, replace the archived reference with all newly created variants. -Add test to reproduce this use case task id: 3713861 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#156301
This update resolves an issue where branch accounts weren't correctly recognized for payment processing. The fix allows branches to use their own accounts for point-of-sale transactions, streamlining financial management and ensuring accurate record-keeping. This improves the flexibility and usability of the accounting and point-of-sale modules.
Original PR description
Steps to reproduce: - Install point of sale and accounting - Create a branch - Make a copy of the outstanding receipts account and change company to the branch - Attach the branch to this account in the accounting settings - Open a PoS make a transaction and close the session Issues: An error is displayed notifying the user that the journal entry draft is not valid. Solution: Accounts that are attached to a branch should be valid for them as well as their parents account. Task link: https://www.odoo.com/web#model=project.task&id=3659707 opw-3659707 Forward-Port-Of: odoo/odoo#148810
This update resolves an issue where coupon codes applied to a shopping cart were not being correctly removed. The fix addresses a technical glitch where a temporary order line was created when a coupon was applied, preventing its removal. This ensures users can accurately manage their shopping carts and discounts.
Original PR description
## Steps to reproduce - Install **eCommerce** app - Go to **Settings** and enable **Discounts, Loyalty & Gift Card** option - Go to **Website** app > **eCommerce** > **Loyalty** > **Discount &…
## Steps to reproduce - Install **eCommerce** app - Go to **Settings** and enable **Discounts, Loyalty & Gift Card** option - Go to **Website** app > **eCommerce** > **Loyalty** > **Discount & Loyalty** - Create a new coupon by setting the **Program Type** to **Coupons** and then save - Generate a new coupon by clicking the **GENERATE COUPONS** button. - Go to **Website** > **site** > **Homepage** - Go to **Shop** page - Add a product to the cart - Apply the coupon code created - Remove the coupon code by clicking the bin icon next to the coupon code line - The coupon code is **_NOT_** removed. ## Investigation #### First, we'll take a look on what happens when a coupon code is applied - When a coupon code is applied, a new `sale.order.line` is created for it. - That triggers `super()._compute_website_order_line()` https://github.com/odoo/odoo/blob/d8ec7735aa8759fa94fc0223945ac9b19e05312e/addons/website_sale_loyalty/models/sale_order.py#L111 which **_filters out_** the discount order line https://github.com/odoo/odoo/blob/d8ec7735aa8759fa94fc0223945ac9b19e05312e/addons/website_sale/models/sale_order.py#L66 via the `_show_in_cart()` method https://github.com/odoo/odoo/blob/d8ec7735aa8759fa94fc0223945ac9b19e05312e/addons/website_sale_loyalty/models/sale_order_line.py#L12 - Then a new **_temporary_** sale.order.line is created by https://github.com/odoo/odoo/blob/d8ec7735aa8759fa94fc0223945ac9b19e05312e/addons/website_sale_loyalty/models/sale_order.py#L121 meaning that is has no `id` - ⚠️ Note that we can only apply one coupon from the same program type. #### Second, Let's take a look on what happens when we try to remove a coupon code - A call is made to `cart_update_json()` which calls https://github.com/odoo/odoo/blob/d8ec7735aa8759fa94fc0223945ac9b19e05312e/addons/website_sale/controllers/main.py#L811-L819 which calls https://github.com/odoo/odoo/blob/d8ec7735aa8759fa94fc0223945ac9b19e05312e/addons/website_sale_loyalty/models/sale_order.py#L159 - But as noted above the coupon order line **`has no id`** being a **_temporary_** record. Hence the `line_id` is **None** which basically cancels the cart update. opw-3744910 Forward-Port-Of: odoo/odoo#156383 Forward-Port-Of: odoo/odoo#154680
This update resolves an issue where Ctrl+clicking on styled links within the web editor didn't open the intended destination. The fix ensures that the link targets the nearest actual anchor tag, providing the expected functionality for users to navigate to external URLs.
Original PR description
Current behavior before PR: Ctrl+clicking on a styled link is ineffective since the target is the styled element, which lacks an href. Desired behavior after PR is merged: The target should be set to the nearest `<a>` tag rather than on the styled tag. task-3773924 Forward-Port-Of: odoo/odoo#155820
This update fixes a rounding issue that was causing incorrect prices in UBL (Universal Business Language) invoices. The team switched from a specific rounding function to Python's built-in rounding method to ensure accurate price calculations. This improves invoice accuracy and consistency for our customers.
Original PR description
In [1], we added a rounding of the amounts in the `<PriceAmount>` tags to avoid floating point rounding errors. However, it seems the `float_round` function does not guarantee to avoid these errors. Take the example of `price_subtotal` = 250.80 and `quantity` = 3. We will compute the PriceAmount as 250.80 / 3 which yields 83.60000000000001. Even when using `float_round(amount, 10)`, it still results in the same amount with the rounding error. For that reason we use the built-in `round` method of Python instead. [1] 58d57bbbaaab32ba0183890a9182e6de09b32ac5 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#155949 Forward-Port-Of: odoo/odoo#155570
This update fixes a potential error in how Odoo fetches message types within the mail system. Previously, retrieving related information after the initial fetch could cause performance issues. This change adds a temporary solution to optimize the database retrieval process, ensuring smoother and more reliable mail operations.
Original PR description
A new message type was added in stable. This is usually safe, however in cases where there are related fields on that same selection fetching them will raise an exception as the ORM has to fetch the translations for the selection in DB. We add a hack on mail.mail to update the selections in DB when fetching the message type the first time. Subsequent gets should be inexpensive as these are cached. task-3773301 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#156235 Forward-Port-Of: odoo/odoo#155766
This update resolves an issue where removing a filter on the website forum would incorrectly redirect users to their own profile instead of displaying all questions from the author. Now, removing the filter correctly shows all questions from the author's profile as intended.
Original PR description
Before this PR: - Navigate to the author's profile from a course on website forum. - Go to the Questions tab and remove the existing filter - It directs to the login user's profile instead of removing the filter. After this PR: Now when the filter is removed and all the questions of the author are shown from his profile. Task-3725329 Forward-Port-Of: odoo/odoo#154901 Forward-Port-Of: odoo/odoo#153986
This update corrects terminology and translates key terms within the l10n_it_edi_website_sale module into Italian. This ensures accurate and localized reporting for Italian customers using the website sale functionality, improving the user experience and compliance with Italian regulations.
Original PR description
Correct the terms in this module and translate them in Italian. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#155993 Forward-Port-Of: odoo/odoo#155905
This update fixes a potential error where duplicate accounts could be created in the system. Previously, the system checked for account duplicates based on the original code, not the normalized code. Now, the system correctly checks for duplicates using the normalized code, preventing errors and ensuring data integrity.
Original PR description
**Description of the issue/feature this PR addresses:** Function `_pre_reload_data` checks for the existance of accounts with the same code to avoid creating a duplicate. It does so however comparing with the code before normalizing it with the length from the template, failing to find possible duplicates with a normalized code. **Current behavior before PR:** If accounts with non-normalized codes _(eg 172)_ are being loaded, there's a risk that an account with a matching normalized code _(eg 172000)_ already exists in the database. If the corresponding xmlid is not pointing at it, another account with the same code will be created triggering the ValidationError. **Desired behavior after PR is merged:** The comparison with existing accounts is made with the normalized code avoiding this conflicts. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#156119 Forward-Port-Of: odoo/odoo#155256
This update fixes an issue where survey questions using comment fields as answers wouldn't display the expected text input box. The fix ensures that clicking on the comment field reveals the text box, allowing users to properly input their responses. This improves the survey functionality and user experience.
Original PR description
**Current behavior:** A survey question which has a comment field counted as an answer will not reveal its text box input field when it is selected as the current answer. **Expected behavior:** After clicking on the comment field answer, the text box will be revealed and enabled. **Steps to reproduce:** 1. In the surveys app, add a question to a survey of type `Multiple choice: only one answer` 2. In the question's options, enable the `Show Comments Field` and `Comment is an answer` options 3. Go to the question in the survey, click on the comment answer and observe there is no field to enter a comment **Cause of the issue:** The function which is responsible for adapting these page elements is not selecting the correct html elements, thus their attributes are not properly changed when needed. **Fix:** Change the function variables so that they are pointing to the correct location in the DOM. opw-3748291 Forward-Port-Of: odoo/odoo#155023
This update fixes an issue where duplicating a warehouse didn't automatically copy its operating types (like 'delivery' or 'internal transfer). Now, when you duplicate a warehouse, the new warehouse will have its own set of operating types, ensuring consistent inventory management. This improves the reliability of warehouse duplication processes.
Original PR description
[FIX] stock: duplicating warehouse dependencies Before this commit when duplicating a warehouse, its operation types (picking.type) wouldn't get copied. This commit ensures that new picking.types are created for the duplicate warehouse. ### [Reproduce] - run odoo 17 with -i stock,mrp_subcontracting - in Inventory/Configuration/Warehouses Duplicate a Warehouse - Bug: in Inventory/Configuration/OperationTypes picking types aren't duplicated opw-3674614 Forward-Port-Of: odoo/odoo#151769
This update fixes a bug where accrual calculations were incorrectly updating allocation amounts when created with start dates in the past. The fix ensures a 'nextcall' is automatically set, preventing immediate value changes and maintaining accurate accrual balances. This improves the reliability of our holiday accrual system.
Original PR description
Description of the issue: Before this commit, allocation created for which no nextcall were set (allocation starting in the past or immediately) would update to a wrong value if the cron is run immediately after the allocation creation To reproduce the issue: - Create an accrual plan giving daily allocation - Create an allocation with that accrual and a start date in the past - Validate the allocation - Run the accrual schedule action manually - The new amount for the allocation is inferior to what it was at creation Expected Behaviour: The value should remain the same Fix: A nextcall is now set whenever the allocation is supposed to have already started to ensure no immediate accrual update. Forward-Port-Of: odoo/odoo#148154
This update removes an outdated code used in Swedish billing (EAS code '9955') and replaces it with the correct, current code ('0007'). This ensures accurate and compliant electronic invoicing for our Swedish customers, aligning with European regulations.
Original PR description
remove deprecated EAS code for Sweden. The code is no longer part of the valid list of codes. See https://docs.peppol.eu/poacc/billing/3.0/codelist/eas/ and https://docs.peppol.eu/edelivery/codelists/ Also, in the endpoint the Swedish organization number must be used, which is taken from the VAT by removing the country code and the last two digits. You can check it out here: https://organisationsnummer.dev/ --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#156289 Forward-Port-Of: odoo/odoo#153440
This update fixes an issue where expense totals were incorrectly calculated due to using the current exchange rate instead of the rate at the time the expense was incurred. The change ensures accurate totals in the 'totals to submit' section, improving the reliability of expense reporting. This impacts users who record expenses in multiple currencies.
Original PR description
## Issue: - Expenses entered in currencies other than the company currency are incorrectly calculated using today's exchange rate instead of the rate applicable on the date the expense was made. This results in inaccurate totals in the "totals to submit" section of the Expenses dashboard. ## Steps To Reproduce: - Go to Expenses. - See the current total to submit. - Create a new expense that is 999,999 EUR but $1.00 USD. - See that the expenses to submit is not matching the exchange rate we put in the expense. ## Solution: - In the 'get_expense_dashboard' method instead of summing up of 'total_amount_currency' and then converting to the company currency. we sum up directly the 'total_amount' for each expense instead. opw-3731445 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#156591 Forward-Port-Of: odoo/odoo#155221
This update improves the speed of creating orderpoints in the stock management system. Previously, the process was slow due to inefficient data retrieval. This change streamlines the process, significantly reducing the time taken to create orderpoints and improving overall system performance.
Original PR description
This commit changes the computation of product having a negative forecasted quantity to create manual orderpoints. The issue was that each replenish location needed multiple `_read_group` on…
This commit changes the computation of product having a negative forecasted quantity to create manual orderpoints. The issue was that each replenish location needed multiple `_read_group` on `stock.quant` and `stock.move` on all storable product. This commit makes only 3 `_read_group`s for all products x locations and post process the group and quantity sum by location in Python. This method gives some performance gain in time as well as in memory consumption Task: 3653272 Here is the time comparison before/after the patch for different configuration | | before | after | |---|---|---| | 700 loc, 300 prod | 14.08s | 850ms | |10 loc, 3k prod | 2.174s | 349ms | |700 loc, 30k prod | TO | 74s | 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#156507 Forward-Port-Of: odoo/odoo#149966
This update fixes a potential issue where notifications were being sent even when there were no channel members to update. This prevented the creation of channel members with invalid IDs. A new test case has been added to ensure notifications are only sent when updates are actually needed.
Original PR description
When there is no channel members to be updated the seen status, we should not send a notification to the channel members, otherwise, it will lead into creating a channel member with id undefined. test case added to check that the notification is not sent when there is no channel members to be updated. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#156534
This update fixes an error that occurred during database upgrades, specifically when tracking values were associated with multiple models. The change ensures that tracking calculations are accurate, preventing errors related to model mismatches and improving data integrity. This resolves a potential issue impacting task management and reporting.
Original PR description
Forward-Port-Of: odoo/odoo#156571
This update resolves a user error that occurred during account tag migrations, specifically when inactive tags were present. The change ensures inactive tags are correctly processed, preventing migration blocks and allowing seamless updates to the accounting system. This improves stability and prevents disruptions during module upgrades.
Original PR description
After this commit: [commit](https://github.com/odoo/odoo/pull/148866/files) - If tags belonging to localization are present in the database but with active='f', the user error will still trigger. As…
After this commit: [commit](https://github.com/odoo/odoo/pull/148866/files)
- If tags belonging to localization are present in the database but with active='f', the user error will still trigger. As mentioned in the commit if tags are deleted by the end user, then updating the localization module will resolve this and will create the new tags for that localization, but in our case if the tag are present in the db but are active='f', so updating the localization module will not help as noupdate will become true, if the enduser makes any changes to it. so updating the localization will not change active='f' and the user error will keep on coming unless the end user manually set it active='t'.
**Steps to reproduce**:
1. Create a database in saas-16.2
2. Install the module account_accountant and a localization, for example l10n_ee.
3. With debug mode on, navigate to the account tags menu
(Configuration > Accounting > Account Tags).
4. Archive any tag using the archive action.
5. On the accounting settings page, under Fiscal Localization, trigger a user error when clicking the reload button.
This user error is blocking.
By making the record inactive, the user has made the account tag no-update, so upgrading the module does not solve this.
- So, as this mentioned commit is introduced in 16.2, any db migrating to v16.2 or further, when the ```_get_tag_mapper``` is triggered this user error is blocking the migration.
**Solution**:
- This commit adds a context to include the inactive tags here: [here](https://github.com/odoo/odoo/blob/saas-16.2/addons/account/models/chart_template.py#L924-L928)
OPW-3716164
UPG-1297494
[TBG-1074](https://upgrade.odoo.com/web#id=1074&cids=1&menu_id=107&action=178&model=upgrade.request.traceback.group&view_type=form)
Forward-Port-Of: odoo/odoo#155516
Forward-Port-Of: odoo/odoo#153944This update resolves a problem where new picking requests were incorrectly generated for repaired products without stock. The fix ensures that the system properly handles 'draft' moves during the repair process, preventing gaps in the repair sequence and maintaining accurate tracking. This improves the reliability of our repair operations.
Original PR description
For repaired products with no stock, a new picking is wrongly created, leading to a gap in the repair sequence. This because the move is created in 'draft' and the function does not take it into account. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#156476 Forward-Port-Of: odoo/odoo#156083
This update optimizes how spreadsheet filters are evaluated, reducing unnecessary calculations and improving report loading times. Specifically, the Timesheet report now loads faster due to a change in how filter evaluations are handled. While this doesn't address all filter evaluation issues, it represents a significant performance gain.
Original PR description
Steps to reproduce:
- create a relational filter, let's say on `res.company`
- add a default value
- reference the filter in a cell with `=ODOO.FILTER.VALUE("my filter")`
=> every `ODOO.FILTER.VALUE` triggers an evaluation
With this commit, the re-evaluation after the data is fetched uses the
data source mechanism which only re-evaluates when all the data promises
are resolved, instead of evaluating after every resolved promise.
With this commit, the number of evaluations required when loading the
Timesheet report on our prod goes from 5 evaluations to only 3 (each evaluation
is 2-3s) because `ODOO.FILTER.VALUE("Company")` is present two times.
One issue this commit doesn't fix: there one RPC per `ODOO.FILTER.VALUE`
(can be fixed in master very easily because we refactored data fetching)
Task: 3787125
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#156495A recent update to Odoo's frontend styling caused a visual inconsistency where search bar buttons lacked rounded corners. This update corrects this issue, ensuring that search bars and other input groups maintain a consistent and visually appealing design. This change improves the overall user experience for website editing.
Original PR description
Since the commit [1] introducing Bootstrap 5, buttons within input groups (e.g., "search bars") no longer have the same border-radius as the inputs. Steps to reproduce the bug: - In Website edit mode, drag and drop a "Search" snippet onto the page. - Click on the "Theme" tab. - Set the inputs "Border Radius" option to 25px. - Bug: The border-radius is not applied to the right side of the search bar. [1]: https://github.com/odoo/odoo/commit/9ea13513342b14e6b8d4e10e162b618a6ab2cce0 task-3662985 Forward-Port-Of: odoo/odoo#156499 Forward-Port-Of: odoo/odoo#154235
This update optimizes how Odoo routes incoming emails by adding an index to the `mail.alias` table. Previously, searching email aliases was slow due to inefficient database queries. This change dramatically speeds up email routing, particularly for high-volume email processing, leading to a more responsive system.
Original PR description
## Description Since https://github.com/odoo/odoo/pull/76734, the new field `alias_full_name` is used in addition to `alias_name` to search on `mail.alias` and route emails in `message_route`. It's…
## Description
Since https://github.com/odoo/odoo/pull/76734, the new field `alias_full_name` is used in addition to `alias_name` to search on `mail.alias` and route emails in `message_route`. It's also used as a search criteria in `_search_alias_email` on `mail.alias.mixin. optional`. The issue is that the table `mail.alias` can grow quite large, and only the old field `alias_name` has an index on it, which may not be selective enough, forcing Seq.Scans on the table with possibly millions of records. The impact is noticeable on `message_route` which is a hot path for processing incoming emails.
Adding an index on `alias_full_name` allows PostgreSQL to do an bitmap OR scan on the two indexes, considerably speeding up search criteria that are a disjunction between `alias_name` and `alias_full_name`.
## Benchmark
For domain
```python
[
'&',
('alias_model_id', '!=', reply_model_id),
'|',
('alias_full_name', 'in', email_to_list),
'&', ('alias_name', 'in', email_to_localparts), ('alias_incoming_local', '=', True),
]
```
with test arguments, on a `mail.alias` table containing over 2M records.
| | Before | After |
|-----------|--------|-------|
| Timing | 696ms | 1ms |
| Buffer IO | 790MB | 48KB |
Specially impactful as those gains needs to be multiplied by the frequency of the searches.
## Reference
task-3724844
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#156237This update prevents users from submitting multiple reviews for the same course. Previously, users could add multiple reviews even with multiple browser tabs open. This change ensures data integrity and a consistent user experience when leaving feedback on courses.
Original PR description
Once a user posts a review, they are able to edit this single review and not create any new ones. However if the user had multiple tabs open of the same course, then they can still access the "Add a review" functionality. This fix enforces the single review per user per course policy. Task-3721958 Forward-Port-Of: odoo/odoo#156411 Forward-Port-Of: odoo/odoo#153679
This update fixes a bug that caused Odoo to crash when attempting to retrieve information about channels that didn't exist. The fix ensures that Odoo gracefully handles missing channel data, improving stability and preventing unexpected errors. This resolves an issue reported as part of opw-3775992.
Original PR description
When the channel is not found it becomes deleted, then `thread.fetchChannelInfoDeferred` becomes undefined, and attempting to resolve/reject it leads to a crash. Part of opw-3775992
This update corrects a problem where the 'Journal' field was sometimes hidden on payment providers other than Wire Transfer. The change ensures the `payment_custom` module always loads after `account_payment`, guaranteeing consistent visibility of the 'Journal' field for all payment providers. This improves the user experience and data accuracy.
Original PR description
Both the `payment_custom` and the `account_payment` modules made changes to the visibility of the `payment_followup` group in the view of the `payment.provider` model. As these modules didn't depend on each other, the visibility of the group was determined based on the (random) loading order or the modules, causing the "Journal" field to be either visible or invisible on other providers than Wire Transfer. With this commit, a priority is set on `payment_custom`'s view to force it to always load after that of `account_payment`. Forward-Port-Of: odoo/odoo#156514
This update corrects a bug where the 'Open in new window' setting for website links wasn't consistently saved and reapplied when editing. Previously, the toggle would reset to off after saving. This change ensures the 'Open in new window' option persists correctly, improving the website builder's functionality.
Original PR description
Before this commit and most likely since commit [1], the "Open in new window" option of link would not persist through editions. Steps to reproduce: - Create a link in the website builder - Set its "Open in new window" property to true - Save, and see that it works as expected - Now enter edit mode again, the toggle will be off and not on as it should be since the `target="_blank"` was correctly added. For easy of debugging and understanding, you can just grep this line ```js this.initialNewWindow = this.initialNewWindow || this.linkEl.target === '_blank'; ``` [1]: https://github.com/odoo/odoo/commit/d7245d2abf528d093226c80e40975e63d61e8997# opw-3781477 Forward-Port-Of: odoo/odoo#156372
This update fixes a confusing issue where users could accidentally submit surveys by pressing the Enter key. Now, requiring Ctrl + Enter for submission ensures a clearer and more intentional process, reducing errors and improving the user experience. This change enhances survey completion rates and data accuracy.
Original PR description
Previously, In "one_page & page_per_section" survey, pressing Enter would submit the survey, leading to confusion and accidental submissions, as users might press Enter intending to navigate through questions. With this PR, Now, requiring "Ctrl + Enter" to submit, ensures clarity in survey submission, reducing the chance of accidental submission. task-3707763 Forward-Port-Of: odoo/odoo#152850