[PATCH 4 of 6 seda] [views] Fix add sub-archive-units menu on archive units of simplified profile

Sylvain Thenault sylvain.thenault at logilab.fr
Fri Mar 24 10:48:40 CET 2017


# HG changeset patch
# User Sylvain Thénault <sylvain.thenault at logilab.fr>
# Date 1490200729 -3600
#      Wed Mar 22 17:38:49 2017 +0100
# Node ID a5ea6eb18024bd052547633526d5d8e96c955380
# Parent  a5a36f8af01cf746882d2ff66b032f89ebe55c65
[views] Fix add sub-archive-units menu on archive units of simplified profile

which unexpectedly propose to add "reference archive unit" because a class
attribute hadn't followed a renaming in its parent class.

diff --git a/cubicweb_seda/views/archiveunit.py b/cubicweb_seda/views/archiveunit.py
--- a/cubicweb_seda/views/archiveunit.py
+++ b/cubicweb_seda/views/archiveunit.py
@@ -985,11 +985,13 @@ class ArchiveUnitArchiveUnitsTab(Archive
 
 class SimplifiedArchiveUnitArchiveUnitsTab(ArchiveUnitArchiveUnitsTab):
 
     __select__ = ArchiveUnitArchiveUnitsTab.__select__ & simplified_profile()
 
-    sub_unit_types = [('unit_content', _('seda_archive_unit_object'))]
+    unit_custom_arguments = [
+        ('unit_type', 'unit_content', _('archive unit (content)')),
+    ]
 
 
 # data objects tab #############################################################
 
 class ArchiveUnitDataObjectReferencesTab(ArchiveUnitSubObjectsTab):


More information about the saem-devel mailing list