diff --git a/InvenTree/part/migrations/0019_auto_20180416_1249.py b/InvenTree/part/migrations/0019_auto_20180416_1249.py new file mode 100644 index 0000000000..fb2717a7b6 --- /dev/null +++ b/InvenTree/part/migrations/0019_auto_20180416_1249.py @@ -0,0 +1,62 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2018-04-16 12:49 +from __future__ import unicode_literals + +import django.core.validators +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('part', '0018_part_buildable'), + ] + + operations = [ + migrations.AlterField( + model_name='part', + name='IPN', + field=models.CharField(blank=True, help_text='Internal Part Number', max_length=100), + ), + migrations.AlterField( + model_name='part', + name='URL', + field=models.URLField(blank=True, help_text='Link to extenal URL'), + ), + migrations.AlterField( + model_name='part', + name='buildable', + field=models.BooleanField(default=False, help_text='Can this part be built from other parts?'), + ), + migrations.AlterField( + model_name='part', + name='category', + field=models.ForeignKey(blank=True, help_text='Part category', null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='parts', to='part.PartCategory'), + ), + migrations.AlterField( + model_name='part', + name='description', + field=models.CharField(help_text='Part description', max_length=250), + ), + migrations.AlterField( + model_name='part', + name='minimum_stock', + field=models.PositiveIntegerField(default=0, help_text='Minimum allowed stock level', validators=[django.core.validators.MinValueValidator(0)]), + ), + migrations.AlterField( + model_name='part', + name='name', + field=models.CharField(help_text='Part name (must be unique)', max_length=100, unique=True), + ), + migrations.AlterField( + model_name='part', + name='purchaseable', + field=models.BooleanField(default=True, help_text='Can this part be purchased from external suppliers?'), + ), + migrations.AlterField( + model_name='part', + name='trackable', + field=models.BooleanField(default=False, help_text='Does this part have tracking for unique items?'), + ), + ] diff --git a/InvenTree/part/models.py b/InvenTree/part/models.py index f0e1b7a436..3edd260f9b 100644 --- a/InvenTree/part/models.py +++ b/InvenTree/part/models.py @@ -84,43 +84,44 @@ class Part(models.Model): return '/part/{id}/'.format(id=self.id) # Short name of the part - name = models.CharField(max_length=100, unique=True) + name = models.CharField(max_length=100, unique=True, help_text='Part name (must be unique)') # Longer description of the part (optional) - description = models.CharField(max_length=250) + description = models.CharField(max_length=250, help_text='Part description') # Internal Part Number (optional) # Potentially multiple parts map to the same internal IPN (variants?) # So this does not have to be unique - IPN = models.CharField(max_length=100, blank=True) + IPN = models.CharField(max_length=100, blank=True, help_text='Internal Part Number') # Provide a URL for an external link - URL = models.URLField(blank=True) + URL = models.URLField(blank=True, help_text='Link to extenal URL') # Part category - all parts must be assigned to a category category = models.ForeignKey(PartCategory, related_name='parts', null=True, blank=True, - on_delete=models.DO_NOTHING) + on_delete=models.DO_NOTHING, + help_text='Part category') image = models.ImageField(upload_to=rename_part_image, max_length=255, null=True, blank=True) # Minimum "allowed" stock level - minimum_stock = models.PositiveIntegerField(default=0, validators=[MinValueValidator(0)]) + minimum_stock = models.PositiveIntegerField(default=0, validators=[MinValueValidator(0)], help_text='Minimum allowed stock level') # Units of quantity for this part. Default is "pcs" units = models.CharField(max_length=20, default="pcs", blank=True) # Can this part be built? - buildable = models.BooleanField(default=False) + buildable = models.BooleanField(default=False, help_text='Can this part be built from other parts?') # Is this part "trackable"? # Trackable parts can have unique instances # which are assigned serial numbers (or batch numbers) # and can have their movements tracked - trackable = models.BooleanField(default=False) + trackable = models.BooleanField(default=False, help_text='Does this part have tracking for unique items?') # Is this part "purchaseable"? - purchaseable = models.BooleanField(default=True) + purchaseable = models.BooleanField(default=True, help_text='Can this part be purchased from external suppliers?') def __str__(self): if self.IPN: diff --git a/InvenTree/part/templates/delete_obj.html b/InvenTree/part/templates/delete_obj.html index 2b85af7061..3cf123330d 100644 --- a/InvenTree/part/templates/delete_obj.html +++ b/InvenTree/part/templates/delete_obj.html @@ -12,7 +12,6 @@ Deletion title goes here
This is a permanent action and cannot be undone.
{% block del_body %} -Deletion body goes here {% endblock %}