Commit 69995ba0 authored by Yoshinori Okuji's avatar Yoshinori Okuji

Use setDefaultActivateParameters instead of _v_activate_kw.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13760 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 104fcc37
......@@ -78,7 +78,7 @@ class SplitAndDefer(CopyToTarget):
new_movement.activate(**self.additional_parameters).expand()
# adopt new quantity on original simulation movement
simulation_movement.edit(quantity=new_movement_quantity)
simulation_movement._v_activate_kw = self.activate_kw
simulation_movement.setDefaultActivateParameters(**self.activate_kw)
simulation_movement.activate(**self.additional_parameters).expand()
# SplitAndDefer solves the divergence at the current level, no need to
......
......@@ -67,7 +67,7 @@ class SplitQuantity(CopyToTarget):
activate_kw = self.activate_kw,
**self.additional_parameters
)
simulation_movement._v_activate_kw = self.activate_kw
simulation_movement.setDefaultActivateParameters(**self.activate_kw)
simulation_movement.edit (
quantity = (simulation_movement.getQuantity() - self.quantity)
* simulation_movement.getDeliveryRatio()
......
......@@ -121,18 +121,17 @@ class CopyContainer:
if changed != 0:
object.setCategoryList(category_list)
def _recursiveSetActivityAfterTag(self,object):
def _recursiveSetActivityAfterTag(self, obj):
"""
Make sure to set an after tag on each object
so that it is possible to unindex before doing
indexing, this prevent uid changes
"""
uid = getattr(aq_base(object),'uid',None)
uid = getattr(aq_base(obj), 'uid', None)
if uid is not None:
activate_kw = {'after_tag': '%s' % uid}
object._v_activate_kw = activate_kw
for sub_object in object.objectValues():
self._recursiveSetActivityAfterTag(sub_object)
obj.setDefaultActivateParameters(after_tag = str(uid))
for sub_obj in obj.objectValues():
self._recursiveSetActivityAfterTag(sub_obj)
security.declareProtected( Permissions.ModifyPortalContent, 'manage_renameObject' )
def manage_renameObject(self, id=None, new_id=None, REQUEST=None):
......
......@@ -333,7 +333,7 @@ class DocumentConstructor(Method):
activate_kw=None, is_indexable=None, **kw):
o = self.klass(id)
if activate_kw is not None:
o._v_activate_kw = activate_kw
o.setDefaultActivateParameters(**activate_kw)
if is_indexable is not None:
o.isIndexable = is_indexable
folder._setObject(id, o)
......
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