-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[10.0][ADD] add delivery price simulation for cart #352
[10.0][ADD] add delivery price simulation for cart #352
Conversation
Codecov Report
@@ Coverage Diff @@
## 10.0 #352 +/- ##
==========================================
+ Coverage 89.36% 89.49% +0.13%
==========================================
Files 139 141 +2
Lines 3619 3684 +65
==========================================
+ Hits 3234 3297 +63
- Misses 385 387 +2
Continue to review full report at Codecov.
|
58484e6
to
6ccbc14
Compare
6ccbc14
to
2186a61
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The behaviour has to be changed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The way it's implemented add a lot of burden on the cart service. Moreover a partner is really created into the DB to simulate the price computation (IMO this is against RGPD).
All the functionalities related to delivery should be provided by dedicated services. A first step has already been implemented for version 9.0 shopinvader/odoo-shopinvader-carrier#1 (comment) and provides a more modular approach and a cleaner code.
2186a61
to
5510a97
Compare
5510a97
to
357baf9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We must wait for #325 since some code into this PR is also into the other
…_carrier service The goal is to have a dedicated service to retrieve information of available delivery carriers
357baf9
to
a233c02
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code review. Seems ok
@acsonefho Can you take care of the comments from @simahawk PLZ |
a233c02
to
b854516
Compare
b854516
to
16950a0
Compare
/ocabot merge minor |
What a great day to merge this nice PR. Let's do it! |
This PR has the |
Congratulations, your PR was merged at 43201c5. Thanks a lot for contributing to shopinvader. ❤️ |
Forward port of delivery_carrier service (cherry-pick of acsone/odoo-shopinvader@d710b6a ).
And add possibility for the user to specify a country/zip code
Expected behaviour:
Based on country/zip, compute the delivery price of the existing cart (provided by session). Then it returns carrier information with adapted price.
The partner is not updated with the country/zip (it's only simulation).
Bonus:
I extract the
abstract sale
into a new python file to avoid confusion.