Tuesday, February 4, 2025
82 changes
13 changes
Miscellaneous changes
For the same reason as [1], this commit adds the parameter "sanitize_overridable=True" to the "description_motivational" field of "gamification" model. This ensures that users with sufficient rights can properly edit the motivational description. This issue is difficult to reproduce in 16.0, as no blocks contain `<button>` elements. However, in 18.0, some snippets—such as `accordion` or the new `image gallery`—include button elements, making the issue more apparent. Steps to reproduce (in
Original PR description
For the same reason as [1], this commit adds the parameter "sanitize_overridable=True" to the "description_motivational" field of "gamification" model. This ensures that users with sufficient rights can properly edit the motivational description. This issue is difficult to reproduce in 16.0, as no blocks contain `<button>` elements. However, in 18.0, some snippets—such as `accordion` or the new `image gallery`—include button elements, making the issue more apparent. Steps to reproduce (in 18.0): - Open website module - Go to /slides - Add a carousel snippet to the side panel > Save - Traceback [1]: https://github.com/odoo/odoo/commit/0cd42f8b55e2ab8f214653556b5bde4b54281972 opw-4272357 Forward-Port-Of: odoo/odoo#195777
**Problem**: When `u` or `s` tags are applied, changing the `font-size` wraps the text inside these tags instead of applying it to the tags themselves. For example, `a<u>b</u>c` → `a<u><font>b</font></u>c`, which results in an inconsistent appearance. **Solution**: Ensure that the `span` for font size is applied to the highest non-block ancestor to maintain proper styling. **Steps to Reproduce**: 1. Add text. 2. Apply underline. 3. Increase font size. 4. Observe that the underline
Original PR description
**Problem**: When `u` or `s` tags are applied, changing the `font-size` wraps the text inside these tags instead of applying it to the tags themselves. For example, `a<u>b</u>c` → `a<u><font>b</font></u>c`, which results in an inconsistent appearance. **Solution**: Ensure that the `span` for font size is applied to the highest non-block ancestor to maintain proper styling. **Steps to Reproduce**: 1. Add text. 2. Apply underline. 3. Increase font size. 4. Observe that the underline remains the original size instead of scaling with the text. opw-3086072 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#195569
**Problem**: The function `_getColumnSize` returns the size of the columns. When `gridIndex = columnSize;` is assigned and `columnSize` equals 12, it causes an overflow in the `grid` array. This leads to invalid elements being passed to `_applyColspan`. **Solution**: Ensure `_applyColspan` is only called when `gridIndex` is within valid bounds. **Steps to reproduce**: 1. Open an email marketing template. 2. Extend the "Centered Logo" snippet to the maximum size (`col-12`). 3. Observe
Original PR description
**Problem**: The function `_getColumnSize` returns the size of the columns. When `gridIndex = columnSize;` is assigned and `columnSize` equals 12, it causes an overflow in the `grid` array. This leads to invalid elements being passed to `_applyColspan`. **Solution**: Ensure `_applyColspan` is only called when `gridIndex` is within valid bounds. **Steps to reproduce**: 1. Open an email marketing template. 2. Extend the "Centered Logo" snippet to the maximum size (`col-12`). 3. Observe a traceback error. opw-4381159 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#193255
…sively The 'no_exchange_difference' is used to prevent exchange diff in the whole reconciliation. However, the reconciliation is recursive when dealing with CABA entries. From the bank reconciliation widget, we want to prevent the exchange diff only for the top reconciliation but not recursively. Otherwise, the CABA entry ends up with a residual amount but considered as fully reconciled. Instead, this commit introduces a new context key: 'no_exchange_difference_no_recursive'. task-id:
Original PR description
…sively The 'no_exchange_difference' is used to prevent exchange diff in the whole reconciliation. However, the reconciliation is recursive when dealing with CABA entries. From the bank reconciliation widget, we want to prevent the exchange diff only for the top reconciliation but not recursively. Otherwise, the CABA entry ends up with a residual amount but considered as fully reconciled. Instead, this commit introduces a new context key: 'no_exchange_difference_no_recursive'. task-id: 4531511 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#196074 Forward-Port-Of: odoo/odoo#195814
A sales team should be assigned only to sales type moves (invoices, credit notes, ...). Currently, it is possible that some Bills get a sales team assigned. This is not ok as it will distort the reports if users analyze by sales team. It occurs when `_compute_team_id` is called on a recordset containing sales moves and other moves. Even if sales moves are correctly filtered a `self.concat` is used to set the `team_id` and it will return the concatenation of `self` with the arguments, s
Original PR description
A sales team should be assigned only to sales type moves (invoices, credit notes, ...). Currently, it is possible that some Bills get a sales team assigned. This is not ok as it will distort the reports if users analyze by sales team. It occurs when `_compute_team_id` is called on a recordset containing sales moves and other moves. Even if sales moves are correctly filtered a `self.concat` is used to set the `team_id` and it will return the concatenation of `self` with the arguments, so also the non sales moves will have the team assigned opw-4422292 Forward-Port-Of: odoo/odoo#195852 Forward-Port-Of: odoo/odoo#195645
A recent change modified the unsubscription flow to make it more resilient to automated security agents. Unfortunately, the implementation of this change breaks if the Website module is installed, and the flow becomes unusable. This commit makes it so that the unsubscription flow works once more, without compromising on resilience to security agents. task-4364446 Forward-Port-Of: odoo/odoo#196187 Forward-Port-Of: odoo/odoo#196154
Original PR description
A recent change modified the unsubscription flow to make it more resilient to automated security agents. Unfortunately, the implementation of this change breaks if the Website module is installed, and the flow becomes unusable. This commit makes it so that the unsubscription flow works once more, without compromising on resilience to security agents. task-4364446 Forward-Port-Of: odoo/odoo#196187 Forward-Port-Of: odoo/odoo#196154
### Description of the issue/feature this PR addresses: - Small font sizes ("8", "10", "12") were unavailable in the font size dropdown. These options were only required in the backend and not where custom input for font sizes is provided. ### Desired behavior after PR is merged: - The font size options "8", "10", and "12" are now included in the dropdown. The `d-none` class is conditionally applied to these options based on the value of `showResponsiveFontSizesBadges`. task-3829323
Original PR description
### Description of the issue/feature this PR addresses:
- Small font sizes ("8", "10", "12") were unavailable in the font size dropdown. These options were only required in the backend and not where custom input for font sizes is provided.
### Desired behavior after PR is merged:
- The font size options "8", "10", and "12" are now included in the dropdown. The `d-none` class is conditionally applied to these options based on the value of `showResponsiveFontSizesBadges`.
task-3829323
Forward-Port-Of: odoo/odoo#194365Change questionable emails for 2 users. Make new demo CV for them as well because we only had the binary pdfs. Raw latex can be found at (google drive): * https://drive.google.com/file/d/1AyRguPcTRrt_7ySXAYE3L9TP4mHnwMNs/view?usp=drive_link * https://drive.google.com/file/d/1e-2JlO3hEbaf6haFTF5TdCy6kx73xOgX/view?usp=drive_link task-4507003 Forward-Port-Of: odoo/odoo#194804
Original PR description
Change questionable emails for 2 users. Make new demo CV for them as well because we only had the binary pdfs. Raw latex can be found at (google drive): * https://drive.google.com/file/d/1AyRguPcTRrt_7ySXAYE3L9TP4mHnwMNs/view?usp=drive_link * https://drive.google.com/file/d/1e-2JlO3hEbaf6haFTF5TdCy6kx73xOgX/view?usp=drive_link task-4507003 Forward-Port-Of: odoo/odoo#194804
Before this commit: Steps 1) Create 3 statement lines in bank journal 2) Cancel the journal entry of the middle one 3) Try to add the first and third lines to a statement => It shows an `Invalid Operation: Unable to create a statement due to missing transactions. You may want to reorder the transactions before proceeding` This happens because the lines are considered non-contiguous due to the canceled middle line. After this commit: This operation can be performed as the missing line
Original PR description
Before this commit: Steps 1) Create 3 statement lines in bank journal 2) Cancel the journal entry of the middle one 3) Try to add the first and third lines to a statement => It shows an `Invalid Operation: Unable to create a statement due to missing transactions. You may want to reorder the transactions before proceeding` This happens because the lines are considered non-contiguous due to the canceled middle line. After this commit: This operation can be performed as the missing line is canceled, and it shouldn’t be counted for the contiguity check. Also, it should be considered in the statement assignment, similar to how the statement button works in the widget/kanban view. Recording of reproducing the issue: https://drive.google.com/file/d/1I5xwNie1HL9ifuK0z21a6yWDdqI_xbTU/view?usp=sharing Discussion with OLMA: https://discord.com/channels/678381219515465750/1099994955830796348/1330856829638545429 opw-4385040 Forward-Port-Of: odoo/odoo#194541
**Steps to reproduce:** - Create a storable product `P1` with the following BoM: - Qty: 1 unit - Components: - C1, C2, C3: 3 units - Create a MO to produce one unit of `P1`; - Confirm the order; - Update the product's `Quantity` to 1 at least; *The quantities of `To Consume` and `Quantity` columns in the `Components` tab of the notebook are automatically set to 3.* - Update the field `Quantity` of components to: - **C1**: 1 unit - **C2**: 3 units -
Original PR description
**Steps to reproduce:** - Create a storable product `P1` with the following BoM: - Qty: 1 unit - Components: - C1, C2, C3: 3 units - Create a MO to produce one unit of `P1`; - Confirm the order; -…
**Steps to reproduce:**
- Create a storable product `P1` with the following BoM:
- Qty: 1 unit
- Components:
- C1, C2, C3: 3 units
- Create a MO to produce one unit of `P1`;
- Confirm the order;
- Update the product's `Quantity` to 1 at least;
*The quantities of `To Consume` and `Quantity` columns in the `Components` tab of the notebook are automatically set to 3.*
- Update the field `Quantity` of components to:
- **C1**: 1 unit
- **C2**: 3 units
- **C3**: 4 units
___
**Issue:**
On a Manufacturing Order, if a component's quantity is:
- **C1**: less than the <ins>total needed</ins> value → highlights in green;
- **C2**: equal to the value → highlights in black;
- **C3**: higher than the value → highlights in orange.

