Saturday, July 27, 2024
8 changes · saas-17.4
Miscellaneous changes
In case you have 2 invoice lines of 21.53 with 21% price included taxes, the code will compute 21.53 / 1.21 * 2 ~= 35.59 as untaxed amount, 7.47 as tax amount and 40.06 as total amount. However, for now, we decided we want to put the rounding into the tax amount instead of making an adjustment on the untaxed amount because we want the untaxed amount being the sum of the price excluded amount of each line. Here, 2 * round(21.53 / 1.21) = 35.58. So we are forced to put the rounding on the tax inst
Original PR description
In case you have 2 invoice lines of 21.53 with 21% price included taxes, the code will compute 21.53 / 1.21 * 2 ~= 35.59 as untaxed amount, 7.47 as tax amount and 40.06 as total amount. However, for now, we decided we want to put the rounding into the tax amount instead of making an adjustment on the untaxed amount because we want the untaxed amount being the sum of the price excluded amount of each line. Here, 2 * round(21.53 / 1.21) = 35.58. So we are forced to put the rounding on the tax instead to have 35.58 + 7.48 = 43.06 and then, round like the round_per_line when the tax is price included. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#169960
## Pull Request HOOT (PRHOOT) - part 21 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 21 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 21 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 Enterprise: https://github.com/odoo/enterprise/pull/67296 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/odoo#174337
…s needed --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#174716 Forward-Port-Of: odoo/odoo#174566
Original PR description
…s needed --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#174716 Forward-Port-Of: odoo/odoo#174566
Description of the issue/feature this PR addresses: Real information was used as a demo data partner, which caused complaints from the company which was the owner of this information Current behavior before PR: Data of the affected company available for demo databases Desired behavior after PR is merged: Data replaced for a fake demo company Task: [4071645](https://www.odoo.com/odoo/project/1625/tasks/4071645?cids=3) --- I confirm I have signed the CLA and read the PR guidelines a
Original PR description
Description of the issue/feature this PR addresses: Real information was used as a demo data partner, which caused complaints from the company which was the owner of this information Current behavior before PR: Data of the affected company available for demo databases Desired behavior after PR is merged: Data replaced for a fake demo company Task: [4071645](https://www.odoo.com/odoo/project/1625/tasks/4071645?cids=3) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#174603 Forward-Port-Of: odoo/odoo#174301
Steps to reproduce: - Create a product that is a kit in company A and not in company B - Try updating quantity on hand in company B Bug: since [1] it's not possible to update kit quantites directly but is_kits is not company dependant Fix: is_kits depends on the selected companies opw-3946361 [1]:https://github.com/odoo/odoo/pull/161124/files Forward-Port-Of: odoo/odoo#174233 Forward-Port-Of: odoo/odoo#169063
Original PR description
Steps to reproduce: - Create a product that is a kit in company A and not in company B - Try updating quantity on hand in company B Bug: since [1] it's not possible to update kit quantites directly but is_kits is not company dependant Fix: is_kits depends on the selected companies opw-3946361 [1]:https://github.com/odoo/odoo/pull/161124/files Forward-Port-Of: odoo/odoo#174233 Forward-Port-Of: odoo/odoo#169063
## Pull Request HOOT (PRHOOT) - part 21 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 21 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 21 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 Community: https://github.com/odoo/odoo/pull/174337 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#67296
Step to reproduce: - install `l10n_uk_reports` - create 2 user or more - for each user, fill their hmrc token values - select a user different from the current environment user - remove their credential with the button "Remove Authentication Credentials" Current behavior: - The selected user's credential is not removed, but the environment user one got removed Expected behavior: - the selected user's credential should be the one that is removed, and the environment user should
Original PR description
Step to reproduce: - install `l10n_uk_reports` - create 2 user or more - for each user, fill their hmrc token values - select a user different from the current environment user - remove their credential with the button "Remove Authentication Credentials" Current behavior: - The selected user's credential is not removed, but the environment user one got removed Expected behavior: - the selected user's credential should be the one that is removed, and the environment user should not be removed. Why it happens: - In `_clean_tokens` function, it clears the credential of the environment user by default. Solution: - Add way to clear the selected user's credential instead of the environment user's opw-4041604 todo in master: make the user argument required instead of default Forward-Port-Of: odoo/enterprise#66870
- Create 4 invoices: A, B, C, D with a correct MX setup - Make sure C will fail by removing the SAT code on the product for example - Run the send and print wizard on all invoices and check 'Download' (to force a synchronous run). After each call to the web-service, the code does: ``` # Check for success. if invoice.l10n_mx_edi_cfdi_state == 'sent': continue ``` However, the `cr.commit` is at the end of the loop. So the transacti
Original PR description
- Create 4 invoices: A, B, C, D with a correct MX setup - Make sure C will fail by removing the SAT code on the product for example - Run the send and print wizard on all invoices and check…
- Create 4 invoices: A, B, C, D with a correct MX setup
- Make sure C will fail by removing the SAT code on the product for example
- Run the send and print wizard on all invoices and check 'Download' (to force a synchronous run).
After each call to the web-service, the code does:
```
# Check for success.
if invoice.l10n_mx_edi_cfdi_state == 'sent':
continue
```
However, the `cr.commit` is at the end of the loop. So the transaction is not committed except in case of error!
When running the send and print synchronously, the error is raised to the user that will rollback the whole
transaction.
In case of the setup above, A, B and C are well commit but D is sent and has been rollback.
Then, the user will sign again D making the invoice signed twice.
To solve the issue, let's commit right after each web-service call.
That way, whatever the way we use to call the web-services, the transaction is commit immediately.
opw-4003043
opw-3985376
opw-4059666
opw-3955553
...and many others!
Forward-Port-Of: odoo/enterprise#67466
Forward-Port-Of: odoo/enterprise#67365