[SEDA 2.1] Implement Originating/Submission agency management medatadata
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 03 Mar 2017 10:39:18 +0100
changeset 2413 139d2b9c221d
parent 2412 35e6abe69889
child 2414 b7177cc7358a
[SEDA 2.1] Implement Originating/Submission agency management medatadata
cubicweb_seda/entities/generated.py
cubicweb_seda/i18n/en.po
cubicweb_seda/i18n/fr.po
cubicweb_seda/migration/0.8.0_Any.py
cubicweb_seda/schema/seda2.py
cubicweb_seda/views/archivetransfer.py
cubicweb_seda/views/uicfg.py
cubicweb_seda/xsd.py
cubicweb_seda/xsd/seda-2.0-main.xsd
test/test_xsd2yams.py
--- a/cubicweb_seda/entities/generated.py	Fri Mar 03 10:36:17 2017 +0100
+++ b/cubicweb_seda/entities/generated.py	Fri Mar 03 10:39:18 2017 +0100
@@ -178,6 +178,16 @@
     fetch_attrs, cw_fetch_order = fetch_config(['user_cardinality'])
     value_attr = None
 
+class SEDAOriginatingAgencyIdentifier(SEDAAnyEntity):
+    __regid__ = 'SEDAOriginatingAgencyIdentifier'
+    fetch_attrs, cw_fetch_order = fetch_config(['user_cardinality', 'originating_agency_identifier', 'user_annotation'])
+    value_attr = 'originating_agency_identifier'
+
+class SEDASubmissionAgencyIdentifier(SEDAAnyEntity):
+    __regid__ = 'SEDASubmissionAgencyIdentifier'
+    fetch_attrs, cw_fetch_order = fetch_config(['user_cardinality', 'submission_agency_identifier', 'user_annotation'])
+    value_attr = 'submission_agency_identifier'
+
 class SEDAStorageRule(SEDAAnyEntity):
     __regid__ = 'SEDAStorageRule'
     fetch_attrs, cw_fetch_order = fetch_config(['user_cardinality'])
--- a/cubicweb_seda/i18n/en.po	Fri Mar 03 10:36:17 2017 +0100
+++ b/cubicweb_seda/i18n/en.po	Fri Mar 03 10:39:18 2017 +0100
@@ -389,6 +389,9 @@
 msgid "New SEDAOriginatingAgencyArchiveUnitIdentifier"
 msgstr ""
 
+msgid "New SEDAOriginatingAgencyIdentifier"
+msgstr ""
+
 msgid "New SEDAOriginatingSystemId"
 msgstr ""
 
@@ -494,6 +497,9 @@
 msgid "New SEDASubmissionAgency"
 msgstr ""
 
+msgid "New SEDASubmissionAgencyIdentifier"
+msgstr ""
+
 msgid "New SEDASystemId"
 msgstr ""
 
@@ -1390,6 +1396,16 @@
 msgid "SEDAOriginatingAgencyArchiveUnitIdentifier_plural"
 msgstr ""
 
+msgid "SEDAOriginatingAgencyIdentifier"
+msgstr ""
+
+msgctxt "inlined:SEDAArchiveTransfer.seda_originating_agency_identifier.object"
+msgid "SEDAOriginatingAgencyIdentifier"
+msgstr ""
+
+msgid "SEDAOriginatingAgencyIdentifier_plural"
+msgstr ""
+
 msgid "SEDAOriginatingAgency_plural"
 msgstr ""
 
@@ -1828,6 +1844,16 @@
 msgid "SEDASubmissionAgency"
 msgstr ""
 
+msgid "SEDASubmissionAgencyIdentifier"
+msgstr ""
+
+msgctxt "inlined:SEDAArchiveTransfer.seda_submission_agency_identifier.object"
+msgid "SEDASubmissionAgencyIdentifier"
+msgstr ""
+
+msgid "SEDASubmissionAgencyIdentifier_plural"
+msgstr ""
+
 msgid "SEDASubmissionAgency_plural"
 msgstr ""
 
@@ -2568,6 +2594,12 @@
 msgid "This SEDAOriginatingAgencyArchiveUnitIdentifier:"
 msgstr ""
 
+msgid "This SEDAOriginatingAgencyIdentifier"
+msgstr ""
+
+msgid "This SEDAOriginatingAgencyIdentifier:"
+msgstr ""
+
 msgid "This SEDAOriginatingSystemId"
 msgstr ""
 
