Commit b562b11f authored by Jean-Paul Smets's avatar Jean-Paul Smets

fixed import of local documents (for tests)


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@656 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c91edaaf
...@@ -364,6 +364,7 @@ def importLocalDocument(class_id, document_path = None): ...@@ -364,6 +364,7 @@ def importLocalDocument(class_id, document_path = None):
new_meta_types.append(meta_type) new_meta_types.append(meta_type)
else: else:
# Update new_meta_types # Update new_meta_types
instance_class = None
new_meta_types.append( new_meta_types.append(
{ 'name': document_class.meta_type, { 'name': document_class.meta_type,
'action': ('manage_addProduct/%s/%s' % ('ERP5Type', document_constructor_name)), 'action': ('manage_addProduct/%s/%s' % ('ERP5Type', document_constructor_name)),
...@@ -413,8 +414,10 @@ def initializeLocalDocumentRegistry(): ...@@ -413,8 +414,10 @@ def initializeLocalDocumentRegistry():
module_name = file_name[0:-3] module_name = file_name[0:-3]
try: try:
importLocalDocument(module_name, document_path = document_path) importLocalDocument(module_name, document_path = document_path)
LOG('Added local document to ERP5Type repository: %s (%s)' % (module_name, document_path),0,'')
print 'Added local document to ERP5Type repository: %s (%s)' % (module_name, document_path) print 'Added local document to ERP5Type repository: %s (%s)' % (module_name, document_path)
except: except:
LOG('Failed to add local document to ERP5Type repository: %s (%s)' % (module_name, document_path) % (module_name, document_path),0,'')
print 'Failed to add local document to ERP5Type repository: %s (%s)' % (module_name, document_path) print 'Failed to add local document to ERP5Type repository: %s (%s)' % (module_name, document_path)
##################################################### #####################################################
......
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