Thursday, November 7, 2024
109 changes
17 changes
Miscellaneous changes
During a major upgrade the registry my be `loaded` but not `ready`. https://github.com/odoo/odoo/blob/9918e8f3d627f3c52238d6b04bcd15c05d34e40c/odoo/modules/registry.py#L159-L160 This causes unnecessary warnings during upgrades (blocking the CI). --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#186467
Original PR description
During a major upgrade the registry my be `loaded` but not `ready`. https://github.com/odoo/odoo/blob/9918e8f3d627f3c52238d6b04bcd15c05d34e40c/odoo/modules/registry.py#L159-L160 This causes unnecessary warnings during upgrades (blocking the CI). --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#186467
Fixed issue introduced in this PR: https://github.com/odoo/odoo/pull/119154. In the above PR, the recurring setting was removed, but the recurring groups were not removed from the group configuration, which caused the group's string to still appear. This issue has now been fixed. Steps to Reproduce and Verify the Fix: 1) Install the Project App. 2) Go to the Project App. 3) Activate the Recurring Feature in the settings. 4) Open any project and verify
Original PR description
Fixed issue introduced in this PR: https://github.com/odoo/odoo/pull/119154.
In the above PR, the recurring setting was removed, but the recurring groups
were not removed from the group configuration, which caused the group's string
to still appear. This issue has now been fixed.
Steps to Reproduce and Verify the Fix:
1) Install the Project App.
2) Go to the Project App.
3) Activate the Recurring Feature in the settings.
4) Open any project and verify the settings.
task-4260042
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#183861System shows Enterprise Widget on E-invoice module Although the module is available in community addons Steps to Reproduce : Run only community Install l10n_in module. Now Go to the Settings -> Invoicing. See the Enterprise Widget is on E-Invoice (Indian Integration). 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/submi
Original PR description
System shows Enterprise Widget on E-invoice module Although the module is available in community addons Steps to Reproduce : Run only community Install l10n_in module. Now Go to the Settings -> Invoicing. See the Enterprise Widget is on E-Invoice (Indian Integration). 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#186389
We can have a user that has enough rights to generate sales orders, but not enough right to check a BoM. When creating a new sale order for a kit, everything works fine. Before this commit, if we updated the quantity on the sale order line, the quantity on the moves would become incorrect. After this commit, the BoM is always found in order to correctly recompute the quantity on the moves. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forwar
Original PR description
We can have a user that has enough rights to generate sales orders, but not enough right to check a BoM. When creating a new sale order for a kit, everything works fine. Before this commit, if we updated the quantity on the sale order line, the quantity on the moves would become incorrect. After this commit, the BoM is always found in order to correctly recompute the quantity on the moves. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#180442
Description of the issue/feature this PR addresses: - Improve _get_report_lines performance Current behavior before PR: - A lag is seen when opening Manufacturing orders, because it goes to compute `components_availability`, calling https://github.com/odoo/odoo/blob/0d3ab1203ad00e2c41768f3209e45cd673e519e7/addons/mrp/models/mrp_production.py#L344 function, which ends up calling https://github.com/odoo/odoo/blob/0d3ab1203ad00e2c41768f3209e45cd673e519e7/addons/stock/report/stock_forecasted.
Original PR description
Description of the issue/feature this PR addresses: - Improve _get_report_lines performance Current behavior before PR: - A lag is seen when opening Manufacturing orders, because it goes to compute…
Description of the issue/feature this PR addresses: - Improve _get_report_lines performance Current behavior before PR: - A lag is seen when opening Manufacturing orders, because it goes to compute `components_availability`, calling https://github.com/odoo/odoo/blob/0d3ab1203ad00e2c41768f3209e45cd673e519e7/addons/mrp/models/mrp_production.py#L344 function, which ends up calling https://github.com/odoo/odoo/blob/0d3ab1203ad00e2c41768f3209e45cd673e519e7/addons/stock/report/stock_forecasted.py#L190 - currently, in `_get_report_lines` function, **transit_stock** https://github.com/odoo/odoo/blob/0d3ab1203ad00e2c41768f3209e45cd673e519e7/addons/stock/report/stock_forecasted.py#L353 is calculated by summing quantities with list comprehension on the **currents** dictionary for each product. https://github.com/odoo/odoo/blob/0d3ab1203ad00e2c41768f3209e45cd673e519e7/addons/stock/report/stock_forecasted.py#L327 - This becomes slow when handling huge number of products and large currents entries. due to O(n * m) complexity Desired behavior after PR is merged: - A dictionary of pre-computed product quantity, minimizes the time taken. ### Here are few benchmarks and stats. **At time of function call :** - As the test database is populated with 2 location ids `_get_report_lines` is called twice during testing, because of https://github.com/odoo/odoo/blob/6e9ace2df2dd3750472c227f818d3dc8d5ba5016/addons/stock/models/stock_move.py#L515-L517 - size of currents dict : 2539 + 2600 - No. of product : 2539 + 2412 ## Before  ## After  opw- 4285618 upg- 2179723 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#186238
Before this PR, pressing `Escape` while renaming a thread in the chat window closed the entire chat window instead of simply exiting the rename mode. This PR ensures that pressing `Escape` only exits the rename action, keeping the chat window open. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#185833
Original PR description
Before this PR, pressing `Escape` while renaming a thread in the chat window closed the entire chat window instead of simply exiting the rename mode. This PR ensures that pressing `Escape` only exits the rename action, keeping the chat window open. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#185833
When a failure occurs when sending an email or a sms, it is displayed in the messaging menu. Before this PR, it could not be removed after a record was deleted. Steps to reproduce: - Send a message on a record, add a recipient with an incorrect email. - A red enveloppe is displayed next to the message and a notification is added in the messaging menu. - Delete this record. - Try to mark this failure as read. - Nothing happens. This occurs because the message deletion is only notified
Original PR description
When a failure occurs when sending an email or a sms, it is displayed in the messaging menu. Before this PR, it could not be removed after a record was deleted. Steps to reproduce: - Send a message on a record, add a recipient with an incorrect email. - A red enveloppe is displayed next to the message and a notification is added in the messaging menu. - Delete this record. - Try to mark this failure as read. - Nothing happens. This occurs because the message deletion is only notified to the recipients, not the author. This PR fixes the issue. opw-4272165 Forward-Port-Of: odoo/odoo#186000
When a user disconnects from a device, the server assumes he is disconnected until another device/browser says otherwise. However, this can lead to small flickers. This PR fixes the issue by debouncing the update of the im status field of the persona model. This way, there is no flickering. Steps to reproduce the issue: - Open two browser windows with mitchell admin in the discuss app (incognito + regular windows). - Go to the chat with your self, where the im status can be seen. - Re
Original PR description
When a user disconnects from a device, the server assumes he is disconnected until another device/browser says otherwise. However, this can lead to small flickers. This PR fixes the issue by debouncing the update of the im status field of the persona model. This way, there is no flickering. Steps to reproduce the issue: - Open two browser windows with mitchell admin in the discuss app (incognito + regular windows). - Go to the chat with your self, where the im status can be seen. - Reload one tab several times: you can sometimes see a flicker from online to offline. task-4236550 Forward-Port-Of: odoo/odoo#184825
**Current behavior:** Manually adjusting a FIFO/AVCO product's cost creates a journal items with non-zero quantity, despite there not being a logical quantity associated with this entry. **Expected behavior:** AMLs generated for this move have 0 quantity. **Steps to reproduce:** *Having accounting, purchase_stock* 1. Create a storable product with `average` costing 2. Create a purchase order for some of the product with some arbitrary price unit, receive the product 3. In
Original PR description
**Current behavior:** Manually adjusting a FIFO/AVCO product's cost creates a journal items with non-zero quantity, despite there not being a logical quantity associated with this entry. **Expected…
**Current behavior:**
Manually adjusting a FIFO/AVCO product's cost creates a journal
items with non-zero quantity, despite there not being a logical
quantity associated with this entry.
**Expected behavior:**
AMLs generated for this move have 0 quantity.
**Steps to reproduce:**
*Having accounting, purchase_stock*
1. Create a storable product with `average` costing
2. Create a purchase order for some of the product with some
arbitrary price unit, receive the product
3. In the product form, change the cost to a smaller value
4. In the journal items pivot view, select the `quantity` field
from the 'Measures' dropdown in the top left, expand the
stock valuation journal on the left axis, observe that the
change in cost has created 2 balancing AMLs, each with
quantity == 1
**Cause of the issue:**
This case was not handled and quantity is always set to 1 if
falsy.
**Fix:**
Create the AMLs created in the cost change handle with
quantity=0. While it does risk being overwritten to 1 if the
`display_type` of the line changes, the diff is minimal and
use-case is non-critical- which makes it the best solution here.
opw-4090620
Forward-Port-Of: odoo/odoo#186304
Forward-Port-Of: odoo/odoo#180998Before this commit, when the accrual cron was running and there was a leave in the future to account for, it would calculate the number of days by processing a fake allocation and invalidating it afterwards. However, the cache invalidation was too aggressive and would also invalidate any changes that were made to existing accrual allocations that were not yet flushed. This commit fixes this behavior by invalidating the recordset so as to only invalidate the fake allocations. opw-4200067 F
Original PR description
Before this commit, when the accrual cron was running and there was a leave in the future to account for, it would calculate the number of days by processing a fake allocation and invalidating it afterwards. However, the cache invalidation was too aggressive and would also invalidate any changes that were made to existing accrual allocations that were not yet flushed. This commit fixes this behavior by invalidating the recordset so as to only invalidate the fake allocations. opw-4200067 Forward-Port-Of: odoo/odoo#185957
Blacklist Odoo in your browser from having access to the local and session storages (security parameters). Before this commit, there were unrecoverable crashes because even doing `window.[localStorage|sessionStorage]` is forbidden. After this commit, we catch those exceptions and make a RamStorage instead. opw-4226366 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
Original PR description
Blacklist Odoo in your browser from having access to the local and session storages (security parameters). Before this commit, there were unrecoverable crashes because even doing `window.[localStorage|sessionStorage]` is forbidden. After this commit, we catch those exceptions and make a RamStorage instead. opw-4226366 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#186294 Forward-Port-Of: odoo/odoo#185811
- Update CoA - Update taxes - Update tax groups - Update reports - Update fiscal positions Courtesy of `Editor.si` for providing data in order to update the files. Enterprise PR: odoo/enterprise#65817 Task [link](https://www.odoo.com/odoo/project/967/tasks/3901247) task-3901247 Forward-Port-Of: odoo/odoo#166559
Original PR description
- Update CoA - Update taxes - Update tax groups - Update reports - Update fiscal positions Courtesy of `Editor.si` for providing data in order to update the files. Enterprise PR: odoo/enterprise#65817 Task [link](https://www.odoo.com/odoo/project/967/tasks/3901247) task-3901247 Forward-Port-Of: odoo/odoo#166559
Use loops with clear input/expected structure to ease changes and debugging. Add few tests while passing by. Task-3943087 Forward-Port-Of: odoo/odoo#186468
Original PR description
Use loops with clear input/expected structure to ease changes and debugging. Add few tests while passing by. Task-3943087 Forward-Port-Of: odoo/odoo#186468
When trying to sign in (for a new user) after making a purchase (existing token), we can choose a password of less than the minimum length allowed in the configuration. The _check_password_policy method prevents the save of the password to the user but arrives too late in the flow as the initiation of the user creation is half done leading to an Invalid token issue at the next attempt (no partner found for the existing token with _signup_retrieve_partner). By adding the minlength attribute
Original PR description
When trying to sign in (for a new user) after making a purchase (existing token), we can choose a password of less than the minimum length allowed in the configuration. The _check_password_policy method prevents the save of the password to the user but arrives too late in the flow as the initiation of the user creation is half done leading to an Invalid token issue at the next attempt (no partner found for the existing token with _signup_retrieve_partner). By adding the minlength attribute in the form of the sign up, we force the respect of the password policy minimum length in the front end and minimize the risk to encounter the issue. opw-4182543 Forward-Port-Of: odoo/odoo#185139
**Steps to reproduce the bug:** - Create two storable products, “P1” and “P2”. - Set “P1” to be tracked by Serial Number - Update P1 with SN1. - Create a repair order: - Set P1 with SN1. - Save. - Edit and update the product to P2. - Save. - Print the order. **Problem:** The “lot_id” is not cleared and appears in the report because the “lot_id” field becomes invisible and read-only under the same condition. Since it is read-only and not force-saved, the value of “lot_id” is no
Original PR description
**Steps to reproduce the bug:** - Create two storable products, “P1” and “P2”. - Set “P1” to be tracked by Serial Number - Update P1 with SN1. - Create a repair order: - Set P1 with SN1. - Save. - Edit and update the product to P2. - Save. - Print the order. **Problem:** The “lot_id” is not cleared and appears in the report because the “lot_id” field becomes invisible and read-only under the same condition. Since it is read-only and not force-saved, the value of “lot_id” is not considered in the write of the repair order, even though the `onchange` sets the “lot_id” field to False: https://github.com/odoo/odoo/blob/16.0/addons/repair/models/repair.py#L208-L212 **opw-4281176** Forward-Port-Of: odoo/odoo#185906 Forward-Port-Of: odoo/odoo#185552
### Analysis Before this commit, the `date_automation_last` was updated before checking the `trigger_field_ids`. This means that the `date_automation_last` field was updated even if the automation rule wasn't supposed to run - which, on the functional side, is a behavior we can argue on. Moreover, this triggers a write on the records which is not necessary if the automation rule is not run and can increase the delay of the operation. ### Solution In this commit, we update the `date_auto
Original PR description
### Analysis Before this commit, the `date_automation_last` was updated before checking the `trigger_field_ids`. This means that the `date_automation_last` field was updated even if the automation…
### Analysis Before this commit, the `date_automation_last` was updated before checking the `trigger_field_ids`. This means that the `date_automation_last` field was updated even if the automation rule wasn't supposed to run - which, on the functional side, is a behavior we can argue on. Moreover, this triggers a write on the records which is not necessary if the automation rule is not run and can increase the delay of the operation. ### Solution In this commit, we update the `date_automation_last` after filtering the records by checking the `trigger_field_ids`. ## Benchmarks Measuring `web_save` when updating the stage of a lead in the Kanban view of CRM: | # `crm.lead ` | # `automation.rule` on crm.lead | Before | After | % | -------------------- | -----| -- | ---------- | -------- | 970 records| 6 | 1.5s | 0.3 s | - ~80% ### References opw-4263443 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#186487
Steps to reproduce: - In edit mode, drop a "Text-Image" snippet. - In the text column, add 4 columns with the powerbox (type "/" then "columns"). - In each column, add an image. => The two outer columns image have the same size, which is bigger than the inner ones. This happens because in commit [1], in order for the columns to be well aligned with the rest of the content, the left padding of the first column and the right padding of the last one have been forced to 0px. This resulted in
Original PR description
Steps to reproduce: - In edit mode, drop a "Text-Image" snippet. - In the text column, add 4 columns with the powerbox (type "/" then "columns"). - In each column, add an image. => The two outer…
Steps to reproduce: - In edit mode, drop a "Text-Image" snippet. - In the text column, add 4 columns with the powerbox (type "/" then "columns"). - In each column, add an image. => The two outer columns image have the same size, which is bigger than the inner ones. This happens because in commit [1], in order for the columns to be well aligned with the rest of the content, the left padding of the first column and the right padding of the last one have been forced to 0px. This resulted in the columns content having different sizes depending on their position. Moreover, this was not a good solution because if we added more columns (by duplicating them) such that they go on multiple lines, the last one of the first line would not be correctly aligned to the content, because it is not the last column so it would keep its right padding. This would also result in the columns being shifted compared to the first line. This commit fixes that by removing the rules added by commit [1], as the columns were already aligned without them. The row margins are then set so they compensate the grid item padding, for the case when we are in grid mode, to avoid overflow. Note that if the padding is under 15px, the columns are not aligned anymore, but this is the compromise to have identical columns. [1]: https://github.com/odoo/odoo/commit/fb55f688f6be2211ebeea4ba431a06230c40fb6b opw-4172256 Forward-Port-Of: odoo/odoo#186613 Forward-Port-Of: odoo/odoo#182951
29 changes
Enhancements to existing features
An unused payment redirect value has been removed from online batch payments. This keeps the payment data model simpler and avoids storing information that is not needed for business operations.
Original PR description
The field redirect_url is unsued and it makes no sense to store it in the database anyway. This commit removes it from the model.
54 changes
Enhancements to existing features
Knowledge article test steps for embedded view filters have been re-enabled after platform support made them stable. This improves confidence that filtering behavior in embedded Knowledge content continues to work as expected, without changing the user experience directly.
Original PR description
These steps were disabled while waiting for the subroots feature of OWL for embedded components, and can now be enabled again without the risk of indeterministic fail. task-4300215
This update adds a check to ensure field display widgets are only used with compatible field types, helping prevent configuration errors from reaching users. It also updates the timesheet grid timer setup to use the newer widget selection approach, reducing the chance of incorrect behavior after related platform changes.
Original PR description
This commit introduces a validation that will raise an error if the widget is used in a field type that is no supported. It bases on the supported types of the widget definition. opw-[4224192](https://www.odoo.com/web#id=4224192&view_type=form&model=project.task)
This update simplifies how common system fields are handled across several Odoo Enterprise apps. It reduces duplicated technical definitions, helping keep future maintenance safer and more consistent without changing day-to-day workflows.
Original PR description
odoo/odoo#186121
Resolved issues and error corrections
This fixes an issue in Odoo Studio exports where built-in system fields could be handled incorrectly. Exports should now use the proper field names, making exported data more reliable for users.
Original PR description
Use the name instead of the field instance.
This fix improves the wording of an error shown when users scan a barcode that is not found during receipt operations. It makes the message clearer and more professional, reducing confusion for warehouse staff.
Original PR description
Barcode --> Operations --> Receipts --> NEW Scan a barcode that doesn't exist in the DB ie: "5449000000996" The current error message's spelling and grammar are off. opw-4307102
Installing the Payroll Accounting module on a new database will now also install the required Accounting app. This prevents setup gaps and ensures payroll accounting features work as expected from the start.
Original PR description
When installing hr_payroll_account on an empty DB, we expect the Accounting app to be installed. But that is not the case. hr_payroll_account should depend on the accountant app.
The commission plan form now uses the standard date range selector, making start and end date selection work better on mobile devices. This reduces friction for users managing commission plans from phones or tablets.
Original PR description
before this commit, commission plan form date field selector seems broken in mobiles devices because we did not directly used widget available. after this commit, use daterange widget.
The sale commission plan list view no longer shows the status field twice. This removes duplicate information from the screen, making the list cleaner and easier for users to read.
Original PR description
in this PR, fixed an issue where the status of the sale commission plan was being displayed twice. This fix ensures that the status information is shown only once.
Code cleanup and technical improvements
Point of Sale utility files were reorganized into a dedicated folder to make the codebase easier to maintain. This is an internal restructuring with no expected change to day-to-day user workflows.
Original PR description
Reorganization of all utils files into a specific folder. task-id: 4290514
Miscellaneous changes
…pany currency Problem: When calculating the non_deductible_tax_value on an asset the non_deductible_tax_value of the original move lines are not converted into the asset's/company's currency. This is used when calculating the original_value of the asset and can cause incorrect calculations. Purpose of this PR: To make sure the non_deductible_tax_value is stored in the asset's currency How to reproduce: 1- install: Uruguay - Accounting 2 - change company country to Uruguay 3- setti
Original PR description
…pany currency Problem: When calculating the non_deductible_tax_value on an asset the non_deductible_tax_value of the original move lines are not converted into the asset's/company's currency. This…
…pany currency Problem: When calculating the non_deductible_tax_value on an asset the non_deductible_tax_value of the original move lines are not converted into the asset's/company's currency. This is used when calculating the original_value of the asset and can cause incorrect calculations. Purpose of this PR: To make sure the non_deductible_tax_value is stored in the asset's currency How to reproduce: 1- install: Uruguay - Accounting 2 - change company country to Uruguay 3- settings -> accounting -> taxes -> Fiscal Country: Uruguay. 4- create a new tax and make sure that the accounts on % of tax are expenses account so that the tax in non-deductible tax. 5- make sure to select the right tax group and country = Uruguay in the advanced options of tax. 6- create new product, and in accounting tap set the fixed asset account to the expenses account. and in the purchase tap make sure that the vendor taxes is set to the tax created before. 7- create a new vendor bill with the currency set to UYU. and confirm the bill. make sure that the fixed assets account is selected. 8- go to assets and create a new asset, in bills tab add the created bill. the asset will be created and the Original Value filed will contain the wrong amount. When calculating the non_deductible_tax_value for an asset, if there are original move lines in a foreign currency they won't be converted into the assets currency opw-4089386 Forward-Port-Of: odoo/enterprise#73206 Forward-Port-Of: odoo/enterprise#70268
The l10n_cl_edi_factoring module allows the credit and rights of a generated sales invoice to be yielded to a third party. The third-party will advance the invoice money, charging a commission or interest on the amount as compensation. This feature enhances financial flexibility and cash flow management for businesses using our Odoo instance. The module complies with requirements from the SII (Servicio de Impuestos Internos) regarding the electronic execution of the yield. It includes the gener
Original PR description
The l10n_cl_edi_factoring module allows the credit and rights of a generated sales invoice to be yielded to a third party. The third-party will advance the invoice money, charging a commission or interest on the amount as compensation. This feature enhances financial flexibility and cash flow management for businesses using our Odoo instance. The module complies with requirements from the SII (Servicio de Impuestos Internos) regarding the electronic execution of the yield. It includes the generation of the AEC (Archivo Electrónico de Cesión) file, the creation of the account move for the yield, and the reconciliation of the invoice with the yield account move. This is also compatible with l10n_cl_edi demo mode, generating and simulating the send and acceptation of the AEC to the SII. Task [link](https://www.odoo.com/odoo/project/967/tasks/3982234?cid=3) task-3982234 Forward-Port-Of: odoo/enterprise#70696
Since domain method for the Sales Order Item field is not harcoded anymore, the inheritance in this module is now considered, so it needs to be adapted to work correctly with the expected value, i.e. returning a list instead of a string. [FIX] helpdesk_sale_timesheet: unharcode domain method of SO line field Since domain method of the Sales Order Item field is set using the actual class method instead of a lambda, it is not possible to inherit that method when inheriting the model.
Original PR description
Since domain method for the Sales Order Item field is not harcoded anymore, the inheritance in this module is now considered, so it needs to be adapted to work correctly with the expected value, i.e. returning a list instead of a string. [FIX] helpdesk_sale_timesheet: unharcode domain method of SO line field Since domain method of the Sales Order Item field is set using the actual class method instead of a lambda, it is not possible to inherit that method when inheriting the model. This issue is fixed by using a lambda function to call the domain method. Forward-Port-Of: odoo/enterprise#73188 Forward-Port-Of: odoo/enterprise#72931
With an MX company setup Create a Payment Action > Send receipt by email Traceback will raise ``` KeyError: 'l10n_mx_edi_cfdi_attachment_id' ``` It occurs because the field is not defined on the payment model opw-4298457 Forward-Port-Of: odoo/enterprise#73457
Original PR description
With an MX company setup Create a Payment Action > Send receipt by email Traceback will raise ``` KeyError: 'l10n_mx_edi_cfdi_attachment_id' ``` It occurs because the field is not defined on the payment model opw-4298457 Forward-Port-Of: odoo/enterprise#73457
## Pull Request HOOT (PRHOOT) - part 26 Part 1: https://github.com/odoo/odoo/pull/152930 Part 2: https://github.com/odoo/odoo/pull/153018 Part 3: https://github.com/odoo/odoo/pull/153023 Part 4: https://github.com/odoo/odoo/pull/153203 Part 5: https://github.com/odoo/odoo/pull/153425 Part 6: https://github.com/odoo/odoo/pull/153700 Part 7: https://github.com/odoo/odoo/pull/154054 Part 8: https://github.com/odoo/odoo/pull/154579 Part 9: https://github.com/odoo/odoo/pull/155073 Part 10
Original PR description
## Pull Request HOOT (PRHOOT) - part 26 Part 1: https://github.com/odoo/odoo/pull/152930 Part 2: https://github.com/odoo/odoo/pull/153018 Part 3: https://github.com/odoo/odoo/pull/153023 Part 4:…
## Pull Request HOOT (PRHOOT) - part 26 Part 1: https://github.com/odoo/odoo/pull/152930 Part 2: https://github.com/odoo/odoo/pull/153018 Part 3: https://github.com/odoo/odoo/pull/153023 Part 4: https://github.com/odoo/odoo/pull/153203 Part 5: https://github.com/odoo/odoo/pull/153425 Part 6: https://github.com/odoo/odoo/pull/153700 Part 7: https://github.com/odoo/odoo/pull/154054 Part 8: https://github.com/odoo/odoo/pull/154579 Part 9: https://github.com/odoo/odoo/pull/155073 Part 10: https://github.com/odoo/odoo/pull/155639 Part 11: https://github.com/odoo/odoo/pull/156255 / https://github.com/odoo/enterprise/pull/58135 Part 12: https://github.com/odoo/odoo/pull/156869 Part 13: https://github.com/odoo/odoo/pull/158384 / https://github.com/odoo/enterprise/pull/59019 Part 14: https://github.com/odoo/odoo/pull/158916 Part 15: https://github.com/odoo/odoo/pull/160292 / https://github.com/odoo/enterprise/pull/59971 Part 15.5: https://github.com/odoo/odoo/pull/166463 Part 16: https://github.com/odoo/odoo/pull/166311 Part 17: https://github.com/odoo/odoo/pull/168328 Part 18: https://github.com/odoo/odoo/pull/171004 / https://github.com/odoo/enterprise/pull/65657 Part 19: https://github.com/odoo/odoo/pull/171242 / https://github.com/odoo/enterprise/pull/65767 Part 20: https://github.com/odoo/odoo/pull/173332 / https://github.com/odoo/enterprise/pull/66895 Part 21: https://github.com/odoo/odoo/pull/174337 Part 22: https://github.com/odoo/odoo/pull/176777 / https://github.com/odoo/enterprise/pull/68721 Part 23: https://github.com/odoo/odoo/pull/179660 / https://github.com/odoo/enterprise/pull/69728 Part 24: https://github.com/odoo/odoo/pull/181971 Part 25: https://github.com/odoo/odoo/pull/183358 Community: https://github.com/odoo/odoo/pull/186403 This pull requests brings various improvements and fixes to Hoot and the Odoo unit test ecosystem. See the different commit messages for more details. Note: these changes are made in stable to avoid having to support multiple versions of the HOOT API. As such, these changes are intended to be strictly limited to unit tests as to not put the rest of the code base at risk. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/enterprise#73361
The trigger in the tour that filter apps was wrongly set to "Not Installed", instead of "Installed". Indeed, that tour puts approval on ir.module's updgrade button, so on already installed apps, and check whether approval rules are triggered when clicking on the "upgrade" button. So we need to filter only installed apps in the ir.module kanban. Forward-Port-Of: odoo/enterprise#73441
Original PR description
The trigger in the tour that filter apps was wrongly set to "Not Installed", instead of "Installed". Indeed, that tour puts approval on ir.module's updgrade button, so on already installed apps, and check whether approval rules are triggered when clicking on the "upgrade" button. So we need to filter only installed apps in the ir.module kanban. Forward-Port-Of: odoo/enterprise#73441
The 'Requests to switch' filter is supposed to show slots that are unwanted and that are not in the past. Prior to this commit, some shifts that were in the future were not shown by the filter. That was because the planning.slot field end_datetime was encoded in UTC while the datetime.datetime.now() function in the filter's domain was returning the datetime in the client's timezone. Shifts in the time difference between the user's timezone and UTC would be mistakenly marked as "past shifts
Original PR description
The 'Requests to switch' filter is supposed to show slots that are unwanted and that are not in the past. Prior to this commit, some shifts that were in the future were not shown by the filter. That was because the planning.slot field end_datetime was encoded in UTC while the datetime.datetime.now() function in the filter's domain was returning the datetime in the client's timezone. Shifts in the time difference between the user's timezone and UTC would be mistakenly marked as "past shifts" while they might still be in the future. We fix this by using the 'to_utc()' function which should make the filter domain's comparisson between 2 UTC datetimes. Fix done in 17.0 task-4286161 Forward-Port-Of: odoo/enterprise#72820
Steps to reproduce: - New product > Storable; Recurring; Edit 'On Hand Quantity' to 10 - New subscription > Add your product > Confirm - Create Invoice > Confirm > Back to sub - View forecast on order line > 1 reserved; 1 forecasted for next period (This is correct, the subscription is ongoing) - Renew > Confirm > View forecast - 1 reserved for original sub (OK); 2 forecasted for next period This is wrong because renewed subscriptions should no longer have recurring invoices, meaning th
Original PR description
Steps to reproduce: - New product > Storable; Recurring; Edit 'On Hand Quantity' to 10 - New subscription > Add your product > Confirm - Create Invoice > Confirm > Back to sub - View forecast on order line > 1 reserved; 1 forecasted for next period (This is correct, the subscription is ongoing) - Renew > Confirm > View forecast - 1 reserved for original sub (OK); 2 forecasted for next period This is wrong because renewed subscriptions should no longer have recurring invoices, meaning there is no reason to forecast a stock decrease for them. i.e here it should only forecast 1 unit for the next period corresponding to our new subscription (Created by renew). Prior to 17.0 a storable product cannot also be recurring, so this issue is irrelevant there. opw-4239989 Forward-Port-Of: odoo/enterprise#73413 Forward-Port-Of: odoo/enterprise#72397
Steps --- * Create a payslip for an Employee with a contract (e.g. Anita Oliver) (*Payroll > Payslips > All Payslips > New*) * From the *Edit Payslip Lines* action, try to add a new worked day line (first list) with a non 0 amount * *Validate Edition* => Traceback Cause --- When saving new worked days lines, we try to recompute the amount of the *Basic Salary* payslip line, but if the payslip is still a **draft** it was never computed, and so the action we are calling does not exist
Original PR description
Steps --- * Create a payslip for an Employee with a contract (e.g. Anita Oliver) (*Payroll > Payslips > All Payslips > New*) * From the *Edit Payslip Lines* action, try to add a new worked day line (first list) with a non 0 amount * *Validate Edition* => Traceback Cause --- When saving new worked days lines, we try to recompute the amount of the *Basic Salary* payslip line, but if the payslip is still a **draft** it was never computed, and so the action we are calling does not exist. task-4191349 Forward-Port-Of: odoo/enterprise#72031 Forward-Port-Of: odoo/enterprise#71373
Have a node that goes: ```xml <div groups="!module.some_group" /> ``` Before this commit, this case was not handled and that not-group was just ignored. This created confusion as the node, when the user was part of the group, would be invisible, the checkbox invisible would be ticked, and uniticking it had no effect. After this commit, we handle the case, with a second selector in the studio sidebar. opw-4273853 Forward-Port-Of: odoo/enterprise#73419 Forward-Port-Of: odoo/enter
Original PR description
Have a node that goes: ```xml <div groups="!module.some_group" /> ``` Before this commit, this case was not handled and that not-group was just ignored. This created confusion as the node, when the user was part of the group, would be invisible, the checkbox invisible would be ticked, and uniticking it had no effect. After this commit, we handle the case, with a second selector in the studio sidebar. opw-4273853 Forward-Port-Of: odoo/enterprise#73419 Forward-Port-Of: odoo/enterprise#73233
Adding the journal type to the user informations of the OCR parsing request will help the algorithm as it'll know whether it's a credit card statement or a "regular" bank statement that is being parsed. Task 4285658 Forward-Port-Of: odoo/enterprise#72829
Original PR description
Adding the journal type to the user informations of the OCR parsing request will help the algorithm as it'll know whether it's a credit card statement or a "regular" bank statement that is being parsed. Task 4285658 Forward-Port-Of: odoo/enterprise#72829
In this commit, we remove useless run: "click" on steps that are just a check. Forward-Port-Of: odoo/enterprise#73393
Original PR description
In this commit, we remove useless run: "click" on steps that are just a check. Forward-Port-Of: odoo/enterprise#73393
The problem: In the accounting reports, filter options were not being translated. Steps to reproduce: Install and change to the Danish language. Navigate to Accounting > Reporting > Partner ledger (Kontoudtog) Activate the filter "Only Show Unreconciled Entries" (Vis kun ikke udlignede posteringer) Generate the PDF report. Why it was happening: The array `extra_options` was built dynamically by concatenating raw python strings to it. Those raw strings will not be translated. The f
Original PR description
The problem: In the accounting reports, filter options were not being translated. Steps to reproduce: Install and change to the Danish language. Navigate to Accounting > Reporting > Partner ledger (Kontoudtog) Activate the filter "Only Show Unreconciled Entries" (Vis kun ikke udlignede posteringer) Generate the PDF report. Why it was happening: The array `extra_options` was built dynamically by concatenating raw python strings to it. Those raw strings will not be translated. The fix: Now, we create local variables for each string, using the syntax `<t t-set="label_raw_string">Raw String</t>` which makes the string label_raw_string translatable, then we append it to `extra_options`. opw-4213562 Forward-Port-Of: odoo/enterprise#73421 Forward-Port-Of: odoo/enterprise#72870
Steps to reproduce: - go to any pivot view - Insert the pivot into a spreadsheet - hit the "Freeze & share" button - open the sharing link in an incognito window => blank page When the document is copied (using the `copy` method), the frozen data is given as a new value for `spreadsheet_data`. But revisions are still copied even though new data is provided on which the revisions should not apply. Task: 4299935 Forward-Port-Of: odoo/enterprise#73117
Original PR description
Steps to reproduce: - go to any pivot view - Insert the pivot into a spreadsheet - hit the "Freeze & share" button - open the sharing link in an incognito window => blank page When the document is copied (using the `copy` method), the frozen data is given as a new value for `spreadsheet_data`. But revisions are still copied even though new data is provided on which the revisions should not apply. Task: 4299935 Forward-Port-Of: odoo/enterprise#73117
Purpose ======= Fix the left panel which wasn't updated when dragging a folder to trash. Specification ============= When dragging a document of type 'folder' to the trash, the model is correctly being notified but the search model isn't, the folder is thus still visible in the left panel. Fixing that by also reloading the search model when archiving a document. Moving the reloading methods calls from toggleArchive to onDropDocuments as it is the only method where we don't reload t
Original PR description
Purpose ======= Fix the left panel which wasn't updated when dragging a folder to trash. Specification ============= When dragging a document of type 'folder' to the trash, the model is correctly being notified but the search model isn't, the folder is thus still visible in the left panel. Fixing that by also reloading the search model when archiving a document. Moving the reloading methods calls from toggleArchive to onDropDocuments as it is the only method where we don't reload the model and search model after archiving. Keeping the reload calls in toggleArchive caused redundant reloads of the models. Task-4260645 Forward-Port-Of: odoo/enterprise#72068
Before this PR, the oe_add class caused the input field to stretch across the entire line. After this PR, adjustments to the class ensure it only takes up the necessary space. task-4223539 Forward-Port-Of: odoo/enterprise#71333
Original PR description
Before this PR, the oe_add class caused the input field to stretch across the entire line. After this PR, adjustments to the class ensure it only takes up the necessary space. task-4223539 Forward-Port-Of: odoo/enterprise#71333
Steps: Create a product of type service that creates a task. Create a subscription with that product, and confirm. Note that if you set the task's state to done, it creates another one. Close the subscription. Issue: If you set the task's state to done, it still creates another one, whereas it would make sense that the task's recurrence ends with the "invoice recurrence". Cause: Actually, it was first designed that way, and `_set_closed_state` was overridden to unlink the recurrence. B
Original PR description
Steps: Create a product of type service that creates a task. Create a subscription with that product, and confirm. Note that if you set the task's state to done, it creates another one. Close the subscription. Issue: If you set the task's state to done, it still creates another one, whereas it would make sense that the task's recurrence ends with the "invoice recurrence". Cause: Actually, it was first designed that way, and `_set_closed_state` was overridden to unlink the recurrence. But then that method and `set_close` were rethought and the override wasn't called anymore. Solution: Just do the same thing, but in `set_close` i/o `_set_closed_state`. task-4259561 Forward-Port-Of: odoo/enterprise#72706
Forward-Port-Of: odoo/enterprise#73389
Original PR description
Forward-Port-Of: odoo/enterprise#73389
https://github.com/odoo/odoo/pull/164671 offers a way for non-template editors to use simple expressions. Thanks to this, most of the expressions used in email templates, such as the partner name in an opportunity email template, can be used by regular users without the need to be an email template editor. Thanks to this, the need to set, by default, internal users as template editors is no longer a strong necessity. This revision aims to set the "Restrict Template Rendering" setting
Original PR description
https://github.com/odoo/odoo/pull/164671 offers a way for non-template editors to use simple expressions. Thanks to this, most of the expressions used in email templates, such as the partner name in an opportunity email template, can be used by regular users without the need to be an email template editor. Thanks to this, the need to set, by default, internal users as template editors is no longer a strong necessity. This revision aims to set the "Restrict Template Rendering" setting by default. Companies needing to set everyone as an email template editor can enable this back by un-checking its related box in the general settings. task-4246174 Forward-Port-Of: odoo/enterprise#71619
To check that an amount is greater than another one, compare_amounts need to be bigger than 0 not 1 Forward-Port-Of: odoo/enterprise#73183 Forward-Port-Of: odoo/enterprise#73159
Original PR description
To check that an amount is greater than another one, compare_amounts need to be bigger than 0 not 1 Forward-Port-Of: odoo/enterprise#73183 Forward-Port-Of: odoo/enterprise#73159
Bank statement OCR requests now include the type of journal being processed, such as credit card or regular bank account. This extra context helps the parsing service interpret statements more accurately, improving automation quality for accounting teams.
Original PR description
Adding the journal type to the user informations of the OCR parsing request will help the algorithm as it'll know whether it's a credit card statement or a "regular" bank statement that is being parsed. Task 4285658
Resolved issues and error corrections
Duplicating a project from the kanban view no longer keeps the original project's stage. New copies now start in the expected default stage, helping teams avoid misplaced projects and workflow confusion.
Original PR description
Steps to reproduce: - Settings > Enable 'Project Stages' - Projects app > New Project > Drag it into 'In Progress' stage - From Project Kanban view duplicate that project The duplicated project is created directly in 'In Progress' stage when it should have defaulted to the lowest sequence stage 'To Do'. Other duplication actions notably do not have this same issue. The kanban action specifically fetches default_stage_id from the context instead of using the dedicated default function of the sage_id field, but more generally we never want to copy the stage (as indicated by copy=False) so this fix covers for other possible mistakes. opw-4291455 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fixes an accounting test that was failing after a recent change in how journal entries are created. It helps keep payment discount behavior properly verified in the community edition, reducing the risk of regressions in accounting workflows.
Original PR description
The test_payments_epd_eligible_on_move_with_payment is no longer passing in community since this commit https://github.com/odoo/odoo/commit/0c2810df991b5ac48483f03d4cd0f5d281ece4b8. This is because a journal entry is now always generated in community edition, whether an outstanding account is provided or not. runbot issue: 105488 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Purchase order PDFs now show tax labels as clean text instead of displaying raw HTML tags. This makes printed purchase documents clearer and more professional for users, especially when using localized tax descriptions.
Original PR description
When printing the purchase order, the tax values were displayed with HTML tags because the field is an HTML field, and it was passed to the `join` function, which treated it as plain text. ```<span t-esc="', '.join(map(lambda x: x.description or x.name, line.taxes_id))"/>``` To fix this, the tax values are now converted to plain text before being passed to the `join` function. Steps to reproduce: 1. Create a purchase order PDF using taxes from a localization (e.g., Belgium). 2. Print the purchase order and observe the tax values displaying with HTML tags. opw-4260595 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update corrects several documentation links that still sent users to version 17 pages. Users working with Point of Sale, Spanish localization, US accounting localization, and POS box setup will now be directed to the appropriate version 18.0 documentation.
Original PR description
* = point_of_sale, l10n_es, l10n_us_account, hw_posbox_homepage 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
Purchase order documents now display the tax name instead of the tax description. This prevents visible HTML tags from appearing in the Taxes column, making printed purchase orders clearer and more professional.
Original PR description
Version: 18.0+ Issue: Currently we are using the `description` of the tax to place on the report. This will cause the `<p>` tags to show on the report because `description` is a HTML field. Purpose of this PR: To only use the tax name to show on the purchase order document by changing to a list comprehension. Steps to reproduce on runbot: install purchase create an purchase order assign a tax print purchase order `<p>` tags will show under the Taxes column. Notes: In previous versions `invoice_label` was being used for this report. opw-4292687 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The translation button for text and character fields is now positioned within its field instead of floating over nearby data. This improves readability and usability in forms with related records, especially when editing translated content.
Original PR description
In x2many form field, the translation feature appears at the end of the row and hovers some data. This commit: 1. Fixes the issue by ensuring that the element is positioned relatively to its container (cf. the translatable field). 2. Refactors the css related to the char_field and text_field translation buttons to avoid negative margins but also to simplify the css. task-4273364 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update fixes and improves Hoot, Odoo’s internal browser-based testing framework, along with related unit tests across several apps. It makes test reporting clearer, reduces stale failed-test results, improves mocked browser behavior, and helps developers catch issues more reliably before they affect users.
Original PR description
## Pull Request HOOT (PRHOOT) - part 26 Part 1: https://github.com/odoo/odoo/pull/152930 Part 2: https://github.com/odoo/odoo/pull/153018 Part 3: https://github.com/odoo/odoo/pull/153023 Part 4:…
## Pull Request HOOT (PRHOOT) - part 26 Part 1: https://github.com/odoo/odoo/pull/152930 Part 2: https://github.com/odoo/odoo/pull/153018 Part 3: https://github.com/odoo/odoo/pull/153023 Part 4: https://github.com/odoo/odoo/pull/153203 Part 5: https://github.com/odoo/odoo/pull/153425 Part 6: https://github.com/odoo/odoo/pull/153700 Part 7: https://github.com/odoo/odoo/pull/154054 Part 8: https://github.com/odoo/odoo/pull/154579 Part 9: https://github.com/odoo/odoo/pull/155073 Part 10: https://github.com/odoo/odoo/pull/155639 Part 11: https://github.com/odoo/odoo/pull/156255 / https://github.com/odoo/enterprise/pull/58135 Part 12: https://github.com/odoo/odoo/pull/156869 Part 13: https://github.com/odoo/odoo/pull/158384 / https://github.com/odoo/enterprise/pull/59019 Part 14: https://github.com/odoo/odoo/pull/158916 Part 15: https://github.com/odoo/odoo/pull/160292 / https://github.com/odoo/enterprise/pull/59971 Part 15.5: https://github.com/odoo/odoo/pull/166463 Part 16: https://github.com/odoo/odoo/pull/166311 Part 17: https://github.com/odoo/odoo/pull/168328 Part 18: https://github.com/odoo/odoo/pull/171004 / https://github.com/odoo/enterprise/pull/65657 Part 19: https://github.com/odoo/odoo/pull/171242 / https://github.com/odoo/enterprise/pull/65767 Part 20: https://github.com/odoo/odoo/pull/173332 / https://github.com/odoo/enterprise/pull/66895 Part 21: https://github.com/odoo/odoo/pull/174337 Part 22: https://github.com/odoo/odoo/pull/176777 / https://github.com/odoo/enterprise/pull/68721 Part 23: https://github.com/odoo/odoo/pull/179660 / https://github.com/odoo/enterprise/pull/69728 Part 24: https://github.com/odoo/odoo/pull/181971 Part 25: https://github.com/odoo/odoo/pull/183358 Enterprise: https://github.com/odoo/enterprise/pull/73361 This pull requests brings various improvements and fixes to Hoot and the Odoo unit test ecosystem. See the different commit messages for more details. Note: these changes are made in stable to avoid having to support multiple versions of the HOOT API. As such, these changes are intended to be strictly limited to unit tests as to not put the rest of the code base at risk. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The invoice portal now handles invoices without a due date without crashing. This prevents customers from seeing an error when opening their invoice list and keeps portal access reliable even when payment due dates are left blank.
Original PR description
Currently, an error occurs when opening a portal view of invoices and any invoice has no 'Due Date' Step to produce: - Install the ```account``` module. - Create a new invoice, add a customer name…
Currently, an error occurs when opening a portal view of invoices and any invoice has no 'Due Date' Step to produce: - Install the ```account``` module. - Create a new invoice, add a customer name and an invoice line, then save the record. - After that, remove the 'Payment terms' and confirm the invoice. - Then Remove a 'Due Date' and save a record. - Go to portal view and try to open 'Your Invoices', ```TypeError: '<' not supported between instances of 'bool' and 'datetime.date'``` An error occurs when the system tries to compare an invoice's due date with today's date at [1], but the due date is missing. Link [1]: https://github.com/odoo/odoo/blob/1615bdb7e52e5ad501922568a1baaee4fd07a4b7/addons/account/views/account_portal_templates.xml#L72 To resolve this issue, add a condition to skip the comparison between the invoice's due date and today's date, if the due date of invoice is unavailable. Sentry-6016842018 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fixes an issue where users could not properly use the attachment popout from accounting move lines after a related mail service change. It restores the expected workflow for viewing attachments without disrupting accounting tasks.
Original PR description
Before this commit, the attachment_view_move_line component was not adapted to the new changes done in the mail_popout_service. This commit solves this problem. task-4275364
Warning messages shown during shift swaps, time off conflicts, and shift conflicts now take up less unnecessary space. This makes the planning screen easier to read and reduces visual clutter for managers and employees.
Original PR description
Prior to this commit, the alert displayed in planning for shifts-switch, time off conflict and shifts conflict was too big, leaving a lot of empty space within the div. This commit sets some bootstrap classes to fix the issue. Task: 4224786
This fixes an error in recruitment document processing caused by using the wrong candidate reference. It also improves skill detection so skills are recognized when they appear at the very start or end of a text, making extracted candidate information more reliable.
Original PR description
Traceback due to typo: applicant_id -> candidate_id \+ fix regexp to also match skills at the start and end of the text \+ make tests fail without the fix task-4207776
This fixes an automated Web Studio test so it checks approval behavior on apps that are already installed, matching the real upgrade workflow. It helps ensure approval rules are properly validated when users upgrade installed apps, without changing day-to-day functionality.
Original PR description
The trigger in the tour that filter apps was wrongly set to "Not Installed", instead of "Installed". Indeed, that tour puts approval on ir.module's updgrade button, so on already installed apps, and check whether approval rules are triggered when clicking on the "upgrade" button. So we need to filter only installed apps in the ir.module kanban.
Users can no longer drag documents while viewing the Trash folder. This prevents errors and confusing notifications by clearly explaining why the action is not allowed.
Original PR description
**Before this PR:** Dragging and dropping documents from the TRASH to another folder will result in a traceback or user error. Dragging and dropping documents within the TRASH will trigger an unusual notification. **After this PR:** Disable dragging in the TRASH folder and inform the user with a valid reason. Task-4231709
This fixes an automated walkthrough used to verify field service report behavior by removing unnecessary click actions from check-only steps. The change helps keep internal validation reliable without changing day-to-day user functionality.
Original PR description
In this commit, we remove useless run: "click" on steps that are just a check.
Dragging a folder to the trash now refreshes the Documents side panel correctly, so the removed folder disappears immediately. This prevents confusion by keeping the folder list in sync with the user's action without extra manual refreshes.
Original PR description
Purpose ======= Fix the left panel which wasn't updated when dragging a folder to trash. Specification ============= When dragging a document of type 'folder' to the trash, the model is correctly being notified but the search model isn't, the folder is thus still visible in the left panel. Fixing that by also reloading the search model when archiving a document. Moving the reloading methods calls from toggleArchive to onDropDocuments as it is the only method where we don't reload the model and search model after archiving. Keeping the reload calls in toggleArchive caused redundant reloads of the models. Task-4260645
Code cleanup and technical improvements
This change updates automated test tours so hidden elements are identified more explicitly. It supports cleanup of older test logic and should improve maintainability without changing day-to-day user workflows.
Original PR description
In this commit, we add the pseudo selector :not(:visible) to invisible elements with the aim to remove _legacyVisible from findTrigger method in tour_step_automatic.js. 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 standardizes how automated product tours handle buttons and menus that are initially hidden. It reduces fragile test workarounds across several business apps, helping future updates be validated more reliably without changing day-to-day user behavior.
Original PR description
In this commit : - we add the pseudo selector :not(:visible) to invisible elements with the aim to remove _legacyVisible from findTrigger method in tour_step_automatic.js. - we also add "hover" action to make the element of the next step visible instead of using tricks to make it visible.
This update improves the automated test suite used to validate several Odoo Enterprise apps, including Mail, VoIP, Cohort, Gantt, Grid, Studio, and the web client. It removes older test dependencies and standardizes how tests that need browser focus are marked, helping developers maintain more reliable quality checks without changing day-to-day user workflows.
Original PR description
## Pull Request HOOT (PRHOOT) - part 26 Part 1: https://github.com/odoo/odoo/pull/152930 Part 2: https://github.com/odoo/odoo/pull/153018 Part 3: https://github.com/odoo/odoo/pull/153023 Part 4:…
## Pull Request HOOT (PRHOOT) - part 26 Part 1: https://github.com/odoo/odoo/pull/152930 Part 2: https://github.com/odoo/odoo/pull/153018 Part 3: https://github.com/odoo/odoo/pull/153023 Part 4: https://github.com/odoo/odoo/pull/153203 Part 5: https://github.com/odoo/odoo/pull/153425 Part 6: https://github.com/odoo/odoo/pull/153700 Part 7: https://github.com/odoo/odoo/pull/154054 Part 8: https://github.com/odoo/odoo/pull/154579 Part 9: https://github.com/odoo/odoo/pull/155073 Part 10: https://github.com/odoo/odoo/pull/155639 Part 11: https://github.com/odoo/odoo/pull/156255 / https://github.com/odoo/enterprise/pull/58135 Part 12: https://github.com/odoo/odoo/pull/156869 Part 13: https://github.com/odoo/odoo/pull/158384 / https://github.com/odoo/enterprise/pull/59019 Part 14: https://github.com/odoo/odoo/pull/158916 Part 15: https://github.com/odoo/odoo/pull/160292 / https://github.com/odoo/enterprise/pull/59971 Part 15.5: https://github.com/odoo/odoo/pull/166463 Part 16: https://github.com/odoo/odoo/pull/166311 Part 17: https://github.com/odoo/odoo/pull/168328 Part 18: https://github.com/odoo/odoo/pull/171004 / https://github.com/odoo/enterprise/pull/65657 Part 19: https://github.com/odoo/odoo/pull/171242 / https://github.com/odoo/enterprise/pull/65767 Part 20: https://github.com/odoo/odoo/pull/173332 / https://github.com/odoo/enterprise/pull/66895 Part 21: https://github.com/odoo/odoo/pull/174337 Part 22: https://github.com/odoo/odoo/pull/176777 / https://github.com/odoo/enterprise/pull/68721 Part 23: https://github.com/odoo/odoo/pull/179660 / https://github.com/odoo/enterprise/pull/69728 Part 24: https://github.com/odoo/odoo/pull/181971 Part 25: https://github.com/odoo/odoo/pull/183358 Community: https://github.com/odoo/odoo/pull/186403 This pull requests brings various improvements and fixes to Hoot and the Odoo unit test ecosystem. See the different commit messages for more details. Note: these changes are made in stable to avoid having to support multiple versions of the HOOT API. As such, these changes are intended to be strictly limited to unit tests as to not put the rest of the code base at risk. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Miscellaneous changes
Since domain methods of fields are set using the actual class method instead of a lambda, it is not possible to inherit those methods when inheriting the model. This issue is fixed by using a lambda function to call the domain method. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#186073 Forward-Port-Of: odoo/odoo#185419
Original PR description
Since domain methods of fields are set using the actual class method instead of a lambda, it is not possible to inherit those methods when inheriting the model. This issue is fixed by using a lambda function to call the domain method. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#186073 Forward-Port-Of: odoo/odoo#185419
Before this commit, the chatter popout button was not working. This comes from recent changes to popout service that were affected to popout from attachment but not from chatter [1]. task-4275364 [1]: https://github.com/odoo/odoo/pull/174878 Forward-Port-Of: odoo/odoo#184742
Original PR description
Before this commit, the chatter popout button was not working. This comes from recent changes to popout service that were affected to popout from attachment but not from chatter [1]. task-4275364 [1]: https://github.com/odoo/odoo/pull/174878 Forward-Port-Of: odoo/odoo#184742
First pass on the most used controllers which can be flagged as read-only. Forward-Port-Of: odoo/odoo#186319
Original PR description
First pass on the most used controllers which can be flagged as read-only. Forward-Port-Of: odoo/odoo#186319
Before this PR, pressing `Escape` while renaming a thread in the chat window closed the entire chat window instead of simply exiting the rename mode. This PR ensures that pressing `Escape` only exits the rename action, keeping the chat window open. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#186538 Forward-Port-Of: odoo/odoo#185833
Original PR description
Before this PR, pressing `Escape` while renaming a thread in the chat window closed the entire chat window instead of simply exiting the rename mode. This PR ensures that pressing `Escape` only exits the rename action, keeping the chat window open. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#186538 Forward-Port-Of: odoo/odoo#185833
We can have a user that has enough rights to generate sales orders, but not enough right to check a BoM. When creating a new sale order for a kit, everything works fine. Before this commit, if we updated the quantity on the sale order line, the quantity on the moves would become incorrect. After this commit, the BoM is always found in order to correctly recompute the quantity on the moves. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forwar
Original PR description
We can have a user that has enough rights to generate sales orders, but not enough right to check a BoM. When creating a new sale order for a kit, everything works fine. Before this commit, if we updated the quantity on the sale order line, the quantity on the moves would become incorrect. After this commit, the BoM is always found in order to correctly recompute the quantity on the moves. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#186446 Forward-Port-Of: odoo/odoo#180442
Use loops with clear input/expected structure to ease changes and debugging. Add few tests while passing by. Task-3943087 Forward-Port-Of: odoo/odoo#186468
Original PR description
Use loops with clear input/expected structure to ease changes and debugging. Add few tests while passing by. Task-3943087 Forward-Port-Of: odoo/odoo#186468
During a major upgrade the registry my be `loaded` but not `ready`. https://github.com/odoo/odoo/blob/9918e8f3d627f3c52238d6b04bcd15c05d34e40c/odoo/modules/registry.py#L159-L160 This causes unnecessary warnings during upgrades (blocking the CI). --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#186501 Forward-Port-Of: odoo/odoo#186467
Original PR description
During a major upgrade the registry my be `loaded` but not `ready`. https://github.com/odoo/odoo/blob/9918e8f3d627f3c52238d6b04bcd15c05d34e40c/odoo/modules/registry.py#L159-L160 This causes unnecessary warnings during upgrades (blocking the CI). --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#186501 Forward-Port-Of: odoo/odoo#186467
Issue: ------- The `res.device.log` model contains a huge number of records and this causes a performance problem for users belonging to the `base.group_system` group. The `res.device` table is a non-materialized view defined with a `DISTINCT ON` clause that uses the `user_id`, `session_identifier`, `platform`, `browser` columns. When we want to retrieve the `res.device` records for a user, two queries are performed. The first will retrieve the `res.device` ids for the user. ```sql
Original PR description
Issue: ------- The `res.device.log` model contains a huge number of records and this causes a performance problem for users belonging to the `base.group_system` group. The `res.device` table is a…
Issue:
-------
The `res.device.log` model contains a huge number of records and this causes a performance problem
for users belonging to the `base.group_system` group.
The `res.device` table is a non-materialized view defined with a `DISTINCT ON` clause
that uses the `user_id`, `session_identifier`, `platform`, `browser` columns.
When we want to retrieve the `res.device` records for a user, two queries are performed.
The first will retrieve the `res.device` ids for the user.
```sql
SELECT d.id FROM res_device d WHERE d.user_id=<user_id>
```
The second will retrieve the information for the `res.device` found in the first query.
```sql
SELECT d.* FROM res_device WHERE d.id IN (<device_ids>)
```
The second query will be very slow for an administrator, because Postgresql cannot use
the index on the primary key (`id`). Only the fields used in the `DISTINCT ON` clause
can be used as an index.
As a result, Postgresql will have to scan the entire `res_device_log` table, which is very large.
For a user who does not belong to the `base.group_system` group, an `ir.rule` is applied
so that they can only see their own `res_device`. For them, the second query is:
```sql
SELECT d.* FROM res_device WHERE d.id IN (<device_ids>) AND d.user_id = <user_id>
```
Postgresql can use the index on `user_id` to filter the table very quickly.
Then it is very fast to find the devices corresponding to the ids in the reduced table.
Solution:
----------
Unfortunately, it doesn't make sense to add the `id` column to the `DISTINCT ON` clause.
One solution could be to keep the `ir.rule` for people in the `base.group_system` group,
but we want administrators to have access to the `res.device` records of all users.
This solution was therefore rejected.
The solution adopted is to modify the non-materialized view so that Postgresql can use
the index on the primary key.
The goal of the view is to deduplicate records from the `res.device.log` model.
If for a given record, we find another record which has the same `user_id`, `session_identifier`,
`platform`, `browser` with a more recent `last_activity`, then we don't keep it.
Add a comparison between the `id` if the `last_activity` values are the same.
In addition, we need to take into account the case where we are unable to determine
the `platform` and the `browser` with the user agent.
This leads to `NULL` values, which must be handled with `IS DISTINCT FROM`.
To improve performance, we can also add a composite index with `user_id`, `session_identifier`,
`platform` and `browser` on `res.device.log`.
Appendices:
------------
Non administrator:
```
EXPLAIN ANALYZE SELECT * FROM res_device WHERE id=1 AND user_id=2;
Subquery Scan on res_device (cost=4.46..4.48 rows=1 width=126) (actual time=0.114..0.125 rows=0 loops=1)
Filter: (res_device.id = 1)
Rows Removed by Filter: 2
-> Unique (cost=4.46..4.47 rows=1 width=126) (actual time=0.089..0.113 rows=2 loops=1)
-> Sort (cost=4.46..4.46 rows=1 width=126) (actual time=0.086..0.095 rows=3 loops=1)
Sort Key: d.session_identifier, d.platform, d.browser, d.last_activity DESC, d.id DESC
Sort Method: quicksort Memory: 25kB
-> Index Scan using res_device_log__user_id_index on res_device_log d (cost=0.43..4.45 rows=1 width=126) (actual time=0.049..0.064 rows=3 loops=1)
Index Cond: (user_id = 2)
Filter: (NOT revoked)
Planning Time: 0.224 ms
Execution Time: 0.171 ms
```
Administrator:
```
EXPLAIN ANALYZE SELECT * FROM res_device WHERE id=1;
Subquery Scan on res_device (cost=475345.64..1031211.97 rows=20000 width=126) (actual time=32385.982..32425.079 rows=0 loops=1)
Filter: (res_device.id = 1)
Rows Removed by Filter: 3999995
-> Unique (cost=475345.64..981211.93 rows=4000003 width=126) (actual time=5740.682..27526.236 rows=3999995 loops=1)
-> Gather Merge (cost=475345.64..941211.90 rows=4000003 width=126) (actual time=5740.679..17382.463 rows=4000003 loops=1)
Workers Planned: 2
Workers Launched: 2
-> Sort (cost=474345.61..478512.28 rows=1666668 width=126) (actual time=5723.180..8743.966 rows=1333334 loops=3)
Sort Key: d.user_id, d.session_identifier, d.platform, d.browser, d.last_activity DESC, d.id DESC
Sort Method: external merge Disk: 159344kB
Worker 0: Sort Method: external merge Disk: 158864kB
Worker 1: Sort Method: external merge Disk: 159360kB
-> Parallel Seq Scan on res_device_log d (cost=0.00..85632.68 rows=1666668 width=126) (actual time=74.375..1997.856 rows=1333334 loops=3)
Filter: (NOT revoked)
Planning Time: 0.215 ms
JIT:
Functions: 9
Options: Inlining true, Optimization true, Expressions true, Deforming true
Timing: Generation 1.220 ms, Inlining 84.317 ms, Optimization 86.161 ms, Emission 52.570 ms, Total 224.268 ms
Execution Time: 32443.730 ms
```
Administrator with corrected view:
```
EXPLAIN ANALYZE SELECT * FROM res_device WHERE id=1;
Sort (cost=16.93..16.94 rows=1 width=126) (actual time=0.854..0.864 rows=0 loops=1)
Sort Key: d.last_activity DESC
Sort Method: quicksort Memory: 25kB
-> Nested Loop Anti Join (cost=0.86..16.92 rows=1 width=126) (actual time=0.844..0.852 rows=0 loops=1)
-> Index Scan using res_device_log_pkey on res_device_log d (cost=0.43..8.45 rows=1 width=126) (actual time=0.608..0.613 rows=1 loops=1)
Index Cond: (id = 1)
Filter: (NOT revoked)
-> Index Scan using res_device_log__session_identifier_index on res_device_log d2 (cost=0.43..8.46 rows=1 width=49) (actual time=0.221..0.223 rows=1 loops=1)
Index Cond: ((session_identifier)::text = (d.session_identifier)::text)
Filter: ((NOT revoked) AND (NOT ((platform)::text IS DISTINCT FROM (d.platform)::text)) AND (NOT ((browser)::text IS DISTINCT FROM (d.browser)::text)) AND (user_id = d.user_id) AND ((last_activity > d.last_activity) OR ((last_activity = d.last_activity) AND (id > d.id))))
Rows Removed by Filter: 1
Planning Time: 8.539 ms
Execution Time: 0.930 ms
```
Administrator with corrected view and index:
```
EXPLAIN ANALYZE SELECT * FROM res_device WHERE id=1;
Sort (cost=16.93..16.94 rows=1 width=126) (actual time=0.151..0.163 rows=0 loops=1)
Sort Key: d.last_activity DESC
Sort Method: quicksort Memory: 25kB
-> Nested Loop Anti Join (cost=0.86..16.92 rows=1 width=126) (actual time=0.140..0.149 rows=0 loops=1)
-> Index Scan using res_device_log_pkey on res_device_log d (cost=0.43..8.45 rows=1 width=126) (actual time=0.063..0.067 rows=1 loops=1)
Index Cond: (id = 1)
Filter: (NOT revoked)
-> Index Only Scan using res_device_log__composite_idx on res_device_log d2 (cost=0.43..8.46 rows=1 width=49) (actual time=0.064..0.066 rows=1 loops=1)
Index Cond: ((user_id = d.user_id) AND (session_identifier = (d.session_identifier)::text))
Filter: ((NOT ((platform)::text IS DISTINCT FROM (d.platform)::text)) AND (NOT ((browser)::text IS DISTINCT FROM (d.browser)::text)) AND ((last_activity > d.last_activity) OR ((last_activity = d.last_activity) AND (id > d.id))))
Rows Removed by Filter: 1
Heap Fetches: 1
Planning Time: 11.480 ms
Execution Time: 0.225 ms
```
Forward-Port-Of: odoo/odoo#186106Before this commit, when the accrual cron was running and there was a leave in the future to account for, it would calculate the number of days by processing a fake allocation and invalidating it afterwards. However, the cache invalidation was too aggressive and would also invalidate any changes that were made to existing accrual allocations that were not yet flushed. This commit fixes this behavior by invalidating the recordset so as to only invalidate the fake allocations. opw-4200067 F
Original PR description
Before this commit, when the accrual cron was running and there was a leave in the future to account for, it would calculate the number of days by processing a fake allocation and invalidating it afterwards. However, the cache invalidation was too aggressive and would also invalidate any changes that were made to existing accrual allocations that were not yet flushed. This commit fixes this behavior by invalidating the recordset so as to only invalidate the fake allocations. opw-4200067 Forward-Port-Of: odoo/odoo#185957
Issue: When printing an employee badge for an employee without a job position, the default title was set to "Software Developer." Steps to Reproduce: -Create an employee with an empty job position. -Alternatively, remove the job position of an existing employee. -Generate and print a badge (in HR settings). Explanation: In `hr_employee_badge.xml`, the default value was set to "Software Developer." opw-4255102 --- I confirm I have signed the CLA and read the PR guidelines at www.
Original PR description
Issue: When printing an employee badge for an employee without a job position, the default title was set to "Software Developer." Steps to Reproduce: -Create an employee with an empty job position. -Alternatively, remove the job position of an existing employee. -Generate and print a badge (in HR settings). Explanation: In `hr_employee_badge.xml`, the default value was set to "Software Developer." opw-4255102 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#186152 Forward-Port-Of: odoo/odoo#185458
Blacklist Odoo in your browser from having access to the local and session storages (security parameters). Before this commit, there were unrecoverable crashes because even doing `window.[localStorage|sessionStorage]` is forbidden. After this commit, we catch those exceptions and make a RamStorage instead. opw-4226366 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
Original PR description
Blacklist Odoo in your browser from having access to the local and session storages (security parameters). Before this commit, there were unrecoverable crashes because even doing `window.[localStorage|sessionStorage]` is forbidden. After this commit, we catch those exceptions and make a RamStorage instead. opw-4226366 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#186294 Forward-Port-Of: odoo/odoo#185811
Description of the issue/feature this PR addresses: Link to task: [#4218972](https://www.odoo.com/web#model=project.task&id=4218972) This change fixes english and arabic labels & translations in the l10n_sa_invoice module Current behavior before PR: Some labels are inaccurate or do not match the saudi arabia ZATCA invoice template. Desired behavior after PR is merged: Labels are more accurate and match the saudi arabia ZATCA invoice template. --- I confirm I have signed the CL
Original PR description
Description of the issue/feature this PR addresses: Link to task: [#4218972](https://www.odoo.com/web#model=project.task&id=4218972) This change fixes english and arabic labels & translations in the l10n_sa_invoice module Current behavior before PR: Some labels are inaccurate or do not match the saudi arabia ZATCA invoice template. Desired behavior after PR is merged: Labels are more accurate and match the saudi arabia ZATCA invoice template. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#186096 Forward-Port-Of: odoo/odoo#184060
[IMP] l10n_es: Add new tax grid for es *Create a new tax grid mod390[110] *Add this tax grid to all taxes in l10n_es on Distribution lines that already have mod303[120] *Make the modelo 390 use that tax grid on the line 110 task-4058894 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#175354
Original PR description
[IMP] l10n_es: Add new tax grid for es *Create a new tax grid mod390[110] *Add this tax grid to all taxes in l10n_es on Distribution lines that already have mod303[120] *Make the modelo 390 use that tax grid on the line 110 task-4058894 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#175354
Steps to reproduce: ==== - Create a promotion program - Rule: Condition --> Select combo product, Reward --> type - discount specific product - Combo product - Open POS and add combo product. - Click on reward button and select on available reward. Issue: === - Promotion is not applied if combo product is added. Fix: === - Previously, when a specific combo product was added as a loyalty reward, it wasn’t properly handled in promotions. This update ensures that combo products in
Original PR description
Steps to reproduce: ==== - Create a promotion program - Rule: Condition --> Select combo product, Reward --> type - discount specific product - Combo product - Open POS and add combo product. - Click on reward button and select on available reward. Issue: === - Promotion is not applied if combo product is added. Fix: === - Previously, when a specific combo product was added as a loyalty reward, it wasn’t properly handled in promotions. This update ensures that combo products included in loyalty rewards and promotion is applied. task-4285895 Forward-Port-Of: odoo/odoo#186231 Forward-Port-Of: odoo/odoo#185780
**Behaviour before PR:** In chatGPT prompt dialog, scroll position is not set to the latest message automatically after hitting 3-4 prompts. User has to scroll to bottom manually. **After this PR:** This commit aims to make sure that the scroll postion is set to the latest message after submitting prompt. task-4256085 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#185784 Forward-Port-Of: odoo/odoo#183862
Original PR description
**Behaviour before PR:** In chatGPT prompt dialog, scroll position is not set to the latest message automatically after hitting 3-4 prompts. User has to scroll to bottom manually. **After this PR:** This commit aims to make sure that the scroll postion is set to the latest message after submitting prompt. task-4256085 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#185784 Forward-Port-Of: odoo/odoo#183862
Description of the issue/feature this PR addresses: - Improve _get_report_lines performance Current behavior before PR: - A lag is seen when opening Manufacturing orders, because it goes to compute `components_availability`, calling https://github.com/odoo/odoo/blob/0d3ab1203ad00e2c41768f3209e45cd673e519e7/addons/mrp/models/mrp_production.py#L344 function, which ends up calling https://github.com/odoo/odoo/blob/0d3ab1203ad00e2c41768f3209e45cd673e519e7/addons/stock/report/stock_forecasted.
Original PR description
Description of the issue/feature this PR addresses: - Improve _get_report_lines performance Current behavior before PR: - A lag is seen when opening Manufacturing orders, because it goes to compute…
Description of the issue/feature this PR addresses: - Improve _get_report_lines performance Current behavior before PR: - A lag is seen when opening Manufacturing orders, because it goes to compute `components_availability`, calling https://github.com/odoo/odoo/blob/0d3ab1203ad00e2c41768f3209e45cd673e519e7/addons/mrp/models/mrp_production.py#L344 function, which ends up calling https://github.com/odoo/odoo/blob/0d3ab1203ad00e2c41768f3209e45cd673e519e7/addons/stock/report/stock_forecasted.py#L190 - currently, in `_get_report_lines` function, **transit_stock** https://github.com/odoo/odoo/blob/0d3ab1203ad00e2c41768f3209e45cd673e519e7/addons/stock/report/stock_forecasted.py#L353 is calculated by summing quantities with list comprehension on the **currents** dictionary for each product. https://github.com/odoo/odoo/blob/0d3ab1203ad00e2c41768f3209e45cd673e519e7/addons/stock/report/stock_forecasted.py#L327 - This becomes slow when handling huge number of products and large currents entries. due to O(n * m) complexity Desired behavior after PR is merged: - A dictionary of pre-computed product quantity, minimizes the time taken. ### Here are few benchmarks and stats. **At time of function call :** - As the test database is populated with 2 location ids `_get_report_lines` is called twice during testing, because of https://github.com/odoo/odoo/blob/6e9ace2df2dd3750472c227f818d3dc8d5ba5016/addons/stock/models/stock_move.py#L515-L517 - size of currents dict : 2539 + 2600 - No. of product : 2539 + 2412 ## Before  ## After  opw- 4285618 upg- 2179723 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#186238
Versions -------- - 16.0 _(sale_product_configurator)_ - 17.0+ _(website_sale_product_configurator)_ Steps ----- 1. Enable Dutch language; 2. go to eCommerce; 3. switch to mobile view; 4. go to a product which has optional products; 5. add to cart. Issue ----- There's not enough space in the configurator to properly display the "Toevoegen aan winkelmandje" button. Cause ----- The view isn't mobile-responsive. Solution -------- Replace the button with a simple cart ico
Original PR description
Versions -------- - 16.0 _(sale_product_configurator)_ - 17.0+ _(website_sale_product_configurator)_ Steps ----- 1. Enable Dutch language; 2. go to eCommerce; 3. switch to mobile view; 4. go to a product which has optional products; 5. add to cart. Issue ----- There's not enough space in the configurator to properly display the "Toevoegen aan winkelmandje" button. Cause ----- The view isn't mobile-responsive. Solution -------- Replace the button with a simple cart icon to ensure consistency between localisations while keeping things simple. opw-4198786 Forward-Port-Of: odoo/odoo#186050 Forward-Port-Of: odoo/odoo#185133
When in daily and weekly calendar views, the start time of events are shown twice in the event card, poluting the user interface. This commit removes the isolated start time for making the event card cleaner. task-4161302 Forward-Port-Of: odoo/odoo#186177 Forward-Port-Of: odoo/odoo#178984
Original PR description
When in daily and weekly calendar views, the start time of events are shown twice in the event card, poluting the user interface. This commit removes the isolated start time for making the event card cleaner. task-4161302 Forward-Port-Of: odoo/odoo#186177 Forward-Port-Of: odoo/odoo#178984
Steps: - Open Terminal and click on the burger combo - Select burger and click the cancel button - Select the burger again and click OK with the default selection - Select a drink Issue: - After selecting all components of the product, the `Add to Order` button remains disabled, preventing the combo from being added to the cart. Cause: - The combo state is not being reset when discarding or closing the product configuration popup. Fix: - Implemented a proper reset of the combo st
Original PR description
Steps: - Open Terminal and click on the burger combo - Select burger and click the cancel button - Select the burger again and click OK with the default selection - Select a drink Issue: - After selecting all components of the product, the `Add to Order` button remains disabled, preventing the combo from being added to the cart. Cause: - The combo state is not being reset when discarding or closing the product configuration popup. Fix: - Implemented a proper reset of the combo state upon closing the configuration popup. task-4285981 Forward-Port-Of: odoo/odoo#186393 Forward-Port-Of: odoo/odoo#185296
System shows Enterprise Widget on E-invoice module Although the module is available in community addons Steps to Reproduce : Run only community Install l10n_in module. Now Go to the Settings -> Invoicing. See the Enterprise Widget is on E-Invoice (Indian Integration). 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/submi
Original PR description
System shows Enterprise Widget on E-invoice module Although the module is available in community addons Steps to Reproduce : Run only community Install l10n_in module. Now Go to the Settings -> Invoicing. See the Enterprise Widget is on E-Invoice (Indian Integration). 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#186469 Forward-Port-Of: odoo/odoo#186389
During `test_drag_and_drop_event_in_calendar`, an error occurs due to the target not being found in drag and drop steps. When the test is performed on the same week as the event, there is a likely chance for the drag and drop steps to be triggered before the rendering of the Monthly Calendar view. When we are changing from weekly to monthly view, we will wait for the latter to be rendered before calling the next steps. runbot-error-105708 runbot-error-105709 Forward-Port-Of: odoo/odoo#18
Original PR description
During `test_drag_and_drop_event_in_calendar`, an error occurs due to the target not being found in drag and drop steps. When the test is performed on the same week as the event, there is a likely chance for the drag and drop steps to be triggered before the rendering of the Monthly Calendar view. When we are changing from weekly to monthly view, we will wait for the latter to be rendered before calling the next steps. runbot-error-105708 runbot-error-105709 Forward-Port-Of: odoo/odoo#186142
Fixed issue introduced in this PR: https://github.com/odoo/odoo/pull/119154. In the above PR, the recurring setting was removed, but the recurring groups were not removed from the group configuration, which caused the group's string to still appear. This issue has now been fixed. Steps to Reproduce and Verify the Fix: 1) Install the Project App. 2) Go to the Project App. 3) Activate the Recurring Feature in the settings. 4) Open any project and verify
Original PR description
Fixed issue introduced in this PR: https://github.com/odoo/odoo/pull/119154.
In the above PR, the recurring setting was removed, but the recurring groups
were not removed from the group configuration, which caused the group's string
to still appear. This issue has now been fixed.
Steps to Reproduce and Verify the Fix:
1) Install the Project App.
2) Go to the Project App.
3) Activate the Recurring Feature in the settings.
4) Open any project and verify the settings.
task-4260042
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#183861Since domain method for the Sales Order Item field is not harcoded anymore, the inheritance in this module is now considered, so it needs to be adapted to work correctly with the expected value, i.e. returning a list instead of a string. [FIX] helpdesk_sale_timesheet: unharcode domain method of SO line field Since domain method of the Sales Order Item field is set using the actual class method instead of a lambda, it is not possible to inherit that method when inheriting the model.
Original PR description
Since domain method for the Sales Order Item field is not harcoded anymore, the inheritance in this module is now considered, so it needs to be adapted to work correctly with the expected value, i.e. returning a list instead of a string. [FIX] helpdesk_sale_timesheet: unharcode domain method of SO line field Since domain method of the Sales Order Item field is set using the actual class method instead of a lambda, it is not possible to inherit that method when inheriting the model. This issue is fixed by using a lambda function to call the domain method. Forward-Port-Of: odoo/enterprise#73188 Forward-Port-Of: odoo/enterprise#72931
**Steps to reproduce:** - Install l10n_es_reports and Sales - Create a SO for a Spanish customer - Create an invoice from the SO - Check "AEAT data" tab of the invoice **Issue:** "Type for mod 347" is not set. It should be set to "Regular operation" as it is done when creating an invoice manually. **Cause:** The default is handled by a function that depends on another field. However that other field is not set when computing the default value and the result is always False. **So
Original PR description
**Steps to reproduce:** - Install l10n_es_reports and Sales - Create a SO for a Spanish customer - Create an invoice from the SO - Check "AEAT data" tab of the invoice **Issue:** "Type for mod 347" is not set. It should be set to "Regular operation" as it is done when creating an invoice manually. **Cause:** The default is handled by a function that depends on another field. However that other field is not set when computing the default value and the result is always False. **Solution:** There were a function for the default (_default_mod_349_invoice_type) and an onchange on partner (_onchange_partner_id_set_347_invoice_type). Both of them were checking different conditions. The fix is merging these 2 methods by converting the field into a computed stored field where both conditions are handled. opw-4194030 Forward-Port-Of: odoo/enterprise#72958
The 'Requests to switch' filter is supposed to show slots that are unwanted and that are not in the past. Prior to this commit, some shifts that were in the future were not shown by the filter. That was because the planning.slot field end_datetime was encoded in UTC while the datetime.datetime.now() function in the filter's domain was returning the datetime in the client's timezone. Shifts in the time difference between the user's timezone and UTC would be mistakenly marked as "past shifts
Original PR description
The 'Requests to switch' filter is supposed to show slots that are unwanted and that are not in the past. Prior to this commit, some shifts that were in the future were not shown by the filter. That was because the planning.slot field end_datetime was encoded in UTC while the datetime.datetime.now() function in the filter's domain was returning the datetime in the client's timezone. Shifts in the time difference between the user's timezone and UTC would be mistakenly marked as "past shifts" while they might still be in the future. We fix this by using the 'to_utc()' function which should make the filter domain's comparisson between 2 UTC datetimes. Fix done in 17.0 task-4286161 Forward-Port-Of: odoo/enterprise#72820
Steps --- * Create a payslip for an Employee with a contract (e.g. Anita Oliver) (*Payroll > Payslips > All Payslips > New*) * From the *Edit Payslip Lines* action, try to add a new worked day line (first list) with a non 0 amount * *Validate Edition* => Traceback Cause --- When saving new worked days lines, we try to recompute the amount of the *Basic Salary* payslip line, but if the payslip is still a **draft** it was never computed, and so the action we are calling does not exist
Original PR description
Steps --- * Create a payslip for an Employee with a contract (e.g. Anita Oliver) (*Payroll > Payslips > All Payslips > New*) * From the *Edit Payslip Lines* action, try to add a new worked day line (first list) with a non 0 amount * *Validate Edition* => Traceback Cause --- When saving new worked days lines, we try to recompute the amount of the *Basic Salary* payslip line, but if the payslip is still a **draft** it was never computed, and so the action we are calling does not exist. task-4191349 Forward-Port-Of: odoo/enterprise#72031 Forward-Port-Of: odoo/enterprise#71373
The problem: In the accounting reports, filter options were not being translated. Steps to reproduce: Install and change to the Danish language. Navigate to Accounting > Reporting > Partner ledger (Kontoudtog) Activate the filter "Only Show Unreconciled Entries" (Vis kun ikke udlignede posteringer) Generate the PDF report. Why it was happening: The array `extra_options` was built dynamically by concatenating raw python strings to it. Those raw strings will not be translated. The f
Original PR description
The problem: In the accounting reports, filter options were not being translated. Steps to reproduce: Install and change to the Danish language. Navigate to Accounting > Reporting > Partner ledger (Kontoudtog) Activate the filter "Only Show Unreconciled Entries" (Vis kun ikke udlignede posteringer) Generate the PDF report. Why it was happening: The array `extra_options` was built dynamically by concatenating raw python strings to it. Those raw strings will not be translated. The fix: Now, we create local variables for each string, using the syntax `<t t-set="label_raw_string">Raw String</t>` which makes the string label_raw_string translatable, then we append it to `extra_options`. opw-4213562 Forward-Port-Of: odoo/enterprise#73352 Forward-Port-Of: odoo/enterprise#72870
Steps to reproduce: - New product > Storable; Recurring; Edit 'On Hand Quantity' to 10 - New subscription > Add your product > Confirm - Create Invoice > Confirm > Back to sub - View forecast on order line > 1 reserved; 1 forecasted for next period (This is correct, the subscription is ongoing) - Renew > Confirm > View forecast - 1 reserved for original sub (OK); 2 forecasted for next period This is wrong because renewed subscriptions should no longer have recurring invoices, meaning th
Original PR description
Steps to reproduce: - New product > Storable; Recurring; Edit 'On Hand Quantity' to 10 - New subscription > Add your product > Confirm - Create Invoice > Confirm > Back to sub - View forecast on order line > 1 reserved; 1 forecasted for next period (This is correct, the subscription is ongoing) - Renew > Confirm > View forecast - 1 reserved for original sub (OK); 2 forecasted for next period This is wrong because renewed subscriptions should no longer have recurring invoices, meaning there is no reason to forecast a stock decrease for them. i.e here it should only forecast 1 unit for the next period corresponding to our new subscription (Created by renew). Prior to 17.0 a storable product cannot also be recurring, so this issue is irrelevant there. opw-4239989 Forward-Port-Of: odoo/enterprise#73347 Forward-Port-Of: odoo/enterprise#72397
Have a node that goes: ```xml <div groups="!module.some_group" /> ``` Before this commit, this case was not handled and that not-group was just ignored. This created confusion as the node, when the user was part of the group, would be invisible, the checkbox invisible would be ticked, and uniticking it had no effect. After this commit, we handle the case, with a second selector in the studio sidebar. opw-4273853 Forward-Port-Of: odoo/enterprise#73341 Forward-Port-Of: odoo/enter
Original PR description
Have a node that goes: ```xml <div groups="!module.some_group" /> ``` Before this commit, this case was not handled and that not-group was just ignored. This created confusion as the node, when the user was part of the group, would be invisible, the checkbox invisible would be ticked, and uniticking it had no effect. After this commit, we handle the case, with a second selector in the studio sidebar. opw-4273853 Forward-Port-Of: odoo/enterprise#73341 Forward-Port-Of: odoo/enterprise#73233
**Steps to reproduce:** - Install account_3way_match - Go to "Invoicing / Vendors / Bills" - Create a bill - (Edit the view in order to display "release_to_pay" field) - (Make sure that "Force Status" (force_release_to_pay) is always checked) - Set "Should Be Paid" (release_to_pay_manual) to "Yes" => "release_to_pay" becomes "Yes" - Save the bill => "release_to_pay" stays "Yes" - Change "Should Be Paid" to "No" => "release_to_pay" becomes "No" - Save the bill => "release_to_pay" reverts
Original PR description
**Steps to reproduce:** - Install account_3way_match - Go to "Invoicing / Vendors / Bills" - Create a bill - (Edit the view in order to display "release_to_pay" field) - (Make sure that "Force Status" (force_release_to_pay) is always checked) - Set "Should Be Paid" (release_to_pay_manual) to "Yes" => "release_to_pay" becomes "Yes" - Save the bill => "release_to_pay" stays "Yes" - Change "Should Be Paid" to "No" => "release_to_pay" becomes "No" - Save the bill => "release_to_pay" reverts to "Yes" **Issue:** Upon save, "release_to_pay" reverts to "Yes", even if it has been correctly computed to "No" before saving. opw-4181752 Forward-Port-Of: odoo/enterprise#73289 Forward-Port-Of: odoo/enterprise#72190
To check that an amount is greater than another one, compare_amounts need to be bigger than 0 not 1 Forward-Port-Of: odoo/enterprise#73183 Forward-Port-Of: odoo/enterprise#73159
Original PR description
To check that an amount is greater than another one, compare_amounts need to be bigger than 0 not 1 Forward-Port-Of: odoo/enterprise#73183 Forward-Port-Of: odoo/enterprise#73159
Currently, when the "Ask to Switch" toast is displayed, the fa-check-circle and fa-exclamation-circle are not visible because they have the same color as the background of the toast. This PR will remove their color, making them dark and visible. task-3919543 Forward-Port-Of: odoo/enterprise#71345
Original PR description
Currently, when the "Ask to Switch" toast is displayed, the fa-check-circle and fa-exclamation-circle are not visible because they have the same color as the background of the toast. This PR will remove their color, making them dark and visible. task-3919543 Forward-Port-Of: odoo/enterprise#71345
Steps to reproduce: ------------------- 1. Install Planning app 2. Have an employee A with 40h/week working schedule and an employee B with 35h/week working schedule 3. Create a shift and assign it to employee A, the default allocated hours should be 8h 4. From the Gantt view, duplicate this shift and assign it to employee B (use drag and drop) 5. Problem: The allocated hours of the duplicated shift are not recomputed, they are equal to 8h instead of 7h Fix: ------------------- When d
Original PR description
Steps to reproduce: ------------------- 1. Install Planning app 2. Have an employee A with 40h/week working schedule and an employee B with 35h/week working schedule 3. Create a shift and assign it to employee A, the default allocated hours should be 8h 4. From the Gantt view, duplicate this shift and assign it to employee B (use drag and drop) 5. Problem: The allocated hours of the duplicated shift are not recomputed, they are equal to 8h instead of 7h Fix: ------------------- When duplicating a shift and assigning it to another resource, the copy() method is called with the resource_id of the target resource (an employee in this case). But _compute_allocated_hours() is not called so we have to call it explicitly in this case. version-17.0 task-3978590 Forward-Port-Of: odoo/enterprise#69828
### Current behavior before PR: When creating a Helpdesk team and the Timesheets option enabled and Time Billing disabled you will not get all non-billed projects in the dropdown menu. This is happening because the domain for project_id is checking the company_id to be the same as the company_id of the team. https://github.com/odoo/enterprise/blob/18.0/helpdesk_sale_timesheet/models/helpdesk_team.py#L10 Though since this commit https://github.com/odoo-dev/odoo/commit/16a07ed1bfd33a193b363f3e87
Original PR description
### Current behavior before PR: When creating a Helpdesk team and the Timesheets option enabled and Time Billing disabled you will not get all non-billed projects in the dropdown menu. This is…
### Current behavior before PR: When creating a Helpdesk team and the Timesheets option enabled and Time Billing disabled you will not get all non-billed projects in the dropdown menu. This is happening because the domain for project_id is checking the company_id to be the same as the company_id of the team. https://github.com/odoo/enterprise/blob/18.0/helpdesk_sale_timesheet/models/helpdesk_team.py#L10 Though since this commit https://github.com/odoo-dev/odoo/commit/16a07ed1bfd33a193b363f3e87aab3f9bd6f8bd0 company_id is not required for projects. Since the domain of the project_id field was introduced here https://github.com/odoo/enterprise/pull/4956/commits/c82b1b019cebd1f78749b9563e717fae88d7fae5 and the reason why we check the company_id is not the same anymore since the commit I mentioned above we should not use the same domain. Also in this PR we are solving another issue which is where you enable both Timesheets and Time Billing options and choose a project that has both options enabled too then you disable the Time Billing option for the team the project that we chose before will be kept and have both options enabled and you can save it. ### Desired behavior after PR is merged: We are now checking for the project of the team if the company_id is False or equal to the team's company_id. Also when disbaling the Time Billing option we set the project_id to False. opw-4275647 opw-4148207 Forward-Port-Of: odoo/enterprise#72935