@@ -2778,6 +2810,12 @@
 msgid "This SEDASubmissionAgency:"
 msgstr ""
 
+msgid "This SEDASubmissionAgencyIdentifier"
+msgstr ""
+
+msgid "This SEDASubmissionAgencyIdentifier:"
+msgstr ""
+
 msgid "This SEDASystemId"
 msgstr ""
 
@@ -3446,6 +3484,13 @@
 msgid "add a SEDAOriginatingAgencyArchiveUnitIdentifier"
 msgstr ""
 
+msgid "add a SEDAOriginatingAgencyIdentifier"
+msgstr ""
+
+msgctxt "inlined:SEDAArchiveTransfer.seda_originating_agency_identifier.object"
+msgid "add a SEDAOriginatingAgencyIdentifier"
+msgstr ""
+
 msgid "add a SEDAOriginatingSystemId"
 msgstr ""
 
@@ -3779,6 +3824,13 @@
 msgid "add a SEDASubmissionAgency"
 msgstr ""
 
+msgid "add a SEDASubmissionAgencyIdentifier"
+msgstr ""
+
+msgctxt "inlined:SEDAArchiveTransfer.seda_submission_agency_identifier.object"
+msgid "add a SEDASubmissionAgencyIdentifier"
+msgstr ""
+
 msgid "add a SEDASystemId"
 msgstr ""
 
@@ -4314,6 +4366,10 @@
 msgid "container"
 msgstr ""
 
+msgctxt "SEDAOriginatingAgencyIdentifier"
+msgid "container"
+msgstr ""
+
 msgctxt "SEDAOriginatingSystemId"
 msgid "container"
 msgstr ""
@@ -4454,6 +4510,10 @@
 msgid "container"
 msgstr ""
 
+msgctxt "SEDASubmissionAgencyIdentifier"
+msgid "container"
+msgstr ""
+
 msgctxt "SEDASystemId"
 msgid "container"
 msgstr ""
@@ -4845,6 +4905,13 @@
 msgid "originating_agency_archive_unit_identifier"
 msgstr ""
 
+msgid "originating_agency_identifier"
+msgstr ""
+
+msgctxt "SEDAOriginatingAgencyIdentifier"
+msgid "originating_agency_identifier"
+msgstr ""
+
 msgid "prevent all rules"
 msgstr ""
 
@@ -6757,6 +6824,20 @@
 msgid "seda_originating_agency_from_object"
 msgstr ""
 
+msgid "seda_originating_agency_identifier"
+msgstr ""
+
+msgctxt "SEDAOriginatingAgencyIdentifier"
+msgid "seda_originating_agency_identifier"
+msgstr ""
+
+msgid "seda_originating_agency_identifier_object"
+msgstr ""
+
+msgctxt "SEDAArchiveTransfer"
+msgid "seda_originating_agency_identifier_object"
+msgstr ""
+
 msgid "seda_originating_agency_to"
 msgstr ""
 
@@ -7527,6 +7608,20 @@
 msgid "seda_submission_agency_from_object"
 msgstr ""
 
+msgid "seda_submission_agency_identifier"
+msgstr ""
+
+msgctxt "SEDASubmissionAgencyIdentifier"
+msgid "seda_submission_agency_identifier"
+msgstr ""
+
+msgid "seda_submission_agency_identifier_object"
+msgstr ""
+
+msgctxt "SEDAArchiveTransfer"
+msgid "seda_submission_agency_identifier_object"
+msgstr ""
+
 msgid "seda_submission_agency_to"
 msgstr ""
 
@@ -7903,6 +7998,13 @@
 msgid "status"
 msgstr ""
 
+msgid "submission_agency_identifier"
+msgstr ""
+
+msgctxt "SEDASubmissionAgencyIdentifier"
+msgid "submission_agency_identifier"
+msgstr ""
+
 msgid "tag"
 msgstr ""
 
@@ -8282,6 +8384,10 @@
 msgid "user_annotation"
 msgstr ""
 
+msgctxt "SEDAOriginatingAgencyIdentifier"
+msgid "user_annotation"
+msgstr ""
+
 msgctxt "SEDAOriginatingSystemId"
 msgid "user_annotation"
 msgstr ""
@@ -8406,6 +8512,10 @@
 msgid "user_annotation"
 msgstr ""
 
