-
-
Notifications
You must be signed in to change notification settings - Fork 725
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
After deleting a product I can't cancel an order containing that product #5335
Comments
😱 and here I am deleting products for one of my users.... too late :'( |
I wrote a spec related to this yesterday. When a variant is soft-deleted it's stock item is hard-deleted... |
Cancelling the order obviously tries to restock the deleted variant. |
I don't think there's a workaround here, but it should be fairly simple to fix. |
v3 brought soft deletion to stock items, I wonder if this one is solved... |
For a newly created on_demand variant and after placing the order with it, it seems possible to and delete this variant (which is perhaps useful information to add to #5947). After deleting this variant, it's possible to reproduce this bug by attempting to delete the order: |
That makes sense @Matt-Yorkley . Also, it's not possible to remove or refund those items, from the previously placed orders: This was reported here, by @Cecilia-Hn : |
I tried to un-delete the previously deleted product and its variants but get following error:- |
I have fixed this on my local dev machine .. will be writing test, committing, and requesting pull .. |
Thank you @cmittal791! |
Thanks! |
I will pick up this one. |
Thank you @meronokbay for picking this up! |
I won't be able to address this issue anytime soon, because life is getting hectic for me. Hopefully, someone else can pick it up. |
OK no worries @meronokbay . Thank you for your contributions so far, hope to see you back another time 💪 |
We have a producer (Enterprise 3452) that has deleted 2 products and now wants to cancel order R455001031 that contains them but cannot because of this bug. As far as I can see there is no workaround for this. This producer sells seasonal products and this is likely to happen again for them. For now I am going to suggest they make a negative adjustment for the value of the order and name the adjustment "Zeroing order as unable to cancel order for deleted products". |
I can take a look at this if no one else is |
Sure, go ahead @georgethoppil . Thank you 🎉 There was a previous attempt at this in #7622 that you could take a look at if you want. |
Description
Once a product has been soft-deleted it still appears in orders placed.
If I then want to cancel that order I cannot.
message = 'You need to save the variant to create a stock item before you can set stock levels.'
https://app.bugsnag.com/yaycode/openfoodnetwork-uk/errors/5da4ec3ec076fc0019b57ad6?filters[event.since][0]=30d&filters[error.status][0]=open
Expected Behavior
I want to be able to cancel orders that contain deleted products
Actual Behaviour
I cannot cancel an order than contains a deleted product
Steps to Reproduce
Animated Gif/Screenshot
Workaround
Possibly by recreating the product and then cancelling the order? I haven't tested this.
Severity
bug-s3: a feature is broken but there is a workaround of adding a negative adjustment.
I'm not sure if there is a workaround. This seems to mostly impact people making test orders on the system. This doesn't seem to impact people so often once they start trading.
Your Environment
Possible Fix
The text was updated successfully, but these errors were encountered: