Wednesday, December 18, 2024
27 changes · master
Enhancements to existing features
Map views can now open with a predefined grouping, making location-based records easier to organize from the start. The update also adds this option to Studio and prevents crashes when grouping by date and time fields without a selected time scale.
Original PR description
First commit allows usage of the default_group_by attribute in map view. This also makes it included in the map studio sidebar. Second commit fixes a crash which would happen when the user sets a datetime groupBy without specifying the subgroup (scale). It is now set to groupBy month by default in that case. task-4320734
Duplicating tasks or projects no longer automatically carries over the original task dates, helping teams avoid accidental scheduling mistakes. Gantt view copy actions still preserve dates when users explicitly copy an item by dragging it with Ctrl, so intended timeline copies continue to work as expected.
Original PR description
Related: https://github.com/odoo/odoo/pull/185894 task-4295758
This update removes outdated internal test support files from the Planning app that relied on legacy bus testing helpers. It helps keep the codebase easier to maintain and reduces reliance on obsolete testing infrastructure, with no expected impact on day-to-day users.
Original PR description
Purpose of this commit: Remove files that depends on legacy 'bus/../test/helpers'. Part of:3818666
Sign requests are now assigned to the contact linked to a user when multiple contacts share the same email. This avoids sending or tracking a signing request against the wrong contact and helps teams keep ownership clearer.
Original PR description
Before this PR: When creating two contacts with a sales email, one linked to a user and the other not, the sign request would always be assigned to the contact with the smallest ID, disregarding user association. After this PR: The assignment of sign requests now checks if the contact (partner) is linked to a user. If a user is associated, the request will be assigned accordingly. task-3971110 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Resolved issues and error corrections
A minor issue in Documents Spreadsheet tests was corrected so negative filter offsets are handled as a complete value instead of being checked character by character. This prevents unnecessary console warnings and helps keep testing output clean and reliable.
Original PR description
In unit tests, when global filter offsets are added with negative values, we have a warning in the console saying that the symbol '-' cannot be parsed. The reason behind the warning is that the input element triggers an onChange event whenever a new character is added. The commit fixes this issue by setting the option `instantly` to true to only trigger the onChange with the whole new value. task-4397783
Code cleanup and technical improvements
This update aligns WhatsApp template configuration with a renamed underlying field selector component. It is an internal cleanup that keeps the feature compatible with recent platform changes without changing business workflows.
Original PR description
*: whatsapp: widget usages adaptations Since [1], DynamicModelFieldSelectorChar field widget was introduced. The related community commit renames it amongst other things. This commit adapts its usages in the enterprise repository. [1]: https://github.com/odoo/odoo/commit/fe62bfeacb38e03cb94010f1f75ae301951ac9d1 task-4388736
Miscellaneous changes
Community: https://github.com/odoo/odoo/pull/189421 task-4374458 Forward-Port-Of: odoo/enterprise#75783 Forward-Port-Of: odoo/enterprise#75671
Original PR description
Community: https://github.com/odoo/odoo/pull/189421 task-4374458 Forward-Port-Of: odoo/enterprise#75783 Forward-Port-Of: odoo/enterprise#75671
Product lists and searches have been adjusted so large product catalogs load much faster. This improves day-to-day responsiveness for businesses managing very high volumes of products, without changing the core product workflow.
Original PR description
For performance reasons: - the is_favorite field is moved from the model's _order to the related tree & kanban views - on product.product it is now a stored related to product.template From nim-odoo survey on a database containing more than 1 million products - stored related field & index: improvement in all cases (2500ms => 500 ms) - limit order & adapt views: name search will be fast (~2 ms)
A broken internal test for subscriptions was removed because it referred to functionality that no longer exists. This prevents unnecessary test failures and helps keep future updates more reliable without changing customer-facing behavior.
Original PR description
File was added unimported in #72347, and tries to test things related to a model `sale.order.alert` removed in #70180 (merged two weeks earlier).
Steps: - Go to the Rewards page - Buy a reward - Breadcrumb and navigation menu were disappearing after the purchase Cause of the issue: - Page reload was resetting the breadcrumb and navigation Fix: - Used a soft reload instead of a full page reload to prevent the reset and preserve the breadcrumb and navigation menu task-4266538 Forward-Port-Of: odoo/enterprise#74445
Original PR description
Steps: - Go to the Rewards page - Buy a reward - Breadcrumb and navigation menu were disappearing after the purchase Cause of the issue: - Page reload was resetting the breadcrumb and navigation Fix: - Used a soft reload instead of a full page reload to prevent the reset and preserve the breadcrumb and navigation menu task-4266538 Forward-Port-Of: odoo/enterprise#74445
**Steps to reproduce:** - Install l10n_au_aba - Switch to an Australian company (e.g. AU Company) - Configure batch payments according to fiscal localization docs in Odoo (https://www.odoo.com/documentation/18.0/applications/finance/fiscal_localizations/australia.html#aba-files-for-batch-payments) - Configure a bank account for a vendor - Create a bill for that vendor - Confirm the bill - Register a payment with "ABA Credit Transfer" as payment method - Go to the payments list - Select
Original PR description
**Steps to reproduce:** - Install l10n_au_aba - Switch to an Australian company (e.g. AU Company) - Configure batch payments according to fiscal localization docs in Odoo (https://www.odoo.com/documentation/18.0/applications/finance/fiscal_localizations/australia.html#aba-files-for-batch-payments) - Configure a bank account for a vendor - Create a bill for that vendor - Confirm the bill - Register a payment with "ABA Credit Transfer" as payment method - Go to the payments list - Select the created payment and create a batch payment - Validate the batch payment **Issue:** A traceback is raised while trying to access "ref" field of "account.payment" model. **Cause:** "ref" field has been replaced by "memo" field in "account.payment" model. opw-4346794 opw-4355394 Forward-Port-Of: odoo/enterprise#75708
### Steps to reproduce: - Activate developer mode - Install the 'l10n_ec' module and switch to an Ecuadorian company - In Settings > Technical > Database Structure > Decimal Accuracy change the number of decimals for "Product Price" to 4 for example - In Accounting, create a new Customer Invoice - Select 'Instituto Ecuatoriano' as Customer - Add a line with a price with 4 decimals - Select 'Sin utilization del sistema financiero' as Payment Method - Confirm - On the blue popup at the to
Original PR description
### Steps to reproduce: - Activate developer mode - Install the 'l10n_ec' module and switch to an Ecuadorian company - In Settings > Technical > Database Structure > Decimal Accuracy change the…
### Steps to reproduce: - Activate developer mode - Install the 'l10n_ec' module and switch to an Ecuadorian company - In Settings > Technical > Database Structure > Decimal Accuracy change the number of decimals for "Product Price" to 4 for example - In Accounting, create a new Customer Invoice - Select 'Instituto Ecuatoriano' as Customer - Add a line with a price with 4 decimals - Select 'Sin utilization del sistema financiero' as Payment Method - Confirm - On the blue popup at the top of the page, click 'process now' to get the XML in the chatter - In the XML the "precioUnitario" field only has 2 precision digits, it has been rounded - When adding a discount of 100% this field has all precision digits needed ### Cause: The price_unit is calculated differently if the discount is 100%. The "precioUnitario" field should always have the number of precision digits specified in the settings. ### Solution: We need to find the unit price without the discount, but without the included. This value is not computed. As the values computed in the account.move.line are already rounded based on the currency (2 digits) we need to recompute the values using `compute_all` and multiplying by the `price_digits` to not round in `compute_all`. The way the rounding is made here is by taking the decimal precision from the settings and making it a power of 10 in `price_digits` (4 decimals results in price_digits = 10000). Then we compute the taxes with `price_unit * price_digits`. As, per definition, `price_unit` has the number of digits used in the calculation of `price_digits`, we end up with an integer. But after the results of `compute_all` may no longer be an integer. We need an integer to keep the decimal precision. This is why, in the result, there is a call to `round()`. The call to `float_round()` is to make sure there are not more decimals than 6. This is needed as the number displayed in the XML will always be of 6 decimals, so if the client set a number of decimals greater than 6, it will be rounded in the XML but not on the invoice. To ensure that both values are the same, we round the value here. Some tests had "precioUnitario" with strange values that did not match the actual price_unit. It was because the precedent way to calculate this field was not perfect, I guess. opw-4120341 Forward-Port-Of: odoo/enterprise#75599 Forward-Port-Of: odoo/enterprise#68555
This commit upgrades the Linkedin's versioned API to the latest available which is `202411`. As no features has been broken, nor is there any new features impacting the parts of the API we use. Only the headers are updated as explained inside their documentation. task-4273179 Forward-Port-Of: odoo/enterprise#75788 Forward-Port-Of: odoo/enterprise#74687
Original PR description
This commit upgrades the Linkedin's versioned API to the latest available which is `202411`. As no features has been broken, nor is there any new features impacting the parts of the API we use. Only the headers are updated as explained inside their documentation. task-4273179 Forward-Port-Of: odoo/enterprise#75788 Forward-Port-Of: odoo/enterprise#74687
### Steps to reproduce: - Create a subscription product with two or more plans and two or more variants - Go to the product's page on eCommerce - Choose another plan than the default one - Add it to the cart - Notice the default plan is the one added to the cart ### Current behavior before PR: This is happening because if the product has variants the pricing select will get re-rendered before we get the selected plan_id https://github.com/odoo/odoo/blob/17.0/addons/website_sale/sta
Original PR description
### Steps to reproduce: - Create a subscription product with two or more plans and two or more variants - Go to the product's page on eCommerce - Choose another plan than the default one - Add it to the cart - Notice the default plan is the one added to the cart ### Current behavior before PR: This is happening because if the product has variants the pricing select will get re-rendered before we get the selected plan_id https://github.com/odoo/odoo/blob/17.0/addons/website_sale/static/src/js/website_sale.js#L444:L456 so when getting the plan_id after this render of the <select> it will be the default plan. **### Desired behavior after PR is merged:** We are passing the selected plan_id to the call of get_combination_info so when re-render the <select> we will set the one that was selected as the default one. opw-4296527 Forward-Port-Of: odoo/enterprise#75658 Forward-Port-Of: odoo/enterprise#74813
**Issue:** - Uninstalling the Field Service app will make all normal projects non-billable, resulting in the removal of customers and sales orders from their tasks. **Steps To Reproduce:** - Install the Field Service app. - Create a project and set it as billable. - Create a task for the project. set customer and sales order. - Uninstall the Field Service app. - Check the project's billable status and the task. **Solution:** - remove the `uninstall_hook` meth
Original PR description
**Issue:**
- Uninstalling the Field Service app will make all normal projects non-billable, resulting in the removal of customers and sales orders from their tasks.
**Steps To Reproduce:**
- Install the Field Service app.
- Create a project and set it as billable.
- Create a task for the project. set customer and sales order.
- Uninstall the Field Service app.
- Check the project's billable status and the task.
**Solution:**
- remove the `uninstall_hook` method since the original issue it was added for is no longer reproducable. https://github.com/odoo/enterprise/pull/32022/commits/341e68e6a3e569137aeb41d69203c731559f9ef8
opw-[4379638](https://www.odoo.com/web#id=4379638&view_type=form&model=project.task)
Forward-Port-Of: odoo/enterprise#75356before this PR, the fiscal printer would systematically reprint the last loaded order upon returning to the receipt screen. After this PR, the receipt is printed automatically only once. opw-4367156 opw-4338402 opw-4306960 opw-4328481 opw-4351925 Forward-Port-Of: odoo/enterprise#74774
Original PR description
before this PR, the fiscal printer would systematically reprint the last loaded order upon returning to the receipt screen. After this PR, the receipt is printed automatically only once. opw-4367156 opw-4338402 opw-4306960 opw-4328481 opw-4351925 Forward-Port-Of: odoo/enterprise#74774
Steps: - Create a sales commission plan and assign salespeople. - Create SO and invoice and assign the salesperson to the plan. This will give this person a commission. - Cancel the invoice the commission is still on the commission report. Issue: - Cancelled invoices were being included in commission calculations, which resulted in inaccurate commission amounts. Cause: - The existing SQL query did not account for the state of the invoices, leading to all invoices (including canceled o
Original PR description
Steps: - Create a sales commission plan and assign salespeople. - Create SO and invoice and assign the salesperson to the plan. This will give this person a commission. - Cancel the invoice the commission is still on the commission report. Issue: - Cancelled invoices were being included in commission calculations, which resulted in inaccurate commission amounts. Cause: - The existing SQL query did not account for the state of the invoices, leading to all invoices (including canceled ones) being considered for commission calculations. Fix: - Updated the SQL query by adding a filter to exclude invoices where the state is `canceled`. This ensures only valid invoices are used for commission calculations, providing accurate results. opw-4261999 Forward-Port-Of: odoo/enterprise#72671
Task-4353456 Forward-Port-Of: odoo/enterprise#74355
Original PR description
Task-4353456 Forward-Port-Of: odoo/enterprise#74355
Steps to reproduce the bug: - Create a storable product “P1”: - Tracked with SN - Create a BoM: - no need to component - Add an operation “OP1” with steps - Control by product - Create a manufacturing order for one unit of P1 - Confirm the MO - Go to the shop floor and process “OP1” - Validate the MO - Go to the SN of P1 Problem: The quality check smart button is correctly computes the number of QC linked with finished_lot or lot_id thanks to: htt
Original PR description
Steps to reproduce the bug:
- Create a storable product “P1”:
- Tracked with SN
- Create a BoM:
- no need to component
- Add an operation “OP1” with steps
- Control by product
- Create a manufacturing order for one unit of P1
- Confirm the MO
- Go to the shop floor and process “OP1”
- Validate the MO
- Go to the SN of P1
Problem:
The quality check smart button is correctly computes the number of QC linked with finished_lot or lot_id thanks to:
https://github.com/odoo/enterprise/pull/72693/commits/2e2a49d4ee90b20fe899ca3c199a20ad88d185ad
but they are not read in the quality check view because the domain is
not correct
opw-4361358
Forward-Port-Of: odoo/enterprise#75447*: account_reports, l10n_ec_reports_ats, l10n_es_reports, l10n_uy_edi --- Description of the issue this commit addresses: The community PR linked to this one modified the naming behavior of moves and therefore tests have broken. This PR adapts thoses tests to the new behavior. --- Old vs. New naming behavior: Let's consider an empty journal. In this journal three moves are added with decreasing date (move1 is the most recent, move2 is in the middle and move3 is the oldest). now
Original PR description
*: account_reports, l10n_ec_reports_ats, l10n_es_reports, l10n_uy_edi --- Description of the issue this commit addresses: The community PR linked to this one modified the naming behavior of moves and…
*: account_reports, l10n_ec_reports_ats, l10n_es_reports, l10n_uy_edi --- Description of the issue this commit addresses: The community PR linked to this one modified the naming behavior of moves and therefore tests have broken. This PR adapts thoses tests to the new behavior. --- Old vs. New naming behavior: Let's consider an empty journal. In this journal three moves are added with decreasing date (move1 is the most recent, move2 is in the middle and move3 is the oldest). now we batch the moves and post them together. Before, the first move of a journal would consume the first sequence number upon its creation even in draft and subsequent moves in would be named "/". When batched and posted afterwards, in the `_compute_name()` method, a `.sorted()` would order the moves by date (account.move(3, 2, 1)) and would use that order to name them. As the first sequence number is burned, move3 will use the second number and move2 will use the third number in the sequence. Resulting names: move1: 1, move2: 3 and move3: 2. With x moves: move1: 1, move2: x, move3: x-1, move4: x-2, ... Now, since no sequence number name is ever assigned to a draft entry, upon their creation, all three moves are named "/". And then, when they are batched and posted. they will be ordered 3,2,1 just like before but when naming move3, the first sequence number isn't consumed anymore so it will be named 1, move2 will be name 2 and move1 will be name 3. Resulting names: move1: 3, move2: 2 and move3: 1. With x moves: move1: x, move2: x-1, move3: x-2, move4: x-3, ... --- Desired behavior after this commit is merged: Tests that were relying on the fact that the first move of a sequence uses the first sequence number upon creation and not when posted are now adapted to take into account that sequence number are consumed when posted. In l10n_ec_reports_ats, moves without a latam document number are ignored for the ATS export because missing that attribute means they don't have names which makes them unfit for the export anyway. --- Community PR: https://github.com/odoo/odoo/pull/185326 task-4241510 Forward-Port-Of: odoo/enterprise#73837
When tour resume at redirect step, the route is /sign/documents/. For this route, tour js file is not in manifest. Then the tour abort and is not resumed. After this commit, the tour is not aborted and the error "Script timeout exceeded" is avoided. Forward-Port-Of: odoo/enterprise#75680
Original PR description
When tour resume at redirect step, the route is /sign/documents/. For this route, tour js file is not in manifest. Then the tour abort and is not resumed. After this commit, the tour is not aborted and the error "Script timeout exceeded" is avoided. Forward-Port-Of: odoo/enterprise#75680
Some users need to make invoices with 100% discount lines. If they try then will receive this UCFE error that does not let us to validate the invoice in DGI . > ERROR: CODE 31: Error: El contenido del elemento 'Item' en espacio de nombres 'http://cfe.dgi.gub.uy' está incompleto. Lista esperada de elementos posibles: 'SubDescuento, RecargoPct, RecargoMnt, SubRecargo, RetencPercep, MontoItem' en espacio de nombres 'http://cfe.dgi.gub.uy'. In order to make it work we need to adapt the module
Original PR description
Some users need to make invoices with 100% discount lines. If they try then will receive this UCFE error that does not let us to validate the invoice in DGI . > ERROR: CODE 31: Error: El contenido…
Some users need to make invoices with 100% discount lines. If they try then will receive this UCFE error that does not let us to validate the invoice in DGI . > ERROR: CODE 31: Error: El contenido del elemento 'Item' en espacio de nombres 'http://cfe.dgi.gub.uy' está incompleto. Lista esperada de elementos posibles: 'SubDescuento, RecargoPct, RecargoMnt, SubRecargo, RetencPercep, MontoItem' en espacio de nombres 'http://cfe.dgi.gub.uy'. In order to make it work we need to adapt the module to accept this kind of lines that actually represent an "Entrega Gratuita" (Indicator 5 in Uruguay) - We check if the line is a 100% discount, if it is then we marked as Entrega Gratuita when we are creating XML (Indicator 5) - Now that we can have lines and also invoices with total value 0.0 we need to adapt our XML because if value 0.0 then some tags were not added to the final XML - it was interpreted as False and the result was and invalid XML becasue we were missing a mandatory tag. Now we can tags that have 0.0 value to the final XML. - Now that we can have lines 0.0 total amount, and also invoices 0.0 total amount, if we are using foreign currency then we need to avoid error computing the currency rate (division by zero). Now we detect this cases and use the date rate. Also, the rate is only been computed when actually we are going to use it. LATAM 1296 / ADHOC Ticket 83295 Forward-Port-Of: odoo/enterprise#75639 Forward-Port-Of: odoo/enterprise#73956
Forward-Port-Of: odoo/enterprise#75734
Original PR description
Forward-Port-Of: odoo/enterprise#75734
An error occurs when the system try to raise an error message when a bank account has not client code. ```TypeError: list.append() takes no keyword arguments``` Currently in code [1] mistakenly provides multiple values via keyword arguments to the `append` method. which is incorrect. So instead of it, we need to change the formatting to pass a single argument as a string to resolve the error. Link [1]: https://github.com/odoo/enterprise/blob/07fae63e381dfa7a8035f67837f19d619600d434/l10n
Original PR description
An error occurs when the system try to raise an error message when a bank account has not client code. ```TypeError: list.append() takes no keyword arguments``` Currently in code [1] mistakenly provides multiple values via keyword arguments to the `append` method. which is incorrect. So instead of it, we need to change the formatting to pass a single argument as a string to resolve the error. Link [1]: https://github.com/odoo/enterprise/blob/07fae63e381dfa7a8035f67837f19d619600d434/l10n_jp_zengin/models/account_batch_payment.py#L77 Sentry-6128197646 Forward-Port-Of: odoo/enterprise#75475
Before this commit there was no groupby Properties. In this commit we add a filter for groupby properties in planning module. The search view is being used by two modules`planning.slot` and `planning.analysis.report` thus solution resulted in adding the filter in `planning_view_search` as it is a primary inherited view of search view base in planning.slot. task-3801551 Forward-Port-Of: odoo/enterprise#58814
Original PR description
Before this commit there was no groupby Properties. In this commit we add a filter for groupby properties in planning module. The search view is being used by two modules`planning.slot` and `planning.analysis.report` thus solution resulted in adding the filter in `planning_view_search` as it is a primary inherited view of search view base in planning.slot. task-3801551 Forward-Port-Of: odoo/enterprise#58814
Currently, an exception is generated when the user archives a document and its folder and tries to delete both folder and document once from Trash. Steps to produce: - Open document and create folder and add document in folder - Now delete document and folder - Go to Trash > open list view > Select all records > Click on Delete error ``` MissingError: Record does not exist or has been deleted. (Record: documents.document(1,), User: 1) ``` This is because 'to_delete' contains a
Original PR description
Currently, an exception is generated when the user archives a document and its folder and tries to delete both folder and document once from Trash. Steps to produce: - Open document and create folder…
Currently, an exception is generated when the user archives a document and its folder and tries to delete both folder and document once from Trash. Steps to produce: - Open document and create folder and add document in folder - Now delete document and folder - Go to Trash > open list view > Select all records > Click on Delete error ``` MissingError: Record does not exist or has been deleted. (Record: documents.document(1,), User: 1) ``` This is because 'to_delete' contains all documents (self), including the folder that we deleted, and `removable_parent_folders` contains only the folder that we deleted. Now when cleaning records, [1] unlinks all files, including folders, and [2] again tries to delete the folder that we already deleted with [1]. This commit will fix the above issue by filtering `removable_parent_folders` now it is filtering records folders thats id not in self ids. [1] - https://github.com/odoo/enterprise/blob/5ba1aa66ab17d686da648025c8921995938115ed/documents/models/documents_document.py#L1935 [2] - https://github.com/odoo/enterprise/blob/5ba1aa66ab17d686da648025c8921995938115ed/documents/models/documents_document.py#L1941 sentry-6048388238 Forward-Port-Of: odoo/enterprise#73816
Steps to Reproduce: - Install the Helpdesk app without demo data. - Navigate to the dashboard. - Observe the `SAMPLE` ribbon in the top-right corner. Cause: - The issue occurs because the SAMPLE ribbon for "Fake Data for Demo" is rendered before the helpdesk banner. Due to this loading order, the banner displays on top of the ribbon, obscuring it. Solution: - By adjusting the loading order so the ribbon loads after the helpdesk banner, we ensure the ribbon displays clearly
Original PR description
Steps to Reproduce: - Install the Helpdesk app without demo data. - Navigate to the dashboard. - Observe the `SAMPLE` ribbon in the top-right corner. Cause: - The issue occurs because the SAMPLE ribbon for "Fake Data for Demo" is rendered before the helpdesk banner. Due to this loading order, the banner displays on top of the ribbon, obscuring it. Solution: - By adjusting the loading order so the ribbon loads after the helpdesk banner, we ensure the ribbon displays clearly above the banner without additional adjustments. task: 4209920 Forward-Port-Of: odoo/enterprise#72786