mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Add field "enabled" to Report template
This commit is contained in:
parent
116d966d29
commit
b7ae95686e
@ -8,7 +8,7 @@ from .models import TestReport, ReportAsset
|
||||
|
||||
class ReportTemplateAdmin(admin.ModelAdmin):
|
||||
|
||||
list_display = ('name', 'description', 'template')
|
||||
list_display = ('name', 'description', 'template', 'enabled')
|
||||
|
||||
|
||||
class ReportAssetAdmin(admin.ModelAdmin):
|
||||
|
18
InvenTree/report/migrations/0003_testreport_enabled.py
Normal file
18
InvenTree/report/migrations/0003_testreport_enabled.py
Normal file
@ -0,0 +1,18 @@
|
||||
# Generated by Django 3.0.7 on 2020-08-23 10:50
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('report', '0002_delete_reporttemplate'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='testreport',
|
||||
name='enabled',
|
||||
field=models.BooleanField(default=True, help_text='Report template is enabled', verbose_name='Enabled'),
|
||||
),
|
||||
]
|
@ -147,6 +147,12 @@ class ReportTemplateBase(models.Model):
|
||||
|
||||
description = models.CharField(max_length=250, help_text=_("Report template description"))
|
||||
|
||||
enabled = models.BooleanField(
|
||||
default=True,
|
||||
help_text=_('Report template is enabled'),
|
||||
verbose_name=_('Enabled')
|
||||
)
|
||||
|
||||
class Meta:
|
||||
abstract = True
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user