+msgctxt "SEDASubmissionAgencyIdentifier"
+msgid "user_annotation"
+msgstr ""
+
 msgctxt "SEDASystemId"
 msgid "user_annotation"
 msgstr ""
@@ -8801,6 +8911,10 @@
 msgid "user_cardinality"
 msgstr ""
 
+msgctxt "SEDAOriginatingAgencyIdentifier"
+msgid "user_cardinality"
+msgstr ""
+
 msgctxt "SEDAOriginatingSystemId"
 msgid "user_cardinality"
 msgstr ""
@@ -8925,6 +9039,10 @@
 msgid "user_cardinality"
 msgstr ""
 
+msgctxt "SEDASubmissionAgencyIdentifier"
+msgid "user_cardinality"
+msgstr ""
+
 msgctxt "SEDASystemId"
 msgid "user_cardinality"
 msgstr ""
--- a/cubicweb_seda/i18n/fr.po	Fri Mar 03 10:36:17 2017 +0100
+++ b/cubicweb_seda/i18n/fr.po	Fri Mar 03 10:39:18 2017 +0100
@@ -396,6 +396,9 @@
 msgid "New SEDAOriginatingAgencyArchiveUnitIdentifier"
 msgstr ""
 
+msgid "New SEDAOriginatingAgencyIdentifier"
+msgstr ""
+
 msgid "New SEDAOriginatingSystemId"
 msgstr ""
 
@@ -501,6 +504,9 @@
 msgid "New SEDASubmissionAgency"
 msgstr ""
 
+msgid "New SEDASubmissionAgencyIdentifier"
+msgstr ""
+
 msgid "New SEDASystemId"
 msgstr ""
 
@@ -1400,6 +1406,16 @@
 msgid "SEDAOriginatingAgencyArchiveUnitIdentifier_plural"
 msgstr ""
 
+msgid "SEDAOriginatingAgencyIdentifier"
+msgstr ""
+
+msgctxt "inlined:SEDAArchiveTransfer.seda_originating_agency_identifier.object"
+msgid "SEDAOriginatingAgencyIdentifier"
+msgstr ""
+
+msgid "SEDAOriginatingAgencyIdentifier_plural"
+msgstr ""
+
 msgid "SEDAOriginatingAgency_plural"
 msgstr ""
 
@@ -1838,6 +1854,16 @@
 msgid "SEDASubmissionAgency"
 msgstr ""
 
+msgid "SEDASubmissionAgencyIdentifier"
+msgstr ""
+
+msgctxt "inlined:SEDAArchiveTransfer.seda_submission_agency_identifier.object"
+msgid "SEDASubmissionAgencyIdentifier"
+msgstr ""
+
+msgid "SEDASubmissionAgencyIdentifier_plural"
+msgstr ""
+
 msgid "SEDASubmissionAgency_plural"
 msgstr ""
 
@@ -2580,6 +2606,12 @@
 msgid "This SEDAOriginatingAgencyArchiveUnitIdentifier:"
 msgstr ""
 
+msgid "This SEDAOriginatingAgencyIdentifier"
+msgstr ""
+
+msgid "This SEDAOriginatingAgencyIdentifier:"
+msgstr ""
+
 msgid "This SEDAOriginatingSystemId"
 msgstr ""
 
@@ -2790,6 +2822,12 @@
 msgid "This SEDASubmissionAgency:"
 msgstr ""
 
+msgid "This SEDASubmissionAgencyIdentifier"
+msgstr ""
+
+msgid "This SEDASubmissionAgencyIdentifier:"
+msgstr ""
+
 msgid "This SEDASystemId"
 msgstr ""
 
@@ -3460,6 +3498,13 @@
 msgid "add a SEDAOriginatingAgencyArchiveUnitIdentifier"
 msgstr ""
 
+msgid "add a SEDAOriginatingAgencyIdentifier"
+msgstr ""
+
+msgctxt "inlined:SEDAArchiveTransfer.seda_originating_agency_identifier.object"
+msgid "add a SEDAOriginatingAgencyIdentifier"
+msgstr ""
+
 msgid "add a SEDAOriginatingSystemId"
 msgstr ""
 
@@ -3793,6 +3838,13 @@
 msgid "add a SEDASubmissionAgency"
 msgstr ""
 
