Commit 0e251aba authored by Nicolas Wavrant's avatar Nicolas Wavrant

erp5_interface_post: do not slow down email sending

parent 56cd24a5
# Script called whenever an interface post becomes exportable.
# It just calls in activity a script in which all the action happens.
# The main purpose of adding this script as overhead is to allow easy
# customization of the export behavior.
# Ie: sending mode/interface depends of the portal type. Or project wants
# to send it by bunches using alarm. Or ...
# Priority 2 is just enough to be executed after the immediateReindexObject
context.activate(priority=2).InterfacePost_disallowExportOfSameInterfacePostListAndExport()
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>InterfacePost_afterAllowExport</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
post = state_change['object'] state_change['object'].activate().InterfacePost_afterAllowExport()
# Priority 2 is just enough to be executed after the immediateReindexObject
post.activate(serialization_tag='export_interface_post',
priority=2) \
.InterfacePost_disallowExportOfSameInterfacePostListAndExport()
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