Commit cd9cb478 authored by Jérome Perrin's avatar Jérome Perrin

allow deletion of accounting transactions in DevelopmentMode (this "feature"

will probably go away, because now deletion can be managed by workflow)



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@12086 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent debb359d
......@@ -26,7 +26,8 @@
#
##############################################################################
from Globals import InitializeClass, PersistentMapping
from Globals import InitializeClass
from Globals import DevelopmentMode
from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet, Constraint, Interface
from Products.CMFCore.utils import getToolByName
......@@ -70,7 +71,8 @@ class AccountingTransaction(Delivery):
Accounting transactions can only be deleted
in draft or cancelled state
"""
if self.getSimulationState() not in ("draft", "cancelled") :
if not DevelopmentMode:
if self.getSimulationState() not in ("draft", "cancelled"):
from OFS.ObjectManager import BeforeDeleteException
raise BeforeDeleteException, \
"%s can only be deleted in draft or cancelled states." % self.getPortalType()
......
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