+msgid "add a SEDASubmissionAgencyIdentifier"
+msgstr ""
+
+msgctxt "inlined:SEDAArchiveTransfer.seda_submission_agency_identifier.object"
+msgid "add a SEDASubmissionAgencyIdentifier"
+msgstr ""
+
 msgid "add a SEDASystemId"
 msgstr ""
 
@@ -4328,6 +4380,10 @@
 msgid "container"
 msgstr ""
 
+msgctxt "SEDAOriginatingAgencyIdentifier"
+msgid "container"
+msgstr ""
+
 msgctxt "SEDAOriginatingSystemId"
 msgid "container"
 msgstr ""
@@ -4468,6 +4524,10 @@
 msgid "container"
 msgstr ""
 
+msgctxt "SEDASubmissionAgencyIdentifier"
+msgid "container"
+msgstr ""
+
 msgctxt "SEDASystemId"
 msgid "container"
 msgstr ""
@@ -4866,6 +4926,13 @@
 msgid "originating_agency_archive_unit_identifier"
 msgstr ""
 
+msgid "originating_agency_identifier"
+msgstr "valeur"
+
+msgctxt "SEDAOriginatingAgencyIdentifier"
+msgid "originating_agency_identifier"
+msgstr ""
+
 msgid "prevent all rules"
 msgstr "bloquer toutes les règles"
 
@@ -6778,6 +6845,20 @@
 msgid "seda_originating_agency_from_object"
 msgstr ""
 
+msgid "seda_originating_agency_identifier"
+msgstr ""
+
+msgctxt "SEDAOriginatingAgencyIdentifier"
+msgid "seda_originating_agency_identifier"
+msgstr ""
+
+msgid "seda_originating_agency_identifier_object"
+msgstr "identifiant de gestion du service producteur"
+
+msgctxt "SEDAArchiveTransfer"
+msgid "seda_originating_agency_identifier_object"
+msgstr ""
+
 msgid "seda_originating_agency_to"
 msgstr "valeur"
 
@@ -7548,6 +7629,20 @@
 msgid "seda_submission_agency_from_object"
 msgstr ""
 
+msgid "seda_submission_agency_identifier"
+msgstr ""
+
+msgctxt "SEDASubmissionAgencyIdentifier"
+msgid "seda_submission_agency_identifier"
+msgstr ""
+
+msgid "seda_submission_agency_identifier_object"
+msgstr "identifiant de gestion du service versant"
+
+msgctxt "SEDAArchiveTransfer"
+msgid "seda_submission_agency_identifier_object"
+msgstr ""
+
 msgid "seda_submission_agency_to"
 msgstr "valeur"
 
@@ -7926,6 +8021,13 @@
 msgid "status"
 msgstr "valeur"
 
+msgid "submission_agency_identifier"
+msgstr "valeur"
+
+msgctxt "SEDASubmissionAgencyIdentifier"
+msgid "submission_agency_identifier"
+msgstr ""
+
 msgid "tag"
 msgstr ""
 
@@ -8309,6 +8411,10 @@
 msgid "user_annotation"
 msgstr ""
 
+msgctxt "SEDAOriginatingAgencyIdentifier"
+msgid "user_annotation"
+msgstr ""
+
 msgctxt "SEDAOriginatingSystemId"
 msgid "user_annotation"
 msgstr ""
@@ -8433,6 +8539,10 @@
 msgid "user_annotation"
 msgstr ""
 
+msgctxt "SEDASubmissionAgencyIdentifier"
+msgid "user_annotation"
+msgstr ""
+
 msgctxt "SEDASystemId"
 msgid "user_annotation"
 msgstr ""
@@ -8828,6 +8938,10 @@
 msgid "user_cardinality"
 msgstr ""
 
+msgctxt "SEDAOriginatingAgencyIdentifier"
+msgid "user_cardinality"
+msgstr ""
+
 msgctxt "SEDAOriginatingSystemId"
 msgid "user_cardinality"
 msgstr ""
@@ -8952,6 +9066,10 @@
 msgid "user_cardinality"
 msgstr ""
 
+msgctxt "SEDASubmissionAgencyIdentifier"
+msgid "user_cardinality"
+msgstr ""
+
 msgctxt "SEDASystemId"
 msgid "user_cardinality"
 msgstr ""
