uppsaladatavetare / foobar-api

The backend of the FooBar kiosk and inventory system.
MIT License
12 stars 6 forks source link

Update active status on product quantity change #76

Open Thizizmyname opened 6 years ago

Thizizmyname commented 6 years ago

If a product is inactive and it's quantity amount is changed it should be automatically set to active again so it's quantity is confirmed in the next stock-take.

This is an expansion for #75.

There are three moments a quantity is changed:

A purchased object gets changed on "finalize_purchase" in foobar_api/src/foobar/api.py

A delivery changes a product on "populate_delivery" in foobar_api/src/shop/api.py