2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-17 12:35:46 +00:00

initial showcase implementation

This commit is contained in:
2021-04-06 18:17:09 +02:00
parent 53c9475e6d
commit f647120cd1
6 changed files with 113 additions and 2 deletions

View File

@ -326,7 +326,7 @@ class PurchaseOrder(Order):
return self.pending_line_items().count() == 0
@transaction.atomic
def receive_line_item(self, line, location, quantity, user, status=StockStatus.OK):
def receive_line_item(self, line, location, quantity, user, status=StockStatus.OK, purchase_price=None):
""" Receive a line item (or partial line item) against this PO
"""
@ -348,7 +348,8 @@ class PurchaseOrder(Order):
location=location,
quantity=quantity,
purchase_order=self,
status=status
status=status,
purchase_price=purchase_price,
)
stock.save()

View File

@ -776,6 +776,7 @@ class PurchaseOrderReceive(AjaxUpdateView):
line.receive_quantity,
self.request.user,
status=line.status_code,
purchase_price=line.purchase_price,
)