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

Add form for creating a new StockItem allocation

This commit is contained in:
Oliver Walters
2020-04-22 21:26:38 +10:00
parent 2972aec759
commit 6ab03bd05a
5 changed files with 149 additions and 15 deletions

View File

@ -16,6 +16,7 @@ from InvenTree.fields import RoundingDecimalFormField
from stock.models import StockLocation
from .models import PurchaseOrder, PurchaseOrderLineItem, PurchaseOrderAttachment
from .models import SalesOrder, SalesOrderLineItem, SalesOrderAttachment
from .models import SalesOrderAllocation
class IssuePurchaseOrderForm(HelperForm):
@ -144,3 +145,16 @@ class EditSalesOrderLineItemForm(HelperForm):
'reference',
'notes'
]
class EditSalesOrderAllocationForm(HelperForm):
quantity = RoundingDecimalFormField(max_digits=10, decimal_places=5)
class Meta:
model = SalesOrderAllocation
fields = [
'line',
'item',
'quantity']