diff --git a/InvenTree/order/migrations/0036_auto_20200831_0912.py b/InvenTree/order/migrations/0036_auto_20200831_0912.py new file mode 100644 index 0000000000..1329d0a8d5 --- /dev/null +++ b/InvenTree/order/migrations/0036_auto_20200831_0912.py @@ -0,0 +1,35 @@ +# Generated by Django 3.0.7 on 2020-08-31 09:12 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('company', '0023_auto_20200808_0715'), + ('order', '0035_auto_20200513_0016'), + ] + + operations = [ + migrations.AlterField( + model_name='purchaseorder', + name='complete_date', + field=models.DateField(blank=True, help_text='Date order was completed', null=True), + ), + migrations.AlterField( + model_name='purchaseorder', + name='issue_date', + field=models.DateField(blank=True, help_text='Date order was issued', null=True), + ), + migrations.AlterField( + model_name='purchaseorder', + name='supplier', + field=models.ForeignKey(help_text='Company from which the items are being ordered', limit_choices_to={'is_supplier': True}, on_delete=django.db.models.deletion.CASCADE, related_name='purchase_orders', to='company.Company'), + ), + migrations.AlterField( + model_name='salesorder', + name='customer', + field=models.ForeignKey(help_text='Company to which the items are being sold', limit_choices_to={'is_customer': True}, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='sales_orders', to='company.Company'), + ), + ] diff --git a/InvenTree/order/models.py b/InvenTree/order/models.py index b607d314a0..7d561b95ba 100644 --- a/InvenTree/order/models.py +++ b/InvenTree/order/models.py @@ -137,7 +137,7 @@ class PurchaseOrder(Order): return "PO {ref} - {company}".format(ref=self.reference, company=self.supplier.name) status = models.PositiveIntegerField(default=PurchaseOrderStatus.PENDING, choices=PurchaseOrderStatus.items(), - help_text='Purchase order status') + help_text=_('Purchase order status')) supplier = models.ForeignKey( Company, on_delete=models.CASCADE, @@ -145,7 +145,7 @@ class PurchaseOrder(Order): 'is_supplier': True, }, related_name='purchase_orders', - help_text=_('Supplier') + help_text=_('Company from which the items are being ordered') ) supplier_reference = models.CharField(max_length=64, blank=True, help_text=_("Supplier order reference code")) @@ -157,9 +157,9 @@ class PurchaseOrder(Order): related_name='+' ) - issue_date = models.DateField(blank=True, null=True) + issue_date = models.DateField(blank=True, null=True, help_text=_('Date order was issued')) - complete_date = models.DateField(blank=True, null=True) + complete_date = models.DateField(blank=True, null=True, help_text=_('Date order was completed')) def get_absolute_url(self): return reverse('po-detail', kwargs={'pk': self.id}) @@ -311,11 +311,11 @@ class SalesOrder(Order): null=True, limit_choices_to={'is_customer': True}, related_name='sales_orders', - help_text=_("Customer"), + help_text=_("Company to which the items are being sold"), ) status = models.PositiveIntegerField(default=SalesOrderStatus.PENDING, choices=SalesOrderStatus.items(), - help_text='Purchase order status') + help_text=_('Purchase order status')) customer_reference = models.CharField(max_length=64, blank=True, help_text=_("Customer order reference code")) diff --git a/InvenTree/report/models.py b/InvenTree/report/models.py index bba8e50d3d..a5264f7b2b 100644 --- a/InvenTree/report/models.py +++ b/InvenTree/report/models.py @@ -127,7 +127,7 @@ class ReportTemplateBase(models.Model): except TexError: return TexResponse(rendered, filename="error.tex") else: - return ValidationError("Enable LaTeX support in config.yaml") + raise ValidationError("Enable LaTeX support in config.yaml") elif self.extension in ['.htm', '.html']: # Render HTML template to PDF wp = WeasyprintReportMixin(request, self.template_name, **kwargs) diff --git a/requirements.txt b/requirements.txt index 3687341166..041d349c66 100644 --- a/requirements.txt +++ b/requirements.txt @@ -23,4 +23,5 @@ rapidfuzz==0.7.6 # Fuzzy string matching django-stdimage==5.1.1 # Advanced ImageField management django-tex==1.1.7 # LaTeX PDF export django-weasyprint==1.0.1 # HTML PDF export -django-debug-toolbar==2.2 # Debug / profiling toolbar \ No newline at end of file +django-debug-toolbar==2.2 # Debug / profiling toolbar +inventree # Install the latest version of the InvenTree API python library \ No newline at end of file