Commit 4cc52f62 authored by Jérome Perrin's avatar Jérome Perrin

When we delete an order, the related applied rules are deleted in activities

using SQLDict, so only the first one is deleted, also it can create problems
if we delete the applied rule before the activity is executed (which usually
happens in tests teardown); Anyway users never delete orders directly, so
there's no need to use activities here. Delete the related applied rules
synchronously instead.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@22887 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 07684c8a
......@@ -131,7 +131,7 @@ class Order(Delivery):
Delete related Applied Rule
"""
for o in self.getCausalityRelatedValueList(portal_type='Applied Rule'):
o.getParentValue().activate().deleteContent(o.getId())
o.getParentValue().deleteContent(o.getId())
Delivery.manage_beforeDelete(self, item, container)
##########################################################################
......
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