mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-31 13:15:43 +00:00 
			
		
		
		
	Add field "enabled" to Report template
This commit is contained in:
		| @@ -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 | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user