shopinvader / odoo-shopinvader-payment

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

[14.0][ADD] invader_payment_adyen_klarna #77

Closed acsonefho closed 1 year ago

acsonefho commented 1 year ago

Add some information related to Klarna on the request to do the payment.

Depends on https://github.com/shopinvader/odoo-shopinvader-payment/pull/57

But also some refactor:

I did the refactor into a dedicated commit. I also did this into this PR because it's quite hard to do some test with multi-pr (with a lot of abstraction) and then this PR will depends on many other PR.

rousseldenis commented 1 year ago

@acsonefho @Cedric-Pigeon It could be great to realign PR's in order to make them merged.

acsonefho commented 1 year ago

@shopinvader/shopinvader-maintainers Can I have review/merge please? Already in production so functionally working

acsonefho commented 1 year ago

There is a lot of duplicated code for invoices and sale orders that could be refactored.

I think using the abstract "payable" object would be a good solution to that and be more aligned with the rest of the repo.

You're totally right! It was a discussion that I had today. I'll do it soon

codecov-commenter commented 1 year ago

Codecov Report

Base: 85.17% // Head: 83.44% // Decreases project coverage by -1.74% :warning:

Coverage data is based on head (88734f6) compared to base (b06ed53). Patch coverage: 77.07% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## 14.0 #77 +/- ## ========================================== - Coverage 85.17% 83.44% -1.74% ========================================== Files 65 95 +30 Lines 958 1329 +371 Branches 101 136 +35 ========================================== + Hits 816 1109 +293 - Misses 107 178 +71 - Partials 35 42 +7 ``` | [Impacted Files](https://codecov.io/gh/shopinvader/odoo-shopinvader-payment/pull/77?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=shopinvader) | Coverage Δ | | |---|---|---| | [shopinvader\_payment/models/\_\_init\_\_.py](https://codecov.io/gh/shopinvader/odoo-shopinvader-payment/pull/77?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=shopinvader#diff-c2hvcGludmFkZXJfcGF5bWVudC9tb2RlbHMvX19pbml0X18ucHk=) | `100.00% <ø> (ø)` | | | [...der\_payment\_adyen\_klarna/models/invader\_payable.py](https://codecov.io/gh/shopinvader/odoo-shopinvader-payment/pull/77?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=shopinvader#diff-aW52YWRlcl9wYXltZW50X2FkeWVuX2tsYXJuYS9tb2RlbHMvaW52YWRlcl9wYXlhYmxlLnB5) | `37.93% <37.93%> (ø)` | | | [invader\_payment/models/invader\_payable.py](https://codecov.io/gh/shopinvader/odoo-shopinvader-payment/pull/77?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=shopinvader#diff-aW52YWRlcl9wYXltZW50L21vZGVscy9pbnZhZGVyX3BheWFibGUucHk=) | `64.28% <44.44%> (-35.72%)` | :arrow_down: | | [invader\_payment\_stripe/models/invader\_payable.py](https://codecov.io/gh/shopinvader/odoo-shopinvader-payment/pull/77?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=shopinvader#diff-aW52YWRlcl9wYXltZW50X3N0cmlwZS9tb2RlbHMvaW52YWRlcl9wYXlhYmxlLnB5) | `46.15% <46.15%> (ø)` | | | [invader\_payment\_stripe/services/payment\_stripe.py](https://codecov.io/gh/shopinvader/odoo-shopinvader-payment/pull/77?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=shopinvader#diff-aW52YWRlcl9wYXltZW50X3N0cmlwZS9zZXJ2aWNlcy9wYXltZW50X3N0cmlwZS5weQ==) | `58.66% <50.00%> (-0.31%)` | :arrow_down: | | [...der\_payment\_adyen\_klarna\_sale/models/sale\_order.py](https://codecov.io/gh/shopinvader/odoo-shopinvader-payment/pull/77?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=shopinvader#diff-aW52YWRlcl9wYXltZW50X2FkeWVuX2tsYXJuYV9zYWxlL21vZGVscy9zYWxlX29yZGVyLnB5) | `53.33% <53.33%> (ø)` | | | [...ayment\_adyen\_klarna\_invoice/models/account\_move.py](https://codecov.io/gh/shopinvader/odoo-shopinvader-payment/pull/77?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=shopinvader#diff-aW52YWRlcl9wYXltZW50X2FkeWVuX2tsYXJuYV9pbnZvaWNlL21vZGVscy9hY2NvdW50X21vdmUucHk=) | `56.25% <56.25%> (ø)` | | | [.../components/payment\_transaction\_event\_listerner.py](https://codecov.io/gh/shopinvader/odoo-shopinvader-payment/pull/77?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=shopinvader#diff-c2hvcGludmFkZXJfaW52b2ljZV9wYXltZW50L2NvbXBvbmVudHMvcGF5bWVudF90cmFuc2FjdGlvbl9ldmVudF9saXN0ZXJuZXIucHk=) | `61.53% <61.53%> (ø)` | | | [invader\_invoice\_payment/models/account\_move.py](https://codecov.io/gh/shopinvader/odoo-shopinvader-payment/pull/77?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=shopinvader#diff-aW52YWRlcl9pbnZvaWNlX3BheW1lbnQvbW9kZWxzL2FjY291bnRfbW92ZS5weQ==) | `54.83% <64.28%> (+4.83%)` | :arrow_up: | | [...der\_payment\_adyen\_klarna/services/payment\_adyen.py](https://codecov.io/gh/shopinvader/odoo-shopinvader-payment/pull/77?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=shopinvader#diff-aW52YWRlcl9wYXltZW50X2FkeWVuX2tsYXJuYS9zZXJ2aWNlcy9wYXltZW50X2FkeWVuLnB5) | `66.66% <66.66%> (ø)` | | | ... and [31 more](https://codecov.io/gh/shopinvader/odoo-shopinvader-payment/pull/77?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.

acsonefho commented 1 year ago

@shopinvader/shopinvader-maintainers Some review here please? Huge one...

Already in production and working properly.

Cedric-Pigeon commented 1 year ago

/ocabot merge patch

shopinvader-git-bot commented 1 year ago

What a great day to merge this nice PR. Let's do it! Prepared branch 14.0-ocabot-merge-pr-77-by-Cedric-Pigeon-bump-patch, awaiting test results.

shopinvader-git-bot commented 1 year ago

Congratulations, your PR was merged at adc9c483c976595ded60e1be23f1970a1167568e. Thanks a lot for contributing to shopinvader. ❤️