___
**Expected:**
On a Manufacturing Order, if a component's quantity is:
- **C1**: less -> black;
- **C2**: equal -> green;
- **C3**: higher -> orange.
___
**Cause:**
Text decorations are based on a wrong logic by getting the quantities from wrong field. This field has been changed during an apocalypse.
https://github.com/odoo/odoo/blob/c43297435cfcaf560d5c952ac3c4a383a6f1dc28/addons/mrp/views/mrp_production_views.xml#L405-L406
___
**Fix:**
Reset good field to check quantities, inspired by Odoo 16 using the computed `should_consume_qty` value to check the consumption status:
https://github.com/odoo/odoo/blob/67c78b38e794333eae55758ad4610515df5c49d2/addons/mrp/views/mrp_production_views.xml#L342-L343

___
**Forward:**
To forward up to master.
Odoo 17 :
```
<field name="quantity" string="Quantity"
decoration-success="product_uom_qty - quantity > -0.0001 and product_uom_qty - quantity < 0.0001"
decoration-warning="quantity - product_uom_qty > 0.0001"
```
___
opw-4393156
opw-4391582
opw-4391600
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#190162- Create a customer invoice with **Product A** priced at 1000 and a quantity of 2. - Add a line with **Product A** at the same price but with a quantity of -1. Confirm the invoice. In the product margin report, the `total_margin` for **Product A** is shown as 3000, even though we only sold for 1000 (as shown in the balance report). A similar issue occurs when a line on an invoice has a negative price, for instance, due to a discount on a sales order. Similarly: - Create a vendor bill
Original PR description
- Create a customer invoice with **Product A** priced at 1000 and a quantity of 2. - Add a line with **Product A** at the same price but with a quantity of -1. Confirm the invoice. In the product…
- Create a customer invoice with **Product A** priced at 1000 and a quantity of 2. - Add a line with **Product A** at the same price but with a quantity of -1. Confirm the invoice. In the product margin report, the `total_margin` for **Product A** is shown as 3000, even though we only sold for 1000 (as shown in the balance report). A similar issue occurs when a line on an invoice has a negative price, for instance, due to a discount on a sales order. Similarly: - Create a vendor bill with **Product B**, with a cost of 1000 and a quantity of 2. - Add a line with **Product B**, with the same cost but a quantity of -1. In the product margin report, the `total_cost` for **Product B** is shown as 3000, even though we only bought for 1000. In `_compute_product_margin_fields_values`, the SQL query takes the absolute value of the balance of every account move line to compute `total`. This means negative values become positive and are added to the positive values instead of canceling each other out, creating the above issues. As a result, the product margin report does not align with the balance sheet. The absolute value is used because `total` is used to compute statistics related to both `out_invoice` (e.g., turnover) and `in_invoice` (e.g., total cost), which both need to be positive. However, the same result can be achieved by inverting the sign for `out_invoice`. opw-4342691 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#193440
In this PR, - Set the default department for the Plans smart button. - If there is no plan, it will open the form view. Task-4356557 Forward-Port-Of: odoo/odoo#190938
Original PR description
In this PR, - Set the default department for the Plans smart button. - If there is no plan, it will open the form view. Task-4356557 Forward-Port-Of: odoo/odoo#190938
Steps to reproduce ================== - Activate the assets debug mode - Print a report => The footer is missing Cause of the issue ================== The sames fonts are used in the header and footer. A first request is made ```http GET /web/static/fonts/lato/Lato-Reg-webfont.woff HTTP/1.1 Accept: */* Cookie: REDACTED Connection: Keep-Alive Accept-Encoding: gzip Accept-Language: en-US,* User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.34 (KHTML, like Gecko)
Original PR description
Steps to reproduce ================== - Activate the assets debug mode - Print a report => The footer is missing Cause of the issue ================== The sames fonts are used in the header and…
Steps to reproduce ================== - Activate the assets debug mode - Print a report => The footer is missing Cause of the issue ================== The sames fonts are used in the header and footer. A first request is made ```http GET /web/static/fonts/lato/Lato-Reg-webfont.woff HTTP/1.1 Accept: */* Cookie: REDACTED Connection: Keep-Alive Accept-Encoding: gzip Accept-Language: en-US,* User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.34 (KHTML, like Gecko) wkhtmltopdf Safari/534.34 HTTP/1.0 200 OK Server: Werkzeug/2.0.2 Python/3.11.11 Etag: "1710849406-32964-706485214" Expires: Tue, 28 Jan 2025 13:18:36 GMT Content-Disposition: inline; filename=Lato-Bla-webfont.woff Content-Type: application/font-woff Date: Tue, 28 Jan 2025 13:18:36 GMT Last-Modified: Tue, 19 Mar 2024 11:56:46 GMT Content-Length: 32964 Cache-Control: no-cache, max-age=0 Accept-Ranges: bytes ``` The second request from the footer is ```http GET /web/static/fonts/lato/Lato-Reg-webfont.woff HTTP/1.1 Cache-Control: no-cache Pragma: no-cache If-Modified-Since: Tue, 19 Mar 2024 11:56:46 GMT User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.34 (KHTML, like Gecko) wkhtmltopdf Safari/534.34 Cookie: REDACTED Connection: Keep-Alive Accept-Encoding: gzip If-None-Match: "1710849406-32964-706485214" Accept: */* Accept-Language: en-US,* HTTP/1.0 304 NOT MODIFIED Server: Werkzeug/2.0.2 Python/3.11.11 Date: Tue, 28 Jan 2025 13:18:36 GMT Accept-Ranges: bytes Content-Disposition: inline; filename=Lato-Bla-webfont.woff Cache-Control: no-cache, max-age=0 Expires: Tue, 28 Jan 2025 13:18:36 GMT Etag: "1710849406-32964-706485214" ``` When running wkhtmltopdf manually, we obtain the following output: ``` Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load. ``` This indicates that wkhtmltopdf is not handling the cache headers correctly and fails to recognize the fact that it should reuse the previously received version of the file. Solution ======== In production, odoo should run behind a reverse proxy that handles static files, and the debug assets mode should not be used. Nevertheless, since wkhtmltopdf misinterprets cache headers, we simply remove them in case opw-4413445 Forward-Port-Of: odoo/odoo#195826
12 changes
Enhancements to existing features
This update improves internal test reliability for Belgian payroll accounting by enabling real-time communication support during automated checks. It helps ensure payroll accounting features are validated more consistently before release, with no direct change for end users.
Original PR description
task-3970199
The Studio app's automated tests have been converted from an older test system to the newer HOOT framework. This improves maintainability and helps ensure Studio features like app creation, navigation, menus, icons, and action editing continue to work reliably.
Original PR description
Conversion of all legacy studio tests to HOOT
Miscellaneous changes
Change an f-string into an sql.identifier for injection prevention Forward-Port-Of: odoo/enterprise#77956
Original PR description
Change an f-string into an sql.identifier for injection prevention Forward-Port-Of: odoo/enterprise#77956
From version 18.0, the closing should work fine and there's no need to hide the closing button anymore. This reverts commit cf86ce0e0c7c47336446da5b335cbc53b7602fcd. Forward-Port-Of: odoo/enterprise#77906
Original PR description
From version 18.0, the closing should work fine and there's no need to hide the closing button anymore. This reverts commit cf86ce0e0c7c47336446da5b335cbc53b7602fcd. Forward-Port-Of: odoo/enterprise#77906
[This commit][1] changed the Sign action helper to onboard users. However, in doing so the text was put inside conditional `t-esc` attributes, causing it to not be translatable. This change fixes that by properly using text nodes. [1]: https://github.com/odoo/enterprise/commit/a5fc0b098c4a4b61d7ce7fd87180ed32dcb1f6f5 [opw-4421055](https://www.odoo.com/odoo/project.task/4421055) Forward-Port-Of: odoo/enterprise#78147
Original PR description
[This commit][1] changed the Sign action helper to onboard users. However, in doing so the text was put inside conditional `t-esc` attributes, causing it to not be translatable. This change fixes that by properly using text nodes. [1]: https://github.com/odoo/enterprise/commit/a5fc0b098c4a4b61d7ce7fd87180ed32dcb1f6f5 [opw-4421055](https://www.odoo.com/odoo/project.task/4421055) Forward-Port-Of: odoo/enterprise#78147
### The Issue: In `l10n_es` 347 serves to declare operations within Spain. 349 serves to declare operations in other EU countries https://github.com/odoo/enterprise/commit/9d79ed1128e76e8553a7cc39e790de4369345eec However, when creating an invoice for a Spanish customer, the field `Type for mod 349` is set despite the field `Available for Mod349` being False. ### How to Reproduce: 1. Install `l10n_es`. 2. Create an invoice for a Spanish customer and check that field 347 (AEAT tab)
Original PR description
### The Issue: In `l10n_es` 347 serves to declare operations within Spain. 349 serves to declare operations in other EU countries…
### The Issue: In `l10n_es` 347 serves to declare operations within Spain. 349 serves to declare operations in other EU countries https://github.com/odoo/enterprise/commit/9d79ed1128e76e8553a7cc39e790de4369345eec However, when creating an invoice for a Spanish customer, the field `Type for mod 349` is set despite the field `Available for Mod349` being False. ### How to Reproduce: 1. Install `l10n_es`. 2. Create an invoice for a Spanish customer and check that field 347 (AEAT tab) is set as regular operation. 3. Add both fields (type for 347 and type for 349) to the customer invoices list view using Studio. 4. Observe that for invoices where 347 is set, 349 is also set (E-Suministros/Supplies). ### Cause: In the `account_move` model of `l10n_es_reports`, the field `l10n_es_reports_mod349_invoice_type` was being set with a default value even when `Available for Mod349` is False. opw-4339292 Forward-Port-Of: odoo/enterprise#77996 Forward-Port-Of: odoo/enterprise#76042
Modifiy the test since it's not possible anymore to modify the UoM if all the different record doesn't belong to the same UoM than the product ones. Forward-Port-Of: odoo/enterprise#78282
Original PR description
Modifiy the test since it's not possible anymore to modify the UoM if all the different record doesn't belong to the same UoM than the product ones. Forward-Port-Of: odoo/enterprise#78282
task-4478365 Forward-Port-Of: odoo/enterprise#78243 Forward-Port-Of: odoo/enterprise#77772
Original PR description
task-4478365 Forward-Port-Of: odoo/enterprise#78243 Forward-Port-Of: odoo/enterprise#77772
Before this commit, if a user was an attendee of an event linked to an appointment type, but did not have access to the appointment (not part of the staff_user_ids), an access error would occur when trying to sync their calendar with Google or Microsoft. This error happened inside the `_get_customer_description` function overridden in the appointment module. opw-4402859 Forward-Port-Of: odoo/enterprise#78110 Forward-Port-Of: odoo/enterprise#76113
Original PR description
Before this commit, if a user was an attendee of an event linked to an appointment type, but did not have access to the appointment (not part of the staff_user_ids), an access error would occur when trying to sync their calendar with Google or Microsoft. This error happened inside the `_get_customer_description` function overridden in the appointment module. opw-4402859 Forward-Port-Of: odoo/enterprise#78110 Forward-Port-Of: odoo/enterprise#76113
This PR fixed tests when runbot runs without demo data installed. Creates users instead of referencing them and editing. Forward-Port-Of: odoo/enterprise#78431
Original PR description
This PR fixed tests when runbot runs without demo data installed. Creates users instead of referencing them and editing. Forward-Port-Of: odoo/enterprise#78431
"currency_id_of_value_currency" is redundant with "invoice_currency_id" Forward-Port-Of: odoo/enterprise#77649
Original PR description
"currency_id_of_value_currency" is redundant with "invoice_currency_id" Forward-Port-Of: odoo/enterprise#77649
In quant_barcode_model we fetch the quant at the new line creation. It's use in order to define the current theorical inventory quantity. But with rfid, it could be heavy since each serial number can be a new line and doing an rpc by line will be a bottleneck. To improve it, each time we add a product in the cache, we also add the associated quants. During the new line creation, we search for the product in the cache rather than doing an rpc with a specific domain Forward-Port-Of: odoo/en
Original PR description
In quant_barcode_model we fetch the quant at the new line creation. It's use in order to define the current theorical inventory quantity. But with rfid, it could be heavy since each serial number can be a new line and doing an rpc by line will be a bottleneck. To improve it, each time we add a product in the cache, we also add the associated quants. During the new line creation, we search for the product in the cache rather than doing an rpc with a specific domain Forward-Port-Of: odoo/enterprise#77525 Forward-Port-Of: odoo/enterprise#71660