-
Notifications
You must be signed in to change notification settings - Fork 2
✨ (backend) add from_batch_order
in client and admin API for Order serializers
#1214
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
Merged
jonathanreveille
merged 3 commits into
main
from
feature/order_serializers_add_when_order_is_from_batch_order
Oct 8, 2025
Merged
✨ (backend) add from_batch_order
in client and admin API for Order serializers
#1214
jonathanreveille
merged 3 commits into
main
from
feature/order_serializers_add_when_order_is_from_batch_order
Oct 8, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
06818d1
to
678fff4
Compare
kernicPanel
reviewed
Oct 2, 2025
c4ff108
to
212381a
Compare
kernicPanel
reviewed
Oct 6, 2025
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.
Why not use a model property ?
kernicPanel
reviewed
Oct 6, 2025
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.
Sorry, didn't see you used a model property.
I am using a model property here |
kernicPanel
reviewed
Oct 6, 2025
2ba88b5
to
48e8215
Compare
kernicPanel
approved these changes
Oct 7, 2025
454c5be
to
367d63d
Compare
When an order was created from a batch order, the client API did not return any information indicating this. We have added a new key to the serializer, `from_batch_order`, which returns a boolean value specifying whether the order was created from a batch order or not.
When using the batch order factory in tests, setting the state to `completed` did not succeed. With this fix, preparing a batch order in the `completed` state with the payment method `purchase_order` now works as expected
When an order was created from a batch order, the admin API did not return any information indicating this, except for the status `to_own` when it had not yet been assigned an owner. We have decided to add a new key to the serializers (`AdminOrderLightSerializer` and `AdminOrderSerializer`) to explicitly indicate whether an order was created from a batch order.
367d63d
to
0f1da2a
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose
When an order is created from a batch order, there were no indication that the order was generated
from there. We now added a new key into the serializer's response, which is
from_batch_order
. Itreturns a boolean value whether the order was created from a batch order or not.
Proposal
from_batch_order
from_batch_order
on client API OrderSerializerfrom_batch_order
on admin API OrderSerializerBatchOrderFactory
when state completed with payment methodpurchase_order
for tests