Commit 140be41d authored by Arnaud Fontaine's avatar Arnaud Fontaine

ZODB Components: erp5_base: Revert migration of DeliveryTypeInformation from filesystem (937500a1).

ERP5TypeInformation are used for Portal Types of Portal Types and needed to generate at
least Workflow Methods early at Zope startup (initializePortalTypeDynamicWorkflowMethods()
and portal_type_group_filter in the problem reported on MR 1032) for very basic Portal
Type classes (such as Category Tool). So, Leave these on the filesystem for now, we can
eventually deal with them later if necessary.
parent a4fa0321
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Document Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>DeliveryTypeInformation</string> </value>
</item>
<item>
<key> <string>default_source_reference</string> </key>
<value> <string>Products.ERP5.Document.DeliveryTypeInformation</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>document.erp5.DeliveryTypeInformation</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Document Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -11,7 +11,6 @@ document.erp5.Coordinate
document.erp5.Currency
document.erp5.DayMovementGroup
document.erp5.DeliveryCausalityAssignmentMovementGroup
document.erp5.DeliveryTypeInformation
document.erp5.EmbeddedFile
document.erp5.FirstCausalityMovementGroup
document.erp5.GeneratedDeliveryBuilder
......
......@@ -6600,7 +6600,28 @@ Business Template is a set of definitions, such as skins, portal types and categ
subsubmodule_portal_type = component_portal_type
source_reference = "%s.%s" % (submodule_name, subsubmodule_name)
migrate = filepath in portal_type_module_filepath_set
if component_portal_type == 'Test Component':
if component_portal_type == 'Document Component':
try:
document_class = getattr(
__import__(source_reference, {}, {}, [source_reference]),
subsubmodule_name)
except ImportError, e:
LOG("BusinessTemplate", WARNING,
"Skipping %s: Cannot be imported (%s)" % (filepath, e))
continue
except AttributeError, e:
LOG("BusinessTemplate", WARNING,
"Skipping %s: Cannot get Document class %s (%s)" %
(filepath, subsubmodule_name, e))
continue
from Products.ERP5Type.ERP5Type import ERP5TypeInformation
if issubclass(document_class, ERP5TypeInformation):
# Skip for now as all portal_types/* must be able to be loaded
# to generate Workflow methods...
continue
elif component_portal_type == 'Test Component':
# For non test classes (Mixin, utils...)
if not subsubmodule_name.startswith('test'):
subsubmodule_portal_type = 'Module Component'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment