mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-28 03:26:45 +00:00
(cherry picked from commit 181e1dd9ccfc393276152738354905ab2fdd5b6c) Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
This commit is contained in:
parent
cebad3d142
commit
5c94366bb5
@ -2196,7 +2196,7 @@ class ReturnOrder(TotalPriceMixin, Order):
|
||||
# endregion
|
||||
|
||||
@transaction.atomic
|
||||
def receive_line_item(self, line, location, user, note=''):
|
||||
def receive_line_item(self, line, location, user, note='', **kwargs):
|
||||
"""Receive a line item against this ReturnOrder.
|
||||
|
||||
Rules:
|
||||
@ -2222,7 +2222,7 @@ class ReturnOrder(TotalPriceMixin, Order):
|
||||
deltas['customer'] = stock_item.customer.pk
|
||||
|
||||
# Update the StockItem
|
||||
stock_item.status = StockStatus.QUARANTINED.value
|
||||
stock_item.status = kwargs.get('status', StockStatus.QUARANTINED.value)
|
||||
stock_item.location = location
|
||||
stock_item.customer = None
|
||||
stock_item.sales_order = None
|
||||
|
@ -1161,10 +1161,12 @@ class StockItem(
|
||||
location=location,
|
||||
)
|
||||
|
||||
# Clear out allocation information for the stock item
|
||||
self.customer = None
|
||||
self.belongs_to = None
|
||||
self.sales_order = None
|
||||
self.location = location
|
||||
self.clearAllocations()
|
||||
|
||||
trigger_event('stockitem.returnedfromcustomer', id=self.id)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user