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

remove some unused methods; especially the one that was overloading

manage_beforeDelete on a document without calling manage_beforeDelete on the
parent. Note that such an error will make that the document is *not* removed
from catalog when it's deleted from the ZODB. I added an entry in the coding
crime wiki page for this.




git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@11057 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6b1e5fe8
......@@ -190,35 +190,9 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase):
"hd_size/120Go",
)
def rollbackTest(self) :
""" delete everything created by the test (for 'live debugin')"""
portal = self.getPortal()
from Products.ERP5.Document.AccountingTransaction \
import AccountingTransaction
self.tic()
old_manage_beforeDelete = AccountingTransaction.manage_beforeDelete
AccountingTransaction.manage_beforeDelete = lambda x, y, z: 1
self.getAccountModule().deleteContent(
list(self.getAccountModule().objectIds()))
self.getAccountingModule().deleteContent(
list(self.getAccountingModule().objectIds()))
self.getOrganisationModule().deleteContent(
list(self.getOrganisationModule().objectIds()))
self.getCurrencyModule().deleteContent(
list(self.getCurrencyModule().objectIds()))
self.getProductModule().deleteContent(
list(self.getProductModule().objectIds()))
self.getSimulationTool().deleteContent(
list(self.getSimulationTool().objectIds()))
AccountingTransaction.manage_beforeDelete = old_manage_beforeDelete
self.tic()
def stepTic(self, **kw):
self.tic()
def stepCommitTransaction(self, **kw):
get_transaction().commit()
def stepCreateSaleInvoiceTransactionRule(self, sequence, **kw) :
"""
Create some predicates in the Invoice Transaction Rule
......
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