--- a/cubicweb_seda/migration/0.8.0_Any.py	Fri Mar 03 10:36:17 2017 +0100
+++ b/cubicweb_seda/migration/0.8.0_Any.py	Fri Mar 03 10:39:18 2017 +0100
@@ -8,6 +8,9 @@
 add_entity_type('SEDAAcquisitionInformationCodeListVersion')
 add_entity_type('SEDAAcquisitionInformation')
 
+add_entity_type('SEDAOriginatingAgencyIdentifier')
+add_entity_type('SEDASubmissionAgencyIdentifier')
+
 add_entity_type('SEDALegalStatus')
 
 sync_schema_props_perms('seda_algorithm')
--- a/cubicweb_seda/schema/seda2.py	Fri Mar 03 10:36:17 2017 +0100
+++ b/cubicweb_seda/schema/seda2.py	Fri Mar 03 10:39:18 2017 +0100
@@ -652,6 +652,37 @@
     inlined = True
     constraints = [RQLConstraint('O in_scheme CS, CS scheme_relation_type CR, CR name "seda_legal_status_to"')]
 
+@seda_profile_element(cardinalities=['0..1', '1'], default_cardinality='0..1',
+                      annotable=True)
+class SEDAOriginatingAgencyIdentifier(EntityType):
+    u""""""
+    originating_agency_identifier = String(fulltextindexed=True)
+
+
+class archive_transfer_originating_agency_identifier(RelationDefinition):
+    name = 'seda_originating_agency_identifier'
+    subject = 'SEDAOriginatingAgencyIdentifier'
+    object = 'SEDAArchiveTransfer'
+    cardinality = '1?'
+    composite = fulltext_container = 'object'
+    inlined = True
+    constraints = []
+
+@seda_profile_element(cardinalities=['0..1', '1'], default_cardinality='0..1',
+                      annotable=True)
+class SEDASubmissionAgencyIdentifier(EntityType):
+    u""""""
+    submission_agency_identifier = String(fulltextindexed=True)
+
+
+class archive_transfer_submission_agency_identifier(RelationDefinition):
+    name = 'seda_submission_agency_identifier'
+    subject = 'SEDASubmissionAgencyIdentifier'
+    object = 'SEDAArchiveTransfer'
+    cardinality = '1?'
+    composite = fulltext_container = 'object'
+    inlined = True
+    constraints = []
 
 @seda_profile_element(cardinalities=['0..1', '1'], default_cardinality='0..1',
                       annotable=True)
--- a/cubicweb_seda/views/archivetransfer.py	Fri Mar 03 10:36:17 2017 +0100
+++ b/cubicweb_seda/views/archivetransfer.py	Fri Mar 03 10:39:18 2017 +0100
@@ -40,7 +40,9 @@
     ('seda_archival_agreement', 'object'),
     ('seda_service_level', 'object'),
     ('seda_acquisition_information_from', 'object'),
-    ('seda_legal_status_from', 'object')]
+    ('seda_legal_status_from', 'object'),
+    ('seda_originating_agency_identifier', 'object'),
+    ('seda_submission_agency_identifier', 'object')]
 
 pvs = uicfg.primaryview_section
 pvdc = uicfg.primaryview_display_ctrl
--- a/cubicweb_seda/views/uicfg.py	Fri Mar 03 10:36:17 2017 +0100
+++ b/cubicweb_seda/views/uicfg.py	Fri Mar 03 10:39:18 2017 +0100
@@ -83,6 +83,7 @@
 ives['SEDAReferences'] = 'subobject'
 ives['SEDADataObjectVersionCodeListVersion'] = 'subobject'
 ives['SEDAAuthorizedAgent'] = 'subobject'
+ives['SEDASubmissionAgencyIdentifier'] = 'subobject'
 ives['SEDACreatingApplicationName'] = 'subobject'
 ives['SEDAKeyword'] = 'subobject'
 ives['SEDADescription'] = 'subobject'
@@ -156,6 +157,7 @@
 ives['SEDASubmissionAgency'] = 'subobject'
 ives['SEDAMimeType'] = 'subobject'
 ives['SEDAReceivedDate'] = 'subobject'
+ives['SEDAOriginatingAgencyIdentifier'] = 'subobject'
 ives['SEDAMimeTypeCodeListVersion'] = 'subobject'
 ives['SEDARecipient'] = 'subobject'
 ives['SEDADataObjectReference'] = 'subobject'
