shopinvader / odoo-shopinvader-payment

GNU Affero General Public License v3.0
2 stars 10 forks source link

[FIX] 14.0 SO transaction amount: remove paid amount #79

Open PierrickBrun opened 1 year ago

PierrickBrun commented 1 year ago

While creating the transaction, shopinvader_payment uses the sale_order amount_total.

This works well when using 1 transaction. But when using several transactions, all of them are created with amount_total as amount.

It should be decremented, this is what this PR does

codecov-commenter commented 1 year ago

Codecov Report

Base: 87.12% // Head: 85.96% // Decreases project coverage by -1.15% :warning:

Coverage data is based on head (ac4087e) compared to base (7059f93). Patch coverage: 91.66% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## 14.0 #79 +/- ## ========================================== - Coverage 87.12% 85.96% -1.16% ========================================== Files 38 50 +12 Lines 396 506 +110 Branches 42 60 +18 ========================================== + Hits 345 435 +90 - Misses 38 57 +19 - Partials 13 14 +1 ``` | [Impacted Files](https://codecov.io/gh/shopinvader/odoo-shopinvader-payment/pull/79?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=shopinvader) | Coverage Δ | | |---|---|---| | [shopinvader\_payment/models/sale\_order.py](https://codecov.io/gh/shopinvader/odoo-shopinvader-payment/pull/79?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=shopinvader#diff-c2hvcGludmFkZXJfcGF5bWVudC9tb2RlbHMvc2FsZV9vcmRlci5weQ==) | `93.33% <0.00%> (-6.67%)` | :arrow_down: | | [...pinvader\_payment/services/abstract\_payable\_sale.py](https://codecov.io/gh/shopinvader/odoo-shopinvader-payment/pull/79?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=shopinvader#diff-c2hvcGludmFkZXJfcGF5bWVudC9zZXJ2aWNlcy9hYnN0cmFjdF9wYXlhYmxlX3NhbGUucHk=) | `100.00% <100.00%> (ø)` | | | [...nvader\_payment/services/invader\_payment\_service.py](https://codecov.io/gh/shopinvader/odoo-shopinvader-payment/pull/79?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=shopinvader#diff-aW52YWRlcl9wYXltZW50L3NlcnZpY2VzL2ludmFkZXJfcGF5bWVudF9zZXJ2aWNlLnB5) | `78.26% <0.00%> (-0.32%)` | :arrow_down: | | [shopinvader\_payment/services/cart.py](https://codecov.io/gh/shopinvader/odoo-shopinvader-payment/pull/79?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=shopinvader#diff-c2hvcGludmFkZXJfcGF5bWVudC9zZXJ2aWNlcy9jYXJ0LnB5) | `100.00% <0.00%> (ø)` | | | [shopinvader\_payment/services/\_\_init\_\_.py](https://codecov.io/gh/shopinvader/odoo-shopinvader-payment/pull/79?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=shopinvader#diff-c2hvcGludmFkZXJfcGF5bWVudC9zZXJ2aWNlcy9fX2luaXRfXy5weQ==) | `100.00% <0.00%> (ø)` | | | [invader\_payment/models/invader\_payable.py](https://codecov.io/gh/shopinvader/odoo-shopinvader-payment/pull/79?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=shopinvader#diff-aW52YWRlcl9wYXltZW50L21vZGVscy9pbnZhZGVyX3BheWFibGUucHk=) | `100.00% <0.00%> (ø)` | | | [shopinvader\_payment/tests/test\_payment.py](https://codecov.io/gh/shopinvader/odoo-shopinvader-payment/pull/79?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=shopinvader#diff-c2hvcGludmFkZXJfcGF5bWVudC90ZXN0cy90ZXN0X3BheW1lbnQucHk=) | `100.00% <0.00%> (ø)` | | | [invader\_invoice\_payment/models/\_\_init\_\_.py](https://codecov.io/gh/shopinvader/odoo-shopinvader-payment/pull/79?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=shopinvader#diff-aW52YWRlcl9pbnZvaWNlX3BheW1lbnQvbW9kZWxzL19faW5pdF9fLnB5) | `100.00% <0.00%> (ø)` | | | [...er\_payment\_condition/models/shopinvader\_payment.py](https://codecov.io/gh/shopinvader/odoo-shopinvader-payment/pull/79?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=shopinvader#diff-c2hvcGludmFkZXJfcGF5bWVudF9jb25kaXRpb24vbW9kZWxzL3Nob3BpbnZhZGVyX3BheW1lbnQucHk=) | `100.00% <0.00%> (ø)` | | | ... and [10 more](https://codecov.io/gh/shopinvader/odoo-shopinvader-payment/pull/79?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=shopinvader) | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=shopinvader). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=shopinvader)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.