Commit b1444e66 authored by Vincent Pelletier's avatar Vincent Pelletier

erp5_core: Drop unused script

This is not used anywhere, and actually cannot be reused anywhere because
of hard-coded document identifiers.
It is too trivial to be worth salvaging, so drop it.
parent e167ed2a
# this script is intended to repair errors.
# Let's say you use 2 objects, but this is the same one duplicated.
# So you want to keep only one object, so you have to remove
# all links to this old object and set the link on the new object.
from_object = context.organisation['314']
to_object = context.person['121']
from_object_related_object_list = context.portal_categories.getRelatedValueList(from_object)
for object in from_object_related_object_list:
print object.getDestinationSection()
object.setDestinationSectionValue(to_object)
object.recursiveImmediateReindexObject()
return printed
<?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>Base_exchangeRelatedObject</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
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