@@ -261,6 +263,10 @@
 abaa.tag_object_of(('*', 'seda_legal_status_from', '*'), False)
 abaa.tag_object_of(('*', 'seda_legal_status_to', '*'), False)
 abaa.tag_subject_of(('*', 'seda_legal_status_to', '*'), False)
+abaa.tag_subject_of(('*', 'seda_originating_agency_identifier', '*'), False)
+abaa.tag_object_of(('*', 'seda_originating_agency_identifier', '*'), False)
+abaa.tag_subject_of(('*', 'seda_submission_agency_identifier', '*'), False)
+abaa.tag_object_of(('*', 'seda_submission_agency_identifier', '*'), False)
 abaa.tag_subject_of(('*', 'seda_storage_rule', '*'), False)
 abaa.tag_object_of(('*', 'seda_storage_rule', '*'), False)
 abaa.tag_subject_of(('*', 'seda_appraisal_rule', '*'), False)
@@ -563,6 +569,8 @@
 affk.tag_subject_of(('*', 'filename', '*'), {'widget': fw.TextInput({'size': 80})})
 affk.tag_subject_of(('*', 'compressed', '*'), {'allow_none': True})
 affk.tag_subject_of(('*', 'service_level', '*'), {'widget': fw.TextInput({'size': 80})})
+affk.tag_subject_of(('*', 'originating_agency_identifier', '*'), {'widget': fw.TextInput({'size': 80})})
+affk.tag_subject_of(('*', 'submission_agency_identifier', '*'), {'widget': fw.TextInput({'size': 80})})
 affk.tag_subject_of(('*', 'classification_owner', '*'), {'widget': fw.TextInput({'size': 80})})
 affk.tag_subject_of(('*', 'need_authorization', '*'), {'allow_none': True})
 affk.tag_subject_of(('*', 'format_litteral', '*'), {'widget': fw.TextInput({'size': 80})})
@@ -689,6 +697,10 @@
 afs.tag_object_of(('*', 'seda_legal_status_from', '*'), 'main', 'inlined')
 afs.tag_object_of(('*', 'seda_legal_status_to', '*'), 'main', 'hidden')
 afs.tag_subject_of(('*', 'seda_legal_status_to', '*'), 'main', 'attributes')
+afs.tag_subject_of(('*', 'seda_originating_agency_identifier', '*'), 'main', 'hidden')
+afs.tag_object_of(('*', 'seda_originating_agency_identifier', '*'), 'main', 'inlined')
+afs.tag_subject_of(('*', 'seda_submission_agency_identifier', '*'), 'main', 'hidden')
+afs.tag_object_of(('*', 'seda_submission_agency_identifier', '*'), 'main', 'inlined')
 afs.tag_subject_of(('*', 'seda_storage_rule', '*'), 'main', 'hidden')
 afs.tag_object_of(('*', 'seda_storage_rule', '*'), 'main', 'hidden')
 afs.tag_subject_of(('*', 'seda_appraisal_rule', '*'), 'main', 'hidden')
@@ -1197,6 +1209,10 @@
 rec.tag_subject_of(('*', 'seda_acquisition_information_to', '*'), {'novalue_label': '<no value specified>'})
 rec.tag_object_of(('*', 'seda_legal_status_from', '*'), {'novalue_label': ' '})
 rec.tag_subject_of(('*', 'seda_legal_status_to', '*'), {'novalue_label': '<no value specified>'})
+rec.tag_subject_of(('*', 'originating_agency_identifier', '*'), {'novalue_label': '<no value specified>'})
+rec.tag_object_of(('*', 'seda_originating_agency_identifier', '*'), {'novalue_label': ' '})
+rec.tag_subject_of(('*', 'submission_agency_identifier', '*'), {'novalue_label': '<no value specified>'})
+rec.tag_object_of(('*', 'seda_submission_agency_identifier', '*'), {'novalue_label': ' '})
 rec.tag_object_of(('*', 'seda_storage_rule', '*'), {'novalue_label': ' '})
 rec.tag_object_of(('*', 'seda_appraisal_rule', '*'), {'novalue_label': ' '})
 rec.tag_object_of(('*', 'seda_access_rule', '*'), {'novalue_label': ' '})
