From b0ac6e033844f6d09ad0c2645aa3234a9870e8e4 Mon Sep 17 00:00:00 2001 From: Paul Schilling Date: Wed, 24 Jul 2024 14:07:49 +0200 Subject: [PATCH] [#2637] Support import/export of ZaakTypeConfig --- src/open_inwoner/openzaak/admin.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/open_inwoner/openzaak/admin.py b/src/open_inwoner/openzaak/admin.py index 9c61daccdc..f9c78e4ad2 100644 --- a/src/open_inwoner/openzaak/admin.py +++ b/src/open_inwoner/openzaak/admin.py @@ -5,6 +5,7 @@ from django.forms.models import BaseInlineFormSet from django.utils.translation import gettext_lazy as _, ngettext +from import_export.admin import ImportExportMixin from solo.admin import SingletonModelAdmin from open_inwoner.ckeditor5.widgets import CKEditorWidget @@ -244,7 +245,7 @@ def has_delete_permission(self, request, obj=None): @admin.register(ZaakTypeConfig) -class ZaakTypeConfigAdmin(admin.ModelAdmin): +class ZaakTypeConfigAdmin(ImportExportMixin, admin.ModelAdmin): inlines = [ ZaakTypeInformatieObjectTypeConfigInline, ZaakTypeStatusTypeConfigInline, @@ -307,6 +308,11 @@ class ZaakTypeConfigAdmin(admin.ModelAdmin): ] ordering = ("identificatie", "catalogus__domein") + # import/export + # import_template_name = "admin/category_import.html" + # resource_class = CategoryImportResource + # formats = [base_formats.XLSX, base_formats.CSV] + def has_add_permission(self, request): return False