Tuesday, January 21, 2025
28 changes · saas-17.4
Enhancements to existing features
Restaurant appointment sessions now make sure their live connection is active when a session connects or finishes initializing. This helps prevent missed updates in Odoo when users have the system open in multiple browser tabs.
Original PR description
This commit ensures that the websocket connection is established when receiving a connect or initialized event. This can happen in multitab use of Odoo.
Resolved issues and error corrections
The Time Off action menu no longer shows the “Multiple Requests” option twice when viewing an allocation or leave form. This reduces confusion for users and keeps the form action menu clean and consistent.
Original PR description
Steps to reproduce: --- Go in the Time Off app Click on an allocation or a leave Click on the action gear Issue: --- The gear action shows 2 times the "Multiple Requests", this comes from the fact that the wizard is in the xml and defined in the action_generate_allocations. So it is displayed twice in the form. Fix: --- Since the issue is only appearing in the form view, added the condition on viewType. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Miscellaneous changes
Since chrome 132, the shape of error events for the `ResizeObserver loop completed with undelivered notifications.` error changed: the `error` key is now set in the event (its value is this specific message, i.e. a string, not an Error instance). As a consequence, those errors are no longer swallowed as they're expected to be, and are thus wrongly identified as CORS errors. Those errors are shown to the user in debug mode. This happens for instance in the ir.ui.view form view, which contains
Original PR description
Since chrome 132, the shape of error events for the `ResizeObserver loop completed with undelivered notifications.` error changed: the `error` key is now set in the event (its value is this specific…
Since chrome 132, the shape of error events for the `ResizeObserver loop completed with undelivered notifications.` error changed: the `error` key is now set in the event (its value is this specific message, i.e. a string, not an Error instance). As a consequence, those errors are no longer swallowed as they're expected to be, and are thus wrongly identified as CORS errors. Those errors are shown to the user in debug mode. This happens for instance in the ir.ui.view form view, which contains an AceEditor field. His CodeEditor component listens on the `resize` event to redrawn itself, which causes this error. This also happens with the website builder, which does not involve the CodeEditor. It probably happens at other places as well. We thus need a global solution, like we had before. This commit thus fixes the condition in the error service to keep swallowing that error. opw-4500350 opw-4496862 opw-4496782 opw-4495448 opw-4493209 opw-4495309 opw-4472997 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#194483
The Time Off overview search now correctly finds records by name. This fixes a broken search experience caused by the name field being calculated rather than stored, helping users locate leave entries more reliably.
Original PR description
Steps to reproduce: - Go in time off app -> overview - Search on name Issue: When searching on name, the search does not work. This is due to the name being computed and not stored. Directly related to the [recent changes](https://github.com/odoo/odoo/commit/7a65a1b6ac34f214) Fix The field has now a search method on the different component of the name separetly. opw-4351362 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fixes how employee payroll fields are assigned to access groups in the Bangladesh payroll module. It prevents build errors and ensures the fields are available to the right user profiles without affecting day-to-day payroll behavior.
Original PR description
We need to give fields in the module right group, otherwise we'll get error as these fields won't be avaliable for public profiles. [link to broken build errors](https://runbot.odoo.com/odoo/action-573/70494)
# Description The 'See Records' icon was missing when attempting to open `AccountMoveLines` records from the context menu in the spreadsheet. Task: 0 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#194464
Original PR description
# Description The 'See Records' icon was missing when attempting to open `AccountMoveLines` records from the context menu in the spreadsheet. Task: 0 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#194464
Refund order in spain require a refund reason. Steps to reproduce: ------------------- * Install l10n_es_pos_tbai module * Open PoS * Make an order and try to refund it > Observation: You get an error message saying that you need to add a refund reason opw-4282586 Forward-Port-Of: odoo/odoo#191503 Forward-Port-Of: odoo/odoo#191205
Original PR description
Refund order in spain require a refund reason. Steps to reproduce: ------------------- * Install l10n_es_pos_tbai module * Open PoS * Make an order and try to refund it > Observation: You get an error message saying that you need to add a refund reason opw-4282586 Forward-Port-Of: odoo/odoo#191503 Forward-Port-Of: odoo/odoo#191205
Fixes an issue on the partner view where a compute would try to read the proxy user, while not all users who can read the partner would have read access to the proxy user. Also fix a similar case in the action used to validate the ID, which tries to read the proxy user. error-105104 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#194459
Original PR description
Fixes an issue on the partner view where a compute would try to read the proxy user, while not all users who can read the partner would have read access to the proxy user. Also fix a similar case in the action used to validate the ID, which tries to read the proxy user. error-105104 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#194459
Before this commit, the base.automation form view displays the filter_domain field when on_change trigger type is selected but the code does not take into account the filter_domain value for this type of trigger. After this commit, this field is simply hidden in that case. Task: opw-4492554 Forward-Port-Of: odoo/odoo#194424 Forward-Port-Of: odoo/odoo#194158
Original PR description
Before this commit, the base.automation form view displays the filter_domain field when on_change trigger type is selected but the code does not take into account the filter_domain value for this type of trigger. After this commit, this field is simply hidden in that case. Task: opw-4492554 Forward-Port-Of: odoo/odoo#194424 Forward-Port-Of: odoo/odoo#194158
Before this commit, the module_loader was showing error by empty the DOM and then adding his element with the errors. The issue is, if you have an error because of custom script or after an upgrade, then you were lockout because the DOM with empty and you cannot go fix the script. After this commit, a shorter message will be shown in the bottom-left of the screen. This message will invite the user to check the devtool to have more details about the error. --- I confirm I have signed the
Original PR description
Before this commit, the module_loader was showing error by empty the DOM and then adding his element with the errors. The issue is, if you have an error because of custom script or after an upgrade, then you were lockout because the DOM with empty and you cannot go fix the script. After this commit, a shorter message will be shown in the bottom-left of the screen. This message will invite the user to check the devtool to have more details about the error. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#194342 Forward-Port-Of: odoo/odoo#193912
When creating a new working schedule, the duration (days) was not computed correctly. This was due to a missing field in the depends of the compute method. This commits fixes the issue by adding the hours per day in the depens of the duration days compute method. That way, the duration days will be computed after that the hours per day are computed. task-4457200 Forward-Port-Of: odoo/odoo#193715
Original PR description
When creating a new working schedule, the duration (days) was not computed correctly. This was due to a missing field in the depends of the compute method. This commits fixes the issue by adding the hours per day in the depens of the duration days compute method. That way, the duration days will be computed after that the hours per day are computed. task-4457200 Forward-Port-Of: odoo/odoo#193715
Steps to reproduce: [l10n_dk] - create and confirm a sale order - create an expense for a new employee and use a product set with reinvoice at cost and a tax with multiple repartition lines - confirm and process the expense - post journal entries Issue: Missing required fields on accountable sale order line. Cause: We want to reinvoice the tax line that no product on it opw-4378714 Forward-Port-Of: odoo/odoo#193036 Forward-Port-Of: odoo/odoo#191163
Original PR description
Steps to reproduce: [l10n_dk] - create and confirm a sale order - create an expense for a new employee and use a product set with reinvoice at cost and a tax with multiple repartition lines - confirm and process the expense - post journal entries Issue: Missing required fields on accountable sale order line. Cause: We want to reinvoice the tax line that no product on it opw-4378714 Forward-Port-Of: odoo/odoo#193036 Forward-Port-Of: odoo/odoo#191163
### Steps to reproduce: - In Accounting create a new tax like this: -Tax computation: percentage of price tax included -Amount: 100% -Included in Price: Ticked - Create a new Customer Invoice in another currency - Use the 100% tax - Go in the tab "Journal Entries" - The amounts were not converted ### Cause: The rate is calculated like this : `rate = line.amount_currency / line.balance if line.balance else 1` But with this specific tax `amount_currency` and `balance` are 0 so the rate de
Original PR description
### Steps to reproduce: - In Accounting create a new tax like this: -Tax computation: percentage of price tax included -Amount: 100% -Included in Price: Ticked - Create a new Customer Invoice in another currency - Use the 100% tax - Go in the tab "Journal Entries" - The amounts were not converted ### Cause: The rate is calculated like this : `rate = line.amount_currency / line.balance if line.balance else 1` But with this specific tax `amount_currency` and `balance` are 0 so the rate defaults to 1 thus not converting. ### Solution: Fallback on the rate of the line. opw-4443522 Forward-Port-Of: odoo/odoo#193593
`accounting_supplier_party` was never sent right from IAP, it was always 'None'. So, we could never log it. But the information was in fact always useless. This information is already in the UBL file. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#193462 Forward-Port-Of: odoo/odoo#192740
Original PR description
`accounting_supplier_party` was never sent right from IAP, it was always 'None'. So, we could never log it. But the information was in fact always useless. This information is already in the UBL file. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#193462 Forward-Port-Of: odoo/odoo#192740
Peppol migration creates more issues than it solves. A lot of users issue migration requests to move to another SMP but later discover that the SMP they wanted to migrate to does not support migration keys. This creates a state that we need to handle manually. Most SMP do not support migrating away and force users to deregister and reregister again on another one. This commit adds a fix in stable for that issue by removing the button from the res_config_settings_buttons and adding a deprecate
Original PR description
Peppol migration creates more issues than it solves. A lot of users issue migration requests to move to another SMP but later discover that the SMP they wanted to migrate to does not support migration keys. This creates a state that we need to handle manually. Most SMP do not support migrating away and force users to deregister and reregister again on another one. This commit adds a fix in stable for that issue by removing the button from the res_config_settings_buttons and adding a deprecated warning when the user tries to call the `button_migrate_peppol_registration` method. task-4394408 Forward-Port-Of: odoo/odoo#193955 Forward-Port-Of: odoo/odoo#193794
Versions -------- - 16.0+ Steps ----- 1. Have a user with only access to "Sales User: Own Documents Only"; 2. open a product variant page; 3. add a comment in the chatter. Issue ----- Access Error Cause ----- Commit 35a07975deb0 added `_mail_post_access = 'read'` to the `product.template` model. This allows users with read-only access to still comment on `product.template` records. This was not done for product variants, leading to an inconsistency where an internal user ca
Original PR description
Versions -------- - 16.0+ Steps ----- 1. Have a user with only access to "Sales User: Own Documents Only"; 2. open a product variant page; 3. add a comment in the chatter. Issue ----- Access Error Cause ----- Commit 35a07975deb0 added `_mail_post_access = 'read'` to the `product.template` model. This allows users with read-only access to still comment on `product.template` records. This was not done for product variants, leading to an inconsistency where an internal user can comment on product templates, but not variants. Solution -------- Add `_mail_post_access = 'read'` to `product.product` as well. opw-4189326 Forward-Port-Of: odoo/odoo#194048 Forward-Port-Of: odoo/odoo#194005
When an error occurs on IAP side for Peppol we display the content of `message` while we have a more friendly-user text stored in `display_message`. Use the latter when logging in Odoo. See: https://github.com/odoo/iap-apps/blob/5dde71627dfd6c6168935346bece0018d4701ce3/iap_services/peppol_proxy/exceptions.py#L14 task-no Forward-Port-Of: odoo/odoo#194352
Original PR description
When an error occurs on IAP side for Peppol we display the content of `message` while we have a more friendly-user text stored in `display_message`. Use the latter when logging in Odoo. See: https://github.com/odoo/iap-apps/blob/5dde71627dfd6c6168935346bece0018d4701ce3/iap_services/peppol_proxy/exceptions.py#L14 task-no Forward-Port-Of: odoo/odoo#194352
**Before this PR:** Steps to reproduce: - In an empty paragraph write something, press shift + enter - Write something in new line break - Select whole text in second line - Paste any text, notice that an extra <br> is added above pasted text. In other words, `<p>abc<br>[def]</p> + insert('x')` becomes `<p>abc<br><br>x[]</p>` instead of `<p>abc<br>x[]</p> `. **Desired behaviour after PR:** Now, pasting something at line-break doesn't add an extra an extra `<br>` . task-4231
Original PR description
**Before this PR:**
Steps to reproduce:
- In an empty paragraph write something, press shift + enter
- Write something in new line break
- Select whole text in second line
- Paste any text, notice that an extra <br> is added above pasted text.
In other words,
`<p>abc<br>[def]</p> + insert('x')` becomes `<p>abc<br><br>x[]</p>` instead of `<p>abc<br>x[]</p> `.
**Desired behaviour after PR:**
Now, pasting something at line-break doesn't add an extra an extra `<br>` .
task-4231290
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#185854**Problem**: When splitting a document, the `output` should include the attachments from the `input_pdf`. Currently, the attachments are missing in the output after splitting. **Steps to reproduce**: 1. In the Documents app, upload a PDF that contains attachments (example file provided in the ticket). 2. Split the uploaded PDF. 3. Preview the split file and check the left panel. 4. Notice that the attachments are missing in the left panel. opw-4191327 Forward-Port-Of: odoo/enterprise
Original PR description
**Problem**: When splitting a document, the `output` should include the attachments from the `input_pdf`. Currently, the attachments are missing in the output after splitting. **Steps to reproduce**: 1. In the Documents app, upload a PDF that contains attachments (example file provided in the ticket). 2. Split the uploaded PDF. 3. Preview the split file and check the left panel. 4. Notice that the attachments are missing in the left panel. opw-4191327 Forward-Port-Of: odoo/enterprise#77450 Forward-Port-Of: odoo/enterprise#74989
Before this commit, created moves were not done in batch making the amount of queries go up uselessly. This commit makes that creation in batch and adapts the query counters in tests. task-4299915 Forward-Port-Of: odoo/enterprise#73145
Original PR description
Before this commit, created moves were not done in batch making the amount of queries go up uselessly. This commit makes that creation in batch and adapts the query counters in tests. task-4299915 Forward-Port-Of: odoo/enterprise#73145
Forward-Port-Of: odoo/enterprise#77448 Forward-Port-Of: odoo/enterprise#76540
Original PR description
Forward-Port-Of: odoo/enterprise#77448 Forward-Port-Of: odoo/enterprise#76540
…ique FITID To replicate the issue: 1. Install the brazilian localization (enterprise) 2. In the accounting app dashboard, click Import Statement 3. Upload an .OFX file with duplicate FIDID 4. A validation error appears and the upload is not done Cause: The bank statement import assumes the FIDID is a unique identifier for the transactions in the .OFX file. A sql constraint is set in place to ensure this uniqueness. However, some Brazilian banks may generate files with transactions wi
Original PR description
…ique FITID To replicate the issue: 1. Install the brazilian localization (enterprise) 2. In the accounting app dashboard, click Import Statement 3. Upload an .OFX file with duplicate FIDID 4. A…
…ique FITID To replicate the issue: 1. Install the brazilian localization (enterprise) 2. In the accounting app dashboard, click Import Statement 3. Upload an .OFX file with duplicate FIDID 4. A validation error appears and the upload is not done Cause: The bank statement import assumes the FIDID is a unique identifier for the transactions in the .OFX file. A sql constraint is set in place to ensure this uniqueness. However, some Brazilian banks may generate files with transactions with the same FITID. An example is when PIX transfers have the same FITID as the fee charged for the PIX, which appears as another bank statement line with the same FITID. Fix: The function _parse_bank_statement_file is altered to call a function that fills the vals_line dictionary with the transaction's values. This function is then overwritten in l10n_br_reports to not include the FITID (unique_import_id) for journals of Brazilian companies. opw-4317681 Forward-Port-Of: odoo/enterprise#76556
This PR fixes two accessibility issues related to the gantt view connectors. Prior to this commit, the connectors were using the raw value when hovering the pill. This is mostly fine is light mode, but for some specific color, this was sometimes not enough to ensure a good visual separation between the connectors and the pill. To handle this issue, we add a pseudo element underneath the border, to make it stand out and prevent all the potential contrast issues. There was also a `z-index` is
Original PR description
This PR fixes two accessibility issues related to the gantt view connectors. Prior to this commit, the connectors were using the raw value when hovering the pill. This is mostly fine is light mode, but for some specific color, this was sometimes not enough to ensure a good visual separation between the connectors and the pill. To handle this issue, we add a pseudo element underneath the border, to make it stand out and prevent all the potential contrast issues. There was also a `z-index` issues with the connectors, the one at the bottom being hidden by the pill below. To fix the issue, we handle the `z-index` at the pill wrapper level to ensure it gets the right elevation. | 17.0 | This PR | |--------|--------| | <img width="366" alt="image" src="https://github.com/user-attachments/assets/f14d3c98-c2d5-4215-90ec-3cbe97b3ea56"> |  | task-3865935 Forward-Port-Of: odoo/enterprise#74859
Issue Before This Commit: -------------------------------- The delivery label generated by the Shiprocket delivery method displayed an incorrect total when a discount or free delivery was applied, which caused confusion for users. Steps to Produce: -------------------------------- 1. Apply a discount or free delivery for a Shiprocket shipment. 2. Validate the delivery. 3. The total on the delivery label will show an incorrect value, not accounting for the discount or free delivery. W
Original PR description
Issue Before This Commit: -------------------------------- The delivery label generated by the Shiprocket delivery method displayed an incorrect total when a discount or free delivery was applied, which caused confusion for users. Steps to Produce: -------------------------------- 1. Apply a discount or free delivery for a Shiprocket shipment. 2. Validate the delivery. 3. The total on the delivery label will show an incorrect value, not accounting for the discount or free delivery. With This Commit: -------------------------------- The issue is fixed by ensuring the correct data is sent to the API, which now reflects the accurate total value on the delivery label, even when a discount or free delivery is applied. Task-id: 4395054 Forward-Port-Of: odoo/enterprise#75660
Before this commit, for map views on res.partner (which have attribute res_partner = id), if the user group by a relational field (X2many, many2one), the name of the group is "None" ### Steps to reproduce: Contacts > Map view in the search bar, group by "Salesperson" On the left side of the map view, the group name is "None" ### Expected Name of partner salesperson should be visible instead of "None" original PR : #74205 Forward-Port-Of: odoo/enterprise#76248
Original PR description
Before this commit, for map views on res.partner (which have attribute res_partner = id), if the user group by a relational field (X2many, many2one), the name of the group is "None" ### Steps to reproduce: Contacts > Map view in the search bar, group by "Salesperson" On the left side of the map view, the group name is "None" ### Expected Name of partner salesperson should be visible instead of "None" original PR : #74205 Forward-Port-Of: odoo/enterprise#76248
The value sent from IAP was never sent. So what was printed was always None. So we remove its uses (and will change the method definition in non-stable Forward-Port-Of: odoo/enterprise#77102
Original PR description
The value sent from IAP was never sent. So what was printed was always None. So we remove its uses (and will change the method definition in non-stable Forward-Port-Of: odoo/enterprise#77102
The tool tip is being replaced with a more concise message. task-4437887 Forward-Port-Of: odoo/enterprise#77375 Forward-Port-Of: odoo/enterprise#76474
Original PR description
The tool tip is being replaced with a more concise message. task-4437887 Forward-Port-Of: odoo/enterprise#77375 Forward-Port-Of: odoo/enterprise#76474
## Description - when applying sort by for a non-stored field in a list view, it leads to traceback. - when fetching data, when attempting to convert it into an SQL query, now throws error after this [commit](https://github.com/odoo/odoo/commit/fb0569eeba0a8909a067f2ad90b80edbe8d2d915), form this [line](https://github.com/odoo/odoo/blame/de47ec932742ef82b315990cbac8787f82aa91d5/odoo/models.py#L2846) - This pr ensures that only stored fields are available for sorting in the list view editor,
Original PR description
## Description - when applying sort by for a non-stored field in a list view, it leads to traceback. - when fetching data, when attempting to convert it into an SQL query, now throws error after this…
## Description
- when applying sort by for a non-stored field in a list view, it leads to traceback.
- when fetching data, when attempting to convert it into an SQL query, now throws error after this [commit](https://github.com/odoo/odoo/commit/fb0569eeba0a8909a067f2ad90b80edbe8d2d915), form this [line](https://github.com/odoo/odoo/blame/de47ec932742ef82b315990cbac8787f82aa91d5/odoo/models.py#L2846)
- This pr ensures that only stored fields are available for sorting in the list view editor, preventing such issues.
## steps to reproduce
- Start a db ( version 17.2 or greater)
- install studio and contacts app
- open studio editor for contact app's list view.
- Add display_name in list and set `sort by` attribute with `display_name` field.
## Traceback
```py
File "/home/odoo/odoo/codebase/odoo/saas-17.2/addons/web/controllers/dataset.py", line 34, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/home/odoo/odoo/codebase/odoo/saas-17.2/odoo/api.py", line 458, in call_kw
result = getattr(recs, name)(*args, **kwargs)
File "/home/odoo/odoo/codebase/odoo/saas-17.2/addons/web/models/models.py", line 46, in web_search_read
records = self.search_fetch(domain, specification.keys(), offset=offset, limit=limit, order=order)
File "/home/odoo/odoo/codebase/odoo/saas-17.2/odoo/models.py", line 1626, in search_fetch
query = self._search(domain, offset=offset, limit=limit, order=order or self._order)
File "/home/odoo/odoo/codebase/odoo/saas-17.2/odoo/models.py", line 5454, in _search
query.order = self._order_to_sql(order, query)
File "/home/odoo/odoo/codebase/odoo/saas-17.2/odoo/models.py", line 5266, in _order_to_sql
term = self._order_field_to_sql(alias, field_name, sql_direction, sql_nulls, query)
File "/home/odoo/odoo/codebase/odoo/saas-17.2/odoo/models.py", line 5324, in _order_field_to_sql
sql_field = self._field_to_sql(alias, field_name, query)
File "/home/odoo/odoo/codebase/odoo/saas-17.2/odoo/models.py", line 2846, in _field_to_sql
raise ValueError(f"Cannot convert field {field} to SQL")
ValueError: Cannot convert field res.partner.display_name to SQL
```
Forward-Port-Of: odoo/enterprise#76351