@@ -1358,6 +1374,10 @@
 pvds.set_fields_order('SEDAArchiveUnit', ['user_cardinality', 'user_annotation'])
 affk.set_fields_order('SEDAServiceLevel', ['user_cardinality', 'service_level', 'user_annotation'])
 pvds.set_fields_order('SEDAServiceLevel', ['user_cardinality', 'service_level', 'user_annotation'])
+affk.set_fields_order('SEDAOriginatingAgencyIdentifier', ['user_cardinality', 'originating_agency_identifier', 'user_annotation'])
+pvds.set_fields_order('SEDAOriginatingAgencyIdentifier', ['user_cardinality', 'originating_agency_identifier', 'user_annotation'])
+affk.set_fields_order('SEDASubmissionAgencyIdentifier', ['user_cardinality', 'submission_agency_identifier', 'user_annotation'])
+pvds.set_fields_order('SEDASubmissionAgencyIdentifier', ['user_cardinality', 'submission_agency_identifier', 'user_annotation'])
 affk.set_fields_order('SEDAClassificationRule', ['user_cardinality', 'classification_owner', 'user_annotation'])
 pvds.set_fields_order('SEDAClassificationRule', ['user_cardinality', 'classification_owner', 'user_annotation'])
 affk.set_fields_order('SEDANeedAuthorization', ['user_cardinality', 'need_authorization', 'user_annotation'])
--- a/cubicweb_seda/xsd.py	Fri Mar 03 10:36:17 2017 +0100
+++ b/cubicweb_seda/xsd.py	Fri Mar 03 10:39:18 2017 +0100
@@ -93,7 +93,9 @@
     'TransferRequestReplyIdentifier': 'String',
     'RelatedTransferReference': 'String',
     'ArchivalAgencyArchiveUnitIdentifier': 'String',
+    'OriginatingAgencyIdentifier': 'String',
     'OriginatingAgencyArchiveUnitIdentifier': 'String',
+    'SubmissionAgencyIdentifier': 'String',
     'TransferringAgencyArchiveUnitIdentifier': 'String',
     'RepositoryArchiveUnitPID': 'String',
     'RepositoryObjectPID': 'String',
--- a/cubicweb_seda/xsd/seda-2.0-main.xsd	Fri Mar 03 10:36:17 2017 +0100
+++ b/cubicweb_seda/xsd/seda-2.0-main.xsd	Fri Mar 03 10:39:18 2017 +0100
@@ -153,6 +153,16 @@
                     <xsd:documentation>Statut des archives échangées.</xsd:documentation>
                 </xsd:annotation>
             </xsd:element>
+            <xsd:element name="OriginatingAgencyIdentifier" type="IdentifierType" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Identifiant du service producteur - information de gestion à ne pas confondre avec OriginatingAgency dans les métadonnées de description.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
+            <xsd:element name="SubmissionAgencyIdentifier" type="IdentifierType" minOccurs="0">
+                <xsd:annotation>
+                    <xsd:documentation>Identifiant du service versant - information de gestion à ne pas confondre avec SubmissionAgency dans les métadonnées de description.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:element>
             <xsd:group ref="ManagementGroup" minOccurs="0">
                 <xsd:annotation>
                     <xsd:documentation>Métadonnées de gestion associées à l'ensemble des unités d'archives.</xsd:documentation>
--- a/test/test_xsd2yams.py	Fri Mar 03 10:36:17 2017 +0100
+++ b/test/test_xsd2yams.py	Fri Mar 03 10:39:18 2017 +0100
@@ -275,6 +275,13 @@
                 ('LegalStatus',
                  [('seda_legal_status_from', 'object', 'SEDALegalStatus'),
                   ('seda_legal_status_to', 'subject', 'Concept')]),
+                ('OriginatingAgencyIdentifier',
+                 [('seda_originating_agency_identifier', 'object',
+                   'SEDAOriginatingAgencyIdentifier'),
+                  ('originating_agency_identifier', 'subject', 'String')]),
+                ('SubmissionAgencyIdentifier',
+                 [('seda_submission_agency_identifier', 'object', 'SEDASubmissionAgencyIdentifier'),
+                  ('submission_agency_identifier', 'subject', 'String')]),
                 ('StorageRule', [('seda_storage_rule', 'object', 'SEDAStorageRule')]),
                 ('AppraisalRule', [('seda_appraisal_rule', 'object', 'SEDAAppraisalRule')]),
                 ('AccessRule', [('seda_access_rule', 'object', 'SEDAAccessRule')]),