mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Adds "target_date" field to PurchaseOrderLineItem and SalesOrderLineItem models
- Allows different target dates to be specified for different line items - If not set (null) then the base "target_date" parameter for the parent order is used
This commit is contained in:
parent
010ce48ce0
commit
557aa44904
@ -12,11 +12,14 @@ import common.models
|
|||||||
INVENTREE_SW_VERSION = "0.7.0 dev"
|
INVENTREE_SW_VERSION = "0.7.0 dev"
|
||||||
|
|
||||||
# InvenTree API version
|
# InvenTree API version
|
||||||
INVENTREE_API_VERSION = 26
|
INVENTREE_API_VERSION = 27
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Increment this API version number whenever there is a significant change to the API that any clients need to know about
|
Increment this API version number whenever there is a significant change to the API that any clients need to know about
|
||||||
|
|
||||||
|
v27 -> 2022-02-28
|
||||||
|
- Adds target_date field to individual line items for purchase orders and sales orders
|
||||||
|
|
||||||
v26 -> 2022-02-17
|
v26 -> 2022-02-17
|
||||||
- Adds API endpoint for uploading a BOM file and extracting data
|
- Adds API endpoint for uploading a BOM file and extracting data
|
||||||
|
|
||||||
|
23
InvenTree/order/migrations/0062_auto_20220228_0321.py
Normal file
23
InvenTree/order/migrations/0062_auto_20220228_0321.py
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
# Generated by Django 3.2.10 on 2022-02-28 03:21
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('order', '0061_merge_0054_auto_20211201_2139_0060_auto_20211129_1339'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='purchaseorderlineitem',
|
||||||
|
name='target_date',
|
||||||
|
field=models.DateField(blank=True, help_text='Target shipping date for this line item', null=True, verbose_name='Target Date'),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='salesorderlineitem',
|
||||||
|
name='target_date',
|
||||||
|
field=models.DateField(blank=True, help_text='Target shipping date for this line item', null=True, verbose_name='Target Date'),
|
||||||
|
),
|
||||||
|
]
|
@ -794,8 +794,9 @@ class OrderLineItem(models.Model):
|
|||||||
|
|
||||||
Attributes:
|
Attributes:
|
||||||
quantity: Number of items
|
quantity: Number of items
|
||||||
|
reference: Reference text (e.g. customer reference) for this line item
|
||||||
note: Annotation for the item
|
note: Annotation for the item
|
||||||
|
target_date: An (optional) date for expected shipment of this line item.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
@ -813,6 +814,12 @@ class OrderLineItem(models.Model):
|
|||||||
|
|
||||||
notes = models.CharField(max_length=500, blank=True, verbose_name=_('Notes'), help_text=_('Line item notes'))
|
notes = models.CharField(max_length=500, blank=True, verbose_name=_('Notes'), help_text=_('Line item notes'))
|
||||||
|
|
||||||
|
target_date = models.DateField(
|
||||||
|
blank=True, null=True,
|
||||||
|
verbose_name=_('Target Date'),
|
||||||
|
help_text=_('Target shipping date for this line item'),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class PurchaseOrderLineItem(OrderLineItem):
|
class PurchaseOrderLineItem(OrderLineItem):
|
||||||
""" Model for a purchase order line item.
|
""" Model for a purchase order line item.
|
||||||
|
@ -194,6 +194,7 @@ class POLineItemSerializer(InvenTreeModelSerializer):
|
|||||||
'purchase_price_string',
|
'purchase_price_string',
|
||||||
'destination',
|
'destination',
|
||||||
'destination_detail',
|
'destination_detail',
|
||||||
|
'target_date',
|
||||||
'total_price',
|
'total_price',
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -605,6 +606,7 @@ class SOLineItemSerializer(InvenTreeModelSerializer):
|
|||||||
'sale_price_currency',
|
'sale_price_currency',
|
||||||
'sale_price_string',
|
'sale_price_string',
|
||||||
'shipped',
|
'shipped',
|
||||||
|
'target_date',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user