Change the methods to new API of id tool

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@34549 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ed95477a
No related merge requests found
......@@ -303,7 +303,7 @@ class Alarm(XMLObject, PeriodicityMixin):
# later when creating an active process for example
# We do some inspection to keep compatibility
# (because fixit and tag were not set previously)
tag = str(self.portal_ids.generateNewLengthId(id_group=self.getId()))
tag = str(self.portal_ids.generateNewId(id_generator='uid', id_group=self.getId()))
method = getattr(self, method_id)
func_code = method.func_code
try:
......
......@@ -136,7 +136,7 @@ class BPMBuilder(Alarm):
# able to notify the user after all processes are ended
# Tag is generated from portal_ids so that it can be retrieved
# later when creating an active process for example
tag = str(self.portal_ids.generateNewLengthId(id_group=self.getId()))
tag = str(self.portal_ids.generateNewId(id_generator='uid', id_group=self.getId()))
self.activate(tag=tag).build(tag=tag)
if self.isAlarmNotificationMode():
......
......@@ -2092,13 +2092,7 @@ class TestTransactions(AccountingTestCase):
"""
def _resetIdGenerator(self):
# clear all existing ids in portal ids
if hasattr(self.portal.portal_ids, 'dict_ids'):
self.portal.portal_ids.dict_ids.clear()
if hasattr(self.portal.portal_ids, 'dict_length_ids'):
self.portal.portal_ids.dict_length_ids.clear()
self.portal.erp5_sql_transactionless_connection.manage_test(
"""DELETE FROM portal_ids WHERE id_group LIKE '%accounting%'""")
self.portal.portal_catalog.getSQLCatalog().z_portal_ids_commit()
self.portal.portal_ids.clearGenerator(all=True)
def test_SourceDestinationReference(self):
# Check that source reference and destination reference are filled
......
......@@ -393,7 +393,7 @@ class TestAdvancedSaleInvoice(TestAdvancedInvoice):
def afterSetUp(self):
super(TestAdvancedSaleInvoice, self).afterSetUp()
self.portal.portal_ids.setLastGeneratedId(0, id_group='Accounting_Transaction_Module-Sale_Invoice_Transaction')
self.portal.portal_ids.clearGenerator(all=True)
def stepCheckInvoicesAndTransactionsConsistency(self, sequence=None, sequence_list=None,
**kw):
......
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