mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-28 11:36:44 +00:00
Updated docstring (#8868)
This commit is contained in:
parent
dcff7a5ccd
commit
c99aae5a28
@ -796,7 +796,26 @@ class PurchaseOrder(TotalPriceMixin, Order):
|
|||||||
def receive_line_item(
|
def receive_line_item(
|
||||||
self, line, location, quantity, user, status=StockStatus.OK.value, **kwargs
|
self, line, location, quantity, user, status=StockStatus.OK.value, **kwargs
|
||||||
):
|
):
|
||||||
"""Receive a line item (or partial line item) against this PurchaseOrder."""
|
"""Receive a line item (or partial line item) against this PurchaseOrder.
|
||||||
|
|
||||||
|
Arguments:
|
||||||
|
line: The PurchaseOrderLineItem to receive against
|
||||||
|
location: The StockLocation to receive the item into
|
||||||
|
quantity: The quantity to receive
|
||||||
|
user: The User performing the action
|
||||||
|
status: The StockStatus to assign to the item (default: StockStatus.OK)
|
||||||
|
|
||||||
|
Keyword Arguments:
|
||||||
|
barch_code: Optional batch code for the new StockItem
|
||||||
|
serials: Optional list of serial numbers to assign to the new StockItem(s)
|
||||||
|
notes: Optional notes field for the StockItem
|
||||||
|
packaging: Optional packaging field for the StockItem
|
||||||
|
barcode: Optional barcode field for the StockItem
|
||||||
|
|
||||||
|
Raises:
|
||||||
|
ValidationError: If the quantity is negative or otherwise invalid
|
||||||
|
ValidationError: If the order is not in the 'PLACED' state
|
||||||
|
"""
|
||||||
# Extract optional batch code for the new stock item
|
# Extract optional batch code for the new stock item
|
||||||
batch_code = kwargs.get('batch_code', '')
|
batch_code = kwargs.get('batch_code', '')
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user