mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Fix issue 3371 (#3381)
* Add missing underscore for translation * Fix issue #3371 * Modify comment
This commit is contained in:
parent
864d69d968
commit
2bc8556993
@ -1217,7 +1217,7 @@ class SalesOrderShipment(models.Model):
|
||||
reference = models.CharField(
|
||||
max_length=100,
|
||||
blank=False,
|
||||
verbose_name=('Shipment'),
|
||||
verbose_name=_('Shipment'),
|
||||
help_text=_('Shipment number'),
|
||||
default='1',
|
||||
)
|
||||
|
@ -981,6 +981,10 @@ class SalesOrderShipmentCompleteSerializer(serializers.ModelSerializer):
|
||||
|
||||
# Extract shipping date (defaults to today's date)
|
||||
shipment_date = data.get('shipment_date', datetime.now())
|
||||
if shipment_date is None:
|
||||
# Shipment date should not be None - check above only
|
||||
# checks if shipment_date exists in data
|
||||
shipment_date = datetime.now()
|
||||
|
||||
shipment.complete_shipment(
|
||||
user,
|
||||
|
Loading…
Reference in New Issue
Block a user