mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Order: Improve help text(s)
This commit is contained in:
parent
406dbc36fa
commit
5c4781b5b4
35
InvenTree/order/migrations/0036_auto_20200831_0912.py
Normal file
35
InvenTree/order/migrations/0036_auto_20200831_0912.py
Normal file
@ -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'),
|
||||||
|
),
|
||||||
|
]
|
@ -137,7 +137,7 @@ class PurchaseOrder(Order):
|
|||||||
return "PO {ref} - {company}".format(ref=self.reference, company=self.supplier.name)
|
return "PO {ref} - {company}".format(ref=self.reference, company=self.supplier.name)
|
||||||
|
|
||||||
status = models.PositiveIntegerField(default=PurchaseOrderStatus.PENDING, choices=PurchaseOrderStatus.items(),
|
status = models.PositiveIntegerField(default=PurchaseOrderStatus.PENDING, choices=PurchaseOrderStatus.items(),
|
||||||
help_text='Purchase order status')
|
help_text=_('Purchase order status'))
|
||||||
|
|
||||||
supplier = models.ForeignKey(
|
supplier = models.ForeignKey(
|
||||||
Company, on_delete=models.CASCADE,
|
Company, on_delete=models.CASCADE,
|
||||||
@ -145,7 +145,7 @@ class PurchaseOrder(Order):
|
|||||||
'is_supplier': True,
|
'is_supplier': True,
|
||||||
},
|
},
|
||||||
related_name='purchase_orders',
|
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"))
|
supplier_reference = models.CharField(max_length=64, blank=True, help_text=_("Supplier order reference code"))
|
||||||
@ -157,9 +157,9 @@ class PurchaseOrder(Order):
|
|||||||
related_name='+'
|
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):
|
def get_absolute_url(self):
|
||||||
return reverse('po-detail', kwargs={'pk': self.id})
|
return reverse('po-detail', kwargs={'pk': self.id})
|
||||||
@ -311,11 +311,11 @@ class SalesOrder(Order):
|
|||||||
null=True,
|
null=True,
|
||||||
limit_choices_to={'is_customer': True},
|
limit_choices_to={'is_customer': True},
|
||||||
related_name='sales_orders',
|
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(),
|
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"))
|
customer_reference = models.CharField(max_length=64, blank=True, help_text=_("Customer order reference code"))
|
||||||
|
|
||||||
|
@ -127,7 +127,7 @@ class ReportTemplateBase(models.Model):
|
|||||||
except TexError:
|
except TexError:
|
||||||
return TexResponse(rendered, filename="error.tex")
|
return TexResponse(rendered, filename="error.tex")
|
||||||
else:
|
else:
|
||||||
return ValidationError("Enable LaTeX support in config.yaml")
|
raise ValidationError("Enable LaTeX support in config.yaml")
|
||||||
elif self.extension in ['.htm', '.html']:
|
elif self.extension in ['.htm', '.html']:
|
||||||
# Render HTML template to PDF
|
# Render HTML template to PDF
|
||||||
wp = WeasyprintReportMixin(request, self.template_name, **kwargs)
|
wp = WeasyprintReportMixin(request, self.template_name, **kwargs)
|
||||||
|
Loading…
Reference in New Issue
Block a user