Wednesday, February 26, 2025
15 changes · saas-17.4
Resolved issues and error corrections
This fixes an automated test for the restaurant point of sale tip screen that was failing because order synchronization happened twice too quickly. The change removes unnecessary test steps so payment validation and the tip screen check run reliably, helping keep release validation stable.
Original PR description
- Fix for following runbot error : https://runbot.odoo.com/odoo/runbot.build.error/111599 - Remove useless steps in `tip_screen_tour` so that it run successfully. The tour was always failing except when adding `step_delay`. - The step `TipScreen.isShown()` was failing. This was due because the previous step (validate payment) was not doing anything. This was caused by the fact that the order was syncing two times (syncAllOrders) with too short a time interval, causing the second call to `syncAllOrders` filtering out our order (see `syncingOrders` set in `syncAllOrders` method). - The first call to `syncAllOrders` was triggered by going back to the floorscreen, and I've removed it so now the validate payment and next steps are correctly executed. runbot error: 111599 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Miscellaneous changes
CUP and CIG fields for the Italian Localization are available in account moves and are used when the buyer is a Public Administration or utilizes public funds for payment. However, in some cases, these fields are already necessary in the Sales Order. Therefore, this commit adds the CUP and CIG fields to eligible Sales Orders and automatically adds said fields to the Invoice generated from the SO. The fields Origin Document Type, Origin Document Name, Origin Document Date are also added to
Original PR description
CUP and CIG fields for the Italian Localization are available in account moves and are used when the buyer is a Public Administration or utilizes public funds for payment. However, in some cases, these fields are already necessary in the Sales Order. Therefore, this commit adds the CUP and CIG fields to eligible Sales Orders and automatically adds said fields to the Invoice generated from the SO. The fields Origin Document Type, Origin Document Name, Origin Document Date are also added to the Sales Order. If the fields are filled, then the values are passed to the invoice. If the fields are empty, then the Origin Document fields in the invoice are filled with information about the SO which originated it. Task [link](https://www.odoo.com/odoo/project/967/tasks/4290997) task-4290997 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#197267
Backport a part of 40da85aab905fd4accf8c01887e62b07537ccd2f. Make some of the ORM methods private for the sake of correctness and to prevent people from using incorrect RPC calls. We are targeting methods that return recordsets that are not returned in the correct format in RPC. This commit doesn't strictly follow our stable policy, but it's unlikely to break anything. Small change to the original version: we are not directly modifying odoo.api.call_kw(), as it is used by _eval_xml() and w
Original PR description
Backport a part of 40da85aab905fd4accf8c01887e62b07537ccd2f. Make some of the ORM methods private for the sake of correctness and to prevent people from using incorrect RPC calls. We are targeting…
Backport a part of 40da85aab905fd4accf8c01887e62b07537ccd2f. Make some of the ORM methods private for the sake of correctness and to prevent people from using incorrect RPC calls. We are targeting methods that return recordsets that are not returned in the correct format in RPC. This commit doesn't strictly follow our stable policy, but it's unlikely to break anything. Small change to the original version: we are not directly modifying odoo.api.call_kw(), as it is used by _eval_xml() and we don't want to change that in stable (or we need to backport part of https://github.com/odoo/odoo/pull/182709). #### Original commit message Explicitly prevent calling non-public ORM methods via RPC, without breaking the API The ORM contains a series of API methods found on Models and recordsets, next to the main CRUD methods. Those utility methods are very commonly used in server-side business logic code, and were historically named without the usual underscore prefix that should mark them as private (e.g. `_private_method()` vs `public_method()`). Examples: - the `browse()` method returns a recordset from a list of IDs, which is really just a proxy object prepared for other recordset operations ; - the `fetch()` and `search_fetch()` methods populate the transactional in-memory cache for a set of fields and record ; - and many more... The lack of prefix makes writing business logic code a bit simpler, but causes confusion because these methods look like they are public. Of course, calling such internal methods over RPC doesn't make sense, and may crash or cause unexpected results. This commit marks those internal methods and prevents calling them over RPC. This is preferred over renaming them with an underscore prefix, as that would break a lot of existing code without a good reason. All business logic code must still follow the best-practicce convention of prefixing non-public method with underscores, by default and by design, to avoid mixing different conventions. The `@api.private` decorator is reserved for exceptions for ORM methods. task-4505030 https://github.com/odoo/enterprise/pull/79382 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#198998 Forward-Port-Of: odoo/odoo#197783
**Problem**: When focusing on an empty button (`<a>` tag with `btn` class) and pressing backspace, any visible content before it gets deleted. This happens because buttons are not considered as visible content when handling deletions. **Solution**: Modify `oDeleteBackward` to detect elements with the `btn` class. When deleting such an element, update the selection to avoid deleting preceding content. **Steps to Reproduce**: 1. Open the website builder. 2. Add some content with a button
Original PR description
**Problem**: When focusing on an empty button (`<a>` tag with `btn` class) and pressing backspace, any visible content before it gets deleted. This happens because buttons are not considered as visible content when handling deletions. **Solution**: Modify `oDeleteBackward` to detect elements with the `btn` class. When deleting such an element, update the selection to avoid deleting preceding content. **Steps to Reproduce**: 1. Open the website builder. 2. Add some content with a button. 3. Insert a form just before the button. 4. Press backspace while focusing on the button. 5. The form gets deleted along with the button. opw-4280705 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#198298 Forward-Port-Of: odoo/odoo#196781
**Steps to reproduce:** - Create a normal POS restaurant and a Kiosk - Create a Preparation Display with both POS restaurant and Kiosk - Open a POS restaurant session, a Kiosk session and the preparation display - Create an order with the Kiosk - Check the order number on the preparation display - From the POS restaurant, check all the orders **Issue:** The order number of the POS order coming from the Kiosk has a totally different than the original one displayed on the preparation dis
Original PR description
**Steps to reproduce:** - Create a normal POS restaurant and a Kiosk - Create a Preparation Display with both POS restaurant and Kiosk - Open a POS restaurant session, a Kiosk session and the preparation display - Create an order with the Kiosk - Check the order number on the preparation display - From the POS restaurant, check all the orders **Issue:** The order number of the POS order coming from the Kiosk has a totally different than the original one displayed on the preparation display. **Cause:** The front-end is always recomputing the tracking number from the current session, instead of using the value computed in the backend. opw-4438678 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#199280
Issue: ------ Case: User Settings menu is basically used to handle created users but when clicking on the `New` button within the User Settings the form view corresponding to that model i.e; `res.users.settings` will be opened which is an inappropriate behavior. Whenever a User is created that user will be reflected within that menu. There's no meaning of having `New` button when no user is created to handle. Solution: ----------- Some users do not have a user settings yet, so it is a p
Original PR description
Issue: ------ Case: User Settings menu is basically used to handle created users but when clicking on the `New` button within the User Settings the form view corresponding to that model i.e;…
Issue: ------ Case: User Settings menu is basically used to handle created users but when clicking on the `New` button within the User Settings the form view corresponding to that model i.e; `res.users.settings` will be opened which is an inappropriate behavior. Whenever a User is created that user will be reflected within that menu. There's no meaning of having `New` button when no user is created to handle. Solution: ----------- Some users do not have a user settings yet, so it is a perfectly valid use case to create one. We should not artificially prevent acceptable behavior in technical/admin menus. Steps to reproduce: ------------------------ 1. Create a database in version 16.0. 2. Go to `User Settings`. 3. Click On `New` button. Try making changes and save. 4. An Invalid Field `User` error will Occur. This is because there's a many2One field i.e; `user_id` within the tree and form views which is basically an existing user. The `New` button will open a form view with no User which is a must. And will cause the Invalid field error when trying to save any change. Ref: https://github.com/odoo/odoo/blob/16.0/addons/mail/views/res_users_settings_views.xml#L24 Ref Screenshot:  Co-Authored By - @seb-odoo Forward-Port-Of: odoo/odoo#196844 Forward-Port-Of: odoo/odoo#193400
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#197001
Original PR description
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#197001
Steps to reproduce: - Add an snippet. - Click the "show/hide on desktop" button of visibility option. - Click on the little eye on the "hidden elements" section to have it displayed again. - Go to mobile preview mode. - Come back to desktop view by toggling off mobile preview button. - An empty overlay appears on the left of the screen. With dimensions similar to snippet in mobile view. After this commit: Empty overlays no longer appear when switching between preview modes. task-32
Original PR description
Steps to reproduce: - Add an snippet. - Click the "show/hide on desktop" button of visibility option. - Click on the little eye on the "hidden elements" section to have it displayed again. - Go to mobile preview mode. - Come back to desktop view by toggling off mobile preview button. - An empty overlay appears on the left of the screen. With dimensions similar to snippet in mobile view. After this commit: Empty overlays no longer appear when switching between preview modes. task-3270034 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#197998 Forward-Port-Of: odoo/odoo#173328
Starting from January 6th, 2025, USPS _silently_ migrated to a new developer portal (devloper`s`.usps.com instead of developer.usps.com). See: https://developer.usps.com/getting-started. The new portal also introduces new base URL for their endpoints (See: https://developers.usps.com/sites/default/files/2024-10/USPS%20API%20Cloud%20Enrollment.pdf). Users who registered after this date didn't manage to use Odoo shipping connector for USPS since it used the old endpoints. This commit updat
Original PR description
Starting from January 6th, 2025, USPS _silently_ migrated to a new developer portal (devloper`s`.usps.com instead of developer.usps.com). See: https://developer.usps.com/getting-started. The new portal also introduces new base URL for their endpoints (See: https://developers.usps.com/sites/default/files/2024-10/USPS%20API%20Cloud%20Enrollment.pdf). Users who registered after this date didn't manage to use Odoo shipping connector for USPS since it used the old endpoints. This commit updates the used endpoints so that it's compatible with the new portal. opw-4576028 Forward-Port-Of: odoo/enterprise#80152
`odoo.models.check_method_name` is softly deprecated, replace usages by the new method. task-4505030 https://github.com/odoo/odoo/pull/197783 Forward-Port-Of: odoo/enterprise#80035 Forward-Port-Of: odoo/enterprise#79382
Original PR description
`odoo.models.check_method_name` is softly deprecated, replace usages by the new method. task-4505030 https://github.com/odoo/odoo/pull/197783 Forward-Port-Of: odoo/enterprise#80035 Forward-Port-Of: odoo/enterprise#79382
**To reproduce:** 1. Create two branches within a company. 2. Set a bank account linked to the journal defined in the parent company 3. Create one payment, such as a SEPA payment or check, to be batched later, in each branch. 4. Selecting both branches and the parent company, create a batch payment with both payments. 5. The error "All payments in the batch must belong to the same company." is raised. **Desired behavior:** The payments in different companies that are branches of a commo
Original PR description
**To reproduce:** 1. Create two branches within a company. 2. Set a bank account linked to the journal defined in the parent company 3. Create one payment, such as a SEPA payment or check, to be…
**To reproduce:** 1. Create two branches within a company. 2. Set a bank account linked to the journal defined in the parent company 3. Create one payment, such as a SEPA payment or check, to be batched later, in each branch. 4. Selecting both branches and the parent company, create a batch payment with both payments. 5. The error "All payments in the batch must belong to the same company." is raised. **Desired behavior:** The payments in different companies that are branches of a common head office should not trigger the error. They should be allowed to be batched. **Cause:** The function `_check_payments_constrains()` in account_batch_payments raises an error if more than one company_id is present in the payments being batched. **Solution:** Change the check in `_check_payments_constrains()` to raise an error only if more than one root_id for the companies in the payments is present. This way, payments from several companies, branches of the same head office, can be batched. Payments from companies that do not share the same root_id, however, still raise an error when attempting to batch them. task-4568317 Forward-Port-Of: odoo/enterprise#79359
**To replicate:** 1. Install a localization reports module (e.g. l10n_lu_reports) 2. Create two branches for the company in the localization: one with a different VAT, and another without VAT (it takes the same VAT as the closest parent with VAT) 3. In Accounting > Reporting > Tax Report 4. Select only the company with a different VAT. The button to export an XML is not enabled. 5. Select the parent company and the company without VAT. The button to export an XML is not enabled. **Issue:
Original PR description
**To replicate:** 1. Install a localization reports module (e.g. l10n_lu_reports) 2. Create two branches for the company in the localization: one with a different VAT, and another without VAT (it…
**To replicate:** 1. Install a localization reports module (e.g. l10n_lu_reports) 2. Create two branches for the company in the localization: one with a different VAT, and another without VAT (it takes the same VAT as the closest parent with VAT) 3. In Accounting > Reporting > Tax Report 4. Select only the company with a different VAT. The button to export an XML is not enabled. 5. Select the parent company and the company without VAT. The button to export an XML is not enabled. **Issue:** In some Tax Reports and EC Sales Reports with branch companies, the additional buttons are not enabled properly, even when all companies with the same VAT are selected. **Expected behavior:** If all branches with the same VAT are selected, export buttons should be available. **Cause of the problem:** In the tax report handler and EC sales report handler, `_custom_options_initializer()` calls the function `_enable_export_buttons_for_common_vat_groups_in_branches()`, which should enable the buttons if branches with the same VAT are selected. When extending `_custom_options_initializer()`, the call to super happens before extra buttons are added. These additional buttons are not included in the call to `_enable_export_buttons_for_common_vat_groups_in_branches()`. **Fix:** Instead of calling the function in _custom_options_initializer, add an option key to check and enable export buttons. This check is now done in `get_options()`, using the same logic previously applied in `_enable_export_buttons_for_common_vat_groups_in_branches`. As `get_options()` is called after the custom options initializer, all buttons are enabled if all branches with the same VAT are selected. task-4061157 Forward-Port-Of: odoo/enterprise#79227
…emplate context if mail_notification_light is customized Steps to reproduce : ---- - customize mail_notification_light template with a field from record (with Studio or with inherited template) - confirm a Hr Appraisal or send a Hr Appraisal Survey Error before this commit : ---- - RPC error odoo.addons.base.models.ir_qweb.QWebException: Error while render the template KeyError: 'record' Template: mail.mail_notification_light Explanation : ---- We add the record in the template
Original PR description
…emplate context if mail_notification_light is customized Steps to reproduce : ---- - customize mail_notification_light template with a field from record (with Studio or with inherited template) - confirm a Hr Appraisal or send a Hr Appraisal Survey Error before this commit : ---- - RPC error odoo.addons.base.models.ir_qweb.QWebException: Error while render the template KeyError: 'record' Template: mail.mail_notification_light Explanation : ---- We add the record in the template context, therefore any field from the record can be called Forward-Port-Of: odoo/enterprise#74943
The unfolded_lines option was not updated when a line was expanded using the expand function, if the expanded lines contained already unfolded child lines. This commit updates the unfolded_lines option correctly. Backport of ca1cf04f0410966981a341f569114511ae5a50fd Forward-Port-Of: odoo/enterprise#79859
Original PR description
The unfolded_lines option was not updated when a line was expanded using the expand function, if the expanded lines contained already unfolded child lines. This commit updates the unfolded_lines option correctly. Backport of ca1cf04f0410966981a341f569114511ae5a50fd Forward-Port-Of: odoo/enterprise#79859
…2025 Forward-Port-Of: odoo/enterprise#80030
Original PR description
…2025 Forward-Port-Of: odoo/enterprise#80030