Wednesday, June 26, 2024
35 changes
17 changes
Enhancements to existing features
This update improves and fixes Odoo's internal testing tools, especially the HOOT test framework used by developers to validate product behavior. It helps catch issues earlier and makes tests more predictable, reducing the risk of faulty changes reaching users.
Original PR description
## Pull Request HOOT (PRHOOT) - part 17 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 17 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 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
Resolved issues and error corrections
This change fixes memory leaks that occurred while running JavaScript unit tests for the web module. It helps keep automated test runs more stable and efficient, reducing the risk of slowdowns or failures during development validation.
Original PR description
This PR clears a few retainers that would leak memory during the execution of JS unit tests. Backport of https://github.com/odoo/odoo/pull/170885 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Miscellaneous changes
When posting a big invoice (>800 lines) for products that are valuated in real_time, the `_post` override in `purchase_stock` can become a bottleneck for anglo-saxon companies. This method calls `_stock_account_anglo_saxon_reconcile_valuation` which performs reconciliations for all the invoice_lines. Thanks to odoo/odoo#113680 it's now possible to batch the reconciliation process via the backend method `_reconcile_plan`. This gives various speedups by batching create, reducing the number of
Original PR description
When posting a big invoice (>800 lines) for products that are valuated in real_time, the `_post` override in `purchase_stock` can become a bottleneck for anglo-saxon companies. This method calls…
When posting a big invoice (>800 lines) for products that are valuated in real_time, the `_post` override in `purchase_stock` can become a bottleneck for anglo-saxon companies. This method calls `_stock_account_anglo_saxon_reconcile_valuation` which performs reconciliations for all the invoice_lines. Thanks to odoo/odoo#113680 it's now possible to batch the reconciliation process via the backend method `_reconcile_plan`. This gives various speedups by batching create, reducing the number of flush, etc. Moving the reconciliation process outside of the loops in `_stock_account_anglo_saxon_reconcile_valuation` and calling `_reconcile_plan` only at the end of the method gives a significant speedup for big invoices. #### speedup Customer database with mix of real_time and manual inventory valuation and anglo-saxon accounting. purchase_stock is installed. 15 000 products, 80 000 stock.moves, 66 000 stock.move.lines, 100 000 account.moves, 289 000 account.move.line. Time to post an invoice changing the number of lines. | # Lines | Before PR | After PR | |:-------:|:------------------------:|:--------:| | 10 | 1.66s | 1.11s | | 50 | 8.53s | 2.95s | | 200 | 1min30s | 11.51s | | 889 | +20min (killed) | 58.84s | opw-3901468 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#169825 Forward-Port-Of: odoo/odoo#166482
18 changes
Enhancements to existing features
The aged partner balance report filters have been cleaned up to make them easier to use and maintain. This should provide a smoother reporting experience for accounting users without changing the core report behavior.
Original PR description
This commit will do some clean up on the aged partner filters. task-3961256
This commit fixes a bug where there would be a traceback occuring when the user would either create a favorite with a name that already exists or one with an empty name by pressing enter instead of save. The crash occurs because the keydown event is not passed to saveFavorite and in these cases, saveFavorite will invoke stopPropagation on an undefined event. Solution: pass the event to saveFavorite. Forward-Port-Of: odoo/odoo#170551 Forward-Port-Of: odoo/odoo#170320
Original PR description
This commit fixes a bug where there would be a traceback occuring when the user would either create a favorite with a name that already exists or one with an empty name by pressing enter instead of save. The crash occurs because the keydown event is not passed to saveFavorite and in these cases, saveFavorite will invoke stopPropagation on an undefined event. Solution: pass the event to saveFavorite. Forward-Port-Of: odoo/odoo#170551 Forward-Port-Of: odoo/odoo#170320
Problem: A recent commit (below) added carriage return characters to the .pot file for new `deleteConfirmationMessage` popup. Since the value of the string itself doesn't contain these characters, we'll never see a translation for this popup. Purpose: Revert .pot msgid back to its previous state. FW commit /pull/162106/commits/50f9df296c44d3c86bc251a67944bb0ce36a154e opw-3954024 Forward-Port-Of: odoo/odoo#169688
Original PR description
Problem: A recent commit (below) added carriage return characters to the .pot file for new `deleteConfirmationMessage` popup. Since the value of the string itself doesn't contain these characters, we'll never see a translation for this popup. Purpose: Revert .pot msgid back to its previous state. FW commit /pull/162106/commits/50f9df296c44d3c86bc251a67944bb0ce36a154e opw-3954024 Forward-Port-Of: odoo/odoo#169688
Since [1], `opacity` needs to be a number as defined in ColorPlaette's props definition. However, in the ColorpickerUserValueWidget, when the props is passed to the ColorPalette component, it is given from the dataAttributes, which are strings. This leads to a crash in debug mode as the types are miss-matching. This commit fixes that by parsing the dataAttribute to float. [1]: https://github.com/odoo/odoo/commit/d7245d2abf528d093226c80e40975e63d61e8997#diff-c4e4c8cbbe59c3e61eba1cdcfd8f2380
Original PR description
Since [1], `opacity` needs to be a number as defined in ColorPlaette's props definition. However, in the ColorpickerUserValueWidget, when the props is passed to the ColorPalette component, it is given from the dataAttributes, which are strings. This leads to a crash in debug mode as the types are miss-matching. This commit fixes that by parsing the dataAttribute to float. [1]: https://github.com/odoo/odoo/commit/d7245d2abf528d093226c80e40975e63d61e8997#diff-c4e4c8cbbe59c3e61eba1cdcfd8f23809818a0b78c118d84606a1ab5d7bf1203 task-4001189 Forward-Port-Of: odoo/odoo#170092
The COGS registered was wrong when invoicing a product that is a kit with UOM A and component uses UOM B. Steps to reproduce: ------------------- * Create Comp A with UOM Dozens. It's cost should be 12000 * Create Product A with UOM Units. * Make sure both use the same category, and the category should use automcatic inventory valuation. * Create a kit bom for product A that contains 1 comp A. * Sell this kit in the PoS and invoice it. * Close the PoS and go to the order then on th
Original PR description
The COGS registered was wrong when invoicing a product that is a kit with UOM A and component uses UOM B. Steps to reproduce: ------------------- * Create Comp A with UOM Dozens. It's cost should be…
The COGS registered was wrong when invoicing a product that is a kit with UOM A and component uses UOM B. Steps to reproduce: ------------------- * Create Comp A with UOM Dozens. It's cost should be 12000 * Create Product A with UOM Units. * Make sure both use the same category, and the category should use automcatic inventory valuation. * Create a kit bom for product A that contains 1 comp A. * Sell this kit in the PoS and invoice it. * Close the PoS and go to the order then on the invoice. * Check the journal items > Observation: the COGS is 12000 it's wrong. It should be 1000 Why the fix: ------------ The `_get_pos_anglo_saxon_price_unit` is not taking the product uom into account. So in this example the price unit will be for a dozen, but the bom specifies that we are using a unit and not a dozen. So the quantity needs to be modified from a dozen to unit. That's what the `_compute_price` method is doing. opw-3787201 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#170267 Forward-Port-Of: odoo/odoo#166382
Before this commit, when creating a company and directly installing a chart template without putting a country first, the installation of the chart template was giving a traceback. By updating the country of the company by the one of the chart template, the issues will not happen again. task: 3945833 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#166896
Original PR description
Before this commit, when creating a company and directly installing a chart template without putting a country first, the installation of the chart template was giving a traceback. By updating the country of the company by the one of the chart template, the issues will not happen again. task: 3945833 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#166896
Description of the Issue/Feature Addressed by This PR: This pull request addresses translation issues related to a string defined in JavaScript code. Previously, the string was incorrectly formatted, making it unlocatable for the translation files. The proposed solution ensures that Odoo can now accurately translate the string. Current Behavior Before PR: In the point of sale, when attempting to close a session with a closing difference exceeding the maximum, a popup displays two sentence
Original PR description
Description of the Issue/Feature Addressed by This PR: This pull request addresses translation issues related to a string defined in JavaScript code. Previously, the string was incorrectly formatted,…
Description of the Issue/Feature Addressed by This PR: This pull request addresses translation issues related to a string defined in JavaScript code. Previously, the string was incorrectly formatted, making it unlocatable for the translation files. The proposed solution ensures that Odoo can now accurately translate the string. Current Behavior Before PR: In the point of sale, when attempting to close a session with a closing difference exceeding the maximum, a popup displays two sentences. Unfortunately, these sentences couldn’t be translated due to an improperly formatted string in the JavaScript. The translation files were unable to identify the string. Desired Behavior After PR Is Merged: The corrected string enables Odoo to perform accurate translations. The change has been implemented following an example from another well-formed string in the code.  Now the text displayed in the pop up will be translated without problems.  --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#168952 Forward-Port-Of: odoo/odoo#160303
### Steps to reproduce: - Enable Batch Transfers in the settings - Go to Inventory > Config> Warehouse Management > Operation Types - On receipts, enable "Automatic Batches" group by contact - Create and confirm a purchase order for any contact with: - 1 X storable product P1 - Create and confirm a purchase order for the same contact with: - 1 X storable product P1 - 1 x storable product P2 - Go to the assocated stock picking > change the quantity of P1 to 0 - Validate and cre
Original PR description
### Steps to reproduce: - Enable Batch Transfers in the settings - Go to Inventory > Config> Warehouse Management > Operation Types - On receipts, enable "Automatic Batches" group by contact - Create…
### Steps to reproduce: - Enable Batch Transfers in the settings - Go to Inventory > Config> Warehouse Management > Operation Types - On receipts, enable "Automatic Batches" group by contact - Create and confirm a purchase order for any contact with: - 1 X storable product P1 - Create and confirm a purchase order for the same contact with: - 1 X storable product P1 - 1 x storable product P2 - Go to the assocated stock picking > change the quantity of P1 to 0 - Validate and create a backorder #### > invalid operation: The following transfers cannot be added to batch ### Cause of the issue: When the backorder is processed, the stock picking that currently belongs to our batch is validated and a backorder is created: https://github.com/odoo/odoo/blob/f168c4ba9d64a05a4a55715c44016a15230fe706/addons/stock/models/stock_move.py#L1891-L1892 The picking associated to this backorder is then added to our batch https://github.com/odoo/odoo/blob/f168c4ba9d64a05a4a55715c44016a15230fe706/addons/stock_picking_batch/models/stock_picking.py#L160-L162 But for this action to be performed, we need to pass the sanity check verifying that the pickings associated to our batch are allowed: https://github.com/odoo/odoo/blob/f168c4ba9d64a05a4a55715c44016a15230fe706/addons/stock_picking_batch/models/stock_picking_batch.py#L282-L286 And here comes the problem, the picking that created the backorder was not yet removed from our batch but is not allowed anymore since it is now in 'done' state: https://github.com/odoo/odoo/blob/f168c4ba9d64a05a4a55715c44016a15230fe706/addons/stock_picking_batch/models/stock_picking_batch.py#L76-L77 opw-3893543 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#163935
Before this commit: The version of the IoT was ambiguous and was needed to be updated manually for windows. As windows IoT does not have the concept of "image" (as it depends on the installer build) the version should give this information. This information can be found in odoo release.py file Benefit from this PR to add more details on the IoT box version to also give more information as an IoT box can be on a certain image and "code release" independently. The image shown on the homepage
Original PR description
Before this commit: The version of the IoT was ambiguous and was needed to be updated manually for windows. As windows IoT does not have the concept of "image" (as it depends on the installer build) the version should give this information. This information can be found in odoo release.py file Benefit from this PR to add more details on the IoT box version to also give more information as an IoT box can be on a certain image and "code release" independently. The image shown on the homepage is the same as before, but the detailed/revision information is now sent to the odoo's synced server in order to be visible and used by the support After this commit: Windows IoT version: - Before: W22_11 - After: W22.11 (detailed version: `W22.11-16.0+e-20240412` ) IoT box version: - Before: 24.01 - After: L24.01 (detailed version: `L24.01-16.0#71bd27465` ) Forward-Port-Of: odoo/odoo#169368 Forward-Port-Of: odoo/odoo#163697
When using a cover page with a duplex letter, it would print the content of the letter behind the cover page due to an extra blank page missing. Using Unicode characters in the address would result in black boxes. This is fixed by using the Lato font provided by the web module. Forward-Port-Of: odoo/odoo#170282 Forward-Port-Of: odoo/odoo#155752
Original PR description
When using a cover page with a duplex letter, it would print the content of the letter behind the cover page due to an extra blank page missing. Using Unicode characters in the address would result in black boxes. This is fixed by using the Lato font provided by the web module. Forward-Port-Of: odoo/odoo#170282 Forward-Port-Of: odoo/odoo#155752
### Steps to reproduce: - Create a product SP tracked by lots - Click on "on hand" and create a lot with 10 units on hand - Create and validate picking for 1 x any other product - Unlock the delivery - Add a line (stock move) for 1 x SP - Click on the list icon of the line and set your lot - Save the picking - Go to the on hand quantity of SP #### > 1 unit was reserved even though the move is 'done' ### Cause of the issue: Creating the stock move line associating the lot to th
Original PR description
### Steps to reproduce: - Create a product SP tracked by lots - Click on "on hand" and create a lot with 10 units on hand - Create and validate picking for 1 x any other product - Unlock the delivery…
### Steps to reproduce: - Create a product SP tracked by lots - Click on "on hand" and create a lot with 10 units on hand - Create and validate picking for 1 x any other product - Unlock the delivery - Add a line (stock move) for 1 x SP - Click on the list icon of the line and set your lot - Save the picking - Go to the on hand quantity of SP #### > 1 unit was reserved even though the move is 'done' ### Cause of the issue: Creating the stock move line associating the lot to the stock move will update the reserved quantity of stock quants independently of the state of the move created: https://github.com/odoo/odoo/blob/347c7e21002313da155ebf872853078de23b38fe/addons/stock/models/stock_move_line.py#L337-L343 https://github.com/odoo/odoo/blob/347c7e21002313da155ebf872853078de23b38fe/addons/stock/models/stock_move.py#L1525-L1528 opw-3906472 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#170304 Forward-Port-Of: odoo/odoo#166186
Currently when applying a coupon for 10% on the order on the current order, the points awarded are 100% of the points instead of 90%. The loyalty program rewarding x points per $ spent. The same behavior is also observed in the sale worflow. Steps to reproduce: ------------------- * Go to the **Point of Sale** App * Open shop session * Select a customer * Add a product (ex. Office chair 70$) * Select **Enter Code** * Enter the code `10pc` > Observation: The order will grant 700 poi
Original PR description
Currently when applying a coupon for 10% on the order on the current order, the points awarded are 100% of the points instead of 90%. The loyalty program rewarding x points per $ spent. The same…
Currently when applying a coupon for 10% on the order on the current order, the points awarded are 100% of the points instead of 90%. The loyalty program rewarding x points per $ spent.
The same behavior is also observed in the sale worflow.
Steps to reproduce:
-------------------
* Go to the **Point of Sale** App
* Open shop session
* Select a customer
* Add a product (ex. Office chair 70$)
* Select **Enter Code**
* Enter the code `10pc`
> Observation: The order will grant 700 points instead of 630. The amount paid is 63$ with the code for 10% on the order.
Settings of the **Discount & Loyalties**:
* **Code for 10% on orders**
* Rule:
* `Among` -> no restriction set
* `Minimum quantity`: 1
* `Minimum Purchase`: 0
* Reward:
* `Discount`: 10% `on` order
* **Loyalty Program**
* `Use points on`: Current & Future orders
* Rule:
* `Among` -> no restriction set
* `Minimum quantity`: 1
* `Minimum Purchase`: 0
* `Grant` 10 loyalty poins per $ spent
Idea of the fix
---------------
As discussed with DALA, discount should count toward points awarded. Here is how it should apply:
* If program_rule has no domain, all lines should count (except ewallet & gift cards)
* If program_rule has a domain, we should use all the lines where the product matches the domain (except ewallet & gift cards)
This applies for the computation of points based on the money spent.
Why the fix:
------------
https://github.com/odoo/odoo/blob/2f6f8014f79e1db53d6c4c27e0cc60ccd48fd301/addons/sale_loyalty/models/sale_order.py#L917
Sale-wise, we replace `rule_products` with `so_products_per_rule.get(rule, [])`. We also replace `order_lines` by `lines_per_rule`.
* `rule_products` don't include discounts as they are computed on `order_lines` (all lines that are not reward lines). https://github.com/odoo/odoo/blob/2f6f8014f79e1db53d6c4c27e0cc60ccd48fd301/addons/sale_loyalty/models/sale_order.py#L834-L841 https://github.com/odoo/odoo/blob/2f6f8014f79e1db53d6c4c27e0cc60ccd48fd301/addons/sale_loyalty/models/sale_order.py#L889
* `so_products_per_rule` will include the discounts if they match with the program's domain.
https://github.com/odoo/odoo/blob/2f6f8014f79e1db53d6c4c27e0cc60ccd48fd301/addons/sale_loyalty/models/sale_order.py#L844
* We don't need to exclude the free product reward lines from `lines_for_points` as the price is 0 on the SO. Shipping lines and free shipping rewards are not counted.
In pos, the fix is a bit different.
https://github.com/odoo/odoo/blob/4b9dee8fbe9aefde798c8543fef89c661cc85c57/addons/pos_loyalty/static/src/js/Loyalty.js#L908-L914
We first notice that this piece of code is never triggered as the structure of `program.id` is a number and `reward.program_id` is the following thus the last if statement is never true. A `.id` is added.
```
Proxy(Object) {id: 1, name: 'Code for 10% on orders', trigger: 'with_code', applies_on: 'current', program_type: 'promo_code', …}
```
This now means that we only count reward lines if they are from the same program.
With the following if statement, it means that only the lines that are not reward lines are counted (which excludes discounts).
https://github.com/odoo/odoo/blob/eadfa4ee290a8b62956097aa66989eacff230275/addons/pos_loyalty/static/src/js/Loyalty.js#L921-L924
We conclude that those two ifs must be changed as we want a similar behavior as the workflow in sales.
We remove `orderedProductPaid` out of the if statement since it can be impacted by reward lines. We change the first if to excludes the reward lines only from the current program or from ewallet and giftcards. With this, `orderedProductPaid` now counts the discount lines from other program. (Similar to sales, where `amount_paid` is computed with `lines_per_rule`)
`totalProductQty` still applies only on non reward lines. (Same as sales)
opw-3858286
Forward-Port-Of: odoo/odoo#170391
Forward-Port-Of: odoo/odoo#164723-Before this commit, when user has no expense at all and in mobile view of expense, it will display term "Or" alongside with "Snap pictures of your receipts..." -After this commit, remove term "Or". Description of the issue/feature this PR addresses: Current behavior before PR:  Desired behavior after PR is merged:  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#170460
### Steps to reproduce - Install project. - Create 2 projects one with timesheets and the second without timesheets. - Open the project without time sheets. - Observe that there are timesheet filters even if the timesheets are disabled. ### Issue: Timesheet filters are available for project tasks even though the project is not using the timesheets. ### Cause: Filters were missing some conditions to enable only when timesheets are available. ### Solution: Corrected the timesheet
Original PR description
### Steps to reproduce - Install project. - Create 2 projects one with timesheets and the second without timesheets. - Open the project without time sheets. - Observe that there are timesheet filters even if the timesheets are disabled. ### Issue: Timesheet filters are available for project tasks even though the project is not using the timesheets. ### Cause: Filters were missing some conditions to enable only when timesheets are available. ### Solution: Corrected the timesheet-related filters so they are only available for the project tasks which use the timesheets. Note: When we refresh the page, filters become visible because the context is lost. task-3754591 Forward-Port-Of: odoo/odoo#170001 Forward-Port-Of: odoo/odoo#155186
**[IMP] website: match navbar toggler color to overlay header text color** Before this commit, the navbar hamburger button didn't have the same color as the text color defined for the "Over The Content" header, which led to situations where it wasn't visible. Steps to reproduce: - Go to the website edit mode. - Click on the header and choose "Over The Content" for the "Header Position" option. - Use the color picker to set the "Text Color" option to white. - Drag and drop a "Text-
Original PR description
**[IMP] website: match navbar toggler color to overlay header text color** Before this commit, the navbar hamburger button didn't have the same color as the text color defined for the "Over The…
**[IMP] website: match navbar toggler color to overlay header text color** Before this commit, the navbar hamburger button didn't have the same color as the text color defined for the "Over The Content" header, which led to situations where it wasn't visible. Steps to reproduce: - Go to the website edit mode. - Click on the header and choose "Over The Content" for the "Header Position" option. - Use the color picker to set the "Text Color" option to white. - Drag and drop a "Text-Image" snippet onto the page. - Apply a dark background color to the "Text-Image" snippet. - Click on the "Mobile Preview" button. => The navbar hamburger button is not visible in the header. After this commit, the navbar hamburger button in the "Over The Content" header matches the color of the header's text. task-3853573 --------------------------------- **[FIX] website: hide the overlay on the mobile menu navbar toggler** Before this commit, after clicking on the mobile menu navbar toggler in Website edit mode, the blue overlay was covering the button. This commit fixes this. Indeed, this element is not editable, so there's no need for an overlay on it. task-3853573 Forward-Port-Of: odoo/odoo#163139
Resolved issues and error corrections
Spreadsheet pivots are now correctly recognized as used even when their formulas are on another sheet. This prevents users from seeing an active pivot incorrectly marked as unused in the Data menu.
Original PR description
Enterprise adaptations of the community branch. Steps to reproduce in 17.0: There's no way to reproduce the issue in 17.0 because the faulty getter in only called on positions in the active sheet (pivot autofill, global filter auto-matching) Steps to reproduce in saas-17.1: - insert a pivot in a blank spreadsheet - delete all pivot formulas - insert a new sheet - in the new sheet: - in A1: type "1" - in A2: =ODOO.PIVOT(A1) - activate the first sheet again - Open the Data menu => the pivot 1 is marked as being unused, even though it's used in the second sheet Task: 3859472 X-original-commit: 0b6730496a4316d0ec19ffb823ca2cee1c2c3790
Code cleanup and technical improvements
The spreadsheet selection dialog was redesigned so different spreadsheet areas can share the same experience without custom front-end work each time. This makes it easier and safer to add new spreadsheet-related features in Documents and Dashboards while keeping the user experience consistent.
The spreadsheet editing module’s automated tests were reorganized and converted to a newer testing framework. This is an internal quality improvement that helps maintain reliability while preserving legacy support needed by related modules.
Original PR description
This commit converts the tests of the spreadsheet_edition module to Hoot. Some legacy helpers are kept because they are used in other modules. Task: 4011296
A spreadsheet-related helper and its internal tests were removed from Enterprise because the logic now lives in the shared spreadsheet library. This reduces duplicate maintenance and helps keep spreadsheet behavior consistent across products.
Original PR description
This commit delete the helper `mergeContiguousZones` and its tests from enterprise, as they were moved to the o-spreadsheet library. Task: [3965270](https://www.odoo.com/web#id=3965270&cids=1&menu_id=4720&action=333&active_id=2328&model=project.task&view_type=form)
Miscellaneous changes
The aim of this commit is to allow to declare a 281.50 for curaçao. context: issue spotted by odoo.com prod db Before the commit: `f2018_landwoonplaats` xml tag is empty After the commit: `f2018_landwoonplaats` xml tag is filled with the onss country code of netherlands. task-id: None Forward-Port-Of: odoo/enterprise#65503 Forward-Port-Of: odoo/enterprise#65466
Original PR description
The aim of this commit is to allow to declare a 281.50 for curaçao. context: issue spotted by odoo.com prod db Before the commit: `f2018_landwoonplaats` xml tag is empty After the commit: `f2018_landwoonplaats` xml tag is filled with the onss country code of netherlands. task-id: None Forward-Port-Of: odoo/enterprise#65503 Forward-Port-Of: odoo/enterprise#65466
Before this commit, the "Consumidor Final Anónimo" partner could be missing due to the limited partner loading mechanism. This commit ensures that the "Consumidor Final Anónimo" partner is always loaded, regardless of the partner loading limitations. opw-3988187 Forward-Port-Of: odoo/enterprise#65296
Original PR description
Before this commit, the "Consumidor Final Anónimo" partner could be missing due to the limited partner loading mechanism. This commit ensures that the "Consumidor Final Anónimo" partner is always loaded, regardless of the partner loading limitations. opw-3988187 Forward-Port-Of: odoo/enterprise#65296
Issue ---- When a rental field like (e.g. `rental_start_date`) is changed in a sales order, its lines' description is recomputed. This makes sense for rental order lines as the description depends on these fields, but it messes with non-rental orders and non-rental order lines in rental orders when the Rental app is installed, so all descriptions get overwritten. Steps ----- - Install the rental app. - Create a new Quotation Template with whose line has a description that is differen
Original PR description
Issue ---- When a rental field like (e.g. `rental_start_date`) is changed in a sales order, its lines' description is recomputed. This makes sense for rental order lines as the description depends on these fields, but it messes with non-rental orders and non-rental order lines in rental orders when the Rental app is installed, so all descriptions get overwritten. Steps ----- - Install the rental app. - Create a new Quotation Template with whose line has a description that is different from the product name. - Create a new Quotation from the template. - The description gets overwritten. You can also reproduce this with creating a new rental order, then adding non-rental products with custom description. If you change the start date / end date the custom descriptions get overwritten. opw-3987175 Forward-Port-Of: odoo/enterprise#64675
See commit Forward-Port-Of: odoo/enterprise#65456 Forward-Port-Of: odoo/enterprise#62470
Original PR description
See commit Forward-Port-Of: odoo/enterprise#65456 Forward-Port-Of: odoo/enterprise#62470
Steps to reproduce: - Create a QC with measure on quantity (move_lines) - Create a reciept and set move_line quantity to 0 - Validate and create a backorder - No QC on the backorder Bug: when create the backorder the sml is created first on the original picking and then it's picking_id is updated measure on quantity QCs are created at this time the QCs that are on the move_line should first be moved to the backorder before deleting the pending QCs on the original picking opw-3996782
Original PR description
Steps to reproduce: - Create a QC with measure on quantity (move_lines) - Create a reciept and set move_line quantity to 0 - Validate and create a backorder - No QC on the backorder Bug: when create the backorder the sml is created first on the original picking and then it's picking_id is updated measure on quantity QCs are created at this time the QCs that are on the move_line should first be moved to the backorder before deleting the pending QCs on the original picking opw-3996782 Forward-Port-Of: odoo/enterprise#65358
This commit fixes the access error that occured while trying to rematch gstr-2b report Behaviour before this commit: When user tries to rematch the GSTR-2b Summary, an access error will be thrown that says user has no read access to the Attachments. Steps to reproduce: - Login with a user having `Accountant` group set in access rights for Account. - Install l10n_in_reports_gstr module & Switch to IN Company - Go to Accounting / Reports / GSTR Return Periods - Create new return period.
Original PR description
This commit fixes the access error that occured while trying to rematch gstr-2b report Behaviour before this commit: When user tries to rematch the GSTR-2b Summary, an access error will be thrown that says user has no read access to the Attachments. Steps to reproduce: - Login with a user having `Accountant` group set in access rights for Account. - Install l10n_in_reports_gstr module & Switch to IN Company - Go to Accounting / Reports / GSTR Return Periods - Create new return period. - Fetch GSTR-2b Summary and try to re-match. (An access error will popup)  Behaviour after this commit: The access error is no longer visible. Re-match can be done successfully. Forward-Port-Of: odoo/enterprise#64311
## Changes in the pos_preparation_display/models/preparation_display_order.py: The previous code used to have low selectivity in the initial recordset returned by the search function. Then the records were filtered on their state inside the for loop which increased the number of get requests to view the order stages. This approach caused a bottleneck in the following situation: - All the records are in the done stage and will be processed to filter them out, but not viewed which takes a l
Original PR description
## Changes in the pos_preparation_display/models/preparation_display_order.py: The previous code used to have low selectivity in the initial recordset returned by the search function. Then the…
## Changes in the pos_preparation_display/models/preparation_display_order.py: The previous code used to have low selectivity in the initial recordset returned by the search function. Then the records were filtered on their state inside the for loop which increased the number of get requests to view the order stages. This approach caused a bottleneck in the following situation: - All the records are in the done stage and will be processed to filter them out, but not viewed which takes a lot of resources and no result in the end. - Some of the records are in the done stage, This would add an overhead to the processing of the function with irrelevant records to filter out the done orders. Solution: - Reduce the recordset being returned in the first place from the search function by adding filters to return only the ones in progress by running an `_read_group` function that returns the orders that do not have a completed stage in the current preparation display. This recordset is then added to the new orders that still do not have stages and are in the current preparation display as well. ## Changes in the pos_preparation_display/models/preparation_display.py: The previous code would process all the records to be in the done state even though they could be already done. This approach causes an issue in the following situation: - All the records are archived, but pressing on archive all again, processes all the records again with no benefit added. Solution: - Same as above, reduce the recordset to return the orders still in progress only. Also note that the reset was limited for 1000 records only and with the previous setup, pressing archive multiple times would result in the same processing over the same 1000 records, Which is why the limit was removed ## Benckmark | | Before| After| Orders done | Number of records |Speed up |---|----|-----|------|---------|--------- Time | 15 s | 12 s | No | 170k |1.25x Time | 6 s | 302 ms | yes| 170k |19x This speed up is because all of the records are archived and put in the done state thus not selected by the _read_group function in the first place. Under different circumstances the speed up would differ on the ratio between done and not done orders. But under the assumption that the number of orders on the display order at a single time, the speed up is considerable. ## Reference opw-3865664 Forward-Port-Of: odoo/enterprise#64669 Forward-Port-Of: odoo/enterprise#62996
https://github.com/odoo/enterprise/commit/f510c4098cc4696dec3fbc7d6cd3164c6fb1d6bd prevented to close a subscription if there was no invoice. Unfortulately, sale_order.order_line.invoice_lines.move_id is not always a reliabable way to check for invoices. Sme flows could replaces all the sale.order.line and therefore the link to the invoices would be lost. In that case, for subscription orders, using the subscription_id field on the account.move.line is more reliable. We use both values t
Original PR description
https://github.com/odoo/enterprise/commit/f510c4098cc4696dec3fbc7d6cd3164c6fb1d6bd prevented to close a subscription if there was no invoice. Unfortulately, sale_order.order_line.invoice_lines.move_id is not always a reliabable way to check for invoices. Sme flows could replaces all the sale.order.line and therefore the link to the invoices would be lost. In that case, for subscription orders, using the subscription_id field on the account.move.line is more reliable. We use both values to be sure. Forward-Port-Of: odoo/enterprise#65331
- Requires https://github.com/odoo/enterprise/pull/65166 - task-4004392 - part of task-3883628 ------------------------ This PR removes an unnecessary variable override within our `.dark` files. Before `saas-17.3`. which introduces a migration to Bootstrap v5.3, the `$card-bg` was set to `white` in light mode, which needed an override in dark mode as it'd still be pure white. As we change that value to `$o-view-background-color` which matches the `$card-cap-bg` value, we can remove tha
Original PR description
- Requires https://github.com/odoo/enterprise/pull/65166 - task-4004392 - part of task-3883628 ------------------------ This PR removes an unnecessary variable override within our `.dark` files. Before `saas-17.3`. which introduces a migration to Bootstrap v5.3, the `$card-bg` was set to `white` in light mode, which needed an override in dark mode as it'd still be pure white. As we change that value to `$o-view-background-color` which matches the `$card-cap-bg` value, we can remove that override. Forward-Port-Of: odoo/enterprise#65166
When closing a session, allow the user to cancel all open order by clicking on a button. This will cancel all the orders that are in the draft state in the current session. Task ID: 3987032 Related: https://github.com/odoo/odoo/pull/169742 Forward-Port-Of: odoo/enterprise#64846
Original PR description
When closing a session, allow the user to cancel all open order by clicking on a button. This will cancel all the orders that are in the draft state in the current session. Task ID: 3987032 Related: https://github.com/odoo/odoo/pull/169742 Forward-Port-Of: odoo/enterprise#64846
**Before this PR:** There were no test cases written for the following three GST treatments: deemed export, composition and UIN holder. **After this PR:** Test cases have been added for the deemed export, composition and UIN holder GST treatments. **task**-3892511 Forward-Port-Of: odoo/enterprise#65344 Forward-Port-Of: odoo/enterprise#63333
Original PR description
**Before this PR:** There were no test cases written for the following three GST treatments: deemed export, composition and UIN holder. **After this PR:** Test cases have been added for the deemed export, composition and UIN holder GST treatments. **task**-3892511 Forward-Port-Of: odoo/enterprise#65344 Forward-Port-Of: odoo/enterprise#63333
Only load relevant MOs based on the workcenters that are shown in the view and reintroduce a limit to the amount of MOs that can be loaded simultaneously into the view. task-3895017 Forward-Port-Of: odoo/enterprise#65139 Forward-Port-Of: odoo/enterprise#64551
Original PR description
Only load relevant MOs based on the workcenters that are shown in the view and reintroduce a limit to the amount of MOs that can be loaded simultaneously into the view. task-3895017 Forward-Port-Of: odoo/enterprise#65139 Forward-Port-Of: odoo/enterprise#64551
### Steps to reproduce: - Enable multi-step routes in the settings - Inventory > Configuration > Warehouse Management > Operations types - Click on Manufacturing and put "Always" on create a backorder - Create a product P (no need for a bom) - Create and confirm a manufacturing order for 2 units of the product - Go to the barcode module > operations > manufacturing > the MO - Register only one unit of P and produce #### > A backorder is automatically created but you are redirected to
Original PR description
### Steps to reproduce: - Enable multi-step routes in the settings - Inventory > Configuration > Warehouse Management > Operations types - Click on Manufacturing and put "Always" on create a…
### Steps to reproduce: - Enable multi-step routes in the settings - Inventory > Configuration > Warehouse Management > Operations types - Click on Manufacturing and put "Always" on create a backorder - Create a product P (no need for a bom) - Create and confirm a manufacturing order for 2 units of the product - Go to the barcode module > operations > manufacturing > the MO - Register only one unit of P and produce #### > A backorder is automatically created but you are redirected to the backend. Note: If you were in "ask" on create backorder or if your product had a bom and you did not register the quantities of consumed components, a pop up would appear and resolving the pop up would redirect you to the kanban view of mrp.production in the barcode module. ### Cause of the issue: The `validate` method called by clicking will execute the action if the orm call returns one and adds an 'onClose' call to its options: https://github.com/odoo/enterprise/blob/661fd61c0f50d4bf80484227c92a3fd0b9a05c68/stock_barcode/static/src/models/barcode_model.js#L475-L482 https://github.com/odoo/enterprise/blob/661fd61c0f50d4bf80484227c92a3fd0b9a05c68/stock_barcode/static/src/models/barcode_model.js#L487-L492 If the action is a popup, the onClose method will be called once the pop up is resolved. However, if the action redirects you directly to the form view of the mrp.propduction the onClose method will not be triggered and you will not be redirected to the kanban view. ### Fix: As pop ups are the only actions that we really want to trigger during the validate call we exclude actions from the base models (stock.picking and mrp.production) to avoid any redirection to the backend. #### Follow up of commit 6915741 ## opw-3890886 Forward-Port-Of: odoo/enterprise#64850