-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Migrate to django-prices 2.1 #4639
Migrate to django-prices 2.1 #4639
Conversation
72ea0b7
to
515f558
Compare
515f558
to
98ee31a
Compare
da7c237
to
bad3f91
Compare
bad3f91
to
20000c5
Compare
e60e52e
to
bb87c0c
Compare
Here is the report for d28c53c (NyanKiyoshi/saleor @ django-prices/migrate/2.0) No differences were found. (click me)
# api.benchmark checkout
test name left count right count duplicate count
------------------------------------ ----------- ----------- ---------------
add billing address to checkout 34 34 20
add shipping to checkout 7 7 0
checkout payment charge 14 14 0
complete checkout 6 6 0
create checkout 48 48 24
# api.benchmark homepage
test name left count right count duplicate count
------------------------------------ ----------- ----------- ---------------
retrieve main menu 5 5 0
retrieve product list 4 4 0
retrieve secondary menu 5 5 0
retrieve shop 2 2 0
# api.benchmark product
test name left count right count duplicate count
------------------------------------ ----------- ----------- ---------------
product details 13 13 3
# api.benchmark variant
test name left count right count duplicate count
------------------------------------ ----------- ----------- ---------------
retrieve variant list 15 15 8 |
Codecov Report
@@ Coverage Diff @@
## master #4639 +/- ##
==========================================
- Coverage 91.37% 91.33% -0.05%
==========================================
Files 308 308
Lines 18235 18339 +104
Branches 1814 1830 +16
==========================================
+ Hits 16663 16750 +87
- Misses 1058 1068 +10
- Partials 514 521 +7
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #4639 +/- ##
==========================================
+ Coverage 91.41% 91.41% +<.01%
==========================================
Files 307 307
Lines 18445 18542 +97
Branches 1844 1856 +12
==========================================
+ Hits 16862 16951 +89
- Misses 1065 1070 +5
- Partials 518 521 +3
Continue to review full report at Codecov.
|
A lot of the money logic really needs refactoring as it was never meant to be able to handle multiple currencies. Overall, it should be able to handle having different currencies, e.g. the storefront owner changed the default currency. But it is not meant to be achievable. For now we only want to upgrade to the latest django-prices to fix a blocking bug (#4378) and once we get the time for it, we will implement proper multi-currency support, which shouldn't have any dependency on the settings' default currency. |
7dd257f
to
d5d0807
Compare
@NyanKiyoshi you're right, a lot of code will have to be refactored for multi-currency support. I think the hardest part will be sorting and filtering stuff. And of course checking if values in sum has the same currency - or catching exception. |
d5d0807
to
c900cc4
Compare
c900cc4
to
4f6fbdb
Compare
4f6fbdb
to
d811fa3
Compare
d811fa3
to
78faae1
Compare
c9acda8
to
aafb071
Compare
0cd6592
to
a9c58ee
Compare
- zero_money takes the instances' currency (can be null, defaults to the settings' default currency) - the models having a currency field now have the same length everywhere in the code: 3 instead of 10, the value can be changed in settings if needed. - deprecated Order.discountAmount which was missing
1f81db2
to
39f0131
Compare
39f0131
to
d28c53c
Compare
Closes #4337, fixes #4636, fixes #4378.
TBD
Dashboard 1.0
GraphQL
Pull Request Checklist