Commit b150bc1b authored by Gabriel Monnerat's avatar Gabriel Monnerat

erp5_ingestion: Allow pass extra properties to create document using portal_contributions

parent 5b2aea23
......@@ -50,6 +50,11 @@ if attach_document_to_context:
document_kw['follow_up_list'] = follow_up_list
document_kw.update({'discover_metadata': not synchronous_metadata_discovery})
# With extra_document_kw you can pass properties
# used to create a new document in ERP5, like filename
document_kw.update(extra_document_kw)
if url is not None:
# we contribute and URL, this happens entirely asynchronous
document = portal_contributions.newContentFromURL(url = url, \
......
......@@ -50,7 +50,7 @@
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>file=None, url=None, portal_type=None, classification=None, synchronous_metadata_discovery=None, redirect_to_document=None, attach_document_to_context=False, use_context_for_container=False, redirect_url=None, redirect_to_context=False, cancel_url=None, batch_mode=False, max_repeat=0, editable_mode = 1, follow_up_list=None, user_login=None, group=None, publication_section=None, **kw</string> </value>
<value> <string>file=None, url=None, portal_type=None, classification=None, synchronous_metadata_discovery=None, redirect_to_document=None, attach_document_to_context=False, use_context_for_container=False, redirect_url=None, redirect_to_context=False, cancel_url=None, batch_mode=False, max_repeat=0, editable_mode = 1, follow_up_list=None, user_login=None, group=None, publication_section=None, extra_document_kw={}, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
......
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