2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-06 05:30:56 +00:00

Return from customer (#3120)

* Adds ability to return item into stock via the API

* Remove old server-side form / view for returning stock from a customer

* Add unit tests for new API endpoint
This commit is contained in:
Oliver
2022-06-03 08:36:08 +10:00
committed by GitHub
parent 5fef6563d8
commit 4b3f77763d
9 changed files with 113 additions and 55 deletions

View File

@ -894,7 +894,8 @@ class StockItem(MetadataMixin, MPTTModel):
# Return the reference to the stock item
return item
def returnFromCustomer(self, location, user=None, **kwargs):
@transaction.atomic
def return_from_customer(self, location, user=None, **kwargs):
"""Return stock item from customer, back into the specified location."""
notes = kwargs.get('notes', '')