Wednesday, April 3, 2024
23 changes · 17.0
Enhancements to existing features
This update improves how subscription payment links are processed by ensuring payment tokens are only created when the payment amount meets or exceeds the subscription's recurring amount. This prevents invalid payment processing and ensures customers are charged the correct amount for their subscriptions.
Original PR description
opw-3736162 **UPDATE**: this PR caused regressions, follow-up here: https://github.com/odoo/enterprise/pull/61025
This update enhances the online checkout process by converting the order summary into a collapsible dropdown (similar to the mobile experience), removing unnecessary labels, and making the payment button always visible by keeping the order summary sticky. These changes create a cleaner, more intuitive checkout flow that reduces clutter and improves accessibility to the payment action.
Original PR description
- replace order summary by a dropdown like mobile view - remove 'Pay With' title - match 'Choose delivery method' style with 'Choose payment method' - make order summary sticky so that 'Pay now' is always accessible task-3741412 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The color picker tool now works more smoothly when entering hex color codes. Users can type color values without the "#" symbol and it will be added automatically, and the color preview updates instantly as they type. Additionally, the color picker no longer closes unexpectedly when clicking in the input area, making it easier to enter and confirm color selections.
Original PR description
**[IMP] web_editor: prevent the colorpicker from closing on inner click** Before this commit, clicking in the area below the "Hex color" input would close the color picker. This was annoying when entering a value in the "Hex color" input and then clicking below to confirm it. After this commit, the color picker no longer closes when clicking on its background. task-3747408 ----------------------- **[IMP] web: update the colorpicker on hex color input's input event** This commit improves the UX of the color picker's hex input in two ways: If the user enters a hex color without the "#" symbol, it's automatically added. As soon as a valid hexadecimal color is entered in the input, the colorpicker updates, and the color is applied to the target element. task-3747408
This update improves how Odoo handles journal imports from French FEC files by adding a context option to skip automatic mail alias creation. This prevents errors that occur when multiple journals with the same name but different codes are imported, as each would attempt to create a mail alias with the same name. The change ensures smoother data imports without duplicate alias conflicts.
Original PR description
This is done together with an enterprise commit in order to avoid creating mail alias automatically on journals imported via FEC files, in France. Indeed, such files could contain journals with different codes but same name, each of which would try creating an alias with the same name, raising an error. OPW 3813584 Forward-Port-Of: odoo/odoo#160037 Forward-Port-Of: odoo/odoo#159455
This update improves the automated testing system by providing more detailed information when errors are detected during tests. Instead of just reporting that an error occurred, the system now logs the actual error message and related technical details, making it easier for developers to diagnose and fix issues.
Original PR description
Before this commit, when the clickbot detected an error dialog, it stopped the test and throw an error saying that an error dialog was detected. This information is not enough to check why, and how, the error dialog was produced. Now, we also log the content of the error dialog as well as all the information of the last rpc that was in error. closes odoo/odoo#160103 X-original-commit: 4f26b324a30c5120ea60b6b42fef6cd6000d2859
This update adds the ability to set a maximum number of files that can be uploaded in many-to-many binary fields. This improvement addresses cases where users may have incorrectly used a many-to-many relationship when a simpler structure would be more appropriate, providing better control over file uploads in the WhatsApp integration and other features.
Original PR description
[IMP] web: allow to give a maximum of file to upload in m2m binary People may have used a m2m where we don't really want a m2m relationship. Task-3605612 (WhatsApp: Fix header / upload / reporting usage) Forward-Port-Of: odoo/odoo#159973 Forward-Port-Of: odoo/odoo#157576
This update aligns how portal controllers handle parameters with the backend system controllers. Specifically, the portal_chatter_post and attachment_add functions are being updated to match backend behavior. This is a preparatory change to eventually replace the portal chat feature with the backend chat feature, reducing code duplication and maintenance effort.
Original PR description
This change is a preparation to sync parameters in portal controllers with the backend ones (`portal_chatter_post`, `attachment_add`) in order to reduce the diff in replacing portal chatter with backend chatter. Related to task-2828744
Resolved issues and error corrections
Fixed an issue where the "Create Invoice" button was not appearing when selecting tasks in the Field Service module. The problem was caused by an incorrect context key that was being automatically removed by the system. The fix uses the correct context key to ensure the button displays properly when users select tasks to invoice.
Original PR description
### Steps to reproduce issue: 1. Go to _Field Service > All Tasks > To Invoice_ - If no task is shown, remove To Invoice filter 3. Click on the checkbox of a task 4. The button Create Invoice should appear next to the Print and Actions buttons but it does not ### Explanation: The context key used to show the element contains a `search_default` prefix. Keys with this prefix are specifically used to create a search filter and are deleted in the process. https://github.com/odoo/odoo/blob/71c81e605b2f06889ad8031f021863638edab268/addons/web/static/src/search/search_model.js#L291-L300 ### Suggested fix: No existing key in the context is specific to the action nor is their value. Adding a new specific context key prevents unintended behaviours. opw-3773005
This fix corrects how shipping rates are selected from Sendcloud. Previously, the system was comparing prices as text rather than numbers, causing it to sometimes choose more expensive shipping options (e.g., selecting $11.00 instead of $9.00). The fix ensures prices are properly converted to numbers before comparison, so customers always get the lowest available shipping rate.
Original PR description
Before this commit, the lowest shipping rate was used as the delivery cost, as in: https://github.com/odoo/enterprise/blob/8c40ba77b23c4ccd24c3785bc1e6cf5b3fbe0e51/delivery_sendcloud/models/sendcloud_service.py#L91 However, the prices received from the Sendcloud are strings, and as a result, this line returned the rate with the lowest lexicographical order. As a result, sometimes the rates with a higher value were chosen. The issue happens when a shipping product costs a single digit amount (e.g. `9.00`) but a second product costs in double digits (e.g. `11.00`). In this case the latter is used which is wrong. This commit, converts the prices to float before comparing them to get the actual best price. opw-3815117
This update fixes a system crash that occurred when UPS shipping alerts lacked a description field. The system now properly handles alerts from UPS regardless of whether they include descriptions, ensuring smooth delivery processing without interruptions.
Original PR description
It happens that the alerts message returns by UPS doesn't contains a descirption. In that case the dictionary has no key and traceback. Only returns alerts with description Forward-Port-Of: odoo/enterprise#59606
This fix corrects an issue where custom field labels in worksheets were not displaying correctly for portal users. When a worksheet field had a custom label (like "Proute" for an ID field), portal users would see the default field name instead. The fix ensures that custom labels are properly used when available, improving the consistency of the worksheet experience across all users.
Original PR description
Steps: In the default worksheet template, add the field "ID" and change its label as "Proute". Go to a helpdesk ticket, and create a worksheet. See that the label is "Proute". Now share it with a portal user. Log in as that user, and go on the ticket. Issue: The label of the worksheet's field is "ID". Cause: The back-end template uses `<field name="id" string="Proute">`. It is then translated to a qweb as `<div string="Proute">ID</div>` because it sets the name of the field as the description. Fix: Set the string of the tag if any, or else the name of the field. task-3479545 Forward-Port-Of: odoo/enterprise#47803
This update adds database indexes to speed up the deletion of partner records. Previously, deleting a partner required the system to scan entire tables to find and update related records, which could take a long time. With these new indexes, the system can now quickly locate the relevant records, making partner deletion significantly faster and more efficient.
Original PR description
Deleting a partner may take a long time because odoo has to check an entire table to find few records or no records at all that reference the partner and set it to null. So we are adding an index btree not null to speed up the deletion of partners. TASK-ID: 3759406
Fixed an issue where importing FEC files with journals having the same name but different codes would cause errors when trying to create duplicate mail aliases. The system now prevents automatic mail alias creation during FEC imports, allowing users to add them manually later if needed.
Original PR description
It is possible that a FEC file contains journals with different codes but same name. In such case, each of these would try to create a distinct mail alias with the same name ; this is not allowed and raised an error. We now prevent that by not generating any mail alias by default on journals imported via FEC. They can still be added later on by the user if he wishes to do so. OPW 3813584 Forward-Port-Of: odoo/enterprise#59859 Forward-Port-Of: odoo/enterprise#59527
This fix resolves a problem that occurs when the IoT application is uninstalled from a Point of Sale system. Previously, an internal flag was not being reset during uninstall, which caused errors when trying to install other modules afterward. The fix ensures the flag is properly cleared when IoT is removed, preventing installation failures in related modules.
Original PR description
In `pos_enterprise` we alias `is_posbox` as `module_pos_iot`. If the value is True we install the module `pos_iot` when a write in pos.config model happens:…
In `pos_enterprise` we alias `is_posbox` as `module_pos_iot`. If the value is True we install the module `pos_iot` when a write in pos.config model happens:
https://github.com/odoo/odoo/blob/f7ee5633a8c80afca05074b8574e9c2a720e4bc9/addons/point_of_sale/models/pos_config.py#L496
Steps to reproduce:
1. Install PoS and IoT applications -- will install `pos_enterprise` module.
2. Set is_posbox = True, via the PoS settings.
3. Uninstall IoT application -- will uninstall `iot` and `pos_iot` modules.
4. Try to install a module that writes in a column of the pos_config with is_posbox=True
We get an error like:
```
...
File "/home/odoo/src/odoo/17.0/odoo/addons/base/models/ir_module.py", line 569, in _button_immediate_function
raise UserError(_('The method _button_immediate_install cannot be called on init or non loaded registries. Please use button_install instead.'))
odoo.exceptions.UserError: El método _button_immediate_install no puede ser llamado en registros init o no cargados. Por favor, utilice button_install en su luga
```
The issue is that when we uninstall `iot` module the flag is never reset. This then causes issues if we try to install a module that writes on any value of `pos.config`. Observed during upgrades, e.g `l10n_es_pos` at xml load of data files. Other modules also affected.
The solution we propose here is to introduce a _soft_ dependency between pos_iot -- which is an enterprise module -- and pos_enterprise. The former checks at uninstall if the latter is installed to clear the `is_posbox` flag.
Forward-Port-Of: odoo/enterprise#59810Read-only accounting users were unable to access the Accounting App Dashboard due to missing permissions for bank connection records. This fix grants read-only access to bank connection and account records for users with read-only accounting privileges, allowing them to view banking information without being able to modify it.
Original PR description
In the system parameters, switch account_online_synchronization.proxy_mode to sandbox
Add a bank with plaid for example and follow the different steps
Have a user [DEMO] with Accounting access set to 'Read-only'
Log in with [DEMO]
Try to access the Accounting App Dashboard
Issue:
Access Error
"""
You are not allowed to access 'Bank Connection' (account.online.link) records.
This operation is allowed for the following groups:
- Accounting/Accountant
- Accounting/Bookkeeper
Contact your administrator to request access if necessary.
"""
This occurs because the read access to the account.online.link
and account.online.account records is granted only to users having at
least the account.group_account_user group
But, as those accesses are defined to be read only, it should be
greanted also to account.group_account_readonly users
opw-3821540This update fixes an issue where users would see duplicate error messages when a website page fails to save. Previously, when an error occurred during saving, both a popup notification and an error dialog would appear, creating confusion. The fix ensures users only see one clear error message displayed as a popup on the edited content block.
Original PR description
If an error happens when a website page is being saved, the error message is displayed as a popup on the edited block. Unfortunately, an error dialog is also displayed. This commit prevents that dialog from being displayed when the error is already shown to the user. task-3599890 Forward-Port-Of: odoo/odoo#154050
This fix resolves an issue where changing text color on buttons in the website editor would cause an error. The problem occurred because the system was incorrectly handling the undo/redo history when color changes were applied. The fix ensures that color changes are properly saved and can be undone without errors.
Original PR description
Steps to reproduce the issue: ============================= - Go to website and open editor - Click on the 'Contact Us' button - Change the color of the text - error Origin of the issue: ==================== `HistoryReverCurrentStep` will call `observerFlush` which will mark `_toRollback = true` and in `_observeOdooFieldChanges` we will update the html with `withoutRollback` but this only works only if `_toRollback` is `false`. Solution: ========= We need to rever the step without rollback too. task-3770287
This fix corrects a display issue in spreadsheets where aggregated values that equal zero (such as 9000 + -9000) were incorrectly shown as empty cells instead of displaying "0". Users will now see the correct zero value in their spreadsheet calculations, ensuring accurate data representation.
Original PR description
When the aggregated value is 0 (9000 + -9000 = 0), it displays an empty cell in spreadsheet, instead of zero. Task: 3827502 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fix resolves an issue where customers couldn't use gift cards or eWallets when they had less than 1 point remaining. The system was incorrectly preventing redemption of these small balances. Now customers can use their remaining gift card balance regardless of the amount.
Original PR description
If user had less than 1 point, which is equivalent to 1 quantity of set currency, on gift card and eWallet, they could not use it due to not enough point on Gift Card and eWallet for claiming reward. opw-3667934 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#155161
This fix ensures that when creating invoices from Point of Sale transactions, the system now uses the customer's designated invoice address, just like the Sales app does. Previously, invoices were created with the main customer address instead of the specific invoice address, causing inconsistency between the two apps.
Original PR description
Currently, when generating the invoice from the PoS shop, the invoicing address of the partner is not used. This differs from the invoice created using the sale app which uses the invoice address.…
Currently, when generating the invoice from the PoS shop, the invoicing address of the partner is not used. This differs from the invoice created using the sale app which uses the invoice address. Steps to reproduce: ------------------- * Go to the **Contacts** app * Select any contact (ex: Azure Interior) * Under **Contacts & Addresses** select Add * Select **Invoice Address** * Write the address then **Save & Close** * Go to the **Point of Sale** app * Add items * For customer, select the contact we just modified * Select **Payment** * Select any payment method * Select **Invoice** * Validate > Observation: The invoice address is not used Why the fix: ------------ We observe a discrepancy between the sale and pos output for the same workflow. * Sale * Sale order form: `Customer` -> Azure interior (Has a field for invoice address) * Account move form: `Customer` -> Azure interior, Az inv (Use the invoice address) * PoS * PoS order form: `Customer` -> Azure interior (Does not have a field for invoice address) * Account move form: `Customer` -> Azure interior In stable we can't add the invoice address on the PoS order form but we can still stay consistent with the sale workflow in terms of account move. In the sale workflow, the move is created with `invoice_vals_list` https://github.com/odoo/odoo/blob/d6973d3cd5ee48539b40f94b8444f5522a080438/addons/sale/models/sale_order.py#L1207 Having a look at `invoice_vals_list`, we can see that the customer_id is set using the invoice contact address. https://github.com/odoo/odoo/blob/d6973d3cd5ee48539b40f94b8444f5522a080438/addons/sale/models/sale_order.py#L1004 With `partner_invoice_id` computed as follows: https://github.com/odoo/odoo/blob/d6973d3cd5ee48539b40f94b8444f5522a080438/addons/sale/models/sale_order.py#L340-L342 Thus, we also send the invoicing contact address as partner_id when creating the move in pos; opw-3797434 Forward-Port-Of: odoo/odoo#159856 Forward-Port-Of: odoo/odoo#159172
This fix addresses an issue where translation data fails to load correctly when item names contain dots. The system was splitting these names into too many parts instead of the expected two parts (module and name), causing database save failures. The fix ensures names are split into exactly two parts, allowing translations to load properly regardless of dots in the name field.
Original PR description
In `ir.model.data` model, there is no SQL constraint which is ensuring that the `name` field can not contain `.` (dot) So when loading the translations to database if the xmlid's `name` contains dot then `xmlid.split('.')` will split it more than 2 parts. Which will cause issue during saving it to database as it is expecting[^1] 2 parts `[<module>, <name>]`. I ensured the splitting to 2 parts with `maxsplit=1`
Description of the issue/feature this PR addresses:
Current behavior before PR:
It is splitting xmlids as many as possible parts.
Desired behavior after PR is merged:
It will split xmlid to the 2 parts `[module, name]`
[^1]: https://github.com/odoo/odoo/blob/16.0/odoo/tools/translate.py#L1326
and
https://github.com/odoo/odoo/blob/16.0/odoo/tools/translate.py#L1390
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#160098This update adds database indexes to speed up the deletion of partner records. Previously, deleting a partner required the system to scan entire tables to find related records, which could take a long time. With these optimizations, partner deletions will now complete much faster, improving overall system performance.
Original PR description
Deleting a partner may take a long time because odoo has to check an entire table to find few records or no records at all that reference the partner and set it to null. So we are adding an index btree not null to speed up the deletion of partners. TASK-ID: 3759406 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 corrects the account type classification for Spanish equity accounts (accounts 10x through 13x) to properly reflect them as 'equity' type accounts. This ensures these accounts are correctly displayed under the Equity section of the Balance Sheet, improving financial reporting accuracy for Spanish companies using Odoo.
Original PR description
Accounts 10x -> 13x should be of 'equity' type. (In the Balance Sheet, they are referenced under the Equity section.) Enterprise PR: https://github.com/odoo/enterprise/pull/57117 opw-3743637 Forward-Port-Of: odoo/odoo#160161 Forward-Port-Of: odoo/odoo#154859