Skip to content
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

Make it work! [Clear Order Button] #47

Closed
manuelfedele opened this issue Mar 26, 2018 · 4 comments
Closed

Make it work! [Clear Order Button] #47

manuelfedele opened this issue Mar 26, 2018 · 4 comments

Comments

@manuelfedele
Copy link
Contributor

By adding
Order_Item.objects.filter(order=current_order).delete()
in pos/views.py, after line 181, in reset_order() method, Clear Order button works for real, deleting Item_Order objects of associated Order object.

@Epse
Copy link
Owner

Epse commented Mar 28, 2018

OH. Well f***k. How in the flippin heck did I not think of deleting the Item_Order objects...
Thanks I'll look at your pulls

Epse pushed a commit that referenced this issue Mar 28, 2018
* Update views.py

FIX Value Error on tuple unpacking [line 181]

* #47.FIX Clear Order now works.

Order_Item.objects.filter(order=current_order).delete()
Deletes Order_Item associated to Order deleted.

* Slight styling error.
@Epse
Copy link
Owner

Epse commented Mar 28, 2018

Fixed in #49

@Epse Epse closed this as completed Mar 28, 2018
@manuelfedele
Copy link
Contributor Author

Just one thing I noticed later. When an order is cleared, the reset method should look if "stock applies" and refund items. Just like when you remove a single product from anche order. I have the code fix in my laptop bit I'm texting from another PC now. Cya! :)

@Epse
Copy link
Owner

Epse commented Mar 29, 2018

Blimey the overseights on my end just